Skip to content

solvi.core.sources

Where a label may come from: the trusted sources and the check every channel runs.

Where a label may come from: the trusted sources (a person, an outcome, a rule), the "verified" System 2 answer that only some channels take, and the check every channel runs (check_source). Moved out of solvi.core.store in 1.0, which re-exports every name, so that the guarantees and the memory of corrections check a label without importing the store.

UntrustedLabel

Bases: ValueError

A label from a source outside TRUSTED_SOURCES (the model, the system itself, an unknown process), or a "verified" label offered to a channel that does not take it.

check_source

check_source(source, accept=(), channel=None)

A label's source → itself, when it is trusted: "human", "outcome", "rule" or "audit" (a person's or an outcome's label of a decision drawn at random for it; the store checks the decision was) — or "verified" when the channel lists it in accept (only System.guarantee(..., sources=) does: see VERIFIED); else UntrustedLabel, with the measured reason when a channel (channel, a key of VERIFIED_REFUSED) refuses a verified label.