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

Tests - Samples - Added the component_build sample test #2147

Merged
Show file tree
Hide file tree
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
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 @@ -82,6 +82,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