Skip to main content

Kubeflow Pipelines extension for Metaflow

Compile and run Metaflow flows on Kubeflow Pipelines (argo workflows backend).

Basic Usage

  • Have access to a Kubeflow Pipelines instance with the API server URL.
  • Use the CLI commands to compile your flow into a Kubeflow Pipeline and deploy it.

Youtube Screencast

metaflow kubeflow demo

Compiling and Deploying a Pipeline

python my_flow.py kubeflow-pipelines --url https://my-kubeflow-instance.com create

This command will:

  • Compile your Metaflow flow into a Kubeflow Pipeline YAML specification
  • Upload it to your Kubeflow Pipelines instance
  • Create a new version of the pipeline

Accessing Kubeflow Pipelines for Deployment

Metaflow needs to be able to connect to Kubeflow Pipelines for deployment. If you have connectivity already set up, you don't need to do anything.

If you can't connect to the service directly, you can set up a port forward to the service:

kubectl port-forward -n kubeflow svc/ml-pipeline-ui 8081:80

After this, you can specify the service URL as http://localhost:8081 in one of these ways:

  • On the CLI for kubeflow-pipelines with the --url option
  • In the Metaflow config, specify "METAFLOW_KUBEFLOW_PIPELINES_URL": "http://localhost:8081"
  • Set an environment variable, METAFLOW_KUBEFLOW_PIPELINES_URL=http://localhost:8081

Available Commands

1. create - Compile and/or Deploy Pipeline

Compile a new version of your flow to Kubeflow Pipelines:

Recurring Runs: If your flow is decorated with @schedule, this command will automatically create or update the corresponding Recurring Run in Kubeflow Pipelines.

python my_flow.py kubeflow-pipelines \
    --url https://my-kubeflow-instance.com \
    create \
    --version-name v1.0.0 \
    --experiment "My Production Experiment" \
    --alpha 0.5

Options:

  • --experiment: The experiment name to create the recurring run under (if @schedule is present). Defaults to "Default".
  • --version-name: Allows one to deploy a custom version name. Else, a new version with UTC timestamp is created.
  • --only-yaml: Print the YAML specification to stdout and exit without uploading to Kubeflow Pipelines.
  • Flow Parameters: Any flow parameters (e.g., --alpha) passed here will be baked into the recurring run configuration (if @schedule is present), overriding the defaults defined in your code.

Use --help for all available options including tags, namespace, max-workers, and production token management.

2. trigger - Execute Pipeline

Trigger an execution of your deployed pipeline:

python my_flow.py kubeflow-pipelines \
    --url https://my-kubeflow-instance.com \
    trigger \
    --experiment my-experiment \
    --alpha 0.1 \
    --max-epochs 100

Flow parameters can be passed as command-line arguments. Use --help for all available options.

By default, the latest version of the deployed pipeline is used for the trigger. Else, one can also pass in a custom version using --version-name.

3. status - Check Execution Status

Fetch the status of a running or completed pipeline execution:

python my_flow.py kubeflow-pipelines \
    --url https://my-kubeflow-instance.com \
    status \
    --kfp-run-id abc-123-def-456

Use --help for all available options.

4. terminate - Terminate Execution

Terminate a running pipeline execution:

python my_flow.py kubeflow-pipelines \
    --url https://my-kubeflow-instance.com \
    terminate \
    --kfp-run-id abc-123-def-456

Use --help for all available options.

5. delete - Delete a Deployed Pipeline

Delete the flow definition and all its associated versions from Kubeflow Pipelines.

This command also searches for and deletes any associated Recurring Runs (Schedules) to ensure no orphaned schedules continue trying to trigger deleted pipelines.

In essence, this undeploys the pipeline but preserves execution history (runs) and artifacts.

python my_flow.py kubeflow-pipelines \
    --url https://my-kubeflow-instance.com \
    delete

Use --help for all available options.

Fin.

Metadata

Release files for metaflow-kubeflow 0.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for metaflow-kubeflow 0.0.4
File Size Uploaded
metaflow_kubeflow-0.0.4.tar.gz 29.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for metaflow-kubeflow 0.0.4
File Interpreter ABI Platform
metaflow_kubeflow-0.0.4-py3-none-any.whl Python 3 none any Details

Total release size: 62.9 kB

Release files / metaflow_kubeflow-0.0.4.tar.gz

Download URL metaflow_kubeflow-0.0.4.tar.gz
Size 29.6 kB
Tags Source
SHA-256 checksum
How to use checksums
1cc647e17559bf8badeb8f0a509eb5bcf1de896bc22e608f35d0fcced0193a79
BLAKE2b-256 checksum
How to use checksums
f9b8095039e58086a124bc55e2bbb60db9169f01cb72eb8d7d4f237799beea73
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 27, 2026.

Transparency log

Release files / metaflow_kubeflow-0.0.4-py3-none-any.whl

Download URL metaflow_kubeflow-0.0.4-py3-none-any.whl
Size 33.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1a034713767c1e7ef0f01b8a29734ebb3f896067ae65d4440ef74210b5439025
BLAKE2b-256 checksum
How to use checksums
0aa5ad24a6ad92c3512a19be4cdbe1ed2085c4dfc458c30b1f0aa6fa3a766a93
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 27, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.0.4 This release

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page