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",
type="model",
storage_name="s3",
description="Model trained on latest data",
metadata={"val_loss": 0.15},
tags=["v1"],
)
# Or use create_with_info() to get version and other details
artifact = job.create_with_info(
"TrainedModel",
type="model",
storage_name="s3",
description="Model trained on latest data",
metadata={"val_loss": 0.15},
)
print(f"Created {artifact.name} v{artifact.version} at {artifact.path}")
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, typed piece of data with metadata, tags, and lineage
Registering external data
exp = reg.get_experiment("baseline")
exp.register("TrainingData", type="dataset", 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.3.4.tar.gz
(9.2 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
zvondb-0.3.4-py3-none-any.whl
(10.2 kB
view details)
File details
Details for the file zvondb-0.3.4.tar.gz.
File metadata
- Download URL: zvondb-0.3.4.tar.gz
- Upload date:
- Size: 9.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9ec122fee6c4aba66c5cab59747aa1c2cd81ace5a6f1f36c91df21e98747a0e2
|
|
| MD5 |
9b2b6dd46b721f9c4804f26e7cc0d3f7
|
|
| BLAKE2b-256 |
d8a532ee521c1e754576ef31d1b8d12698fd37ffbe4599ce62e8b5fa316b0c45
|
File details
Details for the file zvondb-0.3.4-py3-none-any.whl.
File metadata
- Download URL: zvondb-0.3.4-py3-none-any.whl
- Upload date:
- Size: 10.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d21a738dec59d665d55ff6a03439696d6881a44f815523cd24d503a3fa3c70b8
|
|
| MD5 |
554991b2ca756d92cbfc9aa8a9707064
|
|
| BLAKE2b-256 |
7cf6a9747c62d098d9411eade3012abc611b9cd5985a0588fad72bb001701a1c
|