Skip to content

Commit

Permalink
fix: ut
Browse files Browse the repository at this point in the history
  • Loading branch information
wangzyphysics committed May 28, 2024
1 parent fa3558c commit 0628717
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 6 additions & 4 deletions dpgen2/superop/prep_run_calypso.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,11 +179,11 @@ def _prep_run_caly(

temp_value = None
if expl_mode == "default":
caly_evo_step_executor = prep_executor
caly_evo_step_config = prep_config
caly_evo_step_executor = prep_executor
elif expl_mode == "merge":
caly_evo_step_executor = run_executor
caly_evo_step_config = run_config
caly_evo_step_executor = run_executor
else:
raise NotImplementedError(f"Unknown expl mode `{expl_mode}`")

Expand Down Expand Up @@ -230,7 +230,8 @@ def _prep_run_caly(
"qhull_input": temp_value,
},
key=step_keys["caly-evo-step-{{item}}"],
executor=caly_evo_step_executor,
with_param=argo_range(prep_caly_input.outputs.parameters["ntasks"]),

Check failure on line 233 in dpgen2/superop/prep_run_calypso.py

View workflow job for this annotation

GitHub Actions / pyright

Argument of type "ArgoVar" cannot be assigned to parameter "with_param" of type "str | list[Unknown] | InputParameter | OutputParameter" in function "__init__"   Type "ArgoVar" cannot be assigned to type "str | list[Unknown] | InputParameter | OutputParameter"     "ArgoVar" is incompatible with "str"     "ArgoVar" is incompatible with "list[Unknown]"     "ArgoVar" is incompatible with "InputParameter"     "ArgoVar" is incompatible with "OutputParameter" (reportGeneralTypeIssues)
# executor=caly_evo_step_executor,
**caly_evo_step_config,
)
prep_run_caly_steps.add(caly_evo_step)
Expand Down Expand Up @@ -273,7 +274,8 @@ def _prep_run_caly(
"qhull_input": temp_value,
},
key=step_keys["caly-evo-step-{{item}}"],
executor=caly_evo_step_executor,
with_param=argo_range(prep_caly_input.outputs.parameters["ntasks"]),

Check failure on line 277 in dpgen2/superop/prep_run_calypso.py

View workflow job for this annotation

GitHub Actions / pyright

Argument of type "ArgoVar" cannot be assigned to parameter "with_param" of type "str | list[Unknown] | InputParameter | OutputParameter" in function "__init__"   Type "ArgoVar" cannot be assigned to type "str | list[Unknown] | InputParameter | OutputParameter"     "ArgoVar" is incompatible with "str"     "ArgoVar" is incompatible with "list[Unknown]"     "ArgoVar" is incompatible with "InputParameter"     "ArgoVar" is incompatible with "OutputParameter" (reportGeneralTypeIssues)
# executor=caly_evo_step_executor,
**caly_evo_step_config,
)
prep_run_caly_steps.add(caly_evo_step)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_prep_run_caly.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def test_caly_evo_step_merge_merge_mode(self):
run_dp_optim=MockedRunCalyDPOptim,
prep_config=prep_default_config,
run_config=run_default_config,
upload_python_packages=upload_python_packages,
upload_python_packages=None,
)
prep_run_caly_op = PrepRunCaly(
"prep-run-calypso",
Expand Down

0 comments on commit 0628717

Please sign in to comment.