Overview
Metaflow provides first-class support for Jupyter notebooks, allowing you to:- Develop and test flows interactively
- Run individual steps in notebook cells
- Deploy notebook-defined flows to production
- Access results from previous runs
- Visualize data with Cards
Defining Flows in Notebooks
You can define complete flows in notebook cells:Running Flows from Notebooks
Using NBRunner
The recommended way to run notebook flows is withNBRunner:
Accessing Results
Interactive Development
Testing Individual Steps
You can test steps interactively:Prototyping with Small Data
Deploying Notebook Flows
Deploy to Production with NBDeployer
Deploy to AWS Step Functions
Accessing Previous Runs
Using the Client API
Comparing Runs
Visualization with Cards
Adding Cards to Notebook Flows
Viewing Cards
Notebook Best Practices
Use NBRunner for execution
Use NBRunner for execution
Always use
NBRunner instead of command-line execution in notebooks:Test with small data first
Test with small data first
Start with small datasets to iterate quickly:
Keep flow definitions in one cell
Keep flow definitions in one cell
Define the entire flow in a single cell for easier maintenance:
Use Cards for visualizations
Use Cards for visualizations
Add
@card decorator to steps that create visualizations:Export to .py files for production
Export to .py files for production
Once your flow is stable, export it to a
.py file:Common Patterns
Experiment Tracking
Data Exploration Pipeline
Related Topics
Runner API
Learn about the Runner and NBRunner APIs
Cards & Visualization
Create rich visual reports
Client API
Access flow results programmatically
Quickstart
Get started with Metaflow
