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

throw error if training_iter0_model_path is not found #1391

Merged
merged 4 commits into from
Nov 7, 2023
Merged
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
5 changes: 4 additions & 1 deletion dpgen/generator/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,10 @@
% numb_models
)
for ii in range(len(iter0_models)):
old_model_files = glob.glob(os.path.join(iter0_models[ii], "model.ckpt*"))
old_model_path = os.path.join(iter0_models[ii], "model.ckpt*")
old_model_files = glob.glob(old_model_path)
if not len(old_model_files):
raise FileNotFoundError(f"{old_model_path} not found!")

Check warning on line 638 in dpgen/generator/run.py

View check run for this annotation

Codecov / codecov/patch

dpgen/generator/run.py#L635-L638

Added lines #L635 - L638 were not covered by tests
_link_old_models(work_path, old_model_files, ii)
copied_models = next(
(
Expand Down
Loading