From 4892b19d33dc5223f59113a107cd914bd6f4487b Mon Sep 17 00:00:00 2001 From: eunwoosh Date: Thu, 27 Oct 2022 14:22:28 +0900 Subject: [PATCH] make dir before save anomaly weight --- ote_cli/ote_cli/utils/hpo.py | 1 + 1 file changed, 1 insertion(+) diff --git a/ote_cli/ote_cli/utils/hpo.py b/ote_cli/ote_cli/utils/hpo.py index 3ee4ceb9ffa..4072507d290 100644 --- a/ote_cli/ote_cli/utils/hpo.py +++ b/ote_cli/ote_cli/utils/hpo.py @@ -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)