CLI
Track shell commands and log results from existing scripts.
Use the embedl-hub CLI to record results from shell scripts or track an
existing command as a run. It works with the same projects as the Python client.
Complete SDK setup first.
ehub is a shorter name for the same command. Use --help on any command to see
its options.
Start and finish a run#
run=$(embedl-hub run start --type eval --name "Evaluate classifier")
embedl-hub log param --run "$run" model_id classifier_int8_v1
embedl-hub log tag --run "$run" sample_data true
embedl-hub log metric --run "$run" accuracy 0.92 --step 1
embedl-hub run finish "$run"
embedl-hub run url "$run" This logs illustrative data. Replace it with measurements from your own work.
A run started with run start stays open until you finish it.
Use --use on run start to select it for subsequent commands in this
directory and those below it, through the nearest .ehub/use.cfg. See CLI targets for how that file is chosen. embedl-hub use shows the selected defaults; use clear removes them.
Explicit --run options are useful in scripts that track several runs.
Wrap an existing command#
embedl-hub exec --type eval python evaluate.py Replace evaluate.py with your script. exec starts a run, provides the run
and its project to the command through EMBEDL_HUB_RUN and EMBEDL_HUB_PROJECT, and finishes it based on the command’s outcome. Commands inside the script can use embedl-hub log to attach results
to that run.
A Python script can adopt the run with client.use_inherited_run() instead of
starting a second run. The wrapper remains responsible for finishing it.
exec --safe is the CLI’s only safe-mode switch. See Safe integration for its
behavior and how to handle logging inside the command.
Queue log entries#
Use a batch to collect log entries locally and send them together. Create a run and select it before starting a batch:
embedl-hub run start --type eval --use
embedl-hub batch start --name "Evaluation metrics" --use
embedl-hub log metric accuracy 0.92 --step 1
embedl-hub log param dataset validation_v1
embedl-hub batch show
embedl-hub batch send
embedl-hub run finish Batch entries stay on the local machine until sent successfully. Starting and
finishing a run still requires a connection. Use batch list to find local
queues and batch discard to remove one you no longer need.
Inspect recorded work#
embedl-hub run list
embedl-hub run show RUN_ID
embedl-hub run url RUN_ID run list shows running, pending, and finished runs by default, and reports
when failed or killed runs are hidden. Use --failed for only failed and killed
runs, or --all for every status. run list and run show support --json.
Command groups#
| Command | Purpose |
|---|---|
| auth | Configure credentials and the Hub address. |
| use | Set default run, project, or batch targets. |
| run | Create, finish, inspect, and link runs. |
| exec | Wrap an existing command in a run. |
| log | Record metrics, parameters, tags, links, artifacts, and dashboards. |
| batch | Queue and send log entries. |
Next steps#
- Explore results to inspect the runs you recorded.