Skip to content

Commit

Permalink
Tests - Samples - Added the component_build sample test (#2147)
Browse files Browse the repository at this point in the history
* Tests - Samples - Added the component_build sample test

* Fixed the papermill issue

* Renamed EXPERIMENT_NAME to experiment_name
  • Loading branch information
Ark-kun authored and k8s-ci-robot committed Sep 20, 2019
1 parent 7659e23 commit 372efe5
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 4 deletions.
16 changes: 12 additions & 4 deletions samples/core/component_build/component_build.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,16 @@
"outputs": [],
"source": [
"# Set your output and project. !!!Must Do before you can proceed!!!\n",
"EXPERIMENT_NAME = 'basic_component'\n",
"PROJECT_NAME = 'Your-Gcp-Project-Name' #'Your-GCP-Project-ID'\n",
"experiment_name = 'basic_component'\n",
"PROJECT_NAME = 'Your-Gcp-Project-Name' #'Your-GCP-Project-ID'\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"OUTPUT_DIR = 'gs://%s-basic-component' % PROJECT_NAME # A path for asset outputs\n",
"BASE_IMAGE = 'google/cloud-sdk:latest' # Base image used in various steps of the pipeline\n",
"TARGET_IMAGE = 'gcr.io/%s/component:latest' % PROJECT_NAME # Target image that will include our final code"
Expand Down Expand Up @@ -103,9 +111,9 @@
"client = kfp.Client()\n",
"\n",
"try:\n",
" experiment = client.get_experiment(experiment_name=EXPERIMENT_NAME)\n",
" experiment = client.get_experiment(experiment_name=experiment_name)\n",
"except:\n",
" experiment = client.create_experiment(EXPERIMENT_NAME)"
" experiment = client.create_experiment(experiment_name)"
]
},
{
Expand Down
18 changes: 18 additions & 0 deletions test/sample-test/configs/component_build.config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

test_name: component_build
notebook_params:
experiment_name: component_build-test
PROJECT_NAME: ml-pipeline-test
1 change: 1 addition & 0 deletions test/sample_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ spec:
- preemptible_tpu_gpu
- volume_snapshot_ops
- kubeflow_tf_serving
- component_build
# Build and push image
- name: build-image-by-dockerfile
inputs:
Expand Down

0 comments on commit 372efe5

Please sign in to comment.