-
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
SDK - Lightweight - Added support for complex default values #1696
SDK - Lightweight - Added support for complex default values #1696
Conversation
Would you mind also giving an example of the component yaml for the function above? |
Here it is. As you see, the inputs are marked as
|
/cc @gaoning777 Can you please take a look? |
1 similar comment
/cc @gaoning777 Can you please take a look? |
/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 |
/retest |
…eflow#1696) Similar to the safeguard that exists in pytorchserver.
Allows creating components from python function with complex default values and calling them preserving those defaults.
Problem: We want to enable users to create Pipelines components from python functions. Some functions have complex default values. Pipelines SDK cannot currently serialize and pass such arguments (and for some kinds of default values it does not even seem to be possible). The only way to make it possible for the function to receive those original complex default values is to make it possible to skip those arguments when instantiating the component (as opposed to passing
None
or''
).This PR makes the following changes:
ComponentSpec.implementation.arguments
will be generated accordingly so that the command-line parameters are omitted when not passed.)Example of a function with complex default values:
Fixes #1485
This change is