Kailash ML 1.0.0 — MANDATORY for ALL ML training/inference/feature/drift/AutoML/RL work. Engine-first km.* surface (train/register/serve/track/diagnose/watch/dashboard/seed/reproduce/resume/lineage/rl_train/engine_info/list_engines/autolog) + 18 engines. Raw sklearn / pytorch / numpy training loops BLOCKED.
Installation
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Kailash ML 1.0.0 — MANDATORY for ALL ML training/inference/feature/drift/AutoML/RL work. Engine-first km.* surface (train/register/serve/track/diagnose/watch/dashboard/seed/reproduce/resume/lineage/rl_train/engine_info/list_engines/autolog) + 18 engines. Raw sklearn / pytorch / numpy training loops BLOCKED.
Kailash ML 1.0.0 — Classical / Deep Learning / RL Lifecycle
Production ML lifecycle framework built on Kailash Core SDK — engine-first km.* verb surface, 18-engine discovery registry, polars-native, ONNX-default serialisation, Agent Tool Discovery for Kaizen integration, wave-released with 6 sibling packages.
1.0.0 Engine-First Surface (Canonical)
Single entry: import kailash_ml as km. Zero-arg construction. 14 lifecycle verbs + 2 discovery verbs grouped in __all__:
import kailash_ml as km
asyncwith km.track("demo") as run: # Group 1 lifecycle
result = await km.train(df, target="y") # Group 1 lifecycle
registered = await km.register(result, name="demo") # Group 1 lifecycle
server = await km.serve("demo@production") # Group 1 lifecycle# $ kailash-ml-dashboard (separate shell) # Group 1 lifecycle
km.diagnose(model) # Group 1 — DLDiagnostics / RAGDiagnostics / RLDiagnostics
km.watch(model, reference_df) # Group 1 — DriftMonitor
km.seed(42); await km.reproduce(run_id) # Group 1 — reproducibilityawait km.resume(run_id) # Group 1 — checkpoint resume
graph = await km.lineage("demo@v1", tenant_id=None) # Group 1 — LineageGraph; ambient tenant via get_current_tenant_id()await km.rl_train(env, policy) # Group 1 — RL
km.autolog() # Group 1 — sklearn/lgb/Lightning/torch auto-logging
info = km.engine_info("TrainingPipeline") # Group 6 Engine Discovery (agents MUST use this, not imports)
engines = km.list_engines() # Group 6 — 18-engine catalog per §E1.1
Quick Start fingerprint (pinned, regression-tested via ml-engines-v2 §16.3):
c962060cf467cc732df355ec9e1212cfb0d7534a3eed4480b511adad5a9ceb00
21 Canonical Specs
Authoritative domain truth lives in specs/. Read the spec before touching the code:
Legacy v0.x material below retained as internal-implementation reference only. The canonical user surface is the engine-first km.* verbs above; the spec files under specs/ml-*.md are the authority.
Install Matrix
pip install kailash-ml # Core: polars, numpy, scipy, sklearn, lightgbm, xgboost, plotly, onnx
pip install kailash-ml[dl] # + PyTorch, Lightning, transformers, timm
pip install kailash-ml[dl-gpu] # + onnxruntime-gpu
pip install kailash-ml[rl] # + Stable-Baselines3, Gymnasium
pip install kailash-ml[agents] # + kailash-kaizen (agent integration)
# NOTE: [xgb] is a no-op alias — xgboost is now a base dep (xgboost>=2.0 ships
# with CUDA built in and auto-detects GPU at runtime, CPU fallback otherwise).
pip install kailash-ml[catboost] # + CatBoost
pip install kailash-ml[explain] # + SHAP (model explainability)
pip install kailash-ml[imbalance] # + imbalanced-learn (SMOTE, ADASYN)
pip install kailash-ml[stats] # + statsmodels
pip install kailash-ml[full] # Everything (CPU)
pip install kailash-ml[all-gpu] # Everything (GPU)
from kailash_ml import ExperimentTracker
tracker = ExperimentTracker(conn)
await tracker.initialize()
asyncwith tracker.run("hyperopt-sweep") as parent:
for params in param_grid:
asyncwith tracker.run("trial", parent_run_id=parent.run_id) as child:
await child.log_params(params)
Decision Tree: kailash-ml vs kailash-align vs kailash-kaizen
You Want To...
Use
Train sklearn/LightGBM/XGBoost models
kailash-ml
Manage feature pipelines
kailash-ml
Monitor model drift
kailash-ml
Export models to ONNX
kailash-ml
Fine-tune an LLM (LoRA, DPO, RLHF)
kailash-align
Serve a fine-tuned LLM via Ollama
kailash-align
Build an AI agent with tools
kailash-kaizen
Add agent intelligence to ML engines
kailash-ml[agents] (uses Kaizen under the hood)
Train RL policies (Gymnasium)
kailash-ml[rl]
Polars-Native Rule (ABSOLUTE)
Every engine accepts and returns polars.DataFrame. Conversion to numpy/pandas/LightGBM Dataset happens ONLY in interop.py at sklearn/framework boundaries.
# DO: Work in polars throughout
df = pl.read_csv("data.csv")
await fs.ingest("features", schema, df)
# DO NOT: Convert to pandas first
df_pd = pd.read_csv("data.csv") # WRONG — polars is the native format
Interop Conversion Table
All conversions live in interop.py. Import from there only.
SQL placement: Zero raw SQL outside _feature_sql.py — all queries go through that module
Model classes: Dynamic model imports validated via validate_model_class() against ALLOWED_MODEL_PREFIXES (sklearn., lightgbm., xgboost., catboost., kailash_ml., torch., lightning.)
Financial fields: math.isfinite() on all cost/budget fields (NaN/Inf bypass comparisons)
Table prefix: Regex-validated in constructor (^[a-zA-Z_][a-zA-Z0-9_]*$)
Bounded collections: Audit trails, cost logs, trial history use deque(maxlen=N)