Skip to content

CLI

Installed as et.

et history

Print a run's recorded history.

et history tracker/jsonl/demo/run-1
et history tracker/jsonl/demo/run-1 -n 50 --metrics loss,lr
et history tracker/jsonl/demo/run-1 --step-range 100:200 --format json
et history tracker/jsonl/demo/run-1 -n -1 --format csv > run.csv
et history runs/llm/sft-1 --stream data
Option Default Meaning
-n 20 number of steps, -1 for all
--metrics all comma-separated names
--step-range — start:end, end exclusive; either side may be empty
--stream the unnamed producer which stream to read
--format table table, json or csv

The argument is a run directory or a metrics.jsonl file.

et trace

Export recorded spans as a Chrome Trace, for Perfetto or chrome://tracing.

et trace runs/llm/sft-1                              # every stream -> trace.json
et trace runs/llm/sft-1 -o pipeline.json
et trace runs/llm/sft-1 --stream data                # one stream
et trace runs/llm/sft-1 --stream default,data        # several
et trace runs/llm/sft-1 --step-range 100:200         # a slice of the run
Option Default Meaning
-o, --output trace.json where to write
--stream every stream comma separated; default is the unnamed one
--step-range all start:end, end exclusive

et rules explain

Show how an expression parses, and what it references. Useful when precedence is in question:

et rules explain "diff(m1)>50 | m1 > 5 => warn: x"
condition : (diff(m1) > 50) or (m1 > 5)
level     : warning
message   : x
metrics   : m1
functions : diff

The rendered condition is fully parenthesised, so there is nothing left to misread.

et rules test

Replay a rule over recorded history to tune a threshold before trusting it:

et rules test "zscore(loss[50]) > 4 => error: spike" --run tracker/jsonl/demo/run-1
replayed 1000 steps, 2 alert(s)
  step=417  loss_spike: spike at 417
  step=863  loss_spike: spike at 863

-n limits the replay to the last N steps.

et alert

Send a one-off alert through the configured channels:

et alert "training finished" --title Done --level info
et alert "node 3 is on fire" --level critical --channel oncall

Channels come from the same configuration the library uses: ET_ALERT_CONFIG or the ET_LARK_WEBHOOK_URL environment variable. See Alerts.

et alert automatically loads .env from the directory where you invoke it, before resolving alert configuration. Existing environment variables take precedence, including empty values. It does not search parent directories; a missing .env is fine. Use --no-dotenv to disable loading.

# .env
ET_LARK_WEBHOOK_URL=https://example.com/your-webhook

Quoted values, comments, and ${VAR} expansion are supported; shell commands are not executed. Keep secrets out of version control. This loading applies only to et alert, not other CLI commands or the Python API.