<div align="center">
<!-- PROJECT LOGO -->
<br />
<a href="https://zenml.io">
<img src="docs/book/.gitbook/assets/header.png" alt="ZenML Header">
</a>
<br />
<div align="center">
<h3 align="center">Your unified toolkit for shipping everything from decision trees to complex AI agents, built on the MLOps principles you already trust.</h3>
</div>
[![PyPi][pypi-shield]][pypi-url]
[![PyPi][pypiversion-shield]][pypi-url]
[![PyPi][downloads-shield]][downloads-url]
[![Contributors][contributors-shield]][contributors-url]
[![License][license-shield]][license-url]
</div>
<!-- MARKDOWN LINKS & IMAGES -->
[pypi-shield]: https://img.shields.io/pypi/pyversions/zenml?color=281158
[pypi-url]: https://pypi.org/project/zenml/
[pypiversion-shield]: https://img.shields.io/pypi/v/zenml?color=361776
[downloads-shield]: https://img.shields.io/pypi/dm/zenml?color=431D93
[downloads-url]: https://pypi.org/project/zenml/
[contributors-shield]: https://img.shields.io/github/contributors/zenml-io/zenml?color=7A3EF4
[contributors-url]: https://github.com/zenml-io/zenml/graphs/contributors
[license-shield]: https://img.shields.io/github/license/zenml-io/zenml?color=9565F6
[license-url]: https://github.com/zenml-io/zenml/blob/main/LICENSE
<div align="center">
<p>
<a href="https://zenml.io/features">Features</a> •
<a href="https://zenml.io/roadmap">Roadmap</a> •
<a href="https://github.com/zenml-io/zenml/issues">Report Bug</a> •
<a href="https://zenml.io/pro">Sign up for ZenML Pro</a> •
<a href="https://www.zenml.io/blog">Blog</a> •
<a href="https://zenml.io/podcast">Podcast</a>
<br />
<br />
🎉 For the latest release, see the <a href="https://github.com/zenml-io/zenml/releases">release notes</a>.
</p>
</div>
---
## 🚨 The Problem: MLOps Works for Models, But What About AI?

You're an ML engineer. You've perfected deploying `scikit-learn` models and wrangling PyTorch jobs. Your MLOps stack is dialed in. But now, you're being asked to build and ship AI agents, and suddenly your trusted toolkit is starting to crack.
- **The Adaptation Struggle:** Your MLOps habits (rigorous testing, versioning, CI/CD) don’t map cleanly onto agent development. How do you version a prompt? How do you regression test a non-deterministic system? The tools that gave you confidence for models now create friction for agents.
- **The Divided Stack:** To cope, teams are building a second, parallel stack just for LLM-based systems. Now you’re maintaining two sets of tools, two deployment pipelines, and two mental models. Your classical models live in one world, your agents in another. It's expensive, complex, and slows everyone down.
- **The Broken Feedback Loop:** Getting an agent from your local environment to production is a slow, painful journey. By the time you get feedback on performance, cost, or quality, the requirements have already changed. Iteration is a guessing game, not a data-driven process.
## 💡 The Solution: One Framework for your Entire AI Stack
Stop maintaining two separate worlds. ZenML is a unified MLOps framework that extends the battle-tested principles you rely on for classical ML to the new world of AI agents. It’s one platform to develop, evaluate, and deploy your entire AI portfolio.
```python
# Morning: Your sklearn pipeline is still versioned and reproducible.
train_and_deploy_classifier()
# Afternoon: Your new agent evaluation pipeline uses the same logic.
evaluate_and_deploy_agent()
# Same platform. Same principles. New possibilities.
```
With ZenML, you're not replacing your knowledge; you're extending it. Use the pipelines and practices you already know to version, test, deploy, and monitor everything from classic models to the most advanced agents.
## 💻 See It In Action: Multi-Agent Architecture Comparison
**The Challenge:** Your team built three different customer service agents. Which one should go to production? With ZenML, you can build a reproducible pipeline to test them on real data and make a data-driven decision, with full observability via Langgraph, LiteLLM & Langfuse.
https://github.com/user-attachments/assets/edeb314c-fe07-41ba-b083-cd9ab11db4a7
```python
from zenml import pipeline, step
from zenml.types import HTMLString
import pandas as pd
@step
def load_real_conversations() -> pd.DataFrame:
"""Load customer service queries for testing."""
return load_customer_queries()
@step
def train_intent_classifier(queries: pd.DataFrame):
"""Train a scikit-learn classifier alongside your agents."""
return train_sklearn_pipeline(queries)
@step
def load_prompts() -> dict:
"""Load prompts as versioned ZenML artifacts."""
return load_agent_prompts_from_files()
@step
def run_architecture_comparison(queries: pd.DataFrame, classifier, prompts: dict) -> tuple:
"""Test three different agent architectures on the same data."""
architectures = {
"single_agent": SingleAgentRAG(prompts),
"multi_specialist": MultiSpecialistAgents(prompts),
"langgraph_workflow": LangGraphAgent(prompts) # Real LangGraph implementation!
}
# ZenML automatically versions agent code, prompts, and configurations
# LiteLLM provides unified access to 100+ LLM providers
# Langgraph orchestrates a multi-agent graph
# Langfuse tracks costs, performance, and traces for full observability
results = test_all_architectures(queries, architectures)
mermaid_diagram = generate_langgraph_visualization()
return results, mermaid_diagram
@step
def evaluate_and_decide(queries: pd.DataFrame, results: dict) -> HTMLString:
"""Generate beautiful HTML report with winner selection."""
return create_styled_comparison_report(results)
@pipeline
def compare_agent_architectures():
"""Data-driven agent architecture decisions with full MLOps tracking."""
queries = load_real_conversations()
prompts = load_prompts() # Prompts as versioned artifacts
classifier = train_intent_classifier(queries)
results, viz = run_architecture_comparison(queries, classifier, prompts)
report = evaluate_and_decide(queries, results)
if __name__ == "__main__":
compare_agent_architectures()
# 🎯 Rich visualizations automatically appear in ZenML dashboard
```
**🚀 [See the complete working example →](examples/agent_comparison/)**
**The Result:** A clear winner is selected based on data, not opinions. You have full lineage from the test data and agent versions to the final report and deployment decision.

