vipr.plugins.compare package

Subpackages

Submodules

vipr.plugins.compare.config module

Compare-specific config helpers.

class vipr.plugins.compare.config.OverlaySelectionSettings(*, series_kinds: set[Annotated[str, Strict(strict=True)]] | None = None, include_experimental: Annotated[bool, Strict(strict=True)] = True)

Bases: BaseModel

Normalized overlay-selection settings resolved from compare config.

include_experimental: StrictBool
model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

series_kinds: set[StrictStr] | None
vipr.plugins.compare.config.get_compare_config(app: Any) dict[str, Any]

Return the compare config section when present.

vipr.plugins.compare.config.resolve_overlay_selection_settings(app: Any) OverlaySelectionSettings

Resolve overlay filter settings from compare.overlay config.

vipr.plugins.compare.controller module

class vipr.plugins.compare.controller.CompareController(*args: Any, **kw: Any)

Bases: ArgparseController

Controller for comparing stored inference results.

class Meta

Bases: object

label = 'compare'
stacked_on = 'base'
stacked_type = 'nested'
run()

Compare stored results structurally and export an artifact summary.

vipr.plugins.compare.hooks module

Hook names for the compare result enrichment lifecycle.

vipr.plugins.compare.labels module

Helpers for compare-facing result labels.

vipr.plugins.compare.labels.build_result_display_label(result: IndexedResult) str

Build a stable human-readable result label.

vipr.plugins.compare.labels.short_result_id(result_id: str) str

Render UUID-like result IDs compactly for labels and columns.

vipr.plugins.compare.result_builder module

Orchestrator for persisting compare UI results.

vipr.plugins.compare.result_builder.save_compare_ui_result(app: Any, results: list[IndexedResult], structural_summary: StructuralCompareSummary, result_id: str | None = None) str

Persist the compare output itself as a normal stored UI result.

vipr.plugins.compare.structural module

Compatibility facade for compare-domain normalization and summary helpers.

class vipr.plugins.compare.structural.DiagramArtifact(id: str, title: str | None, x_label: str | None = None, y_label: str | None = None, x_scale: str | None = None, y_scale: str | None = None, resolved_series: list[~vipr.plugins.compare.structure.models.ResolvedSeries] = <factory>, data: dict[str, ~typing.Any] = <factory>, series: list[dict[str, ~typing.Any]] = <factory>, data_keys: list[str] = <factory>, series_names: list[str] = <factory>, metadata_keys: list[str] = <factory>, visualization_type: str | None = None, fit_metrics: list[dict[str, ~typing.Any]] = <factory>)

Bases: object

Normalized view of one diagram in a stored result.

data: dict[str, Any]
data_keys: list[str]
fit_metrics: list[dict[str, Any]]
id: str
metadata_keys: list[str]
resolved_series: list[ResolvedSeries]
series: list[dict[str, Any]]
series_names: list[str]
title: str | None
visualization_type: str | None = None
x_label: str | None = None
x_scale: str | None = None
y_label: str | None = None
y_scale: str | None = None
class vipr.plugins.compare.structural.IndexedResult(result_id: str, config_name: str | None, diagrams: dict[str, ~vipr.plugins.compare.structure.models.DiagramArtifact] = <factory>, tables: dict[str, ~vipr.plugins.compare.structure.models.TableArtifact] = <factory>, prediction_timing: dict[str, int | float] = <factory>, batch_metadata_keys: list[str] = <factory>)

Bases: object

Normalized structural index of one stored result.

batch_metadata_keys: list[str]
config_name: str | None
diagrams: dict[str, DiagramArtifact]
prediction_timing: dict[str, int | float]
result_id: str
tables: dict[str, TableArtifact]
class vipr.plugins.compare.structural.ResolvedSeries(x_values: list[Any], y_values: list[Any], error_values: list[Any] | None = None, label: str | None = None, kind: str | None = None)

Bases: object

Resolved compare-facing view of one diagram series.

error_values: list[Any] | None = None
kind: str | None = None
label: str | None = None
x_values: list[Any]
y_values: list[Any]
class vipr.plugins.compare.structural.StructuralCompareSummary(result_overview_rows: list[dict[str, Any]], artifact_rows: list[dict[str, Any]], metric_rows: list[dict[str, Any]], result_timing_rows: list[dict[str, Any]], shared_diagrams: list[str], partial_diagrams: dict[str, list[str]], shared_tables: list[str], partial_tables: dict[str, list[str]])

Bases: object

Structural comparison summary across N stored results.

artifact_rows: list[dict[str, Any]]
metric_rows: list[dict[str, Any]]
partial_diagrams: dict[str, list[str]]
partial_tables: dict[str, list[str]]
result_overview_rows: list[dict[str, Any]]
result_timing_rows: list[dict[str, Any]]
shared_diagrams: list[str]
shared_tables: list[str]
class vipr.plugins.compare.structural.TableArtifact(id: str, title: str | None, rows: list[dict[str, ~typing.Any]] = <factory>, columns: list[str] = <factory>, row_count: int = 0, key_field: str | None = None, row_keys: list[str] = <factory>)

Bases: object

Normalized view of one table in a stored result.

columns: list[str]
id: str
key_field: str | None = None
row_count: int = 0
row_keys: list[str]
rows: list[dict[str, Any]]
title: str | None
vipr.plugins.compare.structural.compare_indexed_results(results: list[IndexedResult]) StructuralCompareSummary

Compare normalized stored results structurally.

vipr.plugins.compare.structural.normalize_result_structure(result_id: str, result_data: dict[str, Any]) IndexedResult

Normalize one stored result into a structure-friendly index.

vipr.plugins.compare.structural.to_dict(value: Any) dict[str, Any]

Convert Pydantic-like models to plain dictionaries.

Module contents

VIPR compare plugin.

Provides CLI commands for comparing stored inference results.

vipr.plugins.compare.load(app)

Register compare CLI controllers.