From dd89f1ee709c4e532ea798d62cad96e51c72c576 Mon Sep 17 00:00:00 2001 From: Ashwin Vaidya Date: Tue, 17 May 2022 17:46:18 +0200 Subject: [PATCH] Increase tolerance + nightly path fix (#318) Co-authored-by: Ashwin Vaidya --- tests/nightly/models/test_model_nightly.py | 4 ++-- tests/nightly/tools/benchmarking/test_benchmarking.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/nightly/models/test_model_nightly.py b/tests/nightly/models/test_model_nightly.py index fa1dca341e..ef45517d7d 100644 --- a/tests/nightly/models/test_model_nightly.py +++ b/tests/nightly/models/test_model_nightly.py @@ -91,7 +91,7 @@ def _test_metrics(self, trainer, config, model, datamodule): if "optimization" in config.keys() and "nncf" in config.optimization.keys() and config.optimization.nncf.apply: threshold = threshold.nncf if not ( - np.isclose(results["image_AUROC"], threshold["image_AUROC"], rtol=0.02) + np.isclose(results["image_AUROC"], threshold["image_AUROC"], rtol=0.05) or (results["image_AUROC"] >= threshold["image_AUROC"]) ): raise AssertionError( @@ -100,7 +100,7 @@ def _test_metrics(self, trainer, config, model, datamodule): if config.dataset.task == "segmentation": if not ( - np.isclose(results["pixel_AUROC"], threshold["pixel_AUROC"], rtol=0.02) + np.isclose(results["pixel_AUROC"], threshold["pixel_AUROC"], rtol=0.05) or (results["pixel_AUROC"] >= threshold["pixel_AUROC"]) ): raise AssertionError( diff --git a/tests/nightly/tools/benchmarking/test_benchmarking.py b/tests/nightly/tools/benchmarking/test_benchmarking.py index 62d12e64ba..db8804e0c6 100644 --- a/tests/nightly/tools/benchmarking/test_benchmarking.py +++ b/tests/nightly/tools/benchmarking/test_benchmarking.py @@ -51,7 +51,7 @@ def check_csv(model: str): def test_benchmarking(): """Test if benchmarking script produces the required artifacts.""" - config_path = "tests/pre_merge/tools/benchmarking/benchmark_params.yaml" + config_path = "tests/nightly/tools/benchmarking/benchmark_params.yaml" test_config = OmegaConf.load(config_path) test_config.grid_search.dataset["path"] = [get_dataset_path()]