KladML SDK - Enterprise-grade MLOps toolkit
Project description
KladML
Build ML pipelines with pluggable backends. Simple. Modular. Yours.
⭐ Star us on GitHub to support the project!
Why KladML?
| Feature | KladML | MLflow | ClearML |
|---|---|---|---|
| Interface-based | ✅ Pluggable | ❌ Hardcoded | ❌ Hardcoded |
| Server required | ❌ No | ⚠️ Optional | ✅ Yes |
| Local-first | ✅ SQLite default | ✅ Yes | ❌ No |
| Learning curve | 🟢 Minutes | 🟡 Days | 🔴 Weeks |
| Custom backends | ✅ Easy | ⚠️ Complex | ❌ No |
Installation
pip install kladml
Quick Start
# Initialize a project
kladml init my-project
cd my-project
# Run training locally
kladml run native train.py
Create Your Model
from kladml import TimeSeriesModel, ExperimentRunner
class MyForecaster(TimeSeriesModel):
def train(self, X_train, y_train=None, **kwargs):
# Your training logic
return {"loss": 0.1}
def predict(self, X, **kwargs):
return predictions
def evaluate(self, X_test, y_test=None, **kwargs):
return {"mae": 0.5, "mse": 0.25}
def save(self, path: str):
pass
def load(self, path: str):
pass
# Run with experiment tracking
runner = ExperimentRunner()
result = runner.run(
model_class=MyForecaster,
train_data=train_data,
experiment_name="my-experiment",
)
Architecture
KladML uses dependency injection with abstract interfaces. Swap implementations without changing your code:
┌─────────────────────────────────────────────────────────────┐
│ Your Code │
├─────────────────────────────────────────────────────────────┤
│ ExperimentRunner │
├─────────────────────────────────────────────────────────────┤
│ StorageInterface │ ConfigInterface │ TrackerInterface │
├─────────────────────────────────────────────────────────────┤
│ LocalStorage │ YamlConfig │ LocalTracker │
│ S3Storage │ EnvConfig │ MLflowTracker │
│ (your impl) │ (your impl) │ (your impl) │
└─────────────────────────────────────────────────────────────┘
Implement Custom Backends
from kladml.interfaces import StorageInterface
class S3Storage(StorageInterface):
"""Custom S3 implementation."""
def upload_file(self, local_path, bucket, key):
# Your S3 logic
...
# Plug it in
runner = ExperimentRunner(storage=S3Storage())
Interfaces
| Interface | Description | Default |
|---|---|---|
StorageInterface |
Object storage (files, artifacts) | LocalStorage |
ConfigInterface |
Configuration management | YamlConfig |
PublisherInterface |
Real-time metric publishing | ConsolePublisher |
TrackerInterface |
Experiment tracking | LocalTracker (MLflow + SQLite) |
Configuration
Create kladml.yaml:
project:
name: my-project
version: 0.1.0
training:
device: auto # auto | cpu | cuda | mps
storage:
artifacts_dir: ./artifacts
Or use environment variables:
export KLADML_TRAINING_DEVICE=cuda
export KLADML_STORAGE_ARTIFACTS_DIR=/data/artifacts
CLI Commands
kladml --help # Show all commands
kladml init <name> # Initialize new project
kladml run native <script> # Run with local Python
kladml run local <script> # Run in Docker (GPU support)
kladml version # Show version
Contributing
PRs welcome! See CONTRIBUTING.md for guidelines.
git clone https://github.com/kladml/kladml.git
cd kladml
pip install -e ".[dev]"
pytest
License
MIT License - see LICENSE for details.
Documentation · PyPI · GitHub
Made with ❤️ by the KladML Team
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
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 kladml-0.1.0.tar.gz.
File metadata
- Download URL: kladml-0.1.0.tar.gz
- Upload date:
- Size: 40.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4f5cff8961429750fdf01a98151ee4587b33e54796fb2dbd56eab7b3c3f48239
|
|
| MD5 |
60393af9943277b1fd5e4bd1204c6d58
|
|
| BLAKE2b-256 |
005b26d4367dae4fad299e6014cc3fea04953f262189eb8757ab5476f94b40f5
|
File details
Details for the file kladml-0.1.0-py3-none-any.whl.
File metadata
- Download URL: kladml-0.1.0-py3-none-any.whl
- Upload date:
- Size: 29.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
01c47c9e412e15949f3738f81b563f90145adc28c6c47276d0391d27264047cb
|
|
| MD5 |
a8a0b6205634b6c9b9c26ba9aa0b10e5
|
|
| BLAKE2b-256 |
fbdce59014454f4163ce24d1f6d236e7ed15aaf72af30fcebcecb3ed2e829e66
|