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

symlink model.ckpt.* to relative paths #2720

Merged
merged 3 commits into from
Aug 7, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion deepmd/train/trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -832,7 +832,7 @@
pass
if platform.system() != "Windows":
# by default one does not have access to create symlink on Windows
os.symlink(ori_ff, new_ff)
os.symlink(os.path.relpath(ori_ff, os.path.dirname(new_ff)), new_ff)

Check warning on line 835 in deepmd/train/trainer.py

View check run for this annotation

Codecov / codecov/patch

deepmd/train/trainer.py#L835

Added line #L835 was not covered by tests
else:
shutil.copyfile(ori_ff, new_ff)
log.info("saved checkpoint %s" % self.save_ckpt)
Expand Down