Skip to content

Commit

Permalink
fix calling function for the defualt value of argument.
Browse files Browse the repository at this point in the history
  • Loading branch information
Han Wang committed Aug 22, 2024
1 parent f69ad61 commit 740a91a
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 10 deletions.
6 changes: 4 additions & 2 deletions dpgen2/superop/prep_run_calypso.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,12 @@ def __init__(
prep_caly_model_devi_op: Type[OP],
run_caly_model_devi_op: Type[OP],
expl_mode: str = "default",
prep_config: dict = normalize_step_dict({}),
run_config: dict = normalize_step_dict({}),
prep_config: Optional[dict] = None,
run_config: Optional[dict] = None,
upload_python_packages: Optional[List[os.PathLike]] = None,
):
prep_config = normalize_step_dict({}) if prep_config is None else prep_config
run_config = normalize_step_dict({}) if run_config is None else run_config
self._input_parameters = {
"block_id": InputParameter(type=str, value=""),
"expl_task_grp": InputParameter(),
Expand Down
6 changes: 4 additions & 2 deletions dpgen2/superop/prep_run_diffcsp.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,12 @@ def __init__(
diffcsp_gen_op: Type[OP],
prep_relax_op: Type[OP],
run_relax_op: Type[OP],
prep_config: dict = normalize_step_dict({}),
run_config: dict = normalize_step_dict({}),
prep_config: Optional[dict] = None,
run_config: Optional[dict] = None,
upload_python_packages: Optional[List[os.PathLike]] = None,
):
prep_config = normalize_step_dict({}) if prep_config is None else prep_config
run_config = normalize_step_dict({}) if run_config is None else run_config
self._input_parameters = {
"block_id": InputParameter(type=str, value=""),
"expl_task_grp": InputParameter(),
Expand Down
6 changes: 4 additions & 2 deletions dpgen2/superop/prep_run_dp_train.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,14 @@ def __init__(
name: str,
prep_train_op: Type[OP],
run_train_op: Type[RunDPTrain],
prep_config: dict = normalize_step_dict({}),
run_config: dict = normalize_step_dict({}),
prep_config: Optional[dict] = None,
run_config: Optional[dict] = None,
upload_python_packages: Optional[List[os.PathLike]] = None,
valid_data: Optional[S3Artifact] = None,
optional_files: Optional[List[str]] = None,
):
prep_config = normalize_step_dict({}) if prep_config is None else prep_config
run_config = normalize_step_dict({}) if run_config is None else run_config
self._input_parameters = {
"block_id": InputParameter(type=str, value=""),
"numb_models": InputParameter(type=int),
Expand Down
6 changes: 4 additions & 2 deletions dpgen2/superop/prep_run_fp.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,12 @@ def __init__(
name: str,
prep_op: Type[OP],
run_op: Type[OP],
prep_config: dict = normalize_step_dict({}),
run_config: dict = normalize_step_dict({}),
prep_config: Optional[dict] = None,
run_config: Optional[dict] = None,
upload_python_packages: Optional[List[os.PathLike]] = None,
):
prep_config = normalize_step_dict({}) if prep_config is None else prep_config
run_config = normalize_step_dict({}) if run_config is None else run_config
self._input_parameters = {
"block_id": InputParameter(type=str, value=""),
"fp_config": InputParameter(),
Expand Down
6 changes: 4 additions & 2 deletions dpgen2/superop/prep_run_lmp.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,12 @@ def __init__(
name: str,
prep_op: Type[OP],
run_op: Type[OP],
prep_config: dict = normalize_step_dict({}),
run_config: dict = normalize_step_dict({}),
prep_config: Optional[dict] = None,
run_config: Optional[dict] = None,
upload_python_packages: Optional[List[os.PathLike]] = None,
):
prep_config = normalize_step_dict({}) if prep_config is None else prep_config
run_config = normalize_step_dict({}) if run_config is None else run_config
self._input_parameters = {
"block_id": InputParameter(type=str, value=""),
"explore_config": InputParameter(),
Expand Down

0 comments on commit 740a91a

Please sign in to comment.