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

Copy Markdown View Source

Validated cache of portable rollout trajectories keyed by identity.

Summary

Functions

Claims one exact GEPA trajectory for an RL (problem, prompt) slot.

Clears all prior GEPA samples when a new fast cycle starts.

Types

key()

@type key() :: {String.t(), String.t(), String.t()}

t()

@type t() :: %Imp.Training.FastSlow.ReuseCache{
  cycle: non_neg_integer(),
  entries: %{required(key()) => [Imp.Training.FastSlow.CachedTrajectory.t()]},
  theta_id: String.t()
}

Functions

claim(cache, problem_id, input_digest, prompt_digest)

@spec claim(t(), String.t(), String.t(), String.t()) ::
  {:ok, Imp.Training.FastSlow.CachedTrajectory.t(), t()} | :miss

Claims one exact GEPA trajectory for an RL (problem, prompt) slot.

new!(cycle, theta_id, trajectories \\ [])

next_cycle(reuse_cache, cycle, theta_id)

@spec next_cycle(t(), non_neg_integer(), String.t()) :: t()

Clears all prior GEPA samples when a new fast cycle starts.