Outerbounds Metaflow Extensions

1.6.17 · active · verified Thu Apr 16

The `ob-metaflow-extensions` library provides custom plugins, decorators, and features to seamlessly integrate Metaflow workflows with the Outerbounds Platform. This includes functionalities like authentication, deployment tools, and specialized data store configurations for an Outerbounds-managed environment. It's actively maintained with frequent updates, typically aligning with Metaflow and Outerbounds Platform releases. The current version is 1.6.17.

Common errors

Warnings

Install

Imports

Quickstart

This quickstart demonstrates a basic Metaflow flow using the `@outerbounds` decorator, which enables deployment to the Outerbounds Platform. It requires Metaflow to be installed and Outerbounds authentication configured (e.g., via `OUTERBOUNDS_TOKEN` environment variable or Outerbounds CLI login).

from metaflow import FlowSpec, step
from ob_metaflow_extensions.decorators import outerbounds

# Ensure OUTERBOUNDS_TOKEN environment variable is set for deployment
# or ensure you are logged in via Outerbounds CLI

@outerbounds
class MyOuterboundsFlow(FlowSpec):
    """
    A simple Metaflow flow deployable to the Outerbounds Platform.
    """
    @step
    def start(self):
        print("Starting MyOuterboundsFlow")
        self.message = "Hello from Outerbounds!"
        self.next(self.end)

    @step
    def end(self):
        print(f"MyOuterboundsFlow finished! Message: {self.message}")

if __name__ == '__main__':
    # To run locally:
    # python your_flow_file.py run
    # To deploy to Outerbounds (requires CLI login or token):
    # python your_flow_file.py deploy
    MyOuterboundsFlow()

view raw JSON →