Skip to content

fix: exempt the stability calibration from the consumer-values check - #40

Merged
koen-vg merged 1 commit into
mainfrom
fix-stability-consumer-values-validation
Jul 28, 2026
Merged

koen-vg merged 1 commit into
mainfrom
fix-stability-consumer-values-validation

Conversation

@koen-vg

@koen-vg koen-vg commented Jul 28, 2026

Copy link
Copy Markdown
Member

tools/calibrate stability cannot build its DAG on current main:

RuntimeError: Validation failed:
 - consumer_values: base config enables food_utility_piecewise but configured
   consumer values baseline scenario '_cal_baseline_iter00' is not defined

#38 replaced the lax consumer-values check with a stricter one that requires
consumer_values.baseline_scenario to name a declared scenario. That is the
right rule for ordinary configs, but the deviation-penalty calibration drives
its solves in-process: calibrate_deviation_penalty.py synthesizes
_cal_baseline_iterNN / _cal_main_iterNN per Broyden iteration and passes
them straight to build_scenario_entry. They are never Snakemake scenarios,
so the placeholder in config/calibration/stability.yaml has nothing to
resolve against.

Skipping the check when deviation_penalty.calibration.generate is set follows
the is_generation_run convention already used by the provenance validator.
Declaring the placeholder in scenarios: instead would have leaked a phantom
scenario into list_scenarios().

Found while re-checking calibration fingerprints after #38; regression test
added.

The deviation-penalty calibration drives its solves in-process, synthesizing
a baseline and a main scenario per Broyden iteration, so the baseline named
in `config/calibration/stability.yaml` is not a scenario the workflow
declares. The stricter check introduced in #38 therefore rejected the config
outright and `tools/calibrate stability` could not build its DAG.
@koen-vg
koen-vg merged commit 9d61c6b into main Jul 28, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant