Skip to content

PrepRunDiffCSP discards prep_config and run_config entirely #406

Description

@wanghan-iapcm

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:

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions