Skip to main content

KladML SDK - Enterprise-grade MLOps toolkit

Project description

KladML

Build ML pipelines with pluggable backends. Simple. Modular. Yours.

PyPI - Version PyPI - Python Version License Downloads

⭐ 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kladml-0.1.1.tar.gz (53.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kladml-0.1.1-py3-none-any.whl (42.8 kB view details)

Uploaded Python 3

File details

Details for the file kladml-0.1.1.tar.gz.

File metadata

  • Download URL: kladml-0.1.1.tar.gz
  • Upload date:
  • Size: 53.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for kladml-0.1.1.tar.gz
Algorithm Hash digest
SHA256 c42d169bbfac7c704059033d357d196f5693fac6a157390c05ca787b31af25d5
MD5 bca9da2d343e8b066b2f8feb8573d9fd
BLAKE2b-256 e83551610e87288caa38e9cc250dccee65702898df3c97025ca8f01a48541aae

See more details on using hashes here.

Provenance

The following attestation bundles were made for kladml-0.1.1.tar.gz:

Publisher: publish.yml on kladml/kladml

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file kladml-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: kladml-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 42.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for kladml-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4b88ef09cd7a360b6095233e10fd64bbf4834a17fb898193d170c9f0f8e638a8
MD5 496179bde0c5a9ca76730658e5c4cc52
BLAKE2b-256 7d9da9f1fb3ab089f7435340e97c04f4dbbb5aa619594d11c4bf1dd626a050f9

See more details on using hashes here.

Provenance

The following attestation bundles were made for kladml-0.1.1-py3-none-any.whl:

Publisher: publish.yml on kladml/kladml

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page