-
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 - Switching python container components to Lightweight components code generator #1889
SDK - Switching python container components to Lightweight components code generator #1889
Conversation
c699aaa
to
10874d8
Compare
Had to remove the python2 test since python2 code generation is going away (python2 is near its End of Life and Kubeflow Pipelines only support python 3.5+).
10874d8
to
6911236
Compare
/retest |
@gaoning777 All the tests are passing. |
program_code = command_line_args[program_code_index] | ||
return program_code | ||
|
||
|
||
class TestGenerator(unittest.TestCase): |
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.
Maybe we can add a test for a component function with default values?
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.
There are pretty extensive tests for default value handlingin the Lightweight components test suite.
def test_saving_default_values(self): |
def test_handling_default_value_of_none(self): |
def test_handling_complex_default_values_of_none(self): |
Do you have some additional scenarios in mind?
/lgtm |
Talked with @gaoning777 offline: He proposed removing the |
This was proposed by @gaoning777: `_func_to_entrypoint` is now just a reference to `_func_to_component_spec` which is extensively covered by other tests.
/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 |
/lgtm |
This PR switches the Python container components feature to use Lightweight components code generator and part of the component API unification and streamlining.
The code generation will now become the same which brings feature parity.
Here is a sample of the features that python container components will now support:
Multiple outputs(already added)This PR reduces support for python 2. (Official Python 2 support ends in less than 5 months and Kubeflow Pipelines have only supported python 3.5+ from the start.)
SDK still supports specifying the python2 interpreter, but if the function is not compatible with python 2, the system no longer goes out of its way to fix the user code. This makes sense: if the user wants to run a function under python 2, the function should be compatible with python 2.
Fixes #1687
Fixes #1580
Fixes #1611
This PR builds on top of the #1887 refactoring (the first commit)
This change is