skore/evaluate-invalid-string-splitter
| Pack | Severity | Fix | Versions |
|---|---|---|---|
| skore | error | none, edit by hand | All versions |
skore.evaluate(..., splitter=...) accepts a float test fraction, an integer fold count, a scikit-learn cross-validation splitter, or the literal string "prefit". Any other string (such as "kfold") raises ValueError.
report = skore.evaluate(est, X, y, splitter="kfold")report = skore.evaluate(est, X, y, splitter=5)What the rule reports
Section titled “What the rule reports”Calls to evaluate passing a string literal other than "prefit" for splitter=.
How to fix it
Section titled “How to fix it”Pass splitter="prefit" for an already-fitted estimator, an integer fold count, a float holdout fraction, or a scikit-learn splitter instance.
Diagnostic message
Section titled “Diagnostic message”skore.evaluate() only accepts 'prefit' as a string splitter and raises ValueError for any other string. Pass 'prefit', an integer fold count, a float test size, or a scikit-learn splitter object.See all rules in the skore pack.