Skip to content

Commit

Permalink
disable strict
Browse files Browse the repository at this point in the history
  • Loading branch information
felix5572 committed Jul 6, 2022
1 parent 803eb06 commit e955e0c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions dpdispatcher/machine.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from dpdispatcher.ssh_context import SSHSession
import json
from dargs import Argument, Variant
from typing import List
from typing import List, Union
import pathlib
from dpdispatcher import dlog
from dpdispatcher.base_context import BaseContext
Expand Down Expand Up @@ -333,7 +333,7 @@ def arginfo(cls):
machine_args = [
Argument("batch_type", str, optional=False, doc=doc_batch_type),
# TODO: add default to local_root and remote_root after refactor the code
Argument("local_root", str, optional=False, doc=doc_local_root),
Argument("local_root", [str, None], optional=False, doc=doc_local_root),
Argument("remote_root", str, optional=True, doc=doc_remote_root),
Argument("clean_asynchronously", bool, optional=True, default=False, doc=doc_clean_asynchronously),
]
Expand Down
4 changes: 2 additions & 2 deletions dpdispatcher/submission.py
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ def load_from_dict(cls, task_dict: dict) -> "Task":
# check dict
base = cls.arginfo()
task_dict = base.normalize_value(task_dict, trim_pattern="_*")
base.check_value(task_dict, strict=True)
base.check_value(task_dict, strict=False)

task = cls.deserialize(task_dict=task_dict)
return task
Expand Down Expand Up @@ -809,7 +809,7 @@ def load_from_dict(cls, resources_dict):
# check dict
base = cls.arginfo(detail_kwargs='batch_type' in resources_dict)
resources_dict = base.normalize_value(resources_dict, trim_pattern="_*")
base.check_value(resources_dict, strict=True)
base.check_value(resources_dict, strict=False)

return cls.deserialize(resources_dict=resources_dict)

Expand Down

0 comments on commit e955e0c

Please sign in to comment.