Skip to content

Commit

Permalink
handle artifacts when path is dir (#6658)
Browse files Browse the repository at this point in the history
Signed-off-by: arendu <[email protected]>
  • Loading branch information
arendu committed May 16, 2023
1 parent 90156b1 commit cfff834
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion nemo/core/connectors/save_restore_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,10 @@ def _handle_artifacts(self, model, nemo_file_folder):
# unpack all restorations paths (nemo checkpoints)
# in nemo checkpoints all resources contain hash in name, so there should be no collisions
for path in restoration_paths:
self._unpack_nemo_file(path2file=path, out_folder=archive_dir)
if self.model_extracted_dir:
shutil.copytree(src=path, dst=archive_dir, dirs_exist_ok=True)
else:
self._unpack_nemo_file(path2file=path, out_folder=archive_dir)
os.chdir(archive_dir)
for conf_path, artiitem in tarfile_artifacts:
# Get basename and copy it to nemo_file_folder
Expand Down

0 comments on commit cfff834

Please sign in to comment.