Run a Pipeline
The KFP offers three ways to run a pipeline.
1. Run from the KFP Dashboard
The first and easiest way to run a pipeline is by submitting it via the KFP dashboard.
To submit a pipeline to the KFP Dashboard:
Compile the pipeline to IR YAML.
From the Dashboard, select “+ Upload pipeline”.
- Upload the pipeline IR YAML to “Upload a file”, populate the upload pipeline form, and click “Create”.
- From the Runs tab, select “+ Create run”:
- Choose the pipeline you uploaded, provide a name, any run parameters, and click “Start”.
2. Run from the KFP SDK client
You may also programatically submit pipeline runs from the KFP SDK client. The client supports two ways of submitting runs: from IR YAML or from a Python pipeline function. For either approach, start by instantiating a Client
using the host
URL of your KFP instance:
from kfp.client import Client
client = Client(host='<YOUR_HOST_URL>')
To submit IR YAML for execution use the .create_run_from_pipeline_package
method:
client.create_run_from_pipeline_package('pipeline.yaml', arguments={'param': 'a', 'other_param': 2})
To submit a Python pipeline function for execution use the .create_run_from_pipeline_func
convenience method, which wraps compilation and run submission into one method:
client.create_run_from_pipeline_func(pipeline_func, arguments={'param': 'a', 'other_param': 2})
See the KFP SDK Client reference documentation for a detailed description of the Client
constructor and method parameters.
3. Run from the KFP SDK CLI
The kfp run create
command allows you to submit a pipeline from the command line. kfp run create --help
shows that this command takes the form:
kfp run create [OPTIONS] [ARGS]...
For example, the following command submits the path/to/pipeline.yaml
IR YAML to the KFP backend:
kfp run create --experiment-name my-experiment --package-file path/to/pipeline.yaml
For more information about the kfp run create
command, see Command Line Interface in the KFP SDK reference documentation. For a summary of the available commands in the KFP CLI, see Command-line Interface.
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.