Dsxir.OptimizerSession.Store.File (dsxir v0.2.0)

Copy Markdown

File-backed Store with atomic writes (temp file plus rename).

Options

  • :dir (required) - directory holding <session_id>.<ext> files. The directory is created on first write.
  • :format (:binary default, :json for debugging) - encoding for the checkpoint body. :binary is :erlang.term_to_binary/2 [:deterministic]; :json is JSON.encode!/1 with sampler_blob Base64-wrapped.

Format guarantees:

  • :binary - full round-trip fidelity for any Elixir term, suitable for resume.
  • :json - mostly human-readable, but optimizer_opts is opaquely wrapped as a Base64-encoded :erlang.term_to_binary/2 blob so the checkpoint can still resume sessions whose options contain non-JSON terms (tuples, atoms-as-values, function refs, etc.).