Skip to main content

KladML SDK - Enterprise-grade MLOps toolkit

Project description

KladML

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

PyPI - Version License

⭐ 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 ✅ Unified SQLite DB ✅ Yes ❌ No
Learning curve 🟢 Minutes 🟡 Days 🔴 Weeks
Hierarchy ✅ Workspace/Proj/Fam ❌ Exp/Run ❌ Project/task
User Interface ✅ TUI (Terminal) ⚠️ Web UI ✅ Web UI
Custom backends ✅ Easy ⚠️ Complex ❌ No


Requirements

  • Python: 3.10, 3.11, 3.12 (Native support for modern type hints)
  • OS: Linux, macOS, Windows

Installation

# Core (lightweight, minimal dependencies)
pip install kladml

# All SDK features (tracking, training, dev tools)
pip install "kladml[all]"

# For Vision support (optional)
pip install "kladml[vision]"

Workflow

1. Initialize Workspace

kladml init

Creates the standard folder structure (data/configs/, data/projects/, data/datasets/).

2. Interactive Management (TUI)

kladml ui

Explore projects, runs, and datasets visually in your terminal.

3. Training

# Train using a config file (auto-detects GPU/MPS)
kladml train --config data/configs/my_config.yaml

# Distributed Training (Multi-GPU)
kladml train --config ... --distributed --num-processes 2

Universal Trainer: Supports Mixed Precision (FP16/BF16), Gradient Accumulation, and Multi-GPU without changing code.


Built-in Baselines

KladML is designed to work with any custom model (PyTorch, Scikit-learn, etc.). For convenience, we provide these reference implementations out-of-the-box:

Domain Reference Model
Tabular XGBoost (Coming Soon)
Time Series Transformers
Computer Vision ResNet / ViT (Coming Soon)
TEXT BERT (Coming Soon)

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: ./data

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                   # Initialize workspace
kladml version                # Show version

# Training
kladml train quick ...        # Quick training (no DB setup)
kladml train single ...       # Full training with project/experiment

# Evaluation
kladml eval run ...           # Evaluate a model
kladml eval info              # Show available evaluators
kladml compare --runs r1,r2   # Compare runs side-by-side

# Data
kladml data inspect <path>    # Analyze a dataset
kladml data summary <dir>     # Summary of datasets in directory
kladml data convert ...       # Convert PKL -> HDF5

# Models
kladml models export ...      # Export to TorchScript

# Organization
kladml project list           # List all projects
kladml family list ...        # List families
kladml experiment list ...    # List experiments

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 in 🇮🇹 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.9.0.tar.gz (369.4 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.9.0-py3-none-any.whl (146.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for kladml-0.9.0.tar.gz
Algorithm Hash digest
SHA256 48b82f806c38f06b6bc2e1f40e9503b21aad0b4daaf73623179955a7b1dc51c6
MD5 b060df7371d1055fb4045958fb3f98f5
BLAKE2b-256 00d387f45c49e0ae5c67363ce1a4a7836f543b3ed242607bda344d4cb1251592

See more details on using hashes here.

Provenance

The following attestation bundles were made for kladml-0.9.0.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.9.0-py3-none-any.whl.

File metadata

  • Download URL: kladml-0.9.0-py3-none-any.whl
  • Upload date:
  • Size: 146.6 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.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fda1616a8323b73cd0db9d5f3bc0ce0739f1e03022b0032bb4e3ee3838a995f3
MD5 88792876d725f5a999f1d39c3b6a5d2f
BLAKE2b-256 beecb87758f550e23236f2c29391ddf8f2aa9cc302e7083c4f18e144d209e499

See more details on using hashes here.

Provenance

The following attestation bundles were made for kladml-0.9.0-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