From 4e831f7db9acab7b20168c480d2ed18426eff052 Mon Sep 17 00:00:00 2001 From: "Kim, Sungchul" Date: Thu, 27 Jun 2024 14:15:02 +0900 Subject: [PATCH] Add forcing `num_workers` to 0 --- src/otx/core/model/visual_prompting.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/otx/core/model/visual_prompting.py b/src/otx/core/model/visual_prompting.py index 9dc6416fd01..2ecdfcd9d7a 100644 --- a/src/otx/core/model/visual_prompting.py +++ b/src/otx/core/model/visual_prompting.py @@ -646,6 +646,11 @@ def transform_fn( prompt_for_optim.update(**image_embeddings) return prompt_for_optim + # ticket no. : CVS-135462 + # There is segmentation fault issue when using num_workers > 0 during releasing memory. + # To avoid this issue, force num_workers to 0. + data_module.config.train_subset.num_workers = 0 + output_model_paths: dict[str, Path] = {} for module in ["image_encoder", "decoder"]: output_model_path = output_dir / (self._OPTIMIZED_MODEL_BASE_NAME + f"_{module}.xml")