Compare commits

...
2 Commits
Author SHA1 Message Date
Andrew Ferlitsch b0af906712 port: kfp2 2023-10-04 19:18:51 +00:00
Andrew Ferlitsch dcb486d648 port: kfp2 2023-10-03 21:07:43 +00:00
@@ -157,14 +157,14 @@
"outputs": [],
"source": [
"# Install dependencies\n",
"! pip3 install --upgrade --quiet google-cloud-aiplatform==1.10.0 \\\n",
" google_cloud_pipeline_components==1.0.1 \\\n",
" google-api-core==2.8.2 \\\n",
" google-auth==1.35.0\n",
"! pip3 install --upgrade --quiet google-cloud-aiplatform \\\n",
" google_cloud_pipeline_components \\\n",
" google-api-core \\\n",
" google-auth\n",
"\n",
"! pip3 install --upgrade --quiet tensorflow==2.8.0 \\\n",
" tensorflow-hub==0.12.0 \\\n",
" kfp==1.8.9"
" kfp"
]
},
{
@@ -390,7 +390,7 @@
},
"outputs": [],
"source": [
"! gsutil mb -l $REGION -p $PROJECT_ID $BUCKET_URI"
"! gsutil mb -l {REGION} -p {PROJECT_ID} {BUCKET_URI}"
]
},
{
@@ -566,9 +566,8 @@
"\n",
"import tensorflow_hub as hub\n",
"from google.cloud import aiplatform as vertex_ai\n",
"from kfp import dsl\n",
"from kfp.v2 import compiler\n",
"from kfp.v2.dsl import component\n",
"from kfp import compiler, dsl\n",
"from kfp.dsl import component\n",
"\n",
"os.environ[\"TFHUB_MODEL_LOAD_FORMAT\"] = \"UNCOMPRESSED\""
]
@@ -1421,7 +1420,7 @@
"source": [
"## Compile and Run the pipeline\n",
"\n",
"Pass the necessary constants and parameters to the pipeline and compile it to a json file."
"Pass the necessary constants and parameters to the pipeline and compile it to a yaml file."
]
},
{
@@ -1433,7 +1432,7 @@
"outputs": [],
"source": [
"PIPELINE_ROOT = urlparse(BUCKET_URI)._replace(path=\"pipeline_root\").geturl()\n",
"PIPELINE_PACKAGE = str(path(BUILD) / \"mlops_bqml_text_analyisis_pipeline.json\")\n",
"PIPELINE_PACKAGE = str(path(BUILD) / \"mlops_bqml_text_analyisis_pipeline.yaml\")\n",
"REQUIREMENTS_URI = urlparse(BUCKET_URI)._replace(path=\"requirements.txt\").geturl()\n",
"PYTHON_FILE_URI = urlparse(BUCKET_URI)._replace(path=\"src/ingest_pipeline.py\").geturl()\n",
"MODEL_URI = urlparse(BUCKET_URI)._replace(path=\"swivel_text_embedding_model\").geturl()\n",
@@ -1447,7 +1446,7 @@
"id": "b5c1b7b8b290"
},
"source": [
"Using the compiled json file, create Vertex AI Pipeline Job and run it by passing the `SERVICE_ACCOUNT` details configured earlier."
"Using the compiled yaml file, create Vertex AI Pipeline Job and run it by passing the `SERVICE_ACCOUNT` details configured earlier."
]
},
{