Skip to content

Commit

Permalink
Fix segmentation fault on VPM PTQ to develop (#3690)
Browse files Browse the repository at this point in the history
Add forcing `num_workers` to 0
  • Loading branch information
sungchul2 authored Jun 28, 2024
1 parent dd4d571 commit ba875e1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/otx/core/model/visual_prompting.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit ba875e1

Please sign in to comment.