From f3f9f8a2338be060b46a5ad535952845ca77896a Mon Sep 17 00:00:00 2001 From: Vasilis Vryniotis Date: Wed, 28 Sep 2022 12:59:12 +0100 Subject: [PATCH 1/2] Revert "Bump tol for autocasted `fasterrcnn_resnet50_fpn` (#6601)" This reverts commit a4f53308b2d0f1aa9191686e326f45c26053f686. --- test/test_models.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/test/test_models.py b/test/test_models.py index 4ca9a5bbf1d..df9f2bb9355 100644 --- a/test/test_models.py +++ b/test/test_models.py @@ -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. @@ -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): @@ -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 @@ -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 = ( From 223408f52d01d51294aa88b82c710cc0a5bf9125 Mon Sep 17 00:00:00 2001 From: Vasilis Vryniotis Date: Wed, 28 Sep 2022 13:00:58 +0100 Subject: [PATCH 2/2] Temporarily remove FasterRCNN autocast test --- test/test_models.py | 1 + 1 file changed, 1 insertion(+) diff --git a/test/test_models.py b/test/test_models.py index df9f2bb9355..5d2b5565a9e 100644 --- a/test/test_models.py +++ b/test/test_models.py @@ -231,6 +231,7 @@ def _check_input_backprop(model, inputs): "maskrcnn_resnet50_fpn", "maskrcnn_resnet50_fpn_v2", "keypointrcnn_resnet50_fpn", + "fasterrcnn_resnet50_fpn", # See: https://github.com/pytorch/vision/issues/6655 ) # The tests for the following quantized models are flaky possibly due to inconsistent