Tune.Optimizers.Anything (Tune v0.5.0)

Copy Markdown View Source

The Optimize.Anything target: GEPA-style search over one declared value.

The named Tune.Parameter is the only component of the reflective search in Tune.Optimizers.Reflective. The proposal role sees the parameter's description, JSON Schema, current value, and training trajectories with scores and feedback, and returns a new value as text: raw text for a string schema, JSON otherwise. Every proposal is validated against the parameter schema before use; invalid proposals are discarded. Application code decides how the value is used in its named calls, through Tune.Execution.value/2. No other parameter changes.

Options: :parameter (required name), :objective (text describing what the value is for; defaults to the parameter description), and the Reflective options :max_iterations, :minibatch_size, :use_merge, :merge_every.

Differences from gepa.optimize_anything: the value is evaluated through a normal parameterized program and metric rather than a separate evaluator/adapter interface.

Summary

Functions

Parses proposal text into a value for a schema, without validation.

Renders a parameter value as proposal text.

Functions

from_text(arg1, text)

@spec from_text(Zoi.schema(), String.t()) :: {:ok, term()} | :error

Parses proposal text into a value for a schema, without validation.

to_text(arg1, value)

@spec to_text(Tune.Parameter.t() | Zoi.schema(), term()) :: String.t()

Renders a parameter value as proposal text.