pyvale.validation.validengine module

Run standalone metrics over shared physical and uncertainty axes.

class ValidEngine(metrics, *, workers=1)[source]

Bases: object

Snapshot metric configuration and retain epistemic cases.

Variables:
  • metrics (tuple[IValidMetric, ]) – Independent snapshots of the metric strategies.

  • workers (int or None) – Number of workers. Use None to select the available CPU count.

__init__(metrics, *, workers=1)[source]

Initialise the engine and snapshot the metric strategies.

Parameters:
  • metrics (list[IValidMetric]) – Nonempty list of metrics with unique kinds and declared outputs.

  • workers (int or None, optional) – Number of workers. Use None to select the available CPU count.

metrics
workers
run(valid_case)[source]

Calculate metric values across physical, epistemic, and offset axes.

Parameters:

valid_case (ValidCase) – Aligned simulation and experiment observations with their named axes.

Returns:

ValidResult – Metric fields keyed by observable and metric. Each output has leading dimensions (n_points, n_components, n_times) followed by the non-singleton simulation and experiment epistemic and offset axes. Comparisons with missing samples on either side remain NaN.