-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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/backend): enable parameterization of container images #11404
base: master
Are you sure you want to change the base?
Conversation
2e8e4fd
to
ee6677c
Compare
One question: if the user sets the image with set_container_image, is the cache key using that setting? |
252eb8c
to
1c2da91
Compare
this is a good point, I think we may want to resolve the container image before creating the fingerprint |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Is the documentation updated as part of different PR?
Actually we don't need to cover this as it's already covered via the Example: For this sample pipeline: @dsl.component(base_image="docker.io/python:3.9.17")
def empty_component(image: str, otherinput: str):
print("image=" + image + ", otherinput=" + otherinput)
@dsl.pipeline()
def pipeline_accel(img: str, otherinput: str):
task = empty_component(image=img, otherinput=otherinput)
task.set_container_image(img) We have: |
@javali-google I belive the docs are auto generated and served via readthedocs @chensun can confirm my expectation is the docstring here will be auto surfaced like the other task fields here |
Thanks for the detailed analysis, @HumairAK ! |
lgtm |
1c2da91
to
2f493c0
Compare
2f493c0
to
6a06019
Compare
cc @chensun PTAL when you get the chance it would be good to be able to get this in for 2.11 |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: jgarciao, leseb 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe the CHANGELOG needs to be updated too?
This change allows component base images to be parameterized using runtime pipeline parameters. The container images can be specified within an @pipeline decorated function, and takes precedence over the @component(base_image=..) argument. This change also adds logic to resolve these runtime parameters in the argo driver logic. It also includes resolution steps for resolving the accelerator type which functions the same way but was missing the resolution logic. The resolution logic is a generic workaround solution for any run time pod spec input parameters that cannot be resolved because they cannot be added dynamically in the argo pod spec container template. Signed-off-by: Humair Khan <[email protected]>
6a06019
to
dd0f46c
Compare
good call, updated! |
Resolves #11391
Description of your changes:
This change allows component base images to be parameterized using runtime pipeline parameters. The container images can be specified within an @pipeline decorated function, and takes precedence over the @component(base_image=..) argument.
This change also adds logic to resolve these runtime parameters in the argo driver logic. It also includes resolution steps for resolving the accelerator type which functions the same way but was missing the resolution logic. The resolution logic is a generic workaround solution for any run time pod spec input parameters that cannot be resolved because they cannot be added dynamically in the argo pod spec container template.
Checklist: