aip_sdk.Metric
aip_sdk.Metric(scorer: str, mean: float, std: float, count: int, pass_rate: float)
Aggregated per-scorer summary statistics.
Attributes
meanfloat: Mean score across every row this scorer produced a real value for.float("nan")whencountis 0 — the scorer was legitimately undefined for every row (e.g. a size-based metric on a dataset with no small objects), not a real score of 0. Check withmath.isfinite(mean)andcount > 0before treating it as a number. Notenan != nan: an equality check against another possibly-NaN mean silently reads as "not equal" when either side is simply unmeasured, not only when they genuinely differ — guard both sides withisfinite/countfirst if the comparison is asserting they disagree, or the check passes on "nothing was measured" the same way it would on a real difference.stdfloat: Standard deviation across the same rows.nanwhenevermeanis (zero usable rows), and alsonanatcount == 1even thoughmeanis real then — a sample standard deviation is undefined for a single point, not zero (same convention aspandas.Series([x]).std()).pass_ratefloat: Fraction of scored rows at or above the scorer's threshold.nanwhencountis 0, for the same reason asmean— distinct from a real0.0, which means every row was scored and every one failed the threshold (count > 0,below_threshold == count).
aip_sdk.Metric.count
aip_sdk.Metric.count: int
No docstring is defined in the source.
aip_sdk.Metric.mean
aip_sdk.Metric.mean: float
No docstring is defined in the source.
aip_sdk.Metric.pass_rate
aip_sdk.Metric.pass_rate: float
No docstring is defined in the source.
aip_sdk.Metric.scorer
aip_sdk.Metric.scorer: str
No docstring is defined in the source.
aip_sdk.Metric.std
aip_sdk.Metric.std: float
No docstring is defined in the source.