Skip to content

Commit 7aec091

Browse files
authored
will convert local_root's './' to abspath to avoid hash conflict in new dpdispatcher (#582)
1 parent 2fd6c7e commit 7aec091

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

dpgen/dispatcher/Dispatcher.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -346,11 +346,17 @@ def make_dispatcher(mdata, mdata_resource=None, work_path=None, run_tasks=None,
346346
def make_submission(mdata_machine, mdata_resources, commands, work_path, run_tasks, group_size,
347347
forward_common_files, forward_files, backward_files, outlog, errlog):
348348

349-
machine = Machine.load_from_dict(mdata_machine)
350-
resources = Resources.load_from_dict(mdata_resources)
351-
352349
if mdata_machine['local_root'] != './':
353350
raise RuntimeError(f"local_root must be './' in dpgen's machine.json.")
351+
352+
abs_local_root = os.path.abspath('./')
353+
354+
abs_mdata_machine = mdata_machine.copy()
355+
abs_mdata_machine['local_root'] = abs_local_root
356+
357+
machine = Machine.load_from_dict(abs_mdata_machine)
358+
resources = Resources.load_from_dict(mdata_resources)
359+
354360

355361
command = "&&".join(commands)
356362

0 commit comments

Comments
 (0)