PrepRunDiffCSP computes prep_config and run_config, pops template_config, executor and template_slice_config out of them, and then never spreads either dict into any of its three steps. Every remaining step-level setting is silently discarded for the whole DiffCSP exploration path.
At e45c147ed261d7c43b4b5bc9ada6e7d271e32c51, the configs are prepared here:
|
): |
|
prep_config = deepcopy(prep_config) |
|
run_config = deepcopy(run_config) |
|
prep_template_config = prep_config.pop("template_config") |
|
run_template_config = run_config.pop("template_config") |
|
prep_executor = init_executor(prep_config.pop("executor")) |
|
run_executor = init_executor(run_config.pop("executor")) |
|
template_slice_config = run_config.pop("template_slice_config", {}) |
|
|
and the three Step(...) calls each end at executor=... with no **prep_config / **run_config:
diffcsp-gen —
|
key="%s--diffcsp-gen-{{item}}" % block_id, |
|
executor=prep_executor, |
|
with_sequence=argo_sequence(expl_config["gen_tasks"], format="%06d"), # type: ignore |
|
) |
prep-relax —
|
key="%s--prep-relax" % block_id, |
|
executor=prep_executor, |
|
) |
|
prep_run_diffcsp_steps.add(prep_relax) |
run-relax —
|
key="%s--run-relax-{{item}}" % block_id, |
|
executor=run_executor, |
|
with_sequence=argo_sequence( |
|
prep_relax.outputs.parameters["ntasks"], format="%06d" |
|
), |
So parallelism, continue_on_failed, continue_on_num_success and continue_on_success_ratio are computed and thrown away.
Why it matters
diffcsp-gen and run-relax both carry with_sequence=argo_sequence(...), i.e. they are sliced fan-outs — exactly the shape for which continue_on_success_ratio exists. A user who sets it expecting the workflow to tolerate some failed relaxations gets no effect; the block aborts on the first failure. parallelism is likewise ignored, so the fan-out is unbounded.
The values are user-reachable through the ordinary schema — submit.py passes the same prep_explore_config / run_explore_config here as it does to PrepRunLmp and PrepRunCaly, which do honour them.
Comparison
The sibling superops are correct: prep_run_lmp.py (**prep_config L165, **run_config L204), prep_run_fp.py (L162 / L193), prep_run_dp_train.py (L183 / L225). prep_run_diffcsp.py is the only one that spreads neither.
This is a strictly worse instance of the bug fixed in #354 / #380: there, the wrong config was applied to one step; here, no config is applied to any step.
Origin
Present since the file was added in 4967951 ("Add DiffCSP as a new exploration engine", #251, 2024-08-22). The only later commit to touch the file, 8fb287e (#257), did not change this. tests/test_prep_run_diffcsp.py has no coverage of these keys.
Suggested fix
Add **prep_config to prep-relax, **run_config to run-relax, and decide deliberately which one diffcsp-gen should take — it runs on prep_executor but is sliced, so it needs a config that carries the continuation keys. Note that prep-relax is not sliced, so it needs the no_slice_run_config treatment already used in caly_evo_step.py L150-L152, or it will hit the crash described in the companion issue about prep_config spreading.
Found while reviewing #380.
PrepRunDiffCSPcomputesprep_configandrun_config, popstemplate_config,executorandtemplate_slice_configout of them, and then never spreads either dict into any of its three steps. Every remaining step-level setting is silently discarded for the whole DiffCSP exploration path.At
e45c147ed261d7c43b4b5bc9ada6e7d271e32c51, the configs are prepared here:dpgen2/dpgen2/superop/prep_run_diffcsp.py
Lines 129 to 137 in e45c147
and the three
Step(...)calls each end atexecutor=...with no**prep_config/**run_config:diffcsp-gen—dpgen2/dpgen2/superop/prep_run_diffcsp.py
Lines 160 to 163 in e45c147
prep-relax—dpgen2/dpgen2/superop/prep_run_diffcsp.py
Lines 179 to 182 in e45c147
run-relax—dpgen2/dpgen2/superop/prep_run_diffcsp.py
Lines 205 to 209 in e45c147
So
parallelism,continue_on_failed,continue_on_num_successandcontinue_on_success_ratioare computed and thrown away.Why it matters
diffcsp-genandrun-relaxboth carrywith_sequence=argo_sequence(...), i.e. they are sliced fan-outs — exactly the shape for whichcontinue_on_success_ratioexists. A user who sets it expecting the workflow to tolerate some failed relaxations gets no effect; the block aborts on the first failure.parallelismis likewise ignored, so the fan-out is unbounded.The values are user-reachable through the ordinary schema —
submit.pypasses the sameprep_explore_config/run_explore_confighere as it does toPrepRunLmpandPrepRunCaly, which do honour them.Comparison
The sibling superops are correct:
prep_run_lmp.py(**prep_configL165,**run_configL204),prep_run_fp.py(L162 / L193),prep_run_dp_train.py(L183 / L225).prep_run_diffcsp.pyis the only one that spreads neither.This is a strictly worse instance of the bug fixed in #354 / #380: there, the wrong config was applied to one step; here, no config is applied to any step.
Origin
Present since the file was added in
4967951("Add DiffCSP as a new exploration engine", #251, 2024-08-22). The only later commit to touch the file,8fb287e(#257), did not change this.tests/test_prep_run_diffcsp.pyhas no coverage of these keys.Suggested fix
Add
**prep_configtoprep-relax,**run_configtorun-relax, and decide deliberately which onediffcsp-genshould take — it runs onprep_executorbut is sliced, so it needs a config that carries the continuation keys. Note thatprep-relaxis not sliced, so it needs theno_slice_run_configtreatment already used incaly_evo_step.pyL150-L152, or it will hit the crash described in the companion issue aboutprep_configspreading.Found while reviewing #380.