From 3168670dfdc788c9fdac6655f91ffb3c2dc95f7d Mon Sep 17 00:00:00 2001 From: Harim Kang Date: Wed, 9 Nov 2022 09:44:20 +0900 Subject: [PATCH 1/2] Fix some tests (#1322) --- ote_cli/ote_cli/utils/tests.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ote_cli/ote_cli/utils/tests.py b/ote_cli/ote_cli/utils/tests.py index 264d81dead4..cacd4c5cea2 100644 --- a/ote_cli/ote_cli/utils/tests.py +++ b/ote_cli/ote_cli/utils/tests.py @@ -213,7 +213,8 @@ def ote_eval_openvino_testing(template, root, ote_dir, args, threshold): for k in trained_performance.keys(): assert ( - abs(trained_performance[k] - exported_performance[k]) + exported_performance[k] > trained_performance[k] + or abs(trained_performance[k] - exported_performance[k]) / (trained_performance[k] + 1e-10) <= threshold ), f"{trained_performance[k]=}, {exported_performance[k]=}" @@ -520,7 +521,8 @@ def nncf_eval_testing(template, root, ote_dir, args, threshold): for k in trained_performance.keys(): assert ( - abs(trained_performance[k] - evaluated_performance[k]) + evaluated_performance[k] > trained_performance[k] + or abs(trained_performance[k] - evaluated_performance[k]) / (trained_performance[k] + 1e-10) <= threshold ), f"{trained_performance[k]=}, {evaluated_performance[k]=}" From 214401d1030e73816edead2625ce0b196cdca250 Mon Sep 17 00:00:00 2001 From: Jihwan Eom Date: Fri, 11 Nov 2022 11:14:22 +0900 Subject: [PATCH 2/2] [Develop] Move drop_last into MPA (#1357) * Move drop_last into MPA --- .../mpa_tasks/apis/classification/task.py | 8 -------- external/model-preparation-algorithm/submodule | 2 +- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/external/model-preparation-algorithm/mpa_tasks/apis/classification/task.py b/external/model-preparation-algorithm/mpa_tasks/apis/classification/task.py index 66972cf843c..88b288c69ef 100644 --- a/external/model-preparation-algorithm/mpa_tasks/apis/classification/task.py +++ b/external/model-preparation-algorithm/mpa_tasks/apis/classification/task.py @@ -368,17 +368,9 @@ def patch_color_conversion(pipeline): elif self._hierarchical: cfg.type = "MPAHierarchicalClsDataset" cfg.hierarchical_info = self._hierarchical_info - if subset == "train": - cfg.drop_last = True # For stable hierarchical information indexing else: cfg.type = "MPAClsDataset" - # In train dataset, when sample size is smaller than batch size - if subset == "train" and self._data_cfg: - train_data_cfg = Stage.get_data_cfg(self._data_cfg, "train") - if len(train_data_cfg.get("ote_dataset", [])) < self._recipe_cfg.data.get("samples_per_gpu", 2): - cfg.drop_last = False - cfg.domain = domain cfg.ote_dataset = None cfg.labels = None diff --git a/external/model-preparation-algorithm/submodule b/external/model-preparation-algorithm/submodule index 12861a91ed4..726f545bc3d 160000 --- a/external/model-preparation-algorithm/submodule +++ b/external/model-preparation-algorithm/submodule @@ -1 +1 @@ -Subproject commit 12861a91ed44be1879dccd07ffc9b5114e490705 +Subproject commit 726f545bc3d3d35172fd70a2b4f7c7546b04f52d