Compiler¶
Compile a Kale Pipeline into a Kubeflow Pipelines v2 DSL script.
This module renders the Jinja2 templates in kale/templates/ to produce a
ready-to-run KFP v2 pipeline script, formats it, and optionally hands it off to
the KFP SDK for compilation and submission.
- class kale.compiler.Artifact(name: str, type: str, is_input: bool = False)[source]¶
Bases:
NamedTupleA Step artifact.
- class kale.compiler.Compiler(pipeline: Pipeline, imports_and_functions: str)[source]¶
Bases:
objectConverts a Pipeline object into a KFP executable.
Compiler provides the tools to convert a Pipeline object into an executable script that uses the KFP DSL to create and upload a new pipeline.
The Pipeline object is assumed to provide all the necessary information (environment, configuration, etc…) for the script to be compiled.
- generate_dsl()[source]¶
Generate a Python KFP DSL executable starting from the pipeline.
Returns (str): A Python executable script