Unverified Commit c2ca691d authored by Vasilis Vryniotis's avatar Vasilis Vryniotis Committed by GitHub
Browse files

Temporarily disable the autocast test for `fasterrcnn_resnet50_fpn` (#6660)

* Revert "Bump tol for autocasted `fasterrcnn_resnet50_fpn` (#6601)"

This reverts commit a4f53308.

* Temporarily remove FasterRCNN autocast test
parent 7b8a6db7
...@@ -231,10 +231,9 @@ autocast_flaky_numerics = ( ...@@ -231,10 +231,9 @@ autocast_flaky_numerics = (
"maskrcnn_resnet50_fpn", "maskrcnn_resnet50_fpn",
"maskrcnn_resnet50_fpn_v2", "maskrcnn_resnet50_fpn_v2",
"keypointrcnn_resnet50_fpn", "keypointrcnn_resnet50_fpn",
"fasterrcnn_resnet50_fpn", # See: https://github.com/pytorch/vision/issues/6655
) )
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 # 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 # 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. # tests under test_quantized_classification_model will be skipped for the following models.
...@@ -741,7 +740,7 @@ def test_detection_model(model_fn, dev): ...@@ -741,7 +740,7 @@ def test_detection_model(model_fn, dev):
out = model(model_input) out = model(model_input)
assert model_input[0] is x assert model_input[0] is x
def check_out(out, prec=0.01): def check_out(out):
assert len(out) == 1 assert len(out) == 1
def compact(tensor): def compact(tensor):
...@@ -770,6 +769,7 @@ def test_detection_model(model_fn, dev): ...@@ -770,6 +769,7 @@ def test_detection_model(model_fn, dev):
return {"mean": mean, "std": std} return {"mean": mean, "std": std}
output = map_nested_tensor_object(out, tensor_map_fn=compact) output = map_nested_tensor_object(out, tensor_map_fn=compact)
prec = 0.01
try: try:
# We first try to assert the entire output if possible. This is not # 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 # only the best way to assert results but also handles the cases
...@@ -802,7 +802,7 @@ def test_detection_model(model_fn, dev): ...@@ -802,7 +802,7 @@ def test_detection_model(model_fn, dev):
out = model(model_input) out = model(model_input)
# See autocast_flaky_numerics comment at top of file. # See autocast_flaky_numerics comment at top of file.
if model_name not in autocast_flaky_numerics: 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: if not full_validation:
msg = ( msg = (
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment