Skip to main content

Module report

Module report 

Expand description

Reading a trial’s objective back out of the oniro CLI contract.

The child drives oniro_cli and turns its output into the single number the executor’s result protocol reads. Two objective sources are supported (04-rl-and-oniro.md §B.1 seam #2), selected by ObjectiveSource:

  • eval (the default). Run oniro_cli eval --run-dir <dir> --episodes N and take its mean_return. Greedy evaluation draws no RNG, so it is a clean, low-variance function of the trained weights — the design’s preferred objective, and the one that makes common-random-numbers comparisons meaningful.
  • meta. Read checkpoints/meta.json::final_metric, the training run’s last reported metric. Cheaper (no second process) but noisier and algorithm-dependent in meaning (REINFORCE’s last collection return vs Dreamer’s last greedy-eval return).

Every parser here is total: any bytes resolve to Some(value) or None, never a panic (the child turns a None into a non-zero exit, which the executor records as a failed — diverged — trial).

Enums§

ObjectiveSource
Where the trial’s objective is read from.

Constants§

ONIRO_ENVELOPE_SCHEMA_VERSION
The original version of oniro’s machine envelope this consumer understands.

Functions§

parse_mean_return
The mean_return from a kind = "eval" envelope.
parse_run_dir
The run directory from a kind = "run" envelope, or None for anything unusable.
read_final_metric
Reads final_metric out of a checkpoints/meta.json document.