Skip to content

solvi.core.deciders.adapt

Adapting one question: label-bias correction, few-shot shift and scale, temperature.

Part of solvi.core.deciders, which re-exports every name; import from there.

Adapting one question: label-bias correction, few-shot shift and scale, temperature; the question spec. (Part of solvi.core.deciders, which re-exports every name.)

Adaptation dataclass

Adaptation(bias: list | None = None, n_unlabelled: int = 0, scale: float | None = None, shift: list | None = None, temperature: float = 1.0, other_threshold: float | None = None, n_labelled: int = 0, examples: list = list())

What solvi learned for one question (task, options, kind): the label-bias correction, the few-shot shift / scale, the temperature and the "other" threshold. Part of the fingerprint of every decision that uses it.

params

params()

Everything that changes the output (the examples only through the fitted parameters).

lora_key

lora_key(sp_or_key)

The slot a LoRA adapter (solvi.experimental.lora) is kept under: the question — the task, the scored options with their descriptions (in any order: option_order="average" asks rotations of the same question) and the kind — and, for a _Spec a decision part asks, the part's name as a fourth element. Two parts asking the same question in one process have two slots: one part's adapter never answers the other's question. A _Spec.key (or a _Spec with no owner) gives the question alone; key[:3] is always the question.