Simplifying PyTorch workflows: Pipeline, Versioning, and Vault.
Project description
useml
Stop coding plumbing, start training models.
useml is a minimalist framework for PyTorch designed to eliminate the 90% of software engineering overhead in Machine Learning projects. It handles pipelines, versioning, and environment sealing so you can focus on the architecture.
Key Features
- AtomicData: Type-safe data structures for PyTorch.
- Auto-Versioning: Every run is automatically linked to a Git commit and config snapshot.
- The Vault: Seal your model, schema, and weights into a single, portable artifact.
- Zero Friction: If it doesn't simplify your code, it doesn't belong in
useml.
Basic Usage
import torch
from useml import Vault
# 1. Initialize your vault (the root storage)
vault = Vault(path="my_vault")
# 2. Get or create a specific Project
project = vault.get_project("mnist_classifier")
# 3. Define your model
model = torch.nn.Linear(10, 2)
# 4. Commit your progress
# This saves: weights.pth + manifest.yaml + metadata.yaml
project.commit(model, message="Initial baseline", lr=1e-3, accuracy=0.92)
# 5. List project history (newest first)
for snap in project.log():
print(f"[{snap['timestamp']}] {snap['message']} | Acc: {snap['accuracy']}")
# 6. Restore weights from the latest snapshot
latest = project[0]
latest.load_weights(model)
Installation
pip install useml
Why useml?
Most ML projects fail because of "hidden technical debt" in the pipeline. useml enforces a clean structure from the first line of code, ensuring that every experiment you run is 100% reproducible and deployable.
Development & Testing
If you want to contribute or test the framework, follow these steps.
1. Install for development
Clone the repo and install it in editable mode with dev dependencies:
pip install -e ".[dev]"
2. Running Tests
We use pytest for unit testing. The tests are located in the tests/ directory. To run the full suite:
pytest -vv
3. Build & Publish
Update Version: Increment version in pyproject.toml.
Build the package:
rm -rf dist/ build/ *.egg-info
python3 -m build
twine check dist/*
Upload the new package version:
twine upload dist/*
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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 useml-0.0.2.tar.gz.
File metadata
- Download URL: useml-0.0.2.tar.gz
- Upload date:
- Size: 8.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6c061cf3bbbf3df815a730dd28c8dd7e2072cac3f0cc5da3b2ded90869842164
|
|
| MD5 |
8d4699cabaee3803a6b12b830f49c3d9
|
|
| BLAKE2b-256 |
dd210d8b7aa3bf14b94c8f71c9b1328db28392dc1bd997761b881b4ad748aa28
|
File details
Details for the file useml-0.0.2-py3-none-any.whl.
File metadata
- Download URL: useml-0.0.2-py3-none-any.whl
- Upload date:
- Size: 6.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cff15daffaa6c16c04a2463370aed2f0f6646a8643560ef337e5da0eabc02c04
|
|
| MD5 |
ae6cad90adf969e2a23e853f2a9cf936
|
|
| BLAKE2b-256 |
541db808807ede35b282be7cefab9fdfa918c58cb900dd0776deefc6e0975e8d
|