zenml

zenml-ioApache-2.0活跃维护

面向 MLOps 与 LLM 工作流的可扩展平台,把数据管道、模型训练到 Agent 部署串成可复现流程,并统一追踪元数据与实验。

ZenML 🙏: One AI Platform from Pipelines to Agents. https://zenml.io.

0.98.1发布于 2026-11-04 05:40 UTC5,639star +2 / 7 天674fork同步于 2026-11-10 17:36 UTC

怎么上手

由 README 提炼,执行前请确认
pip install "zenml[server]"
zenml init
zenml login
硬件要求按 README 说明

README 未说明硬件要求,未提及显存或 GPU 型号;本地开发通过 pip 安装即可运行客户端与服务端。

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

把任意 Python 工作流跑在任意基础设施上的 MLOps 编排平台,从传统 ML 到 LLM 与 Agent

面向 MLOps 与 LLM 工作流的可扩展平台,把数据管道、模型训练到 Agent 部署串成可复现流程,并统一追踪元数据与实验。

核心能力

  • 用 @step 包装现有代码,无需重写模型或 Agent
  • 自动容器化并追踪代码,记录每次运行的指标、日志与元数据
  • 抽象基础设施复杂度,同一流水线可切换不同 stack 后端
  • 集成 MLflow、LangGraph、Langfuse、SageMaker、GCP Vertex 等工具
  • 提供本地 Web 仪表盘与 MCP Server,可用自然语言查询流水线

容易踩的坑

