-
Notifications
You must be signed in to change notification settings - Fork 511
Ability to stop pipelines early #3716
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the 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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
This PR introduces comprehensive pipeline stopping functionality to ZenML, with particular focus on the Kubernetes orchestrator implementation. The feature enables users to gracefully or forcefully terminate running pipeline executions through both CLI and programmatic interfaces.
Core Changes
Pipeline Run Stop Interface
stop_run()
method toPipelineRunResponse
model that delegates to the orchestrator's stop implementationExecutionStatus
enum withSTOPPING
andSTOPPED
states to track termination lifecycle/runs/{run_id}/stop
with graceful termination optionzenml pipeline runs stop <run_name_or_id>
with--graceful
flag (defaults to force stop)Base Orchestrator Framework
BaseOrchestrator
withsupports_cancellation
property and abstractstop_run()
methodSTOPPING
before calling concrete orchestrator implementationsKubernetes Orchestrator Implementation
Stop Mechanism
The Kubernetes orchestrator implements two stop modes:
Technical Implementation
zenml-orchestrator-run-id
) to identify related step podsPipeline Cancellation Detection
check_pipeline_cancellation()
function in the Kubernetes orchestrator entrypointThreadedDagRunner
via thecheck_fn
parameter