stormlog.infer.errors

Errors that tell the inference CLI which contract exit code a failure gets.

Both subclass ValueError, so code that catches ValueError from the library keeps working.

Exceptions

InferInputError

An input file the command cannot read; the CLI exits INVALID_INPUT (5).

InferUsageError

A setting the command cannot use; the CLI exits USAGE (2).

TokenizerUnavailableError

Strict token counts were requested but no tokenizer backend loads.

exception stormlog.infer.errors.InferUsageError[source]

Bases: ValueError

A setting the command cannot use; the CLI exits USAGE (2).

exception stormlog.infer.errors.InferInputError[source]

Bases: ValueError

An input file the command cannot read; the CLI exits INVALID_INPUT (5).

exception stormlog.infer.errors.TokenizerUnavailableError[source]

Bases: InferUsageError, RuntimeError

Strict token counts were requested but no tokenizer backend loads.

A usage error for the CLI (exit 2); it is still a RuntimeError, which is what build_token_counter raised before, so existing callers that catch that keep working.