[feature] Re-enable extra_code parameter for Python components.
See original GitHub issueFeature Area
/area sdk
What feature would you like to see?
In KFP v1, there’s an option to extend lightweight python components via extra_code
which enables to have non-primitive values as defaults supported. However in KFPv2 this seems to be largely unsupported. Even in KFP v1, seems to be discouraged to use as create_component_from_func
does not support it and func_to_container_op
seems to be officially discouraged by maintainers (see: #7794 )
What is the use case or pain point?
Extending python lightweigh decorator functionality to use custom defaults that are not primitives.
Is there a workaround currently?
func_to_container_op
in KFP v1 does seem to work fine. However this ask is more related to keep this functionality moving forward.
Love this idea? Give it a 👍. We prioritize fulfilling features with the most 👍.
Issue Analytics
- State:
- Created a year ago
- Reactions:2
- Comments:6 (6 by maintainers)
Top Results From Across the Web
inspect — Inspect live objects — Python 3.11.1 documentation
Return a list of source lines and starting line number for an object. The argument may be a module, class, method, function, traceback,...
Read more >Building Python function-based components - Kubeflow
This section demonstrates how to get started building Python function-based components by walking through the process of creating a simple ...
Read more >python - How to extract parameters from a list and pass them ...
What is a good, brief way to extract items from a list and pass them as parameters to a function call, such as...
Read more >Python Functions — Parameters and Arguments
Parameters define what types of arguments a function can accept. ... of an argument list and/or be passed as elements of an iterable...
Read more >Functions - Advanced R. - Hadley Wickham
Function components. All R functions have three parts: the body() , the code inside the function. the formals() , the list of arguments...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@connor-mccarthy I think this won’t likely work. Essentially what you are asking is users to redo the entire lightweight python decorator just to support non-native types. This seems quite the added overhead for something that seems rather a common use case imho.
Thanks, @casassg. That explanation is very helpful and makes a compelling case for including an
extra_code
parameter.BTW: Support in lightweight components for custom artifact types from a third-party library is a feature that will be added soon. It doesn’t solve for all of the use cases you’re describing, but would for the
Input[MyCustomArtifact]
use case.