From ba875e16590aa89e18fed3f43ee1825599965ceb Mon Sep 17 00:00:00 2001 From: "Kim, Sungchul" Date: Fri, 28 Jun 2024 09:24:26 +0900 Subject: [PATCH] Fix segmentation fault on VPM PTQ to develop (#3690) 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")