Skip to content

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:

Terminal window
pip install 'metrana[wandb]'

Requires Python 3.10+, same as the base package.

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:

Terminal window
$ metrana migrate wandb --entity my-team --project sweeps --workspace my-workspace
Migrating from Weights & Biases requires the optional wandb dependency. Install it with: pip install 'metrana[wandb]'

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:

Terminal window
export METRANA_API_KEY="..."
wandb login # if not already logged in
metrana migrate wandb --entity my-team --project sweeps --workspace my-workspace

The 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.

--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):

Terminal window
metrana migrate wandb \
--entity my-team --project sweeps --workspace my-workspace \
--ingestion-url https://ingestion.development.metrana.ai