pyvale.validation.validio module

Save and load validation records as NumPy archives.

save_valid_case(path, valid_case)[source]

Save prepared samples, axes, observables and optional sample inputs.

Parameters:
  • path (str or Path) – Path to the NPZ archive.

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

load_valid_case(path)[source]

Load the prepared case, including the samples needed for ECDF plots.

Parameters:

path (str or Path) – Path to the NPZ archive.

Returns:

ValidCase – Case with observable metadata, named observation arrays and optional provenance restored.

save_valid_result(path, result)[source]

Save metric fields, observable metadata and built-in metric settings.

Parameters:
  • path (str or Path) – Path to the NPZ archive.

  • result (ValidResult) – Validation results containing the requested observable and metric.

load_valid_result(path)[source]

Load previously calculated metric fields without running validation again.

Parameters:

path (str or Path) – Path to the NPZ archive.

Returns:

ValidResult – Metric fields, named result axes and available built-in metric settings.

save_metric_extrema(path, extrema)[source]

Save extrema, their controlling indices and the associated axis selections.

Parameters:
  • path (str or Path) – Path to the NPZ archive.

  • extrema (ValidMetricExtrema) – Extrema values and controlling indices on their retained axes.

load_metric_extrema(path)[source]

Load a profile. Use the original result for metadata and case for samples.

Parameters:

path (str or Path) – Path to the NPZ archive.

Returns:

ValidMetricExtrema – Extrema arrays and original comparison indices with their axis labels.