kfp_toolbox.pipeline_parser module#

class kfp_toolbox.pipeline_parser.Parameter(name: str, type: Callable, default: int | float | str | None = None)[source]#

Pipeline parameter.

A class that represents a single pipeline parameter.

name#

A name of the parameter.

Type:

str

type#

A type function of the parameter.

Type:

Callable

default#

A default value of the parameter.

Type:

int | float | str | None

class kfp_toolbox.pipeline_parser.Pipeline(name: str, parameters: Sequence[Parameter], spec: Mapping[str, Any])[source]#

Pipeline.

A class that summarizes pipeline information.

name#

A name of the pipeline.

Type:

str

parameters#

A sequence of the pipeline parameters.

Type:

Sequence[kfp_toolbox.pipeline_parser.Parameter]

kfp_toolbox.pipeline_parser.parse_pipeline_package(filepath: str | PathLike) Pipeline[source]#

Parse the pipeline package file.

Load a Pipeline object from a pre-compiled file that represents the pipeline.

Parameters:

filepath (Union[str, os.PathLike]) – The path of the pre-compiled file that represents the pipeline.

Raises:

ValueError – If the filepath file has an invalid schema.

Returns:

An object that represents the pipeline.

Return type:

Pipeline