Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix checkpoint loading with run_id #1403

Merged
merged 3 commits into from
Aug 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
2 changes: 1 addition & 1 deletion src/super_gradients/common/sg_loggers/base_sg_logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down