Compare commits

...
1 Commits
Author SHA1 Message Date
Andrew Ferlitsch d0e50220eb port: kfp2 2023-10-04 19:31:03 +00:00
@@ -152,8 +152,8 @@
"source": [
"! pip3 install --upgrade --quiet google-cloud-aiplatform \\\n",
" google-cloud-storage \\\n",
" 'kfp<2' \\\n",
" 'google-cloud-pipeline-components<2'"
" kfp \\\n",
" google-cloud-pipeline-components"
]
},
{
@@ -381,7 +381,7 @@
},
"outputs": [],
"source": [
"! gsutil mb -l $REGION -p $PROJECT_ID $BUCKET_URI"
"! gsutil mb -l {REGION} -p {PROJECT_ID} {BUCKET_URI}"
]
},
{
@@ -484,7 +484,7 @@
"\n",
"import google.cloud.aiplatform as aip\n",
"import kfp\n",
"from kfp.v2 import compiler # noqa: F811"
"from kfp import compiler # noqa: F811"
]
},
{
@@ -579,7 +579,7 @@
" from google_cloud_pipeline_components.v1.endpoint import (EndpointCreateOp,\n",
" ModelDeployOp)\n",
" from google_cloud_pipeline_components.v1.model import ModelUploadOp\n",
" from kfp.v2.components import importer_node\n",
" from kfp.dsl import importer_node\n",
"\n",
" custom_job_task = CustomTrainingJobOp(\n",
" project=project,\n",
@@ -654,7 +654,7 @@
"source": [
"compiler.Compiler().compile(\n",
" pipeline_func=pipeline,\n",
" package_path=\"tabular_regression_pipeline.json\",\n",
" package_path=\"tabular_regression_pipeline.yaml\",\n",
")"
]
},
@@ -681,14 +681,14 @@
"\n",
"job = aip.PipelineJob(\n",
" display_name=DISPLAY_NAME,\n",
" template_path=\"tabular_regression_pipeline.json\",\n",
" template_path=\"tabular_regression_pipeline.yaml\",\n",
" pipeline_root=PIPELINE_ROOT,\n",
" enable_caching=False,\n",
")\n",
"\n",
"job.run(service_account=SERVICE_ACCOUNT)\n",
"\n",
"! rm tabular_regression_pipeline.json"
"! rm tabular_regression_pipeline.yaml"
]
},
{