Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Temporarily disable the autocast test for fasterrcnn_resnet50_fpn #6660

Merged
merged 4 commits into from
Sep 28, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Revert "Bump tol for autocasted fasterrcnn_resnet50_fpn (#6601)"
This reverts commit a4f5330.
  • Loading branch information
datumbox committed Sep 28, 2022
commit f3f9f8a2338be060b46a5ad535952845ca77896a
7 changes: 3 additions & 4 deletions test/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,6 @@ def _check_input_backprop(model, inputs):
"keypointrcnn_resnet50_fpn",
)

autocast_custom_prec = {"fasterrcnn_resnet50_fpn": 0.012} if platform.system() == "Windows" else {}

# The tests for the following quantized models are flaky possibly due to inconsistent
# rounding errors in different platforms. For this reason the input/output consistency
# tests under test_quantized_classification_model will be skipped for the following models.
Expand Down Expand Up @@ -741,7 +739,7 @@ def test_detection_model(model_fn, dev):
out = model(model_input)
assert model_input[0] is x

def check_out(out, prec=0.01):
def check_out(out):
assert len(out) == 1

def compact(tensor):
Expand Down Expand Up @@ -770,6 +768,7 @@ def compute_mean_std(tensor):
return {"mean": mean, "std": std}

output = map_nested_tensor_object(out, tensor_map_fn=compact)
prec = 0.01
try:
# We first try to assert the entire output if possible. This is not
# only the best way to assert results but also handles the cases
Expand Down Expand Up @@ -802,7 +801,7 @@ def compute_mean_std(tensor):
out = model(model_input)
# See autocast_flaky_numerics comment at top of file.
if model_name not in autocast_flaky_numerics:
full_validation &= check_out(out, autocast_custom_prec.get(model_name, 0.01))
full_validation &= check_out(out)

if not full_validation:
msg = (
Expand Down