Skip to content

Commit e1ae97f

Browse files
authored
Merge pull request #206 from felix5572/master
add field abs_work_base to avoid submission hash conflict
2 parents be02afa + 9d30808 commit e1ae97f

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

dpdispatcher/submission.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
# %%
3-
import time,random,uuid,json,copy
3+
import time,random,uuid,json,copy,os
44
from dargs.dargs import Argument, Variant
55
from dpdispatcher.JobStatus import JobStatus
66
from dpdispatcher import dlog
@@ -43,6 +43,8 @@ def __init__(self,
4343
# self.submission_list = submission_list
4444
self.local_root = None
4545
self.work_base = work_base
46+
self._abs_work_base = os.path.abspath(work_base)
47+
4648
self.resources = resources
4749
self.forward_common_files= forward_common_files
4850
self.backward_common_files = backward_common_files
@@ -114,6 +116,7 @@ def serialize(self, if_static=False):
114116
# submission_dict['local_root'] = self.local_root
115117

116118
submission_dict['work_base'] = self.work_base
119+
submission_dict['_abs_work_base'] = self._abs_work_base
117120
machine = getattr(self, 'machine', None)
118121
if machine is None:
119122
submission_dict['machine'] = {}

tests/devel_test_ali_ehpc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
# pbs = SampleClass.get_sample_pbs_local_context()
2929
# slurm = SampleClass.get_sample_slurm_local_context()
3030

31-
with open('jsons/compute_ali_ehpc.json', 'r') as f:
31+
with open('jsons/machine_ali_ehpc.json', 'r') as f:
3232
compute_dict = json.load(f)
3333

3434
machine = Machine.load_from_dict(compute_dict['machine'])

tests/jsons/machine_ali_ehpc.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@
33
"batch_type": "PBS",
44
"context_type": "SSHContext",
55
"local_root": "./test_context_dir",
6-
"remote_root": "/home/fengbo/work_path_dpdispatcher_test",
6+
"remote_root": "/home/yuanfengbo/work_path_dpdispatcher_test",
77
"remote_profile": {
8-
"hostname": "39.106.84.25",
9-
"username": "fengbo"
8+
"hostname": "39.103.186.143",
9+
"username": "yuanfengbo"
1010
}
1111
},
1212
"resources":{
1313
"number_node": 1,
14-
"cpu_per_node": 4,
14+
"cpu_per_node": 8,
1515
"gpu_per_node": 1,
16-
"queue_name": "T4_4_15",
16+
"queue_name": "V100_8_32",
1717
"group_size": 5
1818
}
1919
}

0 commit comments

Comments
 (0)