Skip to content

Conversation

stefannica
Copy link
Contributor

Describe changes

Pre-requisites

Please ensure you have done the following:

  • I have read the CONTRIBUTING.md document.
  • I have added tests to cover my changes.
  • I have based my new branch on develop and the open PR is targeting develop. If your branch wasn't based on develop read Contribution guide on rebasing branch to develop.
  • IMPORTANT: I made sure that my changes are reflected properly in the following resources:
    • ZenML Docs
    • Dashboard: Needs to be communicated to the frontend team.
    • Templates: Might need adjustments (that are not reflected in the template tests) in case of non-breaking changes and deprecations.
    • Projects: Depending on the version dependencies, different projects might get affected.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Other (add details above)

stefannica and others added 30 commits August 25, 2025 22:54
- Add core direct execution engine that can run ZenML pipelines locally
- Implement step-by-step execution with proper artifact handling
- Add support for parameter injection and step output resolution
- Include comprehensive logging and error handling
This update removes the complex output resolution logic from the DirectExecutionEngine, allowing it to directly use the step output returned by the step function. This change simplifies the code and improves performance by eliminating unnecessary exception handling for output resolution.

Additionally, comprehensive logging has been maintained to ensure clarity in the execution process.

No functional changes are introduced, and the code remains backward compatible.
This update introduces a new method, `_resolve_step_output`, to handle the resolution of specific outputs from a step's return value. The method accommodates various output formats, including single values, dictionaries, and tuples/lists, improving the flexibility and robustness of output handling.
This commit introduces a new example demonstrating a conversational AI chat agent pipeline that integrates with ZenML's serving infrastructure. The pipeline allows for real-time chat applications, utilizing OpenAI's API for generating responses based on user input.

Additionally, the README.md has been updated to include this new example, along with a brief overview of its features and usage instructions.

New files:
- `examples/serving/chat_agent_pipeline.py`: Implementation of the chat agent pipeline.
- Updates to `examples/serving/README.md` to document the new example.
This update introduces Docker settings for the chat and weather agent pipelines, allowing them to utilize the OpenAI API key from environment variables. Additionally, the pipeline decorators have been updated to include these settings.

Also, CORS middleware has been added to the FastAPI application to enable frontend access, with a note to restrict origins in production for security.

Enhancements to the parameter schema extraction in the PipelineServingService have been implemented, improving the extraction of function signatures and parameter types.

New request and response models for pipeline execution and chat interface have been added to the pipeline endpoints.

Fixes #3904
This commit introduces a comprehensive framework for managing capture policies in ZenML's pipeline serving. It includes five distinct capture modes to control the observability of requests, balancing privacy and performance.

Additionally, step-level capture annotations have been implemented, allowing for fine-grained control over which inputs and outputs are captured for each step. This enhancement provides users with the ability to specify capture behavior directly in their pipeline definitions.

New documentation has been added to explain the capture policies and their configurations, along with examples demonstrating their usage in both pipeline and step contexts.

Fixes #3911
This commit introduces a new dependency injection system for ZenML's serving components, enhancing modularity and testability. Key changes include the creation of a `ServingContainer` class to manage service instances and their initialization order. The FastAPI application now utilizes dependency injection for accessing services like `PipelineServingService`, `JobRegistry`, and `StreamManager`.

Additionally, several global service instances have been removed to streamline the architecture, and the lifespan management of the FastAPI application has been improved. This refactor lays the groundwork for better service management and easier testing.
safoinme and others added 5 commits September 1, 2025 15:27
This commit enhances the `install-zenml-dev.sh` script by introducing an `--upgrade-all` option, allowing users to uninstall existing ZenML installations, clear caches, and install the latest versions of all dependencies. The script now includes detailed help messages and examples for better user guidance. Additionally, it ensures that integration dependencies can also be upgraded in a similar manner.
This commit refactors the ZenML serving module to adopt a deployer architecture, enhancing modularity and maintainability. Key changes include the renaming of imports and constants from `zenml.serving` to `zenml.deployers.serving`, ensuring a consistent structure across the codebase. Additionally, the capture policies and step-level annotations have been updated to reflect this new organization, improving clarity in the code.

Documentation has been revised to align with these changes, and tests have been adjusted to accommodate the new import paths. This refactor lays the groundwork for future enhancements in the serving capabilities of ZenML.
This commit introduces new documentation for the serving capabilities of ZenML, including a detailed guide on pipeline serving and capture policies. The `toc.md` files have been updated to include links to the new sections on "Serving Pipelines" and "Pipeline Serving Capture Policies."

Additionally, the previous step-level capture annotations documentation has been removed to streamline the content, consolidating information into the new capture policies guide.

This enhancement improves user understanding of serving pipelines and their observability features.
- Implementation of log handlers for both pipeline and step logs, allowing for in-process log capture.
- Introduction of methods to immediately create and update runs and steps, enhancing the responsiveness of the tracking system.
- Refactoring of output handling to support tuple outputs and improve artifact persistence based on capture policies.
Copy link
Contributor

coderabbitai bot commented Sep 2, 2025

Important

Review skipped

Auto reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/served-pipelines

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot added internal To filter out internal PRs and issues enhancement New feature or request labels Sep 2, 2025
Copy link

socket-security bot commented Sep 2, 2025

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.

Action Severity Alert  (click "▶" to expand/collapse)
Warn Critical
[email protected] has a Critical CVE.

CVE: GHSA-3863-2447-669p transformers has a Deserialization of Untrusted Data vulnerability (CRITICAL)

Affected versions: < 4.36.0

Patched version: 4.36.0

From: ?pypi/[email protected]

ℹ Read more on: This package | This alert | What is a critical CVE?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at [email protected].

Suggestion: Remove or replace dependencies that include known critical CVEs. Consumers can use dependency overrides or npm audit fix --force to remove vulnerable dependencies.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore pypi/[email protected]. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

View full report

stefannica and others added 9 commits September 3, 2025 10:47
This commit removes the `capture-policies.md` documentation and the associated `serving_settings.py` file, which contained legacy capture policy configurations. The removal streamlines the serving module by eliminating outdated features and consolidating the focus on the new run-only architecture.

Additionally, the `toc.md` file for serving has been updated to reflect these changes, ensuring that users are directed to the current documentation relevant to ZenML's serving capabilities. This enhancement improves clarity and usability for users working with ZenML's serving features.
Copy link
Contributor

github-actions bot commented Sep 4, 2025

🔍 Broken Links Report

Summary

  • 📁 Files with broken links: 1
  • 🔗 Total broken links: 1
  • 📄 Broken markdown links: 1
  • 🖼️ Broken image links: 0
  • ⚠️ Broken reference placeholders: 0

Details

File Link Type Link Text Broken Path
book/toc.md 📄 "Pipeline Serving Capture Policies" how-to/serving/capture-policies.md
📂 Full file paths
  • /home/runner/work/zenml/zenml/scripts/../docs/book/toc.md

safoinme and others added 8 commits September 4, 2025 14:44
This commit refactors the serving architecture by removing the `serving_buffer` and `serving_overrides` modules, which were previously used for managing request-scoped outputs and parameter overrides. The refactor introduces a new response tap mechanism for capturing outputs directly, streamlining the process and improving performance.

Additionally, the `PipelineServingService` class has been updated to utilize the new response tap for output management, ensuring a more efficient handling of pipeline responses. This change enhances the overall clarity and maintainability of the serving code.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request internal To filter out internal PRs and issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants