Metaflow Stubs

6.0.12.28 · active · verified Thu Apr 16

ob-metaflow-stubs provides type stubs for the Metaflow library, enhancing static analysis and developer experience for Metaflow users. Metaflow is a human-centric framework for building and managing real-life AI and ML systems, originally developed at Netflix and now supported by Outerbounds. It streamlines the entire development lifecycle from rapid prototyping to production deployments, enabling teams to iterate quickly and deliver robust systems efficiently. The library is actively maintained with frequent patch releases, aligning with the core Metaflow project's release cadence.

Common errors

Warnings

Install

Imports

Quickstart

This 'Hello World' example defines a basic Metaflow flow with three steps: `start`, `hello`, and `end`. It demonstrates defining steps with `@step` and connecting them with `self.next()`. Run this script using `python your_flow_name.py run` in your terminal to execute the flow locally.

from metaflow import FlowSpec, step

class HelloFlow(FlowSpec):
    """A simple Metaflow flow to validate installation."""

    @step
    def start(self):
        print("HelloFlow is starting.")
        self.message = "Metaflow says: Hi!"
        self.next(self.hello)

    @step
    def hello(self):
        print(self.message)
        self.next(self.end)

    @step
    def end(self):
        print("HelloFlow is all done.")

if __name__ == "__main__":
    HelloFlow()

view raw JSON →