Skip to content

Commit

Permalink
fix: continue_on_num_success/continue_on_success_ratio key error (#226)
Browse files Browse the repository at this point in the history
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Refactor**
- Improved configuration handling for better performance and
maintainability.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
  • Loading branch information
wangzyphysics authored Jun 3, 2024
1 parent fa4c0db commit 60c8f94
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions dpgen2/superop/caly_evo_step.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,9 @@ def _caly_evo_step(
run_executor_config = run_config.pop("executor")
template_slice_config = run_config.pop("template_slice_config", {})
expl_mode = caly_evo_step_steps.expl_mode
no_slice_run_config = deepcopy(run_config)
no_slice_run_config.pop("continue_on_num_success", None)
no_slice_run_config.pop("continue_on_success_ratio", None)

def wise_executor(expl_mode, origin_executor_config):
if expl_mode == "default":
Expand Down Expand Up @@ -185,7 +188,7 @@ def wise_executor(expl_mode, origin_executor_config):
caly_evo_step_steps.inputs.parameters["cnt_num"],
),
executor=wise_executor(expl_mode, prep_executor_config),
**run_config,
**no_slice_run_config,
)
caly_evo_step_steps.add(collect_run_calypso)

Expand Down Expand Up @@ -219,7 +222,7 @@ def wise_executor(expl_mode, origin_executor_config):
caly_evo_step_steps.inputs.parameters["cnt_num"],
),
executor=wise_executor(expl_mode, prep_executor_config),
**run_config,
**no_slice_run_config,
)
caly_evo_step_steps.add(prep_dp_optim)

Expand Down

0 comments on commit 60c8f94

Please sign in to comment.