Check#

class skore.Check(*args, **kwargs)[source]#

Protocol for defining checks.

Each check wraps a callable that inspects a report. If the callable returns a non-empty string, that text is recorded as a finding under code with the given title and severity. Checks are scoped to a single report type via report_type so they only run on matching reports.

Parameters:
codestr

Unique identifier for this check , used in summarize() and ignore lists.

titlestr

Short label shown for the finding when one is reported.

report_typestr

Must be one of "cross-validation", "estimator", "comparison-estimator", or "comparison-cross-validation".

docs_urlstr or None, default=None

Optional link or documentation anchor: a string starting with "http" is shown as-is; otherwise it is treated as an HTML anchor fragment under the automated checks user guide.

severity{“issue”, “tip”}

Severity of the finding. "issue" flags a modeling problem to fix; "tip" invites caution (e.g. on the interpretation of a result) without signaling a defect.

abstract check_function(report)[source]#

Check function to run on the report and that returns an explanation string.

Parameters:
report_BaseReport

The report to run the check on.

Returns:
str or None

An explanation string, or None if the check did not find anything.