Skip to main content

Module agent

Module agent 

Source
Expand description

The output of comnum --json for programs and agents: one compact JSON document per specification on standard output, results with their confidence intervals and their provenance, errors with a stable kind, a hint and a suggestion, and the time budget of --max-seconds.

A run is a line

{"ok": true, "command": "run", "spec": NAME, "provenance": {...}, "budget_s": S,
 "conditions": [{"condition": {...}, "status": ..., "trials": N, "wall_s": T,
                 "time_limited": false, "metrics": {"ber": {"value": ..., "lo": ...,
                 "hi": ..., "count": ..., "total": ...}}}], "wall_s": T}

and an error a line {"ok": false, "command": ..., "file": ..., "error": {"kind": ..., "message": ..., "hint": ..., "suggestion": ...}}, the kind one of usage, config, shape, numerical, condition and io.

Constants§

DEFAULT_BUDGET_S
The time budget of a run in JSON mode when --max-seconds is not given (s).

Functions§

apply_budget
Spread a budget of seconds over the conditions (and the evaluations of a search) of spec: its stopping rule becomes the rule of the specification or the share of the budget of every condition, whichever comes first. Returns the rule of the specification, to tell afterwards which conditions the budget cut short.
budget
The budget of a run (s): --max-seconds (0 for none), DEFAULT_BUDGET_S in JSON mode, none otherwise.
check_json
One check of verify.
condition
One condition of a run: its values, how it ended, its metrics with their intervals, and whether the budget stopped it before the rule of the specification (original) was met.
error
An error as JSON: its kind, its message, a hint (the command that documents what was wrong) and, for a misspelt block or parameter, the closest name.
error_kind
The kind of an error: config, shape, numerical, condition, io (other for a kind added later).
fingerprint
FNV-1a (64 bits) of a text, in hexadecimal: the same specification gives the same fingerprint on every machine.
operating_point
One operating point of a search.
provenance
The provenance of a run: the version of comnum, the seed, the threads, the confidence, a fingerprint of the specification and the reports written.