SDK configuration
Choose where your scripts connect and record results.
Use these settings when connecting another machine, switching projects, or
running automated jobs. The Python client and CLI use the same Hub address and
API key. These examples connect to https://hub.embedl.com.
Configure credentials and address#
For a self-hosted Hub, substitute your installation’s URL and use an API key created there. See Using a self-hosted Hub.
embedl-hub auth --base-url https://hub.embedl.com \
--api-key YOUR_API_KEY Replace YOUR_API_KEY. The address and key are stored in config.yaml in your
operating system’s user configuration directory.
Running embedl-hub auth without options shows the effective address and where
the key comes from, without printing the key.
Environment variables override those stored values:
export EMBEDL_HUB_API_BASE_URL=https://hub.embedl.com
export EMBEDL_HUB_API_KEY=YOUR_API_KEY In automated jobs, inject the key from your secret store. Avoid placing real keys in scripts or logs. Unset an environment variable when you want the stored configuration to apply again.
Use embedl-hub auth --reset-base-url to restore the default address, https://hub.embedl.com.
Select CLI targets#
embedl-hub use project quantized-classifier
embedl-hub use use displays the active run, project, and batch targets and where they come
from. Use embedl-hub use project PROJECT_NAME or embedl-hub use run RUN_ID to save a default project or run.
The CLI updates the nearest .ehub/use.cfg in the current directory or a
parent directory. If none exists, it creates one in the current directory.
Defaults apply below the directory containing that file, unless a nearer file
overrides them. use clear removes the defaults from the same file.
The environment variables EMBEDL_HUB_PROJECT, EMBEDL_HUB_RUN, and EMBEDL_HUB_BATCH override directory defaults; explicit command options
override the environment.
Select a project in Python#
from embedl_hub.tracking import Client
client = Client()
client.set_project("quantized-classifier") set_project finds an accessible project by name or creates one. Names are
unique per owner, so shared projects can have duplicate names. When continuing
from a known run, select that run’s project explicitly:
project = client.get_run_project("EXISTING_RUN_ID")
client.use_project(project) Replace EXISTING_RUN_ID with a run you can read. This avoids selecting a
different project with the same name.