# `Imp.Optimizer.Report`
[🔗](https://github.com/deepfates/imp/blob/v0.18.1/lib/imp/optimizer/report.ex#L1)

Optimizer candidate history and diagnostic metadata.

`best_score` is the best score computed inside the optimizer. It is `nil` for
transform-only optimizers such as `LabeledFewShot`, which attach parameters
without evaluating them. When `Imp.Experiment.check/5` performs the outer
admission and held-out measurement, those scores live in
`Imp.Experiment.Result.baseline_selection`, `optimized_selection`, and `test`.

# `attach`

# `decode_term`

Decodes a value produced by `encode_term/1`.

# `dump`

# `encode_term`

Encodes an Elixir term into Imp's lossless tagged JSON representation.

This is a structural codec, not a logging boundary. Callers writing telemetry,
reports, or user-visible artifacts should use `json_safe/1` instead. A pid,
port or reference is written as its inspected text, and reads back as that
text.

# `fetch`

# `json_safe`

Returns a JSON-encodable projection with credential-bearing data redacted.

# `load!`

# `new`

Builds an optimizer report from atom-key, string-key, or keyword attributes.

String-key support is intentional: report data is often restored from JSON
artifacts or provider/debug payloads before it is attached back to a program.
Malformed attribute containers raise Imp-context errors instead of generic
`Map.new/1` failures.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
