diff --git a/src/super_gradients/common/environment/checkpoints_dir_utils.py b/src/super_gradients/common/environment/checkpoints_dir_utils.py index 5a136bdd37..00beb53149 100644 --- a/src/super_gradients/common/environment/checkpoints_dir_utils.py +++ b/src/super_gradients/common/environment/checkpoints_dir_utils.py @@ -108,6 +108,7 @@ def get_checkpoints_dir_path(experiment_name: str, ckpt_root_dir: Optional[str] """ experiment_dir = get_experiment_dir_path(checkpoints_root_dir=ckpt_root_dir, experiment_name=experiment_name) checkpoint_dir = experiment_dir if run_id is None else os.path.join(experiment_dir, run_id) + os.makedirs(checkpoint_dir, exist_ok=True) return checkpoint_dir diff --git a/src/super_gradients/common/sg_loggers/base_sg_logger.py b/src/super_gradients/common/sg_loggers/base_sg_logger.py index f38c7c1812..0ba5f47788 100644 --- a/src/super_gradients/common/sg_loggers/base_sg_logger.py +++ b/src/super_gradients/common/sg_loggers/base_sg_logger.py @@ -133,7 +133,7 @@ def _setup_dir(self): # Only if it exists, i.e. if hydra was used. if os.path.exists(source_hydra_path): destination_hydra_path = os.path.join(self._local_dir, ".hydra") - shutil.copytree(source_hydra_path, destination_hydra_path) + shutil.copytree(source_hydra_path, destination_hydra_path, dirs_exist_ok=True) @multi_process_safe def _init_log_file(self):