Compare commits

...
Author SHA1 Message Date
Andrew Ferlitsch 90d01a58ce fix imports 2023-10-01 04:34:58 +00:00
Andrew Ferlitsch c85c311ebd fix import 2023-10-01 04:05:52 +00:00
Andrew FerlitschandGitHub 44fa90cb84 resolve import issue 2023-09-30 20:40:50 -07:00
Andrew Ferlitsch 3aebf6b23e port: kfp2 2023-09-29 22:58:47 +00:00
@@ -169,8 +169,8 @@
" google-cloud-bigquery \\\n",
" pandas \\\n",
" pyarrow \\\n",
" 'kfp<2' \\\n",
" 'google-cloud-pipeline-components<2' \n",
" kfp \\\n",
" google-cloud-pipeline-components \n",
"\n",
"! pip3 install --quiet db-dtypes "
]
@@ -406,7 +406,7 @@
},
"outputs": [],
"source": [
"! gsutil mb -l $REGION -p $PROJECT_ID $BUCKET_URI"
"! gsutil mb -l {REGION} -p {PROJECT_ID} {BUCKET_URI}"
]
},
{
@@ -506,8 +506,8 @@
"import os\n",
"\n",
"from google.cloud import aiplatform, bigquery\n",
"from kfp.dsl import pipeline\n",
"from kfp.v2 import compiler"
"from kfp import compiler\n",
"from kfp.dsl import pipeline"
]
},
{
@@ -581,7 +581,7 @@
"# Dispaly name for the Vertex AI Pipeline\n",
"PIPELINE_DISPLAY_NAME = f\"income_classfiy_batch_pred_pipeline_{UUID}\"\n",
"# Filename to compile the pipeline to\n",
"PIPELINE_FILE_NAME = f\"{PIPELINE_DISPLAY_NAME}.json\""
"PIPELINE_FILE_NAME = f\"{PIPELINE_DISPLAY_NAME}.yaml\""
]
},
{
@@ -992,9 +992,12 @@
" batch_prediction_machine_type: str = \"n1-standard-4\",\n",
" batch_prediction_batch_size: int = 1000,\n",
"):\n",
" from google_cloud_pipeline_components.aiplatform import (\n",
" CustomPythonPackageTrainingJobRunOp, ModelBatchPredictOp,\n",
" TabularDatasetCreateOp)\n",
" from google_cloud_pipeline_components.v1.batch_predict_job import \\\n",
" ModelBatchPredictOp\n",
" from google_cloud_pipeline_components.v1.custom_job import \\\n",
" CustomPythonPackageTrainingJobRunOp\n",
" from google_cloud_pipeline_components.v1.dtaset import \\\n",
" TabularDatasetCreateOp\n",
"\n",
" # Create the dataset\n",
" dataset_create_op = TabularDatasetCreateOp(\n",
@@ -1043,7 +1046,7 @@
"source": [
"### Compile the pipeline\n",
"\n",
"After defining your pipeline, compile it to a file (`PIPELINE_FILE_NAME`) in JSON or YAML format."
"After defining your pipeline, compile it to a file (`PIPELINE_FILE_NAME`) in YAML format."
]
},
{