LegOutcome#
- class scikitplot.corpus.LegOutcome(leg, status, hit_count=0, generation=None, backend=None, error=None, filter_capability=None, requested_backend=None, fallback_reason=None)[source]#
How one evidence path fared.
- Parameters:
- legLegKind
Which evidence path this describes.
- statusLegStatus
Outcome for this leg.
- hit_countint, optional
Hits contributed before fusion.
- generationIndexGeneration or None, optional
Index generation the leg ran against, for provenance;
to_dictwrites its ownto_dict().- backendstr or None, optional
Backend that served the leg, when applicable.
- errorErrorRecord or None, optional
Required when
statusisDEGRADEDorFAILED.- filter_capabilityFilterCapability or None, optional
How the leg answered the query’s filter (R2-2): every operator
SUPPORTEDorEMULATED;Nonewhen no filter was applied or the leg did not run. A leg never runs with a filter it ignored.- requested_backendstr or None, optional
What the configuration asked to serve the leg (
"auto", a backend name), when a backend served it (R2-5).- fallback_reasonstr or None, optional
Why
backendis not what was requested, when it is not: a closed vocabulary of the backend ("annoy_broken","option_unsupported", …);Noneotherwise.
- Raises:
- ValueError
If
statusisDEGRADEDorFAILEDanderrorisNone.
- Parameters:
leg (LegKind)
status (LegStatus)
hit_count (int)
generation (Any)
backend (str | None)
error (ErrorRecord | None)
filter_capability (FilterCapability | None)
requested_backend (str | None)
fallback_reason (str | None)
Notes
Developer. The
error-required invariant is enforced in__post_init__rather than documented, because an unexplained degradation is exactly as unhelpful as no degradation signal at all.- error: ErrorRecord | None = None#
- filter_capability: FilterCapability | None = None#