probe_backend#
- scikitplot.corpus.probe_backend(cls, *, load=True)[source]#
Classify one backend’s availability.
- Parameters:
- clstype
A backend class exposing
is_available()and, optionally,is_installed()(no import) andload_error().- loadbool, optional
True(default) answers by askingis_available(), which may import the backend.Falseimports nothing: a backend declaringloads_on_probethat is installed but not yet loaded in this process is reportedUNKNOWNwith reason"not_loaded".
- Returns:
- tuple of (CapabilityStatus, str or None)
The status and a stable machine-readable reason code. The reason is
Nonewhen the status isAVAILABLE.
- Parameters:
- Return type:
tuple[CapabilityStatus, str | None]
Notes
Developer. The distinction rests on how the probe answers: returning
Falsemeans the backend knows it is not installed, whereas raising means it is installed enough to try and failed – which isBROKEN. Review disproof D-13 confirmed the probes themselves are correctly fail-safe; the defect was that both outcomes collapsed to one boolean. A backend whoseis_available()swallows a load failure (Annoy) is told apart byis_installed()andload_error(): installed with a failed load isBROKENwith reason"load_failed: <type>"(F-50); without that evidence it staysABSENT.