Skip to content

Commit 749e28a

Browse files
authored
breaking: remove old dispatcher (#1097)
Remove the old dispatcher and all related tests and examples. Fix #1002. Close #522. Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
1 parent 06bd270 commit 749e28a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+38
-8728
lines changed

dpgen/arginfo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def general_mdata_arginfo(name: str, tasks: Tuple[str]) -> Argument:
2424
doc_api_version = "Please set to 1.0"
2525
doc_deepmd_version = "DeePMD-kit version, e.g. 2.1.3"
2626
doc_run_mdata = "machine.json file"
27-
arg_api_version = Argument("api_version", str, optional=False, doc=doc_api_version)
27+
arg_api_version = Argument("api_version", str, default="1.0", optional=True, doc=doc_api_version)
2828
arg_deepmd_version = Argument(
2929
"deepmd_version", str, optional=True, default="2", doc=doc_deepmd_version)
3030

dpgen/auto_test/common_equi.py

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
from dpgen import dlog
1212
from dpgen.auto_test.calculator import make_calculator
1313
from dpgen.auto_test.mpdb import get_structure
14-
from dpgen.dispatcher.Dispatcher import make_dispatcher
1514
from packaging.version import Version
1615
from dpgen.dispatcher.Dispatcher import make_submission
1716
from dpgen.remote.decide_machine import convert_mdata
@@ -176,21 +175,9 @@ def run_equi(confs,
176175
work_path = os.getcwd()
177176
print("%s --> Runing... " % (work_path))
178177

179-
api_version = mdata.get('api_version', '0.9')
178+
api_version = mdata.get('api_version', '1.0')
180179
if Version(api_version) < Version('1.0'):
181-
warnings.warn(f"the dpdispatcher will be updated to new version."
182-
f"And the interface may be changed. Please check the documents for more details")
183-
disp = make_dispatcher(machine, resources, work_path, run_tasks, group_size)
184-
disp.run_jobs(resources,
185-
command,
186-
work_path,
187-
run_tasks,
188-
group_size,
189-
forward_common_files,
190-
forward_files,
191-
backward_files,
192-
outlog='outlog',
193-
errlog='errlog')
180+
raise RuntimeError("API version %s has been removed. Please upgrade to 1.0." % api_version)
194181
elif Version(api_version) >= Version('1.0'):
195182

196183
submission = make_submission(

dpgen/auto_test/common_prop.py

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
from dpgen.auto_test.Vacancy import Vacancy
1414
from dpgen.auto_test.Gamma import Gamma
1515
from dpgen.auto_test.calculator import make_calculator
16-
from dpgen.dispatcher.Dispatcher import make_dispatcher
1716
from dpgen.dispatcher.Dispatcher import make_submission
1817
from dpgen.remote.decide_machine import convert_mdata
1918
from dpgen.auto_test.lib.utils import create_path
@@ -190,21 +189,9 @@ def worker(work_path,
190189
inter_type):
191190
run_tasks = [os.path.basename(ii) for ii in all_task]
192191
machine, resources, command, group_size = util.get_machine_info(mdata, inter_type)
193-
api_version = mdata.get('api_version', '0.9')
192+
api_version = mdata.get('api_version', '1.0')
194193
if Version(api_version) < Version('1.0'):
195-
warnings.warn(f"the dpdispatcher will be updated to new version."
196-
f"And the interface may be changed. Please check the documents for more details")
197-
disp = make_dispatcher(machine, resources, work_path, run_tasks, group_size)
198-
disp.run_jobs(resources,
199-
command,
200-
work_path,
201-
run_tasks,
202-
group_size,
203-
forward_common_files,
204-
forward_files,
205-
backward_files,
206-
outlog='outlog',
207-
errlog='errlog')
194+
raise RuntimeError("API version %s has been removed. Please upgrade to 1.0." % api_version)
208195
elif Version(api_version) >= Version('1.0'):
209196
submission = make_submission(
210197
mdata_machine=machine,

dpgen/auto_test/lib/BatchJob.py

Lines changed: 0 additions & 81 deletions
This file was deleted.

0 commit comments

Comments
 (0)