metaflow-to-zenml-migration
Migrate Metaflow to ZenML
This skill translates Metaflow flows into idiomatic ZenML pipelines. It handles the full migration workflow: analyzing FlowSpec code, classifying each pattern, translating what maps cleanly, flagging what needs redesign, and producing a working ZenML project.
How migration works at a high level
Metaflow and ZenML are deceptively close cousins. Both talk about steps, artifacts, local vs remote execution, and moving the same code between environments. But they tell that story in different ways:
- Metaflow builds a workflow around a
FlowSpecclass,@stepmethods,self.next(...)transitions, andself.*assignments that become persisted artifacts. - ZenML builds a workflow around a
@pipelinefunction, standalone@stepfunctions, and explicit step inputs and outputs that become typed, versioned artifacts.
So this is not a rename-the-primitives migration. The dangerous cases are the ones that still "look right" after a naive rewrite but silently change behavior: join semantics, foreach, merge_artifacts, @catch, resume/checkpoint behavior, conditional branching, recursion, and platform-specific decorators like @batch.
The three mapping types
Every Metaflow concept falls into one of these categories: