mirror of
https://github.com/GoogleCloudPlatform/vertex-ai-samples.git
synced 2026-09-26 14:42:04 +00:00
test: fix for testing (#298)
* test: fixes for testing * test: fixes for testing
This commit is contained in:
@@ -74,7 +74,7 @@
|
||||
"The steps performed include:\n",
|
||||
"\n",
|
||||
"- Define and compile a pipeline.\n",
|
||||
"- Schedule recurring pipeline runs.\n",
|
||||
"- Schedule a recurring pipeline run.\n",
|
||||
"- Specify which service account to use for a pipeline run."
|
||||
]
|
||||
},
|
||||
@@ -950,18 +950,19 @@
|
||||
},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"from kfp.v2.google.client import AIPlatformClient # noqa: F811\n",
|
||||
"if not os.getenv(\"IS_TESTING\"):\n",
|
||||
" from kfp.v2.google.client import AIPlatformClient # noqa: F811\n",
|
||||
"\n",
|
||||
"api_client = AIPlatformClient(project_id=PROJECT_ID, region=REGION)\n",
|
||||
" api_client = AIPlatformClient(project_id=PROJECT_ID, region=REGION)\n",
|
||||
"\n",
|
||||
"# adjust time zone and cron schedule as necessary\n",
|
||||
"response = api_client.create_schedule_from_job_spec(\n",
|
||||
" job_spec_path=\"intro_pipeline.json\",\n",
|
||||
" schedule=\"2 * * * *\",\n",
|
||||
" time_zone=\"America/Los_Angeles\", # change this as necessary\n",
|
||||
" parameter_values={\"text\": \"Hello world!\"},\n",
|
||||
" # pipeline_root=PIPELINE_ROOT # this argument is necessary if you did not specify PIPELINE_ROOT as part of the pipeline definition.\n",
|
||||
")"
|
||||
" # adjust time zone and cron schedule as necessary\n",
|
||||
" response = api_client.create_schedule_from_job_spec(\n",
|
||||
" job_spec_path=\"intro_pipeline.json\",\n",
|
||||
" schedule=\"2 * * * *\",\n",
|
||||
" time_zone=\"America/Los_Angeles\", # change this as necessary\n",
|
||||
" parameter_values={\"text\": \"Hello world!\"},\n",
|
||||
" # pipeline_root=PIPELINE_ROOT # this argument is necessary if you did not specify PIPELINE_ROOT as part of the pipeline definition.\n",
|
||||
" )"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -1010,7 +1011,7 @@
|
||||
},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"if not os.environ[\"IS_TESTING\"]:\n",
|
||||
"if not os.getenv(\"IS_TESTING\"):\n",
|
||||
" response = api_client.create_run_from_job_spec(\n",
|
||||
" job_spec_path=\"intro_pipeline.json\",\n",
|
||||
" pipeline_root=PIPELINE_ROOT,\n",
|
||||
|
||||
Reference in New Issue
Block a user