ZenML is a unified MLOps framework that extends battle-tested machine learning operations principles to support the entire AI stack, from classical machine learning models to advanced AI agents.
ZenML includes 67 integrations with various ML/MLOps tools, cloud providers, and frameworks. Each integration provides stack component flavors, materializers, steps, and utilities specific to that tool.
AWS Integration
pip install zenml[aws]Azure Integration
pip install zenml[azure]GCP Integration
pip install zenml[gcp]Kubernetes
pip install zenml[kubernetes]Kubeflow
pip install zenml[kubeflow]Airflow
pip install zenml[airflow]Tekton
pip install zenml[tekton]Databricks
pip install zenml[databricks]Lightning
pip install zenml[lightning]Modal
pip install zenml[modal]SkyPilot
pip install zenml[skypilot]MLflow
pip install zenml[mlflow]Weights & Biases
pip install zenml[wandb]Neptune
pip install zenml[neptune]Comet
pip install zenml[comet]TensorBoard
pip install zenml[tensorboard]PyTorch
pip install zenml[pytorch]TensorFlow
pip install zenml[tensorflow]PyTorch Lightning
pip install zenml[pytorch-lightning]JAX
pip install zenml[jax]Scikit-learn
pip install zenml[sklearn]XGBoost
pip install zenml[xgboost]LightGBM
pip install zenml[lightgbm]HuggingFace
pip install zenml[huggingface]LangChain
pip install zenml[langchain]LlamaIndex
pip install zenml[llama-index]Great Expectations
pip install zenml[great-expectations]Deepchecks
pip install zenml[deepchecks]Evidently
pip install zenml[evidently]Whylogs
pip install zenml[whylogs]BentoML
pip install zenml[bentoml]Seldon Core
pip install zenml[seldon]vLLM
pip install zenml[vllm]Label Studio
pip install zenml[label-studio]Pigeon
pip install zenml[pigeon]Argilla
pip install zenml[argilla]Slack
pip install zenml[slack]Discord
pip install zenml[discord]Feast
pip install zenml[feast]Facets
pip install zenml[facets]GitHub
pip install zenml[github]GitLab
pip install zenml[gitlab]Bitbucket
pip install zenml[bitbucket]Spark
pip install zenml[spark]Kaniko
pip install zenml[kaniko]NumPy
Pandas
Pillow
pip install zenml[pillow]PyArrow
pip install zenml[pyarrow]SciPy
pip install zenml[scipy]PyCaret
pip install zenml[pycaret]Neural Prophet
pip install zenml[neural-prophet]HyperAI
pip install zenml[hyperai]# Single integration
pip install zenml[aws]
# Multiple integrations
pip install zenml[aws,mlflow,pytorch]
# All integrations
pip install zenml[all]from zenml.integrations.aws import AWSIntegration
# Check if integration is installed
if AWSIntegration.check_installation():
print("AWS integration available")
# Integration is auto-activated when components are usedfrom zenml.client import Client
client = Client()
# Create S3 artifact store
client.create_stack_component(
name="s3_store",
flavor="s3",
component_type="artifact_store",
configuration={
"path": "s3://my-bucket/artifacts",
"region": "us-east-1"
}
)from zenml import step, pipeline
from zenml.client import Client
client = Client()
# Create MLflow experiment tracker
client.create_stack_component(
name="mlflow_tracker",
flavor="mlflow",
component_type="experiment_tracker",
configuration={
"tracking_uri": "http://localhost:5000"
}
)
# Use in step
@step(experiment_tracker="mlflow_tracker")
def train_model(data: list) -> dict:
import mlflow
mlflow.log_param("param1", "value1")
mlflow.log_metric("accuracy", 0.95)
return {"model": "trained"}from zenml import step
import torch
import torch.nn as nn
@step
def train_pytorch_model(data: list) -> nn.Module:
"""PyTorch models automatically use PyTorch materializer."""
model = nn.Sequential(
nn.Linear(10, 5),
nn.ReLU(),
nn.Linear(5, 1)
)
# Training logic
return model
@step
def evaluate_model(model: nn.Module, test_data: list) -> float:
"""Model automatically deserialized."""
# Evaluation logic
return 0.95from zenml.client import Client
client = Client()
# Create SageMaker orchestrator
client.create_stack_component(
name="sagemaker",
flavor="sagemaker",
component_type="orchestrator",
configuration={
"execution_role": "arn:aws:iam::123456789:role/SageMaker",
"region": "us-east-1",
"instance_type": "ml.m5.large"
}
)
# Create stack with SageMaker
client.create_stack(
name="sagemaker_stack",
components={
"orchestrator": "sagemaker",
"artifact_store": "s3_store"
}
)
# Activate and use
client.activate_stack("sagemaker_stack")from zenml import step
import pandas as pd
@step
def validate_data(data: pd.DataFrame) -> pd.DataFrame:
"""Validate data with Great Expectations."""
from great_expectations.core import ExpectationSuite
from great_expectations.dataset import PandasDataset
ge_df = PandasDataset(data)
# Define expectations
ge_df.expect_column_to_exist("feature1")
ge_df.expect_column_values_to_not_be_null("feature1")
ge_df.expect_column_values_to_be_between("feature1", 0, 100)
# Validate
results = ge_df.validate()
if not results.success:
raise ValueError("Data validation failed")
return datafrom zenml import pipeline
from zenml.hooks import alerter_success_hook, alerter_failure_hook
from zenml.client import Client
client = Client()
# Create Slack alerter
client.create_stack_component(
name="slack_alerter",
flavor="slack",
component_type="alerter",
configuration={
"slack_token": "xoxb-your-token",
"default_slack_channel_id": "C01234567"
}
)
# Use in pipeline
@pipeline(
on_success=alerter_success_hook("slack_alerter"),
on_failure=alerter_failure_hook("slack_alerter")
)
def monitored_pipeline():
# Pipeline definition
passfrom zenml.integrations.registry import integration_registry
# List all integrations
for name, integration in integration_registry.integrations.items():
print(f"{name}: {integration.NAME}")
# Check specific integration
from zenml.integrations.pytorch import PyTorchIntegration
print(f"PyTorch Integration: {PyTorchIntegration.NAME}")
print(f"Requirements: {PyTorchIntegration.REQUIREMENTS}")from zenml.client import Client
client = Client()
# AWS + MLflow + PyTorch stack
stack_components = {
"orchestrator": "sagemaker",
"artifact_store": "s3_store",
"container_registry": "ecr",
"experiment_tracker": "mlflow",
"model_registry": "mlflow_registry"
}
client.create_stack(
name="ml_production",
components=stack_components
)Install with Tessl CLI
npx tessl i tessl/pypi-zenml