zenml pipeline command group provides comprehensive pipeline management capabilities, from registration and execution to builds and long-running deployments.
Overview
ZenML pipelines are collections of steps that define your ML workflows. The CLI allows you to:- Register pipeline definitions
- Execute pipeline runs
- Build Docker images for pipelines
- Deploy pipelines for continuous execution
- List and inspect pipeline runs
- Manage pipeline builds and schedules
Command Structure
Core Commands
Register a Pipeline
Register a pipeline definition with ZenML:SOURCE argument is an importable Python path to your pipeline instance:
| Option | Type | Description |
|---|---|---|
--parameters, -p | File Path | JSON file containing pipeline parameters |
Run a Pipeline
Execute a pipeline immediately:| Option | Type | Description |
|---|---|---|
--config, -c | File Path | Path to YAML/JSON configuration file |
--stack, -s | String | Name or ID of stack to run on |
--build, -b | String | Build ID or file path to use |
--prevent-build-reuse | Flag | Prevent automatic reuse of previous builds |
Build Pipeline Images
Build Docker images for a pipeline without running it:| Option | Type | Description |
|---|---|---|
--config, -c | File Path | Path to configuration file for the build |
--stack, -s | String | Name or ID of stack to build for |
--output, -o | File Path | Output path to save build information |
Deploy a Pipeline
Deploy a pipeline for continuous or scheduled execution:| Option | Type | Description |
|---|---|---|
--name, -n | String | Deployment name (defaults to pipeline name) |
--config, -c | File Path | Path to deployment configuration |
--stack, -s | String | Stack name or ID |
--build, -b | String | Build ID or file path |
--prevent-build-reuse | Flag | Force new build |
--update | Flag | Update existing deployment with same name |
--overtake | Flag | Take over existing deployment |
Pipeline Runs
List Pipeline Runs
List all pipeline runs with filtering options:| Option | Description |
|---|---|
--name | Filter by run name |
--pipeline | Filter by pipeline name or ID |
--stack | Filter by stack name or ID |
--status | Filter by status (running, completed, failed, cached) |
--user | Filter by user name or ID |
--created | Filter by creation date |
--sort_by | Sort results (e.g., “desc:created”) |
--columns | Select columns to display |
--output, -o | Output format (table, json, yaml, csv, tsv) |
Describe a Pipeline Run
Get detailed information about a specific run:| Option | Description |
|---|---|
--show-metadata | Display run metadata |
--show-steps | Display all step details |
Delete a Pipeline Run
Pipeline Builds
List Pipeline Builds
Describe a Build
Delete a Build
Pipeline Management
List Pipelines
Describe a Pipeline
Delete a Pipeline
Configuration Files
Pipeline configuration files define run parameters, stack settings, and more.Example Configuration (config.yaml)
Using Configuration Files
Pipeline Status Values
Pipeline runs can have the following statuses:| Status | Description |
|---|---|
initializing | Run is being initialized |
running | Run is currently executing |
completed | Run finished successfully |
failed | Run failed with an error |
cached | Run was skipped due to caching |
Best Practices
Source Path Format
Always use the formatmodule.submodule.pipeline_instance:
Working Directory
Run CLI commands from your project root (wherezenml init was executed):
Build Reuse
Reuse builds to save time:Monitoring Runs
Use filtering and sorting to monitor pipeline health:Troubleshooting
Import Errors
zenml init was executed.
Pipeline Not Found
Build Failures
If builds fail, check:- Docker is running (
docker ps) - Stack has a container registry configured
- You have permission to push to the registry
Next Steps
Configure Stacks
Set up execution environments for pipelines
Manage Deployments
Learn about long-running pipeline deployments
Install Integrations
Add orchestrators and other components
View in Dashboard
Access the web UI for visual pipeline monitoring
