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

feat(sdk): support f-strings in local pipeline execution #localexecution #10435

Conversation

connor-mccarthy
Copy link
Member

Description of your changes:
Support f-strings in local pipeline execution.

from kfp import dsl
from kfp import local

local.init(runner=local.SubprocessRunner())

@dsl.component
def identity(string: str) -> str:
    return string

@dsl.pipeline
def my_pipeline(string: str = 'baz') -> str:
    op1 = identity(string=f'bar-{string}')
    op2 = identity(string=f'foo-{op1.output}')
    return op2.output

task = my_pipeline()
assert task.output == 'foo-bar-baz'

Checklist:

Copy link

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@connor-mccarthy
Copy link
Member Author

/assign @chensun

@connor-mccarthy connor-mccarthy marked this pull request as ready for review January 29, 2024 19:07
@connor-mccarthy connor-mccarthy force-pushed the support-fstrings-in-local-pipeline branch from 4efed0b to b3e348a Compare January 29, 2024 19:07
@connor-mccarthy
Copy link
Member Author

/retest

1 similar comment
@connor-mccarthy
Copy link
Member Author

/retest

Copy link
Member

@chensun chensun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/approve

@google-oss-prow google-oss-prow bot added the lgtm label Jan 30, 2024
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: chensun

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

The pull request process is described 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

@google-oss-prow google-oss-prow bot merged commit 977bffc into kubeflow:master Jan 30, 2024
27 of 28 checks passed
@connor-mccarthy connor-mccarthy changed the title feat(sdk): support f-strings in local pipeline execution feat(sdk): support f-strings in local pipeline execution #localexecution Feb 8, 2024
roytman pushed a commit to roytman/pipelines that referenced this pull request Feb 14, 2024
)

Signed-off-by: Alexey Roytman <roytman@il.ibm.com>
stijntratsaertit pushed a commit to stijntratsaertit/kfp that referenced this pull request Feb 16, 2024
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.

2 participants