hydromodpy.calibration.promotion#

Top-N promotion of calibration trials.

After the ask/tell loop converges, the runner promotes selected trials (top-N or all completed) into full simulations and back-fills the sim_id column on the iterations table. This module isolates that post-loop logic so the runners only deal with control flow.

Functions

promote_iterations(*, cfg, trial_ctx, ...)

Promote selected trials and return (count, failures, best_sim_id).

select_iterations_to_promote(cfg, ...)

Return the list of iteration rows to promote based on cfg.save_runs.

stored_parameter_value(raw)

Return the physical candidate value from a persisted parameter payload.

update_best_sim_id(catalog, session_id, sim_id)

Set best_sim_id on a finalized calibration session.

update_iter_sim_id(catalog, session_id, ...)

Write the promoted sim_id into calibration_iterations.