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

Copy Markdown View Source

Executes the orchestration order of Algorithm 1 from "Learning, Fast and Slow" without binding to a provider.

The returned context contains runtime-only prefetched data required to resume a failed effect. Persisted training invariants remain in FastSlow.State. FastSlow.Backend.update_slow/5 is an external weight-update handoff; this module does not implement or verify CISPO.

Summary

Functions

Returns the digest used to bind an actual prefetched minibatch to lookahead state.

Builds a JSON-safe runtime-context checkpoint bound to the current lookahead.

Returns the digest used for exact cache matching of one problem input.

Loads and validates a runtime-context checkpoint against persisted state.

Types

checkpoint_fn()

@type checkpoint_fn() :: (checkpoint_snapshot() -> term())

checkpoint_snapshot()

@type checkpoint_snapshot() :: %{
  state: Imp.Training.FastSlow.State.t(),
  runner_context: map()
}

result()

Functions

batch_digest(batch)

@spec batch_digest(map()) :: String.t()

Returns the digest used to bind an actual prefetched minibatch to lookahead state.

dump_context!(context, state)

Builds a JSON-safe runtime-context checkpoint bound to the current lookahead.

input_digest(problem)

@spec input_digest(map()) :: String.t()

Returns the digest used for exact cache matching of one problem input.

load_context!(dump, state)

Loads and validates a runtime-context checkpoint against persisted state.

run(state, backend, context \\ %Context{}, options \\ [])