Python SDK for the ML Artifact Registry
Project description
zvondb
Python SDK for the ML Artifact Registry — track artifacts, their lineage, and versions across ML experiments.
Installation
pip install zvondb
Quick start
from zvondb import Registry
with Registry(project="my-project") as reg:
exp = reg.ensure_experiment("my-experiment", parent="baseline")
with exp.start_job(name="train", git_sha="abc123") as job:
# Resolve input artifacts (walks parent chain)
data = job.resolve("TrainingData")
print(f"Using {data.name} v{data.version} from {data.path}")
# ... train your model ...
# Register output artifact
job.create(
"TrainedModel",
storage_name="s3",
description="Model trained on latest data",
metadata={"val_loss": 0.15},
tags=["v1"],
)
job.complete()
Configuration
| Environment variable | Constructor param | Default | Description |
|---|---|---|---|
ZVONDB_URL |
base_url |
http://localhost:8000 |
Registry server URL |
ZVONDB_API_KEY |
api_key |
"" |
API authentication token |
Key concepts
- Registry — entry point; manages projects and experiments
- Experiment — a branch of work that can inherit artifacts from a parent experiment
- Job — a unit of work that consumes and produces artifacts
- Artifact — a versioned, named piece of data with metadata, tags, and lineage
Registering external data
exp = reg.get_experiment("baseline")
exp.register("TrainingData", path="s3://bucket/data/v3", description="External dataset")
# Jobs can now resolve it
with exp.start_job(name="train", git_sha="abc") as job:
data = job.resolve("TrainingData")
W&B integration
with exp.start_job(name="train", git_sha="abc123") as job:
job.inject_wandb_env() # Sets WANDB_API_KEY, WANDB_PROJECT, WANDB_RUN_ID etc.
# Tracking URL auto-set to https://wandb.ai/{entity}/{project}/runs/{job_id}
# Frameworks like Axolotl that respect W&B env vars just work.
# For manual usage:
import wandb
wandb.init()
wandb.log({"loss": 0.5})
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
zvondb-0.2.2.tar.gz
(8.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file zvondb-0.2.2.tar.gz.
File metadata
- Download URL: zvondb-0.2.2.tar.gz
- Upload date:
- Size: 8.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d7d00bf9f71d062b524d3637c1f3c2aa2062147039ad5980f6e3c6e15f16bcae
|
|
| MD5 |
a15a68895fa226e05aef9e9ca69d00cc
|
|
| BLAKE2b-256 |
69a4dde3d9dbf4551af01369cf32fd5f4da6325a2c450bd188225f0957a9a777
|
File details
Details for the file zvondb-0.2.2-py3-none-any.whl.
File metadata
- Download URL: zvondb-0.2.2-py3-none-any.whl
- Upload date:
- Size: 9.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cdf8ed3053afb56ca6173d2d3eb63ade1e7f02fad9347f45de5cdf2f3e5dc7d1
|
|
| MD5 |
b1f05f92baf5e6c0b56d0475576af902
|
|
| BLAKE2b-256 |
f56f2f25e17fec358bce39154a78bf79edbe88fce390cee57ab7f46716da2db0
|