{"id":9146,"library":"ob-metaflow-extensions","title":"Outerbounds Metaflow Extensions","description":"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.","status":"active","version":"1.6.17","language":"en","source_language":"en","source_url":"https://github.com/outerbounds/ob-metaflow-extensions","tags":["metaflow","outerbounds","mlops","platform","deployment","workflow","ai"],"install":[{"cmd":"pip install ob-metaflow-extensions","lang":"bash","label":"Install library"},{"cmd":"pip install metaflow","lang":"bash","label":"Install core Metaflow (recommended)"}],"dependencies":[{"reason":"This library extends Metaflow and requires a compatible version of Metaflow to be installed. Version mismatches are a common source of issues.","package":"metaflow","optional":false}],"imports":[{"symbol":"outerbounds","correct":"from ob_metaflow_extensions.decorators import outerbounds"},{"symbol":"OuterboundsClient","correct":"from ob_metaflow_extensions.auth.client import OuterboundsClient"},{"symbol":"S3Client","correct":"from ob_metaflow_extensions.s3.s3_client import S3Client"}],"quickstart":{"code":"from metaflow import FlowSpec, step\nfrom ob_metaflow_extensions.decorators import outerbounds\n\n# Ensure OUTERBOUNDS_TOKEN environment variable is set for deployment\n# or ensure you are logged in via Outerbounds CLI\n\n@outerbounds\nclass MyOuterboundsFlow(FlowSpec):\n    \"\"\"\n    A simple Metaflow flow deployable to the Outerbounds Platform.\n    \"\"\"\n    @step\n    def start(self):\n        print(\"Starting MyOuterboundsFlow\")\n        self.message = \"Hello from Outerbounds!\"\n        self.next(self.end)\n\n    @step\n    def end(self):\n        print(f\"MyOuterboundsFlow finished! Message: {self.message}\")\n\nif __name__ == '__main__':\n    # To run locally:\n    # python your_flow_file.py run\n    # To deploy to Outerbounds (requires CLI login or token):\n    # python your_flow_file.py deploy\n    MyOuterboundsFlow()","lang":"python","description":"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)."},"warnings":[{"fix":"Always check the `ob-metaflow-extensions` documentation or release notes for compatible `metaflow` versions. Upgrade both packages in tandem if necessary.","message":"Version compatibility with `metaflow` is crucial. `ob-metaflow-extensions` is built against specific Metaflow versions. Mismatches can lead to runtime errors or unexpected behavior.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Ensure `OUTERBOUNDS_TOKEN` is correctly set in your environment, or run `ob login` to authenticate your CLI session before deploying or interacting with platform features.","message":"Deploying or running flows on the Outerbounds Platform requires proper authentication. This typically involves setting the `OUTERBOUNDS_TOKEN` environment variable or logging in via the Outerbounds CLI (`ob login`).","severity":"gotcha","affected_versions":"All versions"},{"fix":"Consult Outerbounds Platform documentation for required environment variables (e.g., `AWS_REGION`, `OUTERBOUNDS_NAMESPACE`) and ensure your Outerbounds workspace has the necessary permissions configured for the actions your flow performs.","message":"Platform-specific features (e.g., S3 artifact storage, Kubernetes orchestration) often require additional environment variables or cluster-side configurations. Errors related to permissions or resource access are common.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-16T00:00:00.000Z","next_check":"2026-07-15T00:00:00.000Z","problems":[{"fix":"Install `metaflow` separately: `pip install metaflow`.","cause":"`ob-metaflow-extensions` requires `metaflow` as a peer dependency, but it's not explicitly listed as a direct dependency during `pip install ob-metaflow-extensions`.","error":"ModuleNotFoundError: No module named 'metaflow'"},{"fix":"Set the `OUTERBOUNDS_TOKEN` environment variable with a valid token, or use the Outerbounds CLI to log in (`ob login`) before running your flow.","cause":"The Outerbounds Platform could not authenticate your request, likely due to a missing or invalid authentication token/credentials.","error":"ob_metaflow_extensions.auth.client.OuterboundsAuthException: Authentication failed."},{"fix":"Verify that your Outerbounds workspace and associated IAM roles have `s3:PutObject` and `s3:GetObject` permissions for the S3 bucket used for Metaflow artifacts. Check `AWS_REGION` and other AWS-related environment variables for correctness.","cause":"Your Outerbounds workspace or the underlying AWS credentials do not have sufficient permissions to write to the specified S3 bucket, often for storing Metaflow artifacts.","error":"An error occurred (403) when calling the PutObject operation: Forbidden (for S3-related operations)"}]}