CalibrationReport#
| Member | Kind | What it is |
|---|---|---|
best | property | The run of the one case (Session.best), None without a run. |
best_by_case | property | The run of the best trial in each case (Session.best_by_case). |
best_rel_dir | property | Directory of the run of the one case, relative to the project root. |
best_sim_id | property | Id of the run of the one case, None when none was written. |
session | property | The session on disk, None when the report names no session folder. |
trials | property | Every trial of the session, one row per trial and case (Session.trials). |
to_dict | method | Return a JSON-friendly summary. |
best_parameters | attribute | Physical values of the best candidate, keyed by calibrated parameter name. |
best_trial | attribute | Number of the best trial in trials.jsonl, unique in the session. |
cost_block_fractions | attribute | Fraction of the cost each block actually took. |
cost_label | attribute | What the cost reads as, such as 1 - nse_log. |
cost_name | attribute | Name of the cost the search minimized. |
frozen | attribute | Every value a settled phase declared frozen, in order, with the path it is written to. |
methods_paragraph | attribute | The prose this run writes about itself, conditioned on the stages that completed. It is the only object by which someone who did not produce the number can know what it rests on without reading Python. |
methods_path | attribute | The methods.md file the paragraph was written to, in the session folder. None when there is no paragraph or no session folder. |
parameter_uncertainty | attribute | Width beside each calibrated value, when the file asked for one. |
phases | attribute | The phases of a staged calibration in the order they ran; empty without phases. |
protocol | attribute | The published method that wrote these stages, when one did. |
restart_spreads | attribute | Where the restarts of each phase landed, when the file asked for restarts. |
reused_from_disk | attribute | Names of the phases read back from the reopened session instead of solved. |
session_dir | attribute | Folder the session journalled its trials in, sessions/<case>. |
status | attribute | How the session closed: completed, partial, aborted or failed. |
steady_window | attribute | The span a regime = "steady" phase actually averaged its recharge over: start, end, days, and mean_recharge_m_s when the steady phase's calibrated conductivity is known. None when no phase declares a steady regime. Read back from the same translation the run itself used (hydromodpy.calibration.runners.phase_regime.regime_overrides), never recomputed by a second reading of the file that could drift from it. |
workspace | attribute | Project root the session was written to. |
-
class CalibrationReport(
)[source]#session_id,method,n_trials,best_cost,duration_s,save_runs,promoted,status='completed',cost_name=None,cost_label=None,best_trial=None,best_parameters=None,best_cases=<factory>,windows=<factory>,parameter_uncertainty=(),cost_block_fractions=None,workspace=None,session_dir=None,phases=(),frozen=(),reused_from_disk=(),restart_spreads=(),steady_window=None,protocol=None,methods_paragraph=None,methods_path=None,extra=<factory>,
What one calibration found, with or without phases.
hmp.calibrateandProject.calibratereturn this class, and withdry_runa plan that runs nothing. A calibration in phases fillsphases, each with its own report, andfrozen, and its best values are those of the calibrated run.to_dictgives the same summary as a JSON-friendly mapping.The shape of this report and the
[calibration]section are experimental until the rework of the calibration is published.- property best: Run | None[source]#
The run of the one case (
Session.best),Nonewithout a run.
- property best_by_case: dict[str, Run | None][source]#
The run of the best trial in each case (
Session.best_by_case).
- best_cases: dict[str, BestCase]#
its run and its cost, by case id.
- Type:
What the best trial gave in each case
- best_parameters: dict[str, float] | None = None#
Physical values of the best candidate, keyed by calibrated parameter name.
The whole set of the calibrated run: in a calibration in phases, the values an earlier phase froze come with those of the last phase.
Nonewhen no candidate was evaluated.
- property best_rel_dir: str | None[source]#
Directory of the run of the one case, relative to the project root.
- property best_sim_id: str | None[source]#
Id of the run of the one case,
Nonewhen none was written.
- cost_block_fractions: dict[str, Any] | None = None#
Fraction of the cost each block actually took.
"mean"averages the fraction over the finished trials (each a mapping of block name to its fraction, 0 to 1, of the cost),"mean_n_trials"is how many of them entered that average, and"best"reads the fraction at the reported candidate.Nonewhen the phase scores through a single metric with no declared[[calibration.objective_blocks]], or, for a phase reused from a previous run (seeextra["cost_block_fractions_absent_note"]when that is why), when its journaled trials carry nothing to recompute it from. Seehydromodpy.calibration.optim.objective.cost_block_fractions()for how a fraction is defined.
- frozen: tuple[FrozenParameter, ...] = ()#
Every value a settled phase declared frozen, in order, with the path it is written to.
A parameter two phases froze appears twice; the later value is the one the phases after both of them hold.
- methods_paragraph: str | None = None#
The prose this run writes about itself, conditioned on the stages that completed. It is the only object by which someone who did not produce the number can know what it rests on without reading Python.
- methods_path: Path | None = None#
The
methods.mdfile the paragraph was written to, in the session folder.Nonewhen there is no paragraph or no session folder.
- parameter_uncertainty: tuple[Any, ...] = ()#
Width beside each calibrated value, when the file asked for one.
Empty unless
[calibration.uncertainty]declared a method that produces it. The values themselves are inbest_parametersand are never touched by it.
- phases: tuple[PhaseRun, ...] = ()#
The phases of a staged calibration in the order they ran; empty without phases.
The report of a phase has no phases of its own.
- restart_spreads: tuple[Any, ...] = ()#
Where the restarts of each phase landed, when the file asked for restarts.
The calibrated value is untouched: it is the best of them. This says how far apart the others finished, which is the one thing a single search cannot report about itself.
- reused_from_disk: tuple[str, ...] = ()#
Names of the phases read back from the reopened session instead of solved.
Only non-empty under
hmp calibrate --resume: a phase is reused when it completed in the session and its recorded fingerprint matches this run’s own model, mesh and input files.
- property session: Session | None[source]#
The session on disk,
Nonewhen the report names no session folder.
- steady_window: dict[str, Any] | None = None#
The span a
regime = "steady"phase actually averaged its recharge over:start,end,days, andmean_recharge_m_swhen the steady phase’s calibrated conductivity is known.Nonewhen no phase declares a steady regime. Read back from the same translation the run itself used (hydromodpy.calibration.runners.phase_regime.regime_overrides()), never recomputed by a second reading of the file that could drift from it.
- property trials: pd.DataFrame[source]#
Every trial of the session, one row per trial and case (
Session.trials).