Jump to content

Connect Leeroopedia MCP: Equip your AI agents to search best practices, build plans, verify code, diagnose failures, and look up hyperparameter defaults.

Implementation:Kubeflow Pipelines Client Create Run

From Leeroopedia
Sources Domains Last Updated
Kubeflow Pipelines, KFP Client ML_Pipelines, Execution 2026-02-13

Overview

Concrete tool for submitting pipeline runs to a Kubeflow Pipelines backend provided by the KFP Client class.

Description

kfp.Client().create_run_from_pipeline_func() compiles and submits a pipeline in one step. The Client connects to the KFP API server and creates a run. Returns a RunPipelineResult that can optionally be waited on with .wait_for_run_completion().

Usage

Use to programmatically execute pipelines against a running KFP deployment. Provide the host endpoint; use None for in-cluster access.

Code Reference

Source Location: Repository: kubeflow/pipelines, File: samples/core/caching/caching_sample.py (L34-37), samples/core/XGBoost/xgboost_sample.py (L80-82)

Signature:

class Client:
    def __init__(self, host: Optional[str] = None, ...): ...
    def create_run_from_pipeline_func(
        self,
        pipeline_func: Callable,
        arguments: dict = {},
        run_name: str = None,
        experiment_name: str = None,
        namespace: str = None,
    ) -> RunPipelineResult: ...

Import: from kfp import Client or import kfp

I/O Contract

Inputs:

Parameter Type Required Description
host str No API endpoint URL
pipeline_func Callable Yes Pipeline function
arguments dict No Runtime parameters
run_name str No Name for the run
experiment_name str No Name for the experiment

Outputs:

  • RunPipelineResult -- with .wait_for_run_completion(timeout=N) method

Usage Examples

Example 1 -- Submit and wait:

kfp.Client(host=kfp_endpoint).create_run_from_pipeline_func(
    caching_pipeline,
    arguments=dict(seconds=60),
).wait_for_run_completion(timeout=999)

Example 2 -- Direct submission:

kfp.Client(host=kfp_endpoint).create_run_from_pipeline_func(
    xgboost_pipeline, arguments={})

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment