From 861157a27b5e65f0cde710ee332d4aa55b2ddf45 Mon Sep 17 00:00:00 2001 From: Inhyuk Cho Date: Tue, 18 Apr 2023 16:00:11 +0900 Subject: [PATCH] Fix default dict (#2025) fix: change default to configdict Signed-off-by: Inhyuk Andy Cho --- otx/algorithms/common/tasks/nncf_task.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/otx/algorithms/common/tasks/nncf_task.py b/otx/algorithms/common/tasks/nncf_task.py index 3fcce753b55..e4d78f04f04 100644 --- a/otx/algorithms/common/tasks/nncf_task.py +++ b/otx/algorithms/common/tasks/nncf_task.py @@ -162,7 +162,7 @@ def _prepare_optimize(self): # last batch size of 1 causes undefined behaviour for batch normalization # when initializing and training NNCF if self._data_cfg is not None: - data_loader = self._recipe_cfg.data.get("train_dataloader", {}) + data_loader = self._recipe_cfg.data.get("train_dataloader", ConfigDict()) samples_per_gpu = data_loader.get("samples_per_gpu", self._recipe_cfg.data.get("samples_per_gpu")) otx_dataset = get_configs_by_keys(self._data_cfg.data.train, "otx_dataset") assert len(otx_dataset) == 1