zenml

Par mkurman · zorai

ZenML — orchestration de pipelines ML. Connectez vos outils ML (MLflow, W&B, Airflow, Kubeflow) dans des pipelines portables. Gestion du cache, du versioning et des stacks cloud-agnostic pour les workflows ML en production.

npx skills add https://github.com/mkurman/zorai --skill zenml

Aperçu

ZenML est un framework MLOps pour des pipelines ML portables et reproductibles. Il fournit une abstraction de pipeline standardisée avec suivi intégré, cache, gestion des artefacts et intégration avec les principaux outils ML et cloud.

Installation

uv pip install zenml

Pipeline basique

from zenml import pipeline, step

@step
def load_data() -> dict:
    return {"data": [1, 2, 3], "labels": [0, 1, 0]}

@step
def train_model(data: dict) -> str:
    return f"Trained on {len(data['data'])} samples"

@pipeline
def training_pipeline():
    data = load_data()
    model = train_model(data)

training_pipeline()

Cache

# Steps are automatically cached — rerunning only changes
@step(enable_cache=True)
def preprocess(raw: dict) -> dict:
    return {"features": [x * 2 for x in raw["data"]]}

# Changing parameters invalidates cache
@step
def train_with_params(data: dict, lr: float = 0.01) -> str:
    return f"Trained with lr={lr}"

Stack et déploiement

zenml stack register my_stack -o default -a default
zenml stack set my_stack
zenml deploy

Références

Skills similaires