Imp.Training.FastSlow.State (Imp v0.5.0)

Copy Markdown View Source

Validated durable state for the Fast-Slow training state machine.

Summary

Types

t()

@type t() :: %Imp.Training.FastSlow.State{
  budgets: Imp.Training.FastSlow.Budget.t(),
  config_fingerprint: String.t(),
  current_theta_id: String.t(),
  cycle: non_neg_integer(),
  dataset: Imp.Training.FastSlow.DatasetState.t(),
  events: [Imp.Training.FastSlow.Event.t()],
  g: pos_integer(),
  k: pos_integer(),
  lookahead: Imp.Training.FastSlow.Lookahead.t() | nil,
  max_cycles: pos_integer(),
  pending_operations: %{
    required(String.t()) => Imp.Training.FastSlow.OperationIntent.t()
  },
  prompt_population: Imp.Training.FastSlow.PromptPopulation.t(),
  reuse_cache: Imp.Training.FastSlow.ReuseCache.t(),
  reuse_rollouts: boolean(),
  rollout_ledger: %{required(String.t()) => Imp.Training.FastSlow.Rollout.t()},
  sampling_config_digest: String.t(),
  slow_step: non_neg_integer(),
  stage: :initialized | :fast | :slow | :terminal,
  t: pos_integer(),
  terminal: Imp.Training.FastSlow.Terminal.t() | nil,
  theta_lineage: [Imp.Training.FastSlow.Theta.t()]
}

Functions

new!(config, theta_payload, prompt_candidates, options \\ [])

@spec new!(Imp.Training.FastSlow.Config.t(), term(), [term()], keyword()) :: t()

validate!(state)

@spec validate!(t()) :: t()