-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
SDK - Components - Setting default base image or image factory #1937
SDK - Components - Setting default base image or image factory #1937
Conversation
Added kfp.components.set_default_base_image which sets the name of the container image that will be used for component creation when base_image is not specified. Alternatively, the base image can also be set to a factory function that will be returning the image. The support is added for both Lightweight components and python container components.
@@ -207,7 +220,7 @@ def annotation_to_type_struct(annotation): | |||
return component_spec | |||
|
|||
|
|||
def _func_to_component_spec(func, extra_code='', base_image=_default_base_image, modules_to_capture: List[str] = None, use_code_pickling=False) -> ComponentSpec: | |||
def _func_to_component_spec(func, extra_code='', base_image : str = None, modules_to_capture: List[str] = None, use_code_pickling=False) -> ComponentSpec: |
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.
Shall we type-check the extra_code too?
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Ark-kun 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 |
…low#1937) Added kfp.components.set_default_base_image which sets the name of the container image that will be used for component creation when base_image is not specified. Alternatively, the base image can also be set to a factory function that will be returning the image. The support is added for both Lightweight components and python container components.
Added kfp.components.set_default_base_image which sets the name of the container image that will be used for component creation when base_image is not specified.
Alternatively, the base image can also be set to a factory function that will be returning the image.
The support is added for both Lightweight components and python container components.
This change is