Compare commits

...
Author SHA1 Message Date
Andrew Ferlitsch fae1eada5f fix: param 2023-10-04 20:54:39 +00:00
Andrew Ferlitsch 1405fe8d44 fix: param 2023-10-04 20:42:22 +00:00
Andrew Ferlitsch 130cb0651a port: kfp2 2023-10-04 20:24:18 +00:00
Andrew Ferlitsch 27d2c7126f port: kfp2 2023-10-04 19:49:44 +00:00
Andrew Ferlitsch 08b120d554 port: kfp2 2023-10-04 19:34:29 +00:00
@@ -143,8 +143,8 @@
"outputs": [],
"source": [
"! pip3 install --upgrade --quiet google-cloud-aiplatform \\\n",
" 'google-cloud-pipeline-components<2' \\\n",
" 'kfp<2'"
" google-cloud-pipeline-components \\\n",
" kfp"
]
},
{
@@ -471,16 +471,15 @@
"source": [
"import kfp\n",
"from google.cloud import aiplatform\n",
"from google_cloud_pipeline_components.experimental.evaluation import \\\n",
" ModelEvaluationOp as evaluation_op\n",
"from google_cloud_pipeline_components.types import artifact_types\n",
"from google_cloud_pipeline_components.v1.batch_predict_job import \\\n",
" ModelBatchPredictOp as batch_prediction_op\n",
"from google_cloud_pipeline_components.v1.model import \\\n",
" ModelUploadOp as model_upload_op\n",
"from kfp.v2 import compiler\n",
"from kfp.v2.components import importer_node\n",
"from kfp.v2.dsl import Input, Metrics, component"
"from google_cloud_pipeline_components.v1.model_evaluation import \\\n",
" ModelEvaluationClassificationOp as evaluation_op\n",
"from kfp import compiler\n",
"from kfp.dsl import Input, Metrics, component, importer_node"
]
},
{
@@ -659,8 +658,6 @@
"\n",
" eval_task = evaluation_op(\n",
" project=project,\n",
" root_dir=WORKING_DIR,\n",
" problem_type=\"classification\",\n",
" classification_type=\"multiclass\",\n",
" ground_truth_column=\"target\",\n",
" class_names=[\"0\", \"1\"],\n",
@@ -696,7 +693,7 @@
"source": [
"compiler.Compiler().compile(\n",
" pipeline_func=pipeline,\n",
" package_path=\"evaluation_demo_pipeline.json\",\n",
" package_path=\"evaluation_demo_pipeline.yaml\",\n",
")"
]
},
@@ -723,7 +720,7 @@
"\n",
"job = aiplatform.PipelineJob(\n",
" display_name=DISPLAY_NAME,\n",
" template_path=\"evaluation_demo_pipeline.json\",\n",
" template_path=\"evaluation_demo_pipeline.yaml\",\n",
" pipeline_root=PIPELINE_ROOT,\n",
" parameter_values={\"metric\": \"auPrc\", \"threshold\": 0.95},\n",
" enable_caching=True,\n",