eval_toolkit.protocols#

Lightweight, low-dependency-surface Protocols intentionally kept here so adapter authors can type-check against them without importing pandas, matplotlib, or filesystem-oriented helpers. The 10 strict Tier-2 Protocols of the v1.x stability contract live in their topic modules (e.g., LeakageCheck in leakage.py, MetricSpec in scorecards.py, SimilarityStrategy in text_dedup.py) to avoid pulling heavy dependencies into this module. See Strict Tier-2 Protocols at v1.0 for the canonical enumeration + import paths.

EvalSliceLike

Pandas-free slice surface needed by evaluation contracts.

PredictionReader

Reads manifest-referenced prediction artifacts into column arrays.

Scorer

Anything exposing predict_proba(X) -> np.ndarray of P(positive).

SliceAwareScorer

Optional scorer contract for cost-controlled slice skipping.

TextTransform

Uniform text-transform shape for sweep + defence + attack strategies.

Versioned

Anything exposing a stable version string.