From daec74b8a7ddb9851a532dea0f81a955894a1a9e Mon Sep 17 00:00:00 2001 From: Alexey Volkov Date: Fri, 17 Jan 2020 16:22:07 -0800 Subject: [PATCH] Samples - Updated the TFX-KFP pipeline (#2867) --- components/tfx/_samples/TFX_pipeline.ipynb | 26 +++++++++++++--------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/components/tfx/_samples/TFX_pipeline.ipynb b/components/tfx/_samples/TFX_pipeline.ipynb index f3e63dbf251..aed8b875c3f 100644 --- a/components/tfx/_samples/TFX_pipeline.ipynb +++ b/components/tfx/_samples/TFX_pipeline.ipynb @@ -23,12 +23,8 @@ "metadata": {}, "outputs": [], "source": [ - "import kfp\n", - "\n", - "# Initializing the client\n", - "client = kfp.Client()\n", - "\n", - "# ! Use kfp.Client(host='https://xxxxx.notebooks.googleusercontent.com/') if working from GCP notebooks (or local notebooks)" + "# Put your KFP cluster endpoint URL here if working from GCP notebooks (or local notebooks). ('https://xxxxx.notebooks.googleusercontent.com/')\n", + "kfp_endpoint='https://XXXXX.notebooks.googleusercontent.com/'" ] }, { @@ -37,11 +33,19 @@ "metadata": {}, "outputs": [], "source": [ - "input_data_uri = 'gs:///tensorflow-tfx/tfx/components/testdata/external/csv'\n", + "input_data_uri = 'gs://ml-pipeline-playground/tensorflow-tfx-repo/tfx/components/testdata/external/csv'\n", "\n", - "#Only S3/GCS is supported. Replace with downloading component or GIT clone\n", - "#module_file = 'https://raw.githubusercontent.com/tensorflow/tfx/master/tfx/examples/chicago_taxi_pipeline/taxi_utils.py'\n", - "module_file = 'gs:///tensorflow-tfx/tfx/examples/chicago_taxi_pipeline/taxi_utils.py'" + "#Only S3/GCS is supported for now.\n", + "module_file = 'gs://ml-pipeline-playground/tensorflow-tfx-repo/tfx/examples/chicago_taxi_pipeline/taxi_utils.py'" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "import kfp" ] }, { @@ -129,7 +133,7 @@ " )\n", "\n", "\n", - "client.create_run_from_pipeline_func(\n", + "kfp.Client(host=kfp_endpoint).create_run_from_pipeline_func(\n", " tfx_pipeline,\n", " arguments=dict(\n", " input_data_uri=input_data_uri,\n",