diff --git a/dpgen2/superop/prep_run_calypso.py b/dpgen2/superop/prep_run_calypso.py index d8bc686a..daa48143 100644 --- a/dpgen2/superop/prep_run_calypso.py +++ b/dpgen2/superop/prep_run_calypso.py @@ -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(), diff --git a/dpgen2/superop/prep_run_diffcsp.py b/dpgen2/superop/prep_run_diffcsp.py index c7978e10..c4d3bd87 100644 --- a/dpgen2/superop/prep_run_diffcsp.py +++ b/dpgen2/superop/prep_run_diffcsp.py @@ -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(), diff --git a/dpgen2/superop/prep_run_dp_train.py b/dpgen2/superop/prep_run_dp_train.py index 006ff562..0fd988e4 100644 --- a/dpgen2/superop/prep_run_dp_train.py +++ b/dpgen2/superop/prep_run_dp_train.py @@ -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), diff --git a/dpgen2/superop/prep_run_fp.py b/dpgen2/superop/prep_run_fp.py index d8085ea3..6203e755 100644 --- a/dpgen2/superop/prep_run_fp.py +++ b/dpgen2/superop/prep_run_fp.py @@ -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(), diff --git a/dpgen2/superop/prep_run_lmp.py b/dpgen2/superop/prep_run_lmp.py index cc8e02c3..6b4de94a 100644 --- a/dpgen2/superop/prep_run_lmp.py +++ b/dpgen2/superop/prep_run_lmp.py @@ -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(),