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

[feature] Add ability to parameterize container images #11391

Open
HumairAK opened this issue Nov 19, 2024 · 1 comment
Open

[feature] Add ability to parameterize container images #11391

HumairAK opened this issue Nov 19, 2024 · 1 comment

Comments

@HumairAK
Copy link
Collaborator

Feature Area

/area sdk

What feature would you like to see?

As a user of KFP sdk I want to be able to provide container images as pipeline parameters.

What is the use case or pain point?

There are a number of use cases for this, one example might be requiring a specific image for a specific accelerator type. Having to create multiple pipelines just for different container images is unnecessarily redundant.

Is there a workaround currently?

No

Also note this is a regression from v1.

Previous discussion on this topic: #5834
It was decided not to add this for v2 due to technical hurdles and concerns around component interface breaking. Let's re-evaluate.


Love this idea? Give it a 👍.

@HumairAK
Copy link
Collaborator Author

HumairAK commented Nov 20, 2024

I'm thinking we do something like this:

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

@dsl.pipeline(name='pipeline-accel')
def pipeline_accel(img: str):
    task = empty_component()
    task.set_container_image(img) # overwrite base_image="docker.io/python:3.9.17"

Which would require us to treat the container spec image as a pipeline channel

It looks like we can just follow the same pattern we have followed for setting accelerators

def convert_to_placeholder(input_value: str) -> str:

seems pretty straight forward

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

No branches or pull requests

1 participant