kfp package
- class kfp.LocalClient(pipeline_root: Optional[str] = None)[source]
Bases:
object
- class ExecutionMode(mode: str = 'docker', images_to_exclude: List[str] = [], ops_to_exclude: List[str] = [], docker_options: List[str] = [])[source]
Bases:
object
Configuration to decide whether the client executes a component in docker or in local process.
- DOCKER = 'docker'
- LOCAL = 'local'
- property docker_options: List[str]
- property images_to_exclude: List[str]
- property mode: str
- property ops_to_exclude: List[str]
- create_run_from_pipeline_func(pipeline_func: Callable, arguments: Mapping[str, str], execution_mode: kfp._local_client.LocalClient.ExecutionMode = <kfp._local_client.LocalClient.ExecutionMode object>)[source]
Runs a pipeline locally, either using Docker or in a local process.
- Parameters
pipeline_func – pipeline function
arguments – Arguments to the pipeline function provided as a dict, reference to kfp.client.create_run_from_pipeline_func
execution_mode – Configuration to decide whether the client executes component in docker or in local process.
- kfp.run_pipeline_func_locally(pipeline_func: Callable, arguments: Mapping[str, str], local_client: Optional[kfp._local_client.LocalClient] = None, pipeline_root: Optional[str] = None, execution_mode: kfp._local_client.LocalClient.ExecutionMode = <kfp._local_client.LocalClient.ExecutionMode object>)[source]
Runs a pipeline locally, either using Docker or in a local process.
Feature stage: [Alpha](https://github.com/kubeflow/pipelines/blob/master/docs/release/feature-stages.md#alpha)
- In this alpha implementation, we support:
Control flow: Condition, ParallelFor
Data passing: InputValue, InputPath, OutputPath
- And we don’t support:
Control flow: ExitHandler, Graph, SubGraph
ContainerOp with environment variables, init containers, sidecars, pvolumes
ResourceOp
VolumeOp
Caching
- Parameters
pipeline_func – A function that describes a pipeline by calling components and composing them into execution graph.
arguments – Arguments to the pipeline function provided as a dict. reference to kfp.client.create_run_from_pipeline_func.
local_client – Optional. An instance of kfp.LocalClient.
pipeline_root – Optional. The root directory where the output artifact of component will be saved.
execution_mode – Configuration to decide whether the client executes component in docker or in local process.
- kfp.run_pipeline_func_on_cluster(pipeline_func: Callable, arguments: Mapping[str, str], run_name: Optional[str] = None, experiment_name: Optional[str] = None, kfp_client: Optional[kfp._client.Client] = None, pipeline_conf: Optional[kfp.dsl._pipeline.PipelineConf] = None)[source]
Runs pipeline on KFP-enabled Kubernetes cluster.
This command compiles the pipeline function, creates or gets an experiment and submits the pipeline for execution.
Feature stage: [Alpha](https://github.com/kubeflow/pipelines/blob/07328e5094ac2981d3059314cc848fbb71437a76/docs/release/feature-stages.md#alpha)
- Parameters
pipeline_func – A function that describes a pipeline by calling components
graph. (and composing them into execution) –
arguments – Arguments to the pipeline function provided as a dict.
run_name – Optional. Name of the run to be shown in the UI.
experiment_name – Optional. Name of the experiment to add the run to.
kfp_client – Optional. An instance of kfp.Client configured for the desired KFP cluster.
pipeline_conf – Optional. kfp.dsl.PipelineConf instance. Can specify op transforms, image pull secrets and other pipeline-level configuration options.