Skip to content

Commit e955e0c

Browse files
committed
disable strict
1 parent 803eb06 commit e955e0c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

dpdispatcher/machine.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from dpdispatcher.ssh_context import SSHSession
44
import json
55
from dargs import Argument, Variant
6-
from typing import List
6+
from typing import List, Union
77
import pathlib
88
from dpdispatcher import dlog
99
from dpdispatcher.base_context import BaseContext
@@ -333,7 +333,7 @@ def arginfo(cls):
333333
machine_args = [
334334
Argument("batch_type", str, optional=False, doc=doc_batch_type),
335335
# TODO: add default to local_root and remote_root after refactor the code
336-
Argument("local_root", str, optional=False, doc=doc_local_root),
336+
Argument("local_root", [str, None], optional=False, doc=doc_local_root),
337337
Argument("remote_root", str, optional=True, doc=doc_remote_root),
338338
Argument("clean_asynchronously", bool, optional=True, default=False, doc=doc_clean_asynchronously),
339339
]

dpdispatcher/submission.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ def load_from_dict(cls, task_dict: dict) -> "Task":
449449
# check dict
450450
base = cls.arginfo()
451451
task_dict = base.normalize_value(task_dict, trim_pattern="_*")
452-
base.check_value(task_dict, strict=True)
452+
base.check_value(task_dict, strict=False)
453453

454454
task = cls.deserialize(task_dict=task_dict)
455455
return task
@@ -809,7 +809,7 @@ def load_from_dict(cls, resources_dict):
809809
# check dict
810810
base = cls.arginfo(detail_kwargs='batch_type' in resources_dict)
811811
resources_dict = base.normalize_value(resources_dict, trim_pattern="_*")
812-
base.check_value(resources_dict, strict=True)
812+
base.check_value(resources_dict, strict=False)
813813

814814
return cls.deserialize(resources_dict=resources_dict)
815815

0 commit comments

Comments
 (0)