2.10.0

Choice

Package: flyteplugins.typesafe_ai

One pick from a fixed vocabulary, carrying the calibration it came with.

Parameters

class Choice(
    value: C,
    confidence: float = 0.0,
    probabilities: dict[str, float] = <factory>,
)
Parameter Type Description
value C
confidence float
probabilities dict[str, float]

Methods

Method Description
certain() Is this pick confident enough to act on without a human?
runner_up() The second-most-likely option, which is what you show a reviewer.

certain()

def certain(
    threshold: float,
) -> bool

Is this pick confident enough to act on without a human?

Parameter Type Description
threshold float

runner_up()

def runner_up()

The second-most-likely option, which is what you show a reviewer.