Skip to content

Commit

Permalink
fix KeyError in init_reaction (#1352)
Browse files Browse the repository at this point in the history
Fix #1351.

The old code seems to be wrong. Since the old dispatcher has been
entirely removed, the code can be more simple.

Signed-off-by: Jinzhe Zeng <[email protected]>
  • Loading branch information
njzjz authored Oct 11, 2023
1 parent d1475f2 commit 329104d
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions dpgen/data/reaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,9 @@ def link_trj(jdata):

def run_build_dataset(jdata, mdata, log_file="build_log"):
work_path = build_path
# compatible with new dpdispatcher and old dpgen.dispatcher
build_ntasks = mdata["build_resources"].get(
"cpu_per_node", mdata["build_resources"]["task_per_node"]
)
fp_ntasks = mdata["fp_resources"].get(
"cpu_per_node", mdata["fp_resources"]["task_per_node"]
)
# only compatible with new dpdispatcher
build_ntasks = mdata["build_resources"]["cpu_per_node"]
fp_ntasks = mdata["fp_resources"]["cpu_per_node"]
build_command = '{cmd} -n {dataset_name} -a {type_map} -d {lammpstrj} -c {cutoff} -s {dataset_size} -k "{qmkeywords}" --nprocjob {nprocjob} --nproc {nproc}'.format(
cmd=mdata["build_command"],
type_map=" ".join(jdata["type_map"]),
Expand Down

0 comments on commit 329104d

Please sign in to comment.