Organizing Stacks Pipelines Models
A step-by-step tutorial on effectively organizing your ML assets in ZenML using tags and projects
This cookbook demonstrates how to effectively organize your machine learning assets in ZenML using tags and projects. We'll implement a fraud detection system while applying increasingly sophisticated organization techniques.
Introduction: The Organization Challenge
As ML projects grow, effective organization becomes critical. ZenML provides two powerful organization mechanisms:
Tags: Flexible labels that can be applied to various entities (pipelines, runs, artifacts, models)
Projects (ZenML Pro): Namespace-based isolation for logical separation between initiatives or teams
Prerequisites
Before starting this tutorial, make sure you have:
ZenML installed and configured
Basic understanding of ZenML pipelines and steps
ZenML Pro account (for the Projects section only)
Part 1: Basic Pipeline Organization with Tags
Creating and Tagging a Simple Pipeline
Let's create a basic fraud detection pipeline with tags:
Adding Tags at Runtime
You can add tags when running a pipeline:
Finding Pipelines by Tags
Part 2: Organizing Artifacts with Tags
Tagging Artifacts During Creation
Use ArtifactConfig to tag artifacts as they're created:
Tagging Artifacts Dynamically
Finding Tagged Artifacts
Part 3: Model Organization with Tags
Creating and Tagging Models
Part 4: Advanced Tagging Techniques
Exclusive Tags for Production Tracking
Read more about exclusive tags here.
Cascade Tags for Automatic Artifact Tagging
Read more about cascade tags here.
Advanced Tag Filtering
Part 5: Organizing with Projects (ZenML Pro)
Projects provide logical separation between different initiatives or teams.
Creating and Setting a Project
You can also use the CLI:
Implementing Cross-Project Organization
For consistency across projects, use a standardized tagging strategy:
Part 6: Practical Organization Patterns
Create a Tag Registry for Consistency
Find and Fix Orphaned Resources
Conclusion and Best Practices
A well-designed tagging strategy helps maintain organization as your ML project grows:
Use consistent tag naming conventions - Create a tag registry to ensure consistency
Apply tags at all levels - Tag pipelines, runs, artifacts, and models
Create meaningful tag categories - Environment, domain, status, algorithm type, etc.
Use exclusive tags for state management - Perfect for tracking current production models
Combine tags with projects for complete organization - Use projects for major boundaries, tags for cross-cutting concerns
Document your tagging strategy - Ensure everyone on the team follows the same conventions
Next Steps
Now that you understand how to organize your ML assets, consider exploring:
Managing scheduled pipelines to automate your ML workflows
Integrating your tagging strategy with CI/CD pipelines
Last updated
Was this helpful?