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

simplify: do not symlink if the file does not exist #1191

Merged
merged 3 commits into from
May 4, 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
19 changes: 11 additions & 8 deletions dpgen/simplify/simplify.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,14 +377,15 @@ def make_fp_labeled(iter_index, jdata):
work_path = os.path.join(iter_name, fp_name)
create_path(work_path)
picked_data_path = os.path.join(iter_name, model_devi_name, picked_data_name)
os.symlink(
os.path.abspath(picked_data_path),
os.path.abspath(os.path.join(work_path, "task." + fp_task_fmt % (0, 0))),
)
os.symlink(
os.path.abspath(picked_data_path),
os.path.abspath(os.path.join(work_path, "data." + data_system_fmt % 0)),
)
if os.path.exists(os.path.abspath(picked_data_path)):
os.symlink(
os.path.abspath(picked_data_path),
os.path.abspath(os.path.join(work_path, "task." + fp_task_fmt % (0, 0))),
)
os.symlink(
os.path.abspath(picked_data_path),
os.path.abspath(os.path.join(work_path, "data." + data_system_fmt % 0)),
)


def make_fp_configs(iter_index, jdata):
Expand All @@ -393,6 +394,8 @@ def make_fp_configs(iter_index, jdata):
work_path = os.path.join(iter_name, fp_name)
create_path(work_path)
picked_data_path = os.path.join(iter_name, model_devi_name, picked_data_name)
if not os.path.exists(os.path.abspath(picked_data_path)):
return
systems = get_multi_system(picked_data_path, jdata)
ii = 0
jj = 0
Expand Down