pip install zenml 只装精简客户端,需要服务端能力要装 zenml[server];本地开发需装 zenml[local] 才能同时跑客户端和服务端;生产环境需单独部署服务端再用 zenml login 连接。

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本0.98.1
  1. 0.98.1最新正式版2026-11-04 · 2026-11-04 05:40 UTC
    • Rename projects from the CLI and SDK: You can now rename projects with zenml project update <name-or-uuid> using --name, --display-name, and --description (PR #5367). Technical names and display names can be changed independently while preserving the project UUID and associated resources, and SDK updates now correctly preserve omitted fields or explicitly clear descriptive fields.
    • Helm chart pods now satisfy restricted Pod Security defaults: The default ZenML Helm chart pod security settings now work in namespaces enforcing Kubernetes Pod Security restricted (PR #5397). This also applies the chart security values consistently to CA certificate init containers and Helm test pods, reducing the extra overrides needed for locked-down clusters.
    • More reliable integration installs: Installing ZenML integrations is now less likely to break ZenML’s already-installed dependency set (PR #5399). This prevents cases where adding an integration upgrades shared packages into incompatible versions and causes import failures before pipelines can run.
    • GCP runner OpenTelemetry compatibility: GCP runner images now avoid installing an incompatible OpenTelemetry API version alongside ZenML’s pinned SDK (PR #5366). This fixes import failures that could happen before any pipeline steps started.
    • MLflow integration installs on Python 3.13 and slim images: The MLflow integration no longer depends on the unused python-rapidjson package (PR #5360). This avoids source compilation failures in environments without build tools such as g++, especially on Python 3.13 or slim container images.
    • GCS-backed runs no longer hang during final uploads or cleanup: ZenML aligned GCS-related dependencies and added optional storage controls to avoid pipeline steps getting stuck after their work and outputs have already completed (PR #5373). This addresses hangs from indefinite GCS responses and affected gcsfs cleanup behavior, helping orchestrators observe completed containers instead of waiting forever.
    • Step outputs are preserved after execution or finalization failures: ZenML no longer deletes step output directories from the launcher exception handler when a step fails after artifacts or server-side completion have already been recorded (PR #5362). Persisted metadata will no longer point to missing files in these partial-failure scenarios, while the original error is still propagated.
    • Replay runs include defaulted pipeline parameters: Replaying a run now forwards pipeline parameters that were satisfied by defaults in the original run (PR #5361). This keeps replayed runs consistent with the source run even when users did not explicitly pass every parameter.
    • CLI labels can contain equals signs: CLI label parsing now splits --label values only on the first =, so values such as URLs and query strings are accepted (PR #5383). This fixes label handling across service connector and stack component commands where values like https://example.com/?a=b were previously rejected or misinterpreted.
    • Hosted Classic dashboard CORS origins are allowed automatically: Pro workspace servers now automatically include the hosted Classic dashboard origin in addition to their configured dashboard origin (PR #5396). Production and staging Classic dashboard URLs are matched exactly over HTTPS, while custom enterprise dashboards and existing custom CORS origins keep
  2. 0.98.02026-10-14 · 2026-10-14 08:50 UTC
    查看更新说明

    Breaking Changes

    • The langchain integration now supports langchain>=0.3.5,<1.0 instead of the previously pinned 0.3.0. If you rely on a fixed LangChain version, update your environment constraints accordingly, and note that LangChain 1.x is still not supported by ZenML and may require you to stay on a compatible pre-1.0 release. PR #5341
    Triggers and automation
    • Dynamic webhook event filters: Webhook triggers can now match a provider’s raw event type and fields directly from the authenticated JSON body. This gives you an escape hatch for events or payload fields that ZenML’s typed event catalog does not expose yet, such as matching newly opened GitHub pull requests targeting a specific branch. PR #5247
    • Forward-compatible run.trigger resolution: Snapshots updated with this release can resolve trigger types that are introduced in future ZenML versions. This reduces the need to refresh snapshots just to use newly added trigger types such as platform or webhook triggers. PR #5281
    • Safer snapshot deletion for triggered pipelines: ZenML now checks whether snapshots are attached to triggers before deletion and warns users about unintended removals. This helps prevent accidentally breaking automations that still depend on a snapshot. PR #5284
    Kubernetes, Run:ai, and workload ownership
    • Synchronized OIDC Linux identities for Kubernetes workloads: ZenML Pro deployments using an enterprise identity provider can now carry synchronized linux_uid and linux_gid claims into workloads created by the Kubernetes orchestrator and Kubernetes step operator. This keeps the process UID and primary GID aligned with organization-managed Linux accounts, which is especially useful for shared filesystems and cluster security policies. PR #5301

    • Workspace account annotations on Kubernetes and Run:ai workloads: Kubernetes Jobs, Pod templates, scheduled and dynamic executions, and Run:ai training workloads now include a resolvable zenml.io/workspace-user-id annotation. This gives platform and audit tooling the actual workspace account UUID while preserving custom annotations and leaving ZENML_USER_ID unchanged. PR #5326

    • Owners for managed Kubernetes sandboxes: Kubernetes-managed Sandbox sessions can now be assigned owners. This makes sandbox sessions that are closely related to a step easier to track and helps avoid leaving orphaned sessions behind. PR #5336

    • Workspace service account activation controls: Activation and deactivation are restored for deprecated workspace service accounts and legacy API keys, including keys retained after adoption. This supports migration cleanup and credential rollback while preserving the existing deprecation restrictions and deletion checks. PR #5340

    • Transformers v5 support in the Hugging Face integration: The Hugging Face integration now supports Transformers v5 while retaining compatibility with v4. ZenML only registers the TensorFlow model materializer when running on Transformers v4, and the Accelerate integration now uses cross-version CPU configuration so users can upgrade their Hugging Face stack more smoothly. PR #5321

    • TypeSafe Jev hooks integration: A new typesafe integration adds jev_failure_triage_hook and jev_run_summary_hook for storing Jev’s typed, probability-scored answers as ZenML run metadata. Users can attach structured failure triage and run summaries to their runs without building custom metadata plumbing. [PR #5312](https://github.com/zenml-io/

  3. 0.97.02026-09-23 · 2026-09-23 13:30 UTC
    查看更新说明

    Breaking Changes

    • Resource pools have been reworked to use ZenML Pro Resource Manager v2, and the old OSS resource-pool control-plane objects and related API/CLI/RBAC behavior have been removed. If you used legacy resource pool management in OSS or automation built on those endpoints/commands, you will need to migrate to the new resource request model and update any scripts or integrations accordingly. PR #4977
    • ZenML now requires Click >=8.3.3,<=8.5.0. If your environment, plugin, or custom CLI extension pins an older Click version or depends on older Click behavior, update those dependencies to a compatible version before upgrading ZenML. PR #5145
    • Dictionary outputs with non-string keys are no longer materialized through the JSON path. If you relied on reading such artifacts back as JSON-compatible data with keys converted to strings, update your code to preserve original key types or change outputs to use string keys for JSON interoperability. PR #5124
    • Log retrieval now uses a paginated/filterable entries API instead of assuming a single full log blob, especially for external log stores. If you consume ZenML log APIs directly or built tooling around the previous response shape, update it to use the new log entries endpoint and pagination/filter parameters. PR #5158
    • Reduced database growth from unused pipeline snapshots: ZenML now cleans up anonymous pipeline snapshots that are no longer referenced by runs, deployments, schedules, or templates. Snapshot creation is also atomic, so failed or interrupted creation attempts no longer leave partial snapshot records behind, and replacing named snapshots no longer keeps unused superseded snapshots around. This helps long-running ZenML deployments keep database size under control with less manual maintenance. PR #5166
    • Dynamic pipeline DAG loading: Dynamic pipeline run DAGs now load correctly even when step records are returned out of dependency order. This fixes cases where the UI or API could fail to render a dynamic run graph despite the underlying run data being valid. PR #5263
    • Larger cached API transactions: API transaction results are now validated against the compressed storage format instead of the uncompressed Base64 JSON representation. This allows large but highly compressible responses to be cached correctly, reducing unnecessary retries when an original request completes after the client timeout. PR #5262
    • Capped exponential backoff overflow: Retry loops using capped exponential backoff no longer keep calculating ever-growing delay values after the maximum delay has been reached. This prevents OverflowError failures in very long-running retry scenarios while preserving the configured maximum delay behavior. PR #5265

    What's Changed

  4. 0.96.42026-09-04 · 2026-09-04 13:32 UTC
    查看更新说明
    Webhook-driven automation
    • Webhook triggers for pipeline snapshots: ZenML now supports first-class webhook-driven automation for secure, project-scoped integrations with GitHub or custom systems PR #5169. You can attach webhook triggers to pipeline snapshots and launch them when matching external events arrive, including typed GitHub filters for merged pull requests, completed workflow runs, pushes, and published releases.

    • ClickUp webhook provider: ZenML now includes a built-in ClickUp webhook provider for triggering automation from ClickUp task and list events PR #5216. The provider authenticates deliveries with ClickUp’s raw hex HMAC signature and supports string-based filters, so teams can connect ClickUp activity directly to ZenML workflows.

    • Slack webhook provider: ZenML Pro now supports inbound Slack Events API callbacks as a first-class webhook provider PR #5221. Slack apps can authenticate events such as mentions, messages, reactions, and other automation-focused activity to trigger pipeline snapshots or related workflows; this is separate from the existing Slack alerter that sends notifications to Slack.

    • AWS RDS IAM authentication for MySQL stores: The MySQL ZenML store now supports AWS RDS IAM database authentication while preserving the existing password-based behavior PR #5113. ZenML generates fresh IAM tokens for database connections and enforces TLS hostname and certificate verification in IAM mode, giving AWS users a passwordless database authentication option aligned with RDS security best practices.

    • Faster pipeline startup with reused build checksums: ZenML now precalculates and reuses Docker build checksums while resolving pipeline builds PR #5154. This avoids repeated build-configuration work during startup, especially for large pipelines with many steps, and also helps when skip_build=True because ZenML no longer repeats unnecessary build preparation checks.

    • Safer workload-scoped tokens: Workload-scoped API tokens can no longer be exchanged for persistent, unscoped API tokens PR #5152. This keeps credentials bound to the pipeline run, schedule, or deployment that created them, so workload permissions expire with the workload authorization instead of being escalated into longer-lived generic API access.

    • Production/stable package metadata: Future ZenML releases are now marked as Development Status :: 5 - Production/Stable on PyPI instead of beta PR #5186. This aligns the published package metadata with ZenML’s current maturity and makes the package classification clearer for users and automated tooling.

    • Failed dynamic pipelines now report failure correctly: Dynamic pipelines running with ExecutionMode.STOP_ON_FAILURE no longer complete successfully when an isolated step fails PR #5182. ZenML now propagates the failed step state correctly so the overall pipeline run status matches the actual execution outcome.

    What's Changed

  5. 0.96.32026-08-07 · 2026-08-07 13:24 UTC
    查看更新说明
    Runtime and orchestration
    • Multi-pod Kubernetes step operator jobs: Command steps can now run across multiple Kubernetes pods with the Kubernetes step operator. Set pod_count in KubernetesStepOperatorSettings to launch the step as an indexed job, making it easier to distribute command-style workloads across pods. PR #5104
    • Local Docker sandbox: ZenML now includes a local Docker sandbox, plus a unified settings model for containerized sandboxes. Local sandbox workflows also support file upload and download, making it easier to test containerized ZenML behavior locally before moving to remote infrastructure. PR #5102
    Deployment, security, and artifact integrity
    • Enrollment keys from Kubernetes Secrets: The Helm chart now supports server.pro.enrollmentKeySecretRef, so ZenML Pro enrollment keys can be injected from an existing Kubernetes Secret instead of being stored inline in Helm release values. The secret reference is applied consistently to the server, migration, and worker containers. PR #5123
    • Cloudpickle artifact hash validation: Cloudpickle-materialized artifacts now store a SHA-256 hash when written and validate that hash before loading. This helps detect corrupted or unexpectedly modified artifact files earlier and fail with a clearer integrity signal. PR #5103
    CLI and dashboard UX
    • Select a stack during login: zenml login now accepts --stack, allowing you to connect to a server and immediately set the active stack in one command. When used together with --project, ZenML applies the project first so the stack is resolved in the intended project context. PR #5125
    • Improved secret value display: Secret values in the dashboard no longer expand indefinitely in the UI and are truncated for readability. A direct copy action is now available, making it easier to work with long secret values without disrupting the page layout. PR #1104
    • Timeline updates for cancelled runs: The dashboard timeline now shows steps that were not started because a run was cancelled. The timeline filter also supports filtering for Not Started, making cancelled or partially executed runs easier to inspect. PR #1108
    • Fewer SQLite lock failures for local stores: Local SQL stores backed by SQLite now wait up to 60 seconds for write locks instead of using Python’s 5-second default. This reduces sqlite3.OperationalError: database is locked failures when concurrent steps, such as mapped dynamic pipeline steps, finish and publish artifacts at the same time. PR #5096
    • Artifact deletion on deployed servers: Artifact version deletion now correctly applies project scope when checking whether an artifact is unused. This fixes deletion through the API on remote deployed servers where the default project is disabled. PR #5100
    • Complete exception tracebacks: Exception reporting now includes the full traceback lineage instead of only the final exception traceback. This makes chained failures easier to debug because the original cause is preserved alongside the final error. PR #5098
    • Smarter Kubernetes dynamic pipeline retries: Kubernetes orchestrator pods are no longer retried when the pipeline run is already in a finished state that cannot be retried. This avoids unnecessary pod restarts that would immediately exit with Run is already finished. PR #5107
    • **Co

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    PyPi PyPi PyPi Contributors License


    ZenML is built for ML or AI Engineers working on traditional ML use-cases, LLM workflows, or agents, in a company setting.

    At it's core, ZenML allows you to write workflows (pipelines) that run on any infrastructure backend (stacks). You can embed any Pythonic logic within these pipelines, like training a model, or running an agentic loop. ZenML then operationalizes your application by:

    1. Automatically containerizing and tracking your code.
    2. Tracking individual runs with metrics, logs, and metadata.
    3. Abstracting away infrastructure complexity.
    4. Integrating your existing tools and infrastructure e.g. MLflow, Langgraph, Langfuse, Sagemaker, GCP Vertex, etc.
    5. Allowing you to quickly iterate on experiments with an observable layer, in development and in production.

    ...amongst many other features.

    ZenML is used by thousands of companies to run their AI workflows. Here are some featured ones:

    (please email [email protected] if you want to be featured)

    🚀 Get Started (5 minutes)

    # Install ZenML with server capabilities
    pip install "zenml[server]"  # pip install zenml will install a slimmer client
    
    # Initialize your ZenML repository
    zenml init
    
    # Start local server or connect to a remote one
    zenml login
    

    You can then explore any of the examples in this repo. We recommend starting with the quickstart, which demonstrates core ZenML concepts: pipelines, steps, artifacts, snapshots, and deployments.

    🏗️ Architecture Overview

    ZenML uses a client-server architecture with an integrated web dashboard (zenml-io/zenml-dashboard):

    • Local Development: pip install "zenml[local]" - runs both client and server locally
    • Production: Deploy server separately, connect with pip install zenml + zenml login <server-url>

    🎮 Demo

    Here is a short demo:

    Watch the video

    🖼️ Resources

    The best way to learn about ZenML is through our comprehensive documentation and tutorials:

    📚 More examples

    1. Agent Architecture Comparison - Compare AI agents with LangGraph workflows, LiteLLM integration, and automatic visualizations via custom materializers
    2. Deploying ML Models - Deploy classical ML models as production endpoints with monitoring and versioning
    3. Deploying Agents - Document analysis service with pipelines, evaluation, and embedded web UI
    4. E2E Batch Inference - Complete MLOps pipeline with feature engineering
    5. LLM RAG Pipeline - Production RAG with evaluation loops
    6. Agentic Workflow (Deep Research) - Orchestrate your agents with ZenML
    7. Fine-tuning Pipeline - Fine-tune and deploy LLMs

    🗣️ Chat With Your Pipelines: ZenML MCP Server

    Stop clicking through dashboards to understand your ML workflows. The ZenML MCP Server 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
    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.

    🤖 Kitaru: Replay-Based Evals for AI Agents

    Running AI agents in production and wondering whether the cheaper model would have held, or whether the new prompt fixes Tuesday's failure? Kitaru is our open-source sister project for agents: traces you can run, not just read.

    • Every run is a recording — wrap your agent once (PydanticAI today), or import the Langfuse traces you already collect
    • Replay is re-execution — the run happens again against your real code, with recorded tool calls answered from the recording, so nothing touches live systems
    • Fork with one thing changed — a cheaper model, a new prompt, the fix in your working tree — and trust the diff
    • Scale the decision — freeze real traffic into cohorts, run experiments, gate CI on the result
    • Self-hosted, by design — one small server on your infrastructure; replays execute on workers in your environment

    The split is clean: ZenML is for ML pipelines, Kitaru is for agents.

    pip install kitaru
    

    👉 kitaru.ai · GitHub · Docs

    🎓 Books & Resources

    ZenML is featured in these comprehensive guides to production AI systems.

    🤝 Join ML Engineers Building the Future of AI

    Contribute:

    Stay Updated:

    • 🗺 Public Roadmap - See what's coming next
    • 📰 Blog - Best practices and case studies
    • 🎙 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 and Weights & Biases. 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 and Kubeflow guide, plus deployment documentation.

    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 / Cursor Extension

    Manage pipelines directly from your editor:

    Install from VS Code Marketplace.

    📜 License

    ZenML is distributed under the terms of the Apache License Version 2.0. See LICENSE for details.