Skip to content

Commit

Permalink
make dir before save anomaly weight
Browse files Browse the repository at this point in the history
  • Loading branch information
eunwoosh committed Oct 27, 2022
1 parent fd16958 commit 4892b19
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ote_cli/ote_cli/utils/hpo.py
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,7 @@ def __init__(
if _is_anomaly_framework_task(task_type):
impl_class = get_impl_class(environment.model_template.entrypoints.base)
task = impl_class(task_environment=environment)
os.makedirs(self.work_dir, exist_ok=True)
torch.save(task.model_info(), osp.join(self.work_dir, "weights.pth"))
else:
save_model_data(environment.model, self.work_dir)
Expand Down

0 comments on commit 4892b19

Please sign in to comment.