Installation
The migration command lives in the metrana package. Reading from a source tracker needs that tracker’s own
client, which ships as an extra:
pip install 'metrana[wandb]'Requires Python 3.10+, same as the base package.
Why an extra
Section titled “Why an extra”A migration reads from one tracker and writes to Metrana, so it needs both clients — but only for as long as
the migration takes. Keeping the source client optional means a training image that only calls
metrana.log(...) never installs it.
The metrana command itself works without any source extra; only the source’s own subcommand needs one.
Invoking it without the extra fails immediately, with the fix in the message:
$ metrana migrate wandb --entity my-team --project sweeps --workspace my-workspaceMigrating from Weights & Biases requires the optional wandb dependency. Install it with: pip install 'metrana[wandb]'Two API keys
Section titled “Two API keys”A migration authenticates on both sides.
| Side | Resolution order |
|---|---|
| Source | --wandb-api-key, then the source client’s own resolution (WANDB_API_KEY, then its stored login) |
| Metrana | --api-key, then METRANA_API_KEY |
A shell already logged into both needs neither flag:
export METRANA_API_KEY="..."wandb login # if not already logged in
metrana migrate wandb --entity my-team --project sweeps --workspace my-workspaceThe Metrana key must belong to a member of the target workspace, and the migration creates the target project if it does not exist. See API keys for getting one.
Targeting a different deployment
Section titled “Targeting a different deployment”--ingestion-url points the write side at a non-production ingestion endpoint, matching the ingestion_url
argument to metrana.init(). Leave it off and the CLI reads
METRANA_INGESTION_URL, then falls back to production (see
Service endpoints):
metrana migrate wandb \ --entity my-team --project sweeps --workspace my-workspace \ --ingestion-url https://ingestion.development.metrana.ai