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

Add lightweight sample test #499

Merged
merged 1 commit into from
Dec 13, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions test/sample_test_v2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,49 @@ spec:
value: "{{inputs.parameters.namespace}}"
- name: test-name
value: "notebook-tfx"
- name: run-notebook-lightweight-tests
template: run-sample-tests
arguments:
parameters:
- name: test-results-gcs-dir
value: "{{inputs.parameters.test-results-gcs-dir}}"
- name: target-image-prefix
value: "{{inputs.parameters.target-image-prefix}}"
- name: dataflow-tft-image
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think there is a way we can simplify image replacement? Maybe the target-image-prefix has enough information?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By pushing the image URL to the scripts, we unnecessarily create a consistency between the sample test yamll and sample test script because they need to agree on the image name. Right?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking about the consistency between image names used by component builders (build_image.sh files), component definition (currently in sample python code), Cloud Build configs and test scripts/yamls. I think those image names must be consistent. The component builder and component definition should be the source of truth and the tests should not contain explicit image names/suffixes.

Copy link
Contributor

@Ark-kun Ark-kun Dec 13, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By pushing the image URL to the scripts

What exactly do you mean by "scripts"? The component definitions in the pipeline python files? Or do you mean the test scripts?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The sample tests should care about the image tags because we current run the sample tests as submit. I can see if we move them to postsubmit, it should work fine by using the image tags that are consistent with others , such as cloud build.

value: "{{inputs.parameters.target-image-prefix}}{{inputs.parameters.dataflow-tft-image-suffix}}"
- name: dataflow-predict-image
value: "{{inputs.parameters.target-image-prefix}}{{inputs.parameters.dataflow-predict-image-suffix}}"
- name: dataflow-tfma-image
value: "{{inputs.parameters.target-image-prefix}}{{inputs.parameters.dataflow-tfma-image-suffix}}"
- name: dataflow-tfdv-image
value: "{{inputs.parameters.target-image-prefix}}{{inputs.parameters.dataflow-tfdv-image-suffix}}"
- name: dataproc-create-cluster-image
value: "{{inputs.parameters.target-image-prefix}}{{inputs.parameters.dataproc-create-cluster-image-suffix}}"
- name: dataproc-delete-cluster-image
value: "{{inputs.parameters.target-image-prefix}}{{inputs.parameters.dataproc-delete-cluster-image-suffix}}"
- name: dataproc-analyze-image
value: "{{inputs.parameters.target-image-prefix}}{{inputs.parameters.dataproc-analyze-image-suffix}}"
- name: dataproc-transform-image
value: "{{inputs.parameters.target-image-prefix}}{{inputs.parameters.dataproc-transform-image-suffix}}"
- name: dataproc-train-image
value: "{{inputs.parameters.target-image-prefix}}{{inputs.parameters.dataproc-train-image-suffix}}"
- name: dataproc-predict-image
value: "{{inputs.parameters.target-image-prefix}}{{inputs.parameters.dataproc-predict-image-suffix}}"
- name: kubeflow-dnntrainer-image
value: "{{inputs.parameters.target-image-prefix}}{{inputs.parameters.kubeflow-dnntrainer-image-suffix}}"
- name: kubeflow-deployer-image
value: "{{inputs.parameters.target-image-prefix}}{{inputs.parameters.kubeflow-deployer-image-suffix}}"
- name: local-confusionmatrix-image
value: "{{inputs.parameters.target-image-prefix}}{{inputs.parameters.local-confusionmatrix-image-suffix}}"
- name: local-roc-image
value: "{{inputs.parameters.target-image-prefix}}{{inputs.parameters.local-roc-image-suffix}}"
- name: sample-tests-image
value: "{{inputs.parameters.target-image-prefix}}{{inputs.parameters.sample-tests-image-suffix}}"
- name: namespace
value: "{{inputs.parameters.namespace}}"
- name: test-name
value: "notebook-lightweight"


# Build and push image
- name: build-image-by-dockerfile
Expand Down