hydromodpy.calibration#

Calibration sub-system.

Public surface:
  • CalibrationEngine: the orchestrator

  • Optimizer / Objective / Evaluator: Protocol contracts

  • Calibrable: Pydantic-field annotation marking a calibrable parameter

  • discover_calibrable: auto-discover calibrable fields in a config tree

  • build_optimizer: adapter registry lookup

Functions

validate_calib_output(payload)

Validate one output mapping and return the concrete variant instance.

build_objective_from_config(cfg, *[, ...])

Assemble an Objective from a CalibrationConfig.

apply_parameter_to_config(cfg, param, value)

Write value into cfg for param, honouring param.mode.

available_optimizers()

Return registered optimizer names, including installed entry points.

build_optimizer(name, space, **kwargs)

Construct an optimizer by name.

register_optimizer(name)

Register a built-in optimizer adapter under a public method name.

discover_calibrable(config, *[, _prefix])

Walk a Pydantic config tree and collect Calibrable annotations.

materialize_candidate(base_config, params, ...)

Write a standalone override TOML for one calibration candidate.

Classes

CalibrationEngine(space, optimizer, evaluator)

Drive an ask/tell loop until convergence or budget is exhausted.

CalibrationSession(session_id, optimizer, space)

Runtime result returned after a calibration loop.

CalibrationReport(session_id, method, ...[, ...])

Structured summary of one calibration session.

Optimizer(*args, **kwargs)

Ask/tell Protocol implemented by optimizer adapters.

Objective(*args, **kwargs)

Protocol for calibration objectives.

ObjectiveValue(total[, components, vector])

Minimization cost returned by an objective.

ObservationSet(stations, times, values, variable)

Observed time series used to score one simulated variable.

SimulationOutput(sim_id, stations, times, values)

Simulated values aligned with an ObservationSet.

ScalarObjective(observations, *[, metric, ...])

Single metric objective over one observation set.

CompositeObjective(blocks, *[, name, transform])

Weighted composite of several ScalarObjective blocks.

ConfigBlockObjective(*, name, metric, ...[, ...])

Objective for one [[calibration.objective_blocks]] declaration.

Calibrable([bounds, transform, prior, ...])

What a search needs to know about one field, declared where the field is.

CalibParameter(name, lower, upper[, ...])

Resolved calibration dimension in physical and transformed space.

ParameterSpace(parameters)

Ordered collection of calibrated parameters.

ParamSuggestion(trial_id, values[, source])

Candidate parameter point proposed by an optimizer.

EvaluationResult(trial_id, sim_id, ...[, ...])

Objective result produced after evaluating one suggestion.