Dsxir. Optimizer. BootstrapFewShot. Sampler
(dsxir v0.2.0)
Copy Markdown
Persistent state for a Dsxir.Optimizer.BootstrapFewShot session.
Holds the data that Dsxir.OptimizerSession needs to checkpoint and resume
a sequential BootstrapFewShot run: the round counter, the remaining examples
for the current round, the accumulated demos pool per predictor, the
predictor declarations needed to compatibility-check labeled demos, the
labeled demos already selected during phase one, a deterministic shuffle
seed, the resolved config, and the running error counter.
Serialized via :erlang.term_to_binary/2 with :deterministic so two
checkpoints over the same logical state are byte-identical, and deserialized
with :safe to refuse atom creation from untrusted blobs.
Summary
Types
@type indexed_example() :: {Dsxir.Example.t(), non_neg_integer()}
@type t() :: %Dsxir.Optimizer.BootstrapFewShot.Sampler{ all_examples_for_round: [indexed_example()], config: map(), demos_pool: %{required(atom()) => [Dsxir.Demo.t()]}, error_count: non_neg_integer(), examples_remaining_in_round: [indexed_example()], labeled_demos_slotted: [Dsxir.Demo.t()], max_rounds: pos_integer(), predictor_decls: [term()], rng_seed: integer(), round: pos_integer() }