evaluate-ml-pipeline

Evaluates sklearn-compatible learners with skore reports and data-driven cross-validator selection.

1|Updated Jun 22, 2026
One-click install
npx skills add https://github.com/probabl-ai/ibm-workshop --skill evaluate-ml-pipeline-probabl-ai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: evaluate-ml-pipeline
Source: https://github.com/probabl-ai/ibm-workshop/tree/main/.bob/skills/evaluate-ml-pipeline
Command: npx skills add https://github.com/probabl-ai/ibm-workshop --skill evaluate-ml-pipeline-probabl-ai

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires skore, scikit-learn, skrub, and includes references (resource) components.

What problem does it solve? Choosing the right evaluation entry point and cross-validator for a fitted ML pipeline is error-prone: hand-rolled cross_val_score calls, habitual KFold defaults, and stratified splitters on imbalanced data all produce misleading scores. This Skill enforces a disciplined methodology for evaluating a single sklearn-compatible learner (especially skrub SkrubLearner pipelines) through skore, so the resulting report reflects the true structure of the data. ## Core Features & Use Cases - Entry-point routing: Uses skore.evaluate as the default dispatcher and escalates to EstimatorReport, CrossValidationReport, or ComparisonReport only when per-fold artifacts, single hold-out fits, or multi-learner comparisons are needed. - Data-driven splitter selection: Maps structural metadata (groups, temporal ordering) attached at build time via split_kwargs to the correct sklearn splitter (GroupKFold, TimeSeriesSplit, KFold), with a mandatory user prompt for time-ordered data. - Methodological guardrails: Blocks stratified splitters for class imbalance, LeaveOneOut-family splitters, inline Python execution, and evaluation calls outside the experiments/ directory. - Use Case: After building a skrub pipeline with group or time metadata, invoke this Skill to pick the correct cross-validator, run skore.evaluate in the experiment script, and read the resulting metrics report without leaking future data or understating variance. ## Quick Start Ask the agent to evaluate the current pipeline with skore, choosing the cross-validator from the data's group or time structure and showing the metrics report.

Frequently Asked Questions about evaluate-ml-pipeline

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I evaluate a sklearn pipeline with cross-validation in Python?

Use skore.evaluate with the estimator, data, and a splitter argument; it dispatches to the right report class automatically. Avoid hand-rolled cross_val_score loops, since the report classes handle per-fold accounting and metric defaults.

Which cross-validator should I use for grouped or time-series data?

Use GroupKFold when rows share group keys passed via split_kwargs, and TimeSeriesSplit with a gap equal to the forecast horizon for temporal data. Plain KFold is the default only when no group or time structure exists.

Should I use StratifiedKFold for imbalanced classification?

No. Stratification compresses across-fold variance by construction, producing over-confident error bars. Use plain KFold and treat fold-to-fold variance as real estimation uncertainty; extreme imbalance calls for more data or fewer splits.

When should I use CrossValidationReport instead of skore.evaluate?

Escalate to CrossValidationReport only when you need per-fold predictions or fold-level artifacts that the evaluate dispatcher does not expose. For a single score with default metrics, skore.evaluate is sufficient.

Why is cross-validation alone not enough for pipelines with lag features?

CV materializes the pipeline graph once and splits indices, so it never tests prediction with a different environment dict. Pipelines with lags, rolling windows, or history joins also need a smoke test that predicts on fresh data and checks row counts.