【发布时间】:2021-11-19 16:55:27
【问题描述】:
我在 Vertex AI 上使用 AutoML 创建了一个预测模型。我想使用这个模型每周进行批量预测。有没有办法安排这个?
进行这些预测的数据存储在一个 bigquery 表中,该表每周更新一次。
【问题讨论】:
标签: google-cloud-platform google-cloud-vertex-ai
我在 Vertex AI 上使用 AutoML 创建了一个预测模型。我想使用这个模型每周进行批量预测。有没有办法安排这个?
进行这些预测的数据存储在一个 bigquery 表中,该表每周更新一次。
【问题讨论】:
标签: google-cloud-platform google-cloud-vertex-ai
Vertex AutoML 中还没有直接的自动调度,但在 GCP 中可以通过多种不同的方式进行设置。
首先尝试使用可用于 BigQuery 和 Vertex 的客户端库的两个选项:
【讨论】:
不确定您是否正在使用 Vertex 管道来运行预测作业,但如果您使用了 here 列出的安排管道执行的方法。
from kfp.v2.google.client import AIPlatformClient # noqa: F811
api_client = AIPlatformClient(project_id=PROJECT_ID, region=REGION)
# adjust time zone and cron schedule as necessary
response = api_client.create_schedule_from_job_spec(
job_spec_path="intro_pipeline.json",
schedule="2 * * * *",
time_zone="America/Los_Angeles", # change this as necessary
parameter_values={"text": "Hello world!"},
# pipeline_root=PIPELINE_ROOT # this argument is necessary if you did not specify PIPELINE_ROOT as part of the pipeline definition.
)
【讨论】: