Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DRAFT WIP - do not merge - demonstration of PipelineConfig #11113

Conversation

gregsheremeta
Copy link
Contributor

@gregsheremeta gregsheremeta commented Aug 17, 2024

Description of your changes:

Note: only review the second commit!

Demonstration of proposed KFP DSL PipelineConfig class. Companion to #11112

Using this pipeline:

from kfp import dsl
from kfp.dsl import PipelineConfig


@dsl.component(base_image="docker.io/python:3.9.17")
def empty_component():
    pass

config = PipelineConfig()
config.set_example_pipeline_config("important-value")

@dsl.pipeline(name='pipeline-config-example', pipeline_config=config)
def pipeline_config_example():
    task = empty_component()

results in this change to the Pipeline Spec:

*** 33,38 ****
--- 33,40 ----
          - "\nimport kfp\nfrom kfp import dsl\nfrom kfp.dsl import *\nfrom typing import\
            \ *\n\ndef empty_component():\n    pass\n\n"
          image: docker.io/python:3.9.17
+ pipelineConfig:
+   examplePipelineConfig: important-value
  pipelineInfo:
    name: pipeline-config-example
  root:

Checklist:

KFP v1 supported setting pipeline-level configuration via a
`PipelineConf` class. This class was deprecated and no replacement
was added to KFP v2.

add new PipelineConfig class to support setting pipeline-level
configuration in KFP v2.

Signed-off-by: Greg Sheremeta <gshereme@redhat.com>
Demonstration of proposed KFP DSL PipelineConfig class.

Signed-off-by: Greg Sheremeta <gshereme@redhat.com>
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign connor-mccarthy for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant