Getting Started
This guide will get you up and running with KladML in under 5 minutes.
Installation
# Core library (lightweight, no UI)
pip install kladml
# Full CLI with Terminal UI
pip install "kladml[cli]"
Verify Installation
Option 1: Universal Quickstart
Note: The
quickstartcommand is currently under maintenance. Please use the interactive workflow below.
Option 2: Interactive TUI (Recommended)
Launch the Terminal User Interface for a guided experience:
Option 3: Traditional Workflow
Initialize a Project
This creates the standard directory structure:
data/
├── kladml.sqlite # Local database
├── configs/ # YAML configurations
├── datasets/ # Your data
└── projects/ # Training results
└── {project}/
└── {run_id}/
├── config.yaml
├── checkpoints/
├── exports/
└── evaluations/
Train with Config
Example config:
project: my-project
experiment: baseline_v1
dataset: my_data/processed
architecture: TransformerAutoencoder
params:
d_model: 64
n_heads: 4
training:
epochs: 50
batch_size: 128
export:
auto: true
format: onnx
evaluation:
auto: true
evaluator: AnomalyEvaluator
Evaluate a Run
Compare Runs
Hyperparameter Tuning
Use Optuna integration for automated hyperparameter search:
Create Custom Models
from kladml import BaseModel, MLTask
class MyModel(BaseModel):
@property
def ml_task(self):
return MLTask.CLASSIFICATION
def train(self, X_train, y_train=None, **kwargs):
# Your training logic
return {"accuracy": 0.95}
def predict(self, X, **kwargs):
return predictions
def evaluate(self, X_test, y_test=None, **kwargs):
return {"accuracy": 0.93, "f1": 0.91}
def save(self, path: str):
# Save model artifacts
pass
def load(self, path: str):
# Load model artifacts
pass
Register it:
Then use it:
Next Steps
- Core Concepts - Understand interfaces and architecture
- Architecture - Deep dive into model contracts
- Roadmap - Planned features
- CLI Reference - All available commands