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

breaking: remove old dispatcher #1097

Merged
merged 4 commits into from
Dec 31, 2022
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion dpgen/arginfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def general_mdata_arginfo(name: str, tasks: Tuple[str]) -> Argument:
doc_api_version = "Please set to 1.0"
doc_deepmd_version = "DeePMD-kit version, e.g. 2.1.3"
doc_run_mdata = "machine.json file"
arg_api_version = Argument("api_version", str, optional=False, doc=doc_api_version)
arg_api_version = Argument("api_version", str, default="1.0", optional=True, doc=doc_api_version)
arg_deepmd_version = Argument(
"deepmd_version", str, optional=True, default="2", doc=doc_deepmd_version)

Expand Down
17 changes: 2 additions & 15 deletions dpgen/auto_test/common_equi.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
from dpgen import dlog
from dpgen.auto_test.calculator import make_calculator
from dpgen.auto_test.mpdb import get_structure
from dpgen.dispatcher.Dispatcher import make_dispatcher
from packaging.version import Version
from dpgen.dispatcher.Dispatcher import make_submission
from dpgen.remote.decide_machine import convert_mdata
Expand Down Expand Up @@ -176,21 +175,9 @@ def run_equi(confs,
work_path = os.getcwd()
print("%s --> Runing... " % (work_path))

api_version = mdata.get('api_version', '0.9')
api_version = mdata.get('api_version', '1.0')
if Version(api_version) < Version('1.0'):
warnings.warn(f"the dpdispatcher will be updated to new version."
f"And the interface may be changed. Please check the documents for more details")
disp = make_dispatcher(machine, resources, work_path, run_tasks, group_size)
disp.run_jobs(resources,
command,
work_path,
run_tasks,
group_size,
forward_common_files,
forward_files,
backward_files,
outlog='outlog',
errlog='errlog')
raise RuntimeError("API version %s has been removed. Please upgrade to 1.0." % api_version)
elif Version(api_version) >= Version('1.0'):

submission = make_submission(
Expand Down
17 changes: 2 additions & 15 deletions dpgen/auto_test/common_prop.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
from dpgen.auto_test.Vacancy import Vacancy
from dpgen.auto_test.Gamma import Gamma
from dpgen.auto_test.calculator import make_calculator
from dpgen.dispatcher.Dispatcher import make_dispatcher
from dpgen.dispatcher.Dispatcher import make_submission
from dpgen.remote.decide_machine import convert_mdata
from dpgen.auto_test.lib.utils import create_path
Expand Down Expand Up @@ -190,21 +189,9 @@ def worker(work_path,
inter_type):
run_tasks = [os.path.basename(ii) for ii in all_task]
machine, resources, command, group_size = util.get_machine_info(mdata, inter_type)
api_version = mdata.get('api_version', '0.9')
api_version = mdata.get('api_version', '1.0')
if Version(api_version) < Version('1.0'):
warnings.warn(f"the dpdispatcher will be updated to new version."
f"And the interface may be changed. Please check the documents for more details")
disp = make_dispatcher(machine, resources, work_path, run_tasks, group_size)
disp.run_jobs(resources,
command,
work_path,
run_tasks,
group_size,
forward_common_files,
forward_files,
backward_files,
outlog='outlog',
errlog='errlog')
raise RuntimeError("API version %s has been removed. Please upgrade to 1.0." % api_version)
elif Version(api_version) >= Version('1.0'):
submission = make_submission(
mdata_machine=machine,
Expand Down
81 changes: 0 additions & 81 deletions dpgen/auto_test/lib/BatchJob.py

This file was deleted.

Loading