-
Notifications
You must be signed in to change notification settings - Fork 122
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
KFP 1.4.0 Rebase #481
KFP 1.4.0 Rebase #481
Conversation
Resolves kubeflow#469
@Tomcli -- I will still remove the samples coming from KFP so we only maintain the list of samples we created |
Here is the PR for fixing api and sdk tests kfp-tekton-bot#4 |
ce8dad5
to
ea88472
Compare
Yes. I was also working on the SDK testdata :-) |
I didn't check the compiler_tests.py so my changes on the testdata might be wrong. I updated the SDK testdata since i was testing the loop features and the generate yaml are getting inconsistent. |
🤣 we might have to renegotiate the SDK testdata. I tried to reconcile the remaining changes from KFP 1.4.0 in commit 87658d5. Can you take a look?
|
@@ -312,5 +312,13 @@ spec: | |||
taskRef: | |||
apiVersion: custom.tekton.dev/v1alpha1 | |||
kind: PipelineLoop | |||
name: for-loop-for-loop-00000003-3 | |||
name: for-loop-3 |
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.
The generated pipeline-loop crd is still called for-loop-for-loop-00000003-3
, so the name is not matching over here
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 generated the YAML files using make unit_test GENERATE_GOLDEN_YAML=True
If I change the names in the YAML manually, the unittests fail.
`
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 think the compiler test has to be updated, the loops crd get updated when i run TektonCompiler().compile(pipeline, __file__.replace('.py', '.yaml'))
|
||
|
||
@func_to_container_op | ||
def produce_list_of_ints() -> list: | ||
return (1234567890, 987654321) | ||
return ([1234567890, 987654321],) |
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.
this new syntax with the [],
is breaking our current loop feature. it's required for all loops now? maybe we need to get rid of it in our compiler to avoid this issue.
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.
For now, let me revert these KFP 1.4.0 changes and create a separate issue. Though technically, if we claim KFP 1.4.0
alignment/support we may need those to work, no?
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.
It seems like a limitation from the Tekton parameter API. Feng has to remove this []
in order to pass the list argument to Tekton. Maybe we should create an issue on this to post process in our compiler.
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.
some of this work around is also apply to 1.3.0. We are still pending some Tekton api in order to run it like the Argo way as Tekton custom task has its own limitation. I can add some documents after this pr on what are the different between Tekton and Argo when running dynamic loops. Our previous loop implementation doesn't support dynamic loop so it's still an improvement.
@@ -30,28 +30,28 @@ def get_code(self, ): | |||
|
|||
@dsl.pipeline(name='my-pipeline') | |||
def pipeline(my_pipe_param: int = 10): | |||
loop_args = [1, 2] | |||
loop_args = [{'a': 1, 'b': 2}, {'a': 10, 'b': 20}] |
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.
right now the loops tekton has only can take string or string Array argument. We cannot take dictionary array as it required us to change the tekton parameter api.
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.
Okay, let me revert the KFP 1.4.0 changes in the affected test cases for now and create a separate issue to address those
@ckadner for the 1.4.0 sdk, the changes from echo to printf works fine. However, the new 1.4.0 test cases where they are wrapping all the loop arguments with |
I think then we should keep the changed syntax in the |
9a08552
to
d7515a8
Compare
The |
The report is where we can use the original kfp tests to verify what features we are supporting natively. |
Sure, but the |
Okay. That is a valid point. I will revert the two pipelines that use lists to wrap the loop arguments. |
I created an issue and hopefully some of these can address in the compiler. #482 |
@Tomcli -- a7e5378 has reverted the list-wrapping of the pipeline-loop arguments and regenerated pipelineloop CRDs along with some other minor fixes. We need to create another issue to make sure the pipeline-loop CRD YAML files get regenerated along with the "Golden" YAML files for the pipelines. For now I did it this way: for f in sdk/python/tests/compiler/testdata/*_pipelineloop_cr*.yaml; do
echo ${f/_pipelineloop_cr*.yaml/.py}
done | sort -u | while read f; do
echo $f; dsl-compile-tekton --py $f --output ${f/.py/.yaml}
done
make unit_test GENERATE_GOLDEN_YAML=True |
thanks @ckadner overall it looks good to me. I will run the e2e test to test the 1.4.0 sdk and will merge after that. |
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: kfp-tekton-bot, Tomcli 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 |
Which issue is resolved by this Pull Request:
Resolves #469
Description of your changes:
Merging the changes from
kubeflow/pipelines
1.3.0..1.4.0
intokfp-tekton
:TODO: resolve rejected merge conflicts.
Environment tested:
NOT tested
/cc @Tomcli
/cc @drewbutlerbb4
Rejected code changes that need to be resolved:
Please review/revise the following files which had/have merge conflicts. The
*.rej
files contain the chunks that Git (and I) could not resolve. Create a PR with the resolved changes on the kfp-tekton-bot fork and remove the*.rej
files for each resolved file.For reference, these are the changes in
kubeflow/pipelines
1.3.0..1.4.0
:@Tomcli
./api/v2alpha1/pipeline_spec.proto.rej
./backend/Dockerfile.rej
./backend/update_requirements.sh.rej
./backend/src/crd/controller/scheduledworkflow/util/scheduled_workflow_test.go.rej
./backend/src/crd/controller/scheduledworkflow/controller.go.rej
./backend/src/crd/controller/scheduledworkflow/main.go.rej
./backend/src/common/util/workflow_test.go.rej
./backend/src/common/util/workflow.go.rej
./backend/src/apiserver/config/sample_config.json.rej
./backend/src/apiserver/storage/run_store.go.rej
./manifests/kustomize/base/pipeline/kustomization.yaml.rej
./manifests/kustomize/base/cache-deployer/kustomization.yaml.rej
./go.sum.rej
./go.mod.rej
@drewbutlerbb4
./frontend/src/lib/Utils.tsx.rej
./frontend/src/lib/StaticGraphParser.ts.rej
./frontend/src/pages/RunDetails.tsx.rej
@ckadner
./sdk/python/tests/compiler/testdata/withitem_nested.py.rej
./sdk/python/tests/compiler/testdata/withparam_global_dict.py.rej
./sdk/python/tests/compiler/testdata/parallelfor_item_argument_resolving.py.rej
./sdk/python/tests/compiler/testdata/loop_over_lightweight_output.py.rej
./sdk/python/tests/compiler/compiler_tests.py.rej
./CONTRIBUTING.md.rej