StageOutcome#

class scikitplot.corpus.StageOutcome(stage, status, component=None, items_in=0, items_out=0, calls=0, seconds=0.0, budget=None, error=None, details=())[source]#

How one stage fared.

Parameters:
stageStageKind

Which stage.

statusStageStatus

Its outcome.

componentstr or None, default=None

Name of the configured callable, for provenance.

items_in, items_outint, default=0

Queries (transform, retrieve) or hits (the other stages) the stage received and produced.

callsint, default=0

Calls the stage started.

secondsfloat, default=0.0

Time the stage took.

budgetStageBudget or None, default=None

The budget it ran under.

errorErrorRecord or None, default=None

Required when status is DEGRADED, FAILED or CANCELLED.

detailstuple of (str, object) pairs, default=()

Stage-specific facts (queries dropped, rerank depth, …).

Raises:
ValueError

If status is DEGRADED, FAILED or CANCELLED and error is None.

Parameters:
budget: StageBudget | None = None#
calls: int = 0#
component: str | None = None#
details: tuple[tuple[str, Any], ...] = ()#
error: ErrorRecord | None = None#
items_in: int = 0#
items_out: int = 0#
property ran: bool#

Whether the stage produced its output in full.

seconds: float = 0.0#
stage: StageKind[source]#
status: StageStatus[source]#
to_dict()[source]#

Return a JSON-compatible mapping.

Return type:

dict[str, Any]