## 🚀 Get Started (5 minutes)
### 🏗️ Architecture Overview
ZenML uses a **client-server architecture** with an integrated web dashboard ([zenml-io/zenml-dashboard](https://github.com/zenml-io/zenml-dashboard)) for pipeline visualization and management:
- **Local Development**: `pip install "zenml[server]"` - runs both client and server locally
- **Production**: Deploy server separately, connect with `pip install zenml` + `zenml login <server-url>`
```bash
# Install ZenML with server capabilities
pip install "zenml[server]"
# Install required dependencies
pip install scikit-learn openai numpy
# Initialize your ZenML repository
zenml init
# Start local server or connect to a remote one
zenml login
# Set OpenAI API key (optional)
export OPENAI_API_KEY=sk-svv....
```
### Your First Pipeline (2 minutes)
```python
# simple_pipeline.py
from zenml import pipeline, step
from sklearn.ensemble import RandomForestClassifier
from sklearn.datasets import make_classification
from sklearn.model_selection import train_test_split
from sklearn.metrics import accuracy_score
from typing import Tuple
from typing_extensions import Annotated
import numpy as np
@step
def create_dataset() -> Tuple[
Annotated[np.ndarray, "X_train"],
Annotated[np.ndarray, "X_test"],
Annotated[np.ndarray, "y_train"],
Annotated[np.ndarray, "y_test"]
]:
"""Generate a simple classification dataset."""
X, y = make_classification(n_samples=100, n_features=4, n_classes=2, random_state=42)
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)
return X_train, X_test, y_train, y_test
@step
def train_model(X_train: np.ndarray, y_train: np.ndarray) -> RandomForestClassifier:
"""Train a simple sklearn model."""
model = RandomForestClassifier(n_estimators=10, random_state=42)
model.fit(X_train, y_train)
return model
@step
def evaluate_model(model: RandomForestClassifier, X_test: np.ndarray, y_test: np.ndarray) -> float:
"""Evaluate the model accuracy."""
predictions = model.predict(X_test)
return accuracy_score(y_test, predictions)
@step
def generate_summary(accuracy: float) -> str:
"""Use OpenAI to generate a model summary."""
import openai
client = openai.OpenAI() # Set OPENAI_API_KEY environment variable
response = client.chat.completions.create(
model="gpt-3.5-turbo",
messages=[{
"role": "user",
"content": f"Write a brief summary of a ML model with {accuracy:.2%} accuracy."
}],
max_tokens=50
)
return response.choices[0].message.content
@pipeline
def simple_ml_pipeline():
"""A simple pipeline combining sklearn and OpenAI."""
X_train, X_test, y_train, y_test = create_dataset()
model = train_model(X_train, y_train)
accuracy = evaluate_model(model, X_test, y_test)
try:
import openai # noqa: F401
generate_summary(accuracy)
except ImportError:
print("OpenAI is not installed. Skipping summary generation.")
if __name__ == "__main__":
result = simple_ml_pipeline()
```
Run it:
```bash
export OPENAI_API_KEY="your-api-key-here"
python simple_pipeline.py
```
## 🗣️ Chat With Your Pipelines: ZenML MCP Server
Stop clicking through dashboards to understand your ML workflows. The **[ZenML MCP Server](https://github.com/zenml-io/mcp-zenml)** lets you query your pipelines, analyze runs, and trigger deployments using natural language through Claude Desktop, Cursor, or any MCP-compatible client.
```
💬 "Which pipeline runs failed this week and why?"
📊 "Show me accuracy metrics for all my customer churn models"
🚀 "Trigger the latest fraud detection pipeline with production data"
```
**Quick Setup:**
1. Download the `.dxt` file from [zenml-io/mcp-zenml](https://github.com/zenml-io/mcp-zenml)
2. Drag it into Claude Desktop settings
3. Add your ZenML server URL and API key
4. Start chatting with your ML infrastructure
The MCP (Model Context Protocol) integration transforms your ZenML metadata into conversational insights, making pipeline debugging and analysis as easy as asking a question. Perfect for teams who want to democratize access to ML operations without requiring dashboard expertise.
## 📚 Learn More
### 🖼️ Getting Started Resources
The best way to learn about ZenML is through our comprehensive documentation and tutorials:
- **[Starter Guide](https://docs.zenml.io/user-guides/starter-guide)** - From zero to production in 30 minutes
- **[LLMOps Guide](https://docs.zenml.io/user-guides/llmops-guide)** - Specific patterns for LLM applications
- **[SDK Reference](https://sdkdocs.zenml.io/)** - Complete SDK reference
For visual learners, start with this 11-minute introduction:
[](https://www.youtube.com/watch?v=wEVwIkDvUPs)
### 📖 Production Examples
1. **[Agent Architecture Comparison](examples/agent_comparison/)** - Compare AI agents with LangGraph workflows, LiteLLM integration, and automatic visualizations via custom materializers
2. **[E2E Batch Inference](examples/e2e/)** - Complete MLOps pipeline with feature engineering
3. **[LLM RAG Pipeline](https://github.com/zenml-io/zenml-projects/tree/main/llm-complete-guide)** - Production RAG with evaluation loops
4. **[Agentic Workflow (Deep Research)](https://github.com/zenml-io/zenml-projects/tree/main/deep_research)** - Orchestrate your agents with ZenML
5. **[Fine-tuning Pipeline](https://github.com/zenml-io/zenml-projects/tree/main/gamesense)** - Fine-tune and deploy LLMs
### 🏢 Deployment Options
**For Teams:**
- **[Self-hosted](https://docs.zenml.io/getting-started/deploying-zenml)** - Deploy on your infrastructure with Helm/Docker
- **[ZenML Pro](https://cloud.zenml.io/?utm_source=readme)** - Managed service with enterprise support (free trial)
**Infrastructure Requirements:**
- Docker (or Kubernetes for production)
- Object storage (S3/GCS/Azure)
- MySQL-compatible database (MySQL 8.0+ or MariaDB)
- _[Complete requirements](https://docs.zenml.io/getting-started/deploying-zenml/deploy-with-helm)_
### 🎓 Books & Resources
<div align="center">
<a href="https://www.amazon.com/LLM-Engineers-Handbook-engineering-production/dp/1836200072">
<img src="docs/book/.gitbook/assets/llm_engineering_handbook_cover.jpg" alt="LLM Engineer's Handbook Cover" width="200"/>
</a>
<a href="https://www.amazon.com/-/en/Andrew-McMahon/dp/1837631964">
<img src="docs/book/.gitbook/assets/ml_engineering_with_python.jpg" alt="Machine Learning Engineering with Python Cover" width="200"/>
</a>
</div>
ZenML is featured in these comprehensive guides to production AI systems.
## 🤝 Join ML Engineers Building the Future of AI
**Contribute:**
- 🌟 [Star us on GitHub](https://github.com/zenml-io/zenml/stargazers) - Help others discover ZenML
- 🤝 [Contributing Guide](CONTRIBUTING.md) - Start with [`good-first-issue`](https://github.com/issues?q=is%3Aopen+is%3Aissue+archived%3Afalse+user%3Azenml-io+label%3A%22good+first+issue%22)
- 💻 [Write Integrations](https://github.com/zenml-io/zenml/blob/main/src/zenml/integrations/README.md) - Add your favorite tools
**Stay Updated:**
- 🗺 [Public Roadmap](https://zenml.io/roadmap) - See what's coming next
- 📰 [Blog](https://zenml.io/blog) - Best practices and case studies
- 🎙 [Slack](https://zenml.io/slack) - Talk with AI practitioners
## ❓ FAQs from ML Engineers Like You
**Q: "Do I need to rewrite my agents or models to use ZenML?"**
A: No. Wrap your existing code in a `@step`. Keep using `scikit-learn`, PyTorch, LangGraph, LlamaIndex, or raw API calls. ZenML orchestrates your tools, it doesn't replace them.
**Q: "How is this different from LangSmith/Langfuse?"**
A: They provide excellent observability for LLM applications. We orchestrate the **full MLOps lifecycle for your entire AI stack**. With ZenML, you manage both your classical ML models and your AI agents in one unified framework, from development and evaluation all the way to production deployment.
**Q: "Can I use my existing MLflow/W&B setup?"**
A: Yes! ZenML integrates with both [MLflow](https://docs.zenml.io/stacks/experiment-trackers/mlflow) and [Weights & Biases](https://docs.zenml.io/stacks/experiment-trackers/wandb). Your experiments, our pipelines.
**Q: "Is this just MLflow with extra steps?"**
A: No. MLflow tracks experiments. We orchestrate the entire development process – from training and evaluation to deployment and monitoring – for both models and agents.
**Q: "How do I configure ZenML with Kubernetes?"**
A: ZenML integrates with Kubernetes through the native Kubernetes orchestrator, Kubeflow, and other K8s-based orchestrators. See our [Kubernetes orchestrator guide](https://docs.zenml.io/stacks/orchestrators/kubernetes) and [Kubeflow guide](https://docs.zenml.io/stacks/orchestrators/kubeflow), plus [deployment documentation](https://docs.zenml.io/getting-started/deploying-zenml/deploy-with-helm).
**Q: "What about cost? I can't afford another platform."**
A: ZenML's open-source version is free forever. You likely already have the required infrastructure (like a Kubernetes cluster and object storage). We just help you make better use of it for MLOps.
### 🛠 VS Code Extension
Manage pipelines directly from your editor:
<details>
<summary>🖥️ VS Code Extension in Action!</summary>
<div align="center">
<img width="60%" src="docs/book/.gitbook/assets/zenml-extension-shortened.gif" alt="ZenML Extension">
</div>
</details>
Install from [VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=ZenML.zenml-vscode).
## 📜 License
ZenML is distributed under the terms of the Apache License Version 2.0. See
[LICENSE](LICENSE) for details.
Raw data
{
"_id": null,
"home_page": "https://zenml.io",
"name": "zenml-nightly",
"maintainer": null,
"docs_url": null,
"requires_python": "<3.13,>=3.9",
"maintainer_email": null,
"keywords": "machine learning, production, pipeline, mlops, devops",
"author": "ZenML GmbH",
"author_email": "info@zenml.io",
"download_url": "https://files.pythonhosted.org/packages/77/20/cabb978de09d665e3e81ffc43f6d596d0d1dae8c6730e56ec6ca08747f9c/zenml_nightly-0.84.0.dev20250717.tar.gz",
"platform": null,
"description": "<div align=\"center\">\n\n <!-- PROJECT LOGO -->\n <br />\n <a href=\"https://zenml.io\">\n <img src=\"docs/book/.gitbook/assets/header.png\" alt=\"ZenML Header\">\n </a>\n <br />\n <div align=\"center\">\n <h3 align=\"center\">Your unified toolkit for shipping everything from decision trees to complex AI agents, built on the MLOps principles you already trust.</h3>\n </div>\n\n [![PyPi][pypi-shield]][pypi-url]\n [![PyPi][pypiversion-shield]][pypi-url]\n [![PyPi][downloads-shield]][downloads-url]\n [![Contributors][contributors-shield]][contributors-url]\n [![License][license-shield]][license-url]\n\n</div>\n\n<!-- MARKDOWN LINKS & IMAGES -->\n[pypi-shield]: https://img.shields.io/pypi/pyversions/zenml?color=281158\n[pypi-url]: https://pypi.org/project/zenml/\n[pypiversion-shield]: https://img.shields.io/pypi/v/zenml?color=361776\n[downloads-shield]: https://img.shields.io/pypi/dm/zenml?color=431D93\n[downloads-url]: https://pypi.org/project/zenml/\n[contributors-shield]: https://img.shields.io/github/contributors/zenml-io/zenml?color=7A3EF4\n[contributors-url]: https://github.com/zenml-io/zenml/graphs/contributors\n[license-shield]: https://img.shields.io/github/license/zenml-io/zenml?color=9565F6\n[license-url]: https://github.com/zenml-io/zenml/blob/main/LICENSE\n\n<div align=\"center\">\n<p>\n <a href=\"https://zenml.io/features\">Features</a> \u2022\n <a href=\"https://zenml.io/roadmap\">Roadmap</a> \u2022\n <a href=\"https://github.com/zenml-io/zenml/issues\">Report Bug</a> \u2022\n <a href=\"https://zenml.io/pro\">Sign up for ZenML Pro</a> \u2022\n <a href=\"https://www.zenml.io/blog\">Blog</a> \u2022\n <a href=\"https://zenml.io/podcast\">Podcast</a>\n <br />\n <br />\n \ud83c\udf89 For the latest release, see the <a href=\"https://github.com/zenml-io/zenml/releases\">release notes</a>.\n</p>\n</div>\n\n---\n\n## \ud83d\udea8 The Problem: MLOps Works for Models, But What About AI?\n\n\n\nYou're an ML engineer. You've perfected deploying `scikit-learn` models and wrangling PyTorch jobs. Your MLOps stack is dialed in. But now, you're being asked to build and ship AI agents, and suddenly your trusted toolkit is starting to crack.\n\n- **The Adaptation Struggle:** Your MLOps habits (rigorous testing, versioning, CI/CD) don\u2019t map cleanly onto agent development. How do you version a prompt? How do you regression test a non-deterministic system? The tools that gave you confidence for models now create friction for agents.\n\n- **The Divided Stack:** To cope, teams are building a second, parallel stack just for LLM-based systems. Now you\u2019re maintaining two sets of tools, two deployment pipelines, and two mental models. Your classical models live in one world, your agents in another. It's expensive, complex, and slows everyone down.\n\n- **The Broken Feedback Loop:** Getting an agent from your local environment to production is a slow, painful journey. By the time you get feedback on performance, cost, or quality, the requirements have already changed. Iteration is a guessing game, not a data-driven process.\n\n## \ud83d\udca1 The Solution: One Framework for your Entire AI Stack\n\nStop maintaining two separate worlds. ZenML is a unified MLOps framework that extends the battle-tested principles you rely on for classical ML to the new world of AI agents. It\u2019s one platform to develop, evaluate, and deploy your entire AI portfolio.\n\n```python\n# Morning: Your sklearn pipeline is still versioned and reproducible.\ntrain_and_deploy_classifier()\n\n# Afternoon: Your new agent evaluation pipeline uses the same logic.\nevaluate_and_deploy_agent()\n\n# Same platform. Same principles. New possibilities.\n```\n\nWith ZenML, you're not replacing your knowledge; you're extending it. Use the pipelines and practices you already know to version, test, deploy, and monitor everything from classic models to the most advanced agents.\n\n## \ud83d\udcbb See It In Action: Multi-Agent Architecture Comparison\n\n**The Challenge:** Your team built three different customer service agents. Which one should go to production? With ZenML, you can build a reproducible pipeline to test them on real data and make a data-driven decision, with full observability via Langgraph, LiteLLM & Langfuse.\n\nhttps://github.com/user-attachments/assets/edeb314c-fe07-41ba-b083-cd9ab11db4a7\n\n```python\nfrom zenml import pipeline, step\nfrom zenml.types import HTMLString\nimport pandas as pd\n\n@step\ndef load_real_conversations() -> pd.DataFrame:\n \"\"\"Load customer service queries for testing.\"\"\"\n return load_customer_queries()\n\n@step\ndef train_intent_classifier(queries: pd.DataFrame):\n \"\"\"Train a scikit-learn classifier alongside your agents.\"\"\"\n return train_sklearn_pipeline(queries)\n\n@step\ndef load_prompts() -> dict:\n \"\"\"Load prompts as versioned ZenML artifacts.\"\"\"\n return load_agent_prompts_from_files()\n\n@step\ndef run_architecture_comparison(queries: pd.DataFrame, classifier, prompts: dict) -> tuple:\n \"\"\"Test three different agent architectures on the same data.\"\"\"\n architectures = {\n \"single_agent\": SingleAgentRAG(prompts),\n \"multi_specialist\": MultiSpecialistAgents(prompts), \n \"langgraph_workflow\": LangGraphAgent(prompts) # Real LangGraph implementation!\n }\n \n # ZenML automatically versions agent code, prompts, and configurations\n # LiteLLM provides unified access to 100+ LLM providers\n # Langgraph orchestrates a multi-agent graph\n # Langfuse tracks costs, performance, and traces for full observability\n results = test_all_architectures(queries, architectures)\n mermaid_diagram = generate_langgraph_visualization()\n \n return results, mermaid_diagram\n\n@step\ndef evaluate_and_decide(queries: pd.DataFrame, results: dict) -> HTMLString:\n \"\"\"Generate beautiful HTML report with winner selection.\"\"\"\n return create_styled_comparison_report(results)\n\n@pipeline\ndef compare_agent_architectures():\n \"\"\"Data-driven agent architecture decisions with full MLOps tracking.\"\"\"\n queries = load_real_conversations()\n prompts = load_prompts() # Prompts as versioned artifacts\n classifier = train_intent_classifier(queries)\n results, viz = run_architecture_comparison(queries, classifier, prompts)\n report = evaluate_and_decide(queries, results)\n\nif __name__ == \"__main__\":\n compare_agent_architectures()\n # \ud83c\udfaf Rich visualizations automatically appear in ZenML dashboard\n```\n\n**\ud83d\ude80 [See the complete working example \u2192](examples/agent_comparison/)**\n\n**The Result:** A clear winner is selected based on data, not opinions. You have full lineage from the test data and agent versions to the final report and deployment decision.\n\n\n\n## \ud83d\ude80 Get Started (5 minutes)\n\n### \ud83c\udfd7\ufe0f Architecture Overview\n\nZenML uses a **client-server architecture** with an integrated web dashboard ([zenml-io/zenml-dashboard](https://github.com/zenml-io/zenml-dashboard)) for pipeline visualization and management:\n\n- **Local Development**: `pip install \"zenml[server]\"` - runs both client and server locally\n- **Production**: Deploy server separately, connect with `pip install zenml` + `zenml login <server-url>`\n\n```bash\n# Install ZenML with server capabilities\npip install \"zenml[server]\"\n\n# Install required dependencies\npip install scikit-learn openai numpy\n\n# Initialize your ZenML repository\nzenml init\n\n# Start local server or connect to a remote one\nzenml login\n\n# Set OpenAI API key (optional)\nexport OPENAI_API_KEY=sk-svv....\n```\n\n### Your First Pipeline (2 minutes)\n\n```python\n# simple_pipeline.py\nfrom zenml import pipeline, step\nfrom sklearn.ensemble import RandomForestClassifier\nfrom sklearn.datasets import make_classification\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.metrics import accuracy_score\nfrom typing import Tuple\nfrom typing_extensions import Annotated\nimport numpy as np\n\n@step\ndef create_dataset() -> Tuple[\n Annotated[np.ndarray, \"X_train\"],\n Annotated[np.ndarray, \"X_test\"], \n Annotated[np.ndarray, \"y_train\"],\n Annotated[np.ndarray, \"y_test\"]\n]:\n \"\"\"Generate a simple classification dataset.\"\"\"\n X, y = make_classification(n_samples=100, n_features=4, n_classes=2, random_state=42)\n X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)\n return X_train, X_test, y_train, y_test\n\n@step\ndef train_model(X_train: np.ndarray, y_train: np.ndarray) -> RandomForestClassifier:\n \"\"\"Train a simple sklearn model.\"\"\"\n model = RandomForestClassifier(n_estimators=10, random_state=42)\n model.fit(X_train, y_train)\n return model\n\n@step\ndef evaluate_model(model: RandomForestClassifier, X_test: np.ndarray, y_test: np.ndarray) -> float:\n \"\"\"Evaluate the model accuracy.\"\"\"\n predictions = model.predict(X_test)\n return accuracy_score(y_test, predictions)\n\n@step\ndef generate_summary(accuracy: float) -> str:\n \"\"\"Use OpenAI to generate a model summary.\"\"\"\n import openai\n\n client = openai.OpenAI() # Set OPENAI_API_KEY environment variable\n response = client.chat.completions.create(\n model=\"gpt-3.5-turbo\",\n messages=[{\n \"role\": \"user\", \n \"content\": f\"Write a brief summary of a ML model with {accuracy:.2%} accuracy.\"\n }],\n max_tokens=50\n )\n return response.choices[0].message.content\n\n@pipeline\ndef simple_ml_pipeline():\n \"\"\"A simple pipeline combining sklearn and OpenAI.\"\"\"\n X_train, X_test, y_train, y_test = create_dataset()\n model = train_model(X_train, y_train)\n accuracy = evaluate_model(model, X_test, y_test)\n try:\n import openai # noqa: F401\n generate_summary(accuracy)\n except ImportError:\n print(\"OpenAI is not installed. Skipping summary generation.\")\n\n\nif __name__ == \"__main__\":\n result = simple_ml_pipeline()\n```\n\nRun it:\n```bash\nexport OPENAI_API_KEY=\"your-api-key-here\"\npython simple_pipeline.py\n```\n\n## \ud83d\udde3\ufe0f Chat With Your Pipelines: ZenML MCP Server\n\nStop clicking through dashboards to understand your ML workflows. The **[ZenML MCP Server](https://github.com/zenml-io/mcp-zenml)** lets you query your pipelines, analyze runs, and trigger deployments using natural language through Claude Desktop, Cursor, or any MCP-compatible client.\n\n```\n\ud83d\udcac \"Which pipeline runs failed this week and why?\"\n\ud83d\udcca \"Show me accuracy metrics for all my customer churn models\" \n\ud83d\ude80 \"Trigger the latest fraud detection pipeline with production data\"\n```\n\n**Quick Setup:**\n1. Download the `.dxt` file from [zenml-io/mcp-zenml](https://github.com/zenml-io/mcp-zenml)\n2. Drag it into Claude Desktop settings\n3. Add your ZenML server URL and API key\n4. Start chatting with your ML infrastructure\n\nThe MCP (Model Context Protocol) integration transforms your ZenML metadata into conversational insights, making pipeline debugging and analysis as easy as asking a question. Perfect for teams who want to democratize access to ML operations without requiring dashboard expertise.\n\n## \ud83d\udcda Learn More\n\n### \ud83d\uddbc\ufe0f Getting Started Resources\n\nThe best way to learn about ZenML is through our comprehensive documentation and tutorials:\n\n- **[Starter Guide](https://docs.zenml.io/user-guides/starter-guide)** - From zero to production in 30 minutes\n- **[LLMOps Guide](https://docs.zenml.io/user-guides/llmops-guide)** - Specific patterns for LLM applications\n- **[SDK Reference](https://sdkdocs.zenml.io/)** - Complete SDK reference\n\nFor visual learners, start with this 11-minute introduction:\n\n[](https://www.youtube.com/watch?v=wEVwIkDvUPs)\n\n### \ud83d\udcd6 Production Examples\n\n1. **[Agent Architecture Comparison](examples/agent_comparison/)** - Compare AI agents with LangGraph workflows, LiteLLM integration, and automatic visualizations via custom materializers\n2. **[E2E Batch Inference](examples/e2e/)** - Complete MLOps pipeline with feature engineering\n3. **[LLM RAG Pipeline](https://github.com/zenml-io/zenml-projects/tree/main/llm-complete-guide)** - Production RAG with evaluation loops\n4. **[Agentic Workflow (Deep Research)](https://github.com/zenml-io/zenml-projects/tree/main/deep_research)** - Orchestrate your agents with ZenML\n5. **[Fine-tuning Pipeline](https://github.com/zenml-io/zenml-projects/tree/main/gamesense)** - Fine-tune and deploy LLMs\n\n### \ud83c\udfe2 Deployment Options\n\n**For Teams:**\n- **[Self-hosted](https://docs.zenml.io/getting-started/deploying-zenml)** - Deploy on your infrastructure with Helm/Docker\n- **[ZenML Pro](https://cloud.zenml.io/?utm_source=readme)** - Managed service with enterprise support (free trial)\n\n**Infrastructure Requirements:**\n- Docker (or Kubernetes for production)\n- Object storage (S3/GCS/Azure)\n- MySQL-compatible database (MySQL 8.0+ or MariaDB)\n- _[Complete requirements](https://docs.zenml.io/getting-started/deploying-zenml/deploy-with-helm)_\n\n### \ud83c\udf93 Books & Resources\n\n<div align=\"center\">\n <a href=\"https://www.amazon.com/LLM-Engineers-Handbook-engineering-production/dp/1836200072\">\n <img src=\"docs/book/.gitbook/assets/llm_engineering_handbook_cover.jpg\" alt=\"LLM Engineer's Handbook Cover\" width=\"200\"/>\n </a>\n <a href=\"https://www.amazon.com/-/en/Andrew-McMahon/dp/1837631964\">\n <img src=\"docs/book/.gitbook/assets/ml_engineering_with_python.jpg\" alt=\"Machine Learning Engineering with Python Cover\" width=\"200\"/>\n </a>\n</div>\n\nZenML is featured in these comprehensive guides to production AI systems.\n\n## \ud83e\udd1d Join ML Engineers Building the Future of AI\n\n**Contribute:**\n- \ud83c\udf1f [Star us on GitHub](https://github.com/zenml-io/zenml/stargazers) - Help others discover ZenML\n- \ud83e\udd1d [Contributing Guide](CONTRIBUTING.md) - Start with [`good-first-issue`](https://github.com/issues?q=is%3Aopen+is%3Aissue+archived%3Afalse+user%3Azenml-io+label%3A%22good+first+issue%22)\n- \ud83d\udcbb [Write Integrations](https://github.com/zenml-io/zenml/blob/main/src/zenml/integrations/README.md) - Add your favorite tools\n\n**Stay Updated:**\n- \ud83d\uddfa [Public Roadmap](https://zenml.io/roadmap) - See what's coming next\n- \ud83d\udcf0 [Blog](https://zenml.io/blog) - Best practices and case studies\n- \ud83c\udf99 [Slack](https://zenml.io/slack) - Talk with AI practitioners\n\n## \u2753 FAQs from ML Engineers Like You\n\n**Q: \"Do I need to rewrite my agents or models to use ZenML?\"**\n\nA: No. Wrap your existing code in a `@step`. Keep using `scikit-learn`, PyTorch, LangGraph, LlamaIndex, or raw API calls. ZenML orchestrates your tools, it doesn't replace them.\n\n**Q: \"How is this different from LangSmith/Langfuse?\"**\n\nA: They provide excellent observability for LLM applications. We orchestrate the **full MLOps lifecycle for your entire AI stack**. With ZenML, you manage both your classical ML models and your AI agents in one unified framework, from development and evaluation all the way to production deployment.\n\n**Q: \"Can I use my existing MLflow/W&B setup?\"**\n\nA: Yes! ZenML integrates with both [MLflow](https://docs.zenml.io/stacks/experiment-trackers/mlflow) and [Weights & Biases](https://docs.zenml.io/stacks/experiment-trackers/wandb). Your experiments, our pipelines.\n\n**Q: \"Is this just MLflow with extra steps?\"**\n\nA: No. MLflow tracks experiments. We orchestrate the entire development process \u2013 from training and evaluation to deployment and monitoring \u2013 for both models and agents.\n\n**Q: \"How do I configure ZenML with Kubernetes?\"**\n\nA: ZenML integrates with Kubernetes through the native Kubernetes orchestrator, Kubeflow, and other K8s-based orchestrators. See our [Kubernetes orchestrator guide](https://docs.zenml.io/stacks/orchestrators/kubernetes) and [Kubeflow guide](https://docs.zenml.io/stacks/orchestrators/kubeflow), plus [deployment documentation](https://docs.zenml.io/getting-started/deploying-zenml/deploy-with-helm).\n\n**Q: \"What about cost? I can't afford another platform.\"**\n\nA: ZenML's open-source version is free forever. You likely already have the required infrastructure (like a Kubernetes cluster and object storage). We just help you make better use of it for MLOps.\n\n### \ud83d\udee0 VS Code Extension\n\nManage pipelines directly from your editor:\n\n<details>\n <summary>\ud83d\udda5\ufe0f VS Code Extension in Action!</summary>\n <div align=\"center\">\n <img width=\"60%\" src=\"docs/book/.gitbook/assets/zenml-extension-shortened.gif\" alt=\"ZenML Extension\">\n</div>\n</details>\n\nInstall from [VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=ZenML.zenml-vscode).\n\n## \ud83d\udcdc License\n\nZenML is distributed under the terms of the Apache License Version 2.0. See\n[LICENSE](LICENSE) for details.\n",
"bugtrack_url": null,
"license": "Apache-2.0",
"summary": "ZenML: Write production-ready ML code.",
"version": "0.84.0.dev20250717",
"project_urls": {
"Documentation": "https://docs.zenml.io",
"Homepage": "https://zenml.io",
"Repository": "https://github.com/zenml-io/zenml"
},
"split_keywords": [
"machine learning",
" production",
" pipeline",
" mlops",
" devops"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "c7d205e39ece81902f49c7d505628d6780d3a3d9cddf9e6d863acf127e6068d9",
"md5": "55661ccc6bd94eb2484a179837540e0b",
"sha256": "0d44c44ced62c316e5bc9dfca5780ec7f80c64c20a00802f95cfa24fb71806fd"
},
"downloads": -1,
"filename": "zenml_nightly-0.84.0.dev20250717-py3-none-any.whl",
"has_sig": false,
"md5_digest": "55661ccc6bd94eb2484a179837540e0b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<3.13,>=3.9",
"size": 4614487,
"upload_time": "2025-07-17T00:55:42",
"upload_time_iso_8601": "2025-07-17T00:55:42.387585Z",
"url": "https://files.pythonhosted.org/packages/c7/d2/05e39ece81902f49c7d505628d6780d3a3d9cddf9e6d863acf127e6068d9/zenml_nightly-0.84.0.dev20250717-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "7720cabb978de09d665e3e81ffc43f6d596d0d1dae8c6730e56ec6ca08747f9c",
"md5": "5afc4c15be732c21f39909b144e41796",
"sha256": "640da56cdec58f2c831722820b3e4d44d20870c87ea9914730b52820247dca6c"
},
"downloads": -1,
"filename": "zenml_nightly-0.84.0.dev20250717.tar.gz",
"has_sig": false,
"md5_digest": "5afc4c15be732c21f39909b144e41796",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<3.13,>=3.9",
"size": 3735637,
"upload_time": "2025-07-17T00:55:44",
"upload_time_iso_8601": "2025-07-17T00:55:44.563484Z",
"url": "https://files.pythonhosted.org/packages/77/20/cabb978de09d665e3e81ffc43f6d596d0d1dae8c6730e56ec6ca08747f9c/zenml_nightly-0.84.0.dev20250717.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-17 00:55:44",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "zenml-io",
"github_project": "zenml",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "zenml-nightly"
}