Skip to content
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

Merged
merged 11 commits into from
Mar 1, 2021
Merged

Conversation

kfp-tekton-bot
Copy link
Contributor

@kfp-tekton-bot kfp-tekton-bot commented Feb 25, 2021

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 into kfp-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

@ckadner
Copy link
Member

ckadner commented Feb 25, 2021

@Tomcli -- I will still remove the samples coming from KFP so we only maintain the list of samples we created

@Tomcli
Copy link
Member

Tomcli commented Feb 26, 2021

Here is the PR for fixing api and sdk tests kfp-tekton-bot#4
@ckadner other than the UI conflicts, I see there's some rej files in the SDK and CONTRIBUTING.md. Are you going to handle those conflicts?

@ckadner
Copy link
Member

ckadner commented Feb 26, 2021

@ckadner other than the UI conflicts, I see there's some rej files in the SDK and CONTRIBUTING.md. Are you going to handle those conflicts?

Yes. I was also working on the SDK testdata :-)

@Tomcli
Copy link
Member

Tomcli commented Feb 26, 2021

@ckadner other than the UI conflicts, I see there's some rej files in the SDK and CONTRIBUTING.md. Are you going to handle those conflicts?

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.

@ckadner
Copy link
Member

ckadner commented Feb 26, 2021

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?

$ git show --pretty="" --name-only 87658d5 | grep "\.py"
sdk/python/tests/compiler/testdata/loop_over_lightweight_output.py
sdk/python/tests/compiler/testdata/parallelfor_item_argument_resolving.py
sdk/python/tests/compiler/testdata/withitem_nested.py
sdk/python/tests/compiler/testdata/withparam_global_dict.py
sdk/python/tests/compiler/testdata/withparam_output.py
sdk/python/tests/compiler/testdata/withparam_output_dict.py

@ckadner ckadner mentioned this pull request Feb 26, 2021
2 tasks
@@ -312,5 +312,13 @@ spec:
taskRef:
apiVersion: custom.tekton.dev/v1alpha1
kind: PipelineLoop
name: for-loop-for-loop-00000003-3
name: for-loop-3
Copy link
Member

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

Copy link
Member

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.
`

Copy link
Member

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],)
Copy link
Member

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.

Copy link
Member

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?

Copy link
Member

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.

Copy link
Member

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}]
Copy link
Member

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.

Copy link
Member

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

@Tomcli
Copy link
Member

Tomcli commented Feb 26, 2021

@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 [], is breaking our current implementation. If this is a new syntax requirement for Argo, then we need to support it in our pipeline loop controller.

@ckadner
Copy link
Member

ckadner commented Feb 26, 2021

@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 [], is breaking our current implementation. If this is a new syntax requirement for Argo, then we need to support it in our pipeline loop controller.

I think then we should keep the changed syntax in the testdata/*.py files (as they currently are in this PR) to reflect what is supported/mandated in KFP and quickly follow up with the changes required to make those work in a subsequent PR. Unless changing the pipeline loop controller can be done quickly and included in this PR #481

@Tomcli
Copy link
Member

Tomcli commented Feb 26, 2021

@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 [], is breaking our current implementation. If this is a new syntax requirement for Argo, then we need to support it in our pipeline loop controller.

I think then we should keep the changed syntax in the testdata/*.py files (as they currently are in this PR) to reflect what is supported/mandated in KFP and quickly follow up with the changes required to make those work in a subsequent PR. Unless changing the pipeline loop controller can be done quickly and included in this PR #481

The testdata/*.py should be the working examples for how to use some of these features on kfp-tekton. Many of these limitations require a TED process in Tekton which it's taking us a while (from few weeks to months, as of now the Tekton team is still preparing for a TED). As the Argo loop syntax requires significant changes to the Tekton API, we have to make some workaround compromise in order to make it work in Tekton.

@Tomcli
Copy link
Member

Tomcli commented Feb 26, 2021

The report is where we can use the original kfp tests to verify what features we are supporting natively.

@ckadner
Copy link
Member

ckadner commented Feb 26, 2021

The report is where we can use the original kfp tests to verify what features we are supporting natively.

Sure, but the sdk/python/tests/test_kfp_samples.sh will merely report whether or not the dsl-compile-tekton CLI succeeded to compile the KFP pipeline sample. That report does not verify anything in the generated Tekton YAML. Only our unittests verify the Tekton YAML

@ckadner
Copy link
Member

ckadner commented Feb 26, 2021

@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 [], is breaking our current implementation. If this is a new syntax requirement for Argo, then we need to support it in our pipeline loop controller.

I think then we should keep the changed syntax in the testdata/*.py files (as they currently are in this PR) to reflect what is supported/mandated in KFP and quickly follow up with the changes required to make those work in a subsequent PR. Unless changing the pipeline loop controller can be done quickly and included in this PR #481

The testdata/*.py should be the working examples for how to use some of these features on kfp-tekton. Many of these limitations require a TED process in Tekton which it's taking us a while (from few weeks to months, as of now the Tekton team is still preparing for a TED). As the Argo loop syntax requires significant changes to the Tekton API, we have to make some workaround compromise in order to make it work in Tekton.

Okay. That is a valid point. I will revert the two pipelines that use lists to wrap the loop arguments.

@Tomcli
Copy link
Member

Tomcli commented Feb 26, 2021

@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 [], is breaking our current implementation. If this is a new syntax requirement for Argo, then we need to support it in our pipeline loop controller.

I think then we should keep the changed syntax in the testdata/*.py files (as they currently are in this PR) to reflect what is supported/mandated in KFP and quickly follow up with the changes required to make those work in a subsequent PR. Unless changing the pipeline loop controller can be done quickly and included in this PR #481

The testdata/*.py should be the working examples for how to use some of these features on kfp-tekton. Many of these limitations require a TED process in Tekton which it's taking us a while (from few weeks to months, as of now the Tekton team is still preparing for a TED). As the Argo loop syntax requires significant changes to the Tekton API, we have to make some workaround compromise in order to make it work in Tekton.

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

@ckadner
Copy link
Member

ckadner commented Feb 26, 2021

@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

@kubeflow kubeflow deleted a comment from k8s-ci-robot Feb 26, 2021
@kubeflow kubeflow deleted a comment from review-notebook-app bot Feb 26, 2021
@ckadner ckadner changed the title [WIP] KFP 1.4.0 Rebase KFP 1.4.0 Rebase Feb 27, 2021
@Tomcli
Copy link
Member

Tomcli commented Feb 27, 2021

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.

@Tomcli
Copy link
Member

Tomcli commented Mar 1, 2021

/lgtm

@Tomcli
Copy link
Member

Tomcli commented Mar 1, 2021

/approve

@k8s-ci-robot
Copy link

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot merged commit ede6750 into kubeflow:master Mar 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade to KFP 1.4.0
4 participants