我将一个预训练的 scikit learn 分类模型上传到 Vertex AI,并对 5 个样本进行批量预测。它只是返回了一个没有置信度分数的错误预测列表。我在 SDK 文档或 Google 控制台中看不到如何获得批量预测以包含置信度分数。这是 Vertex AI 可以做到的吗?
我的意图是使用以下代码自动化批量预测管道。
# Predict
# "csv", ""bigquery", "tf-record", "tf-record-gzip", or "file-list"
batch_prediction_job = model.batch_predict(
job_display_name = job_display_name,
gcs_source = input_path,
instances_format = "", # jsonl, csv, bigquery,
gcs_destination_prefix = output_path,
starting_replica_count = 1,
max_replica_count = 10,
sync = True,
)
batch_prediction_job.wait()
return batch_prediction_job.resource_name
我在谷歌控制台中进行了测试,以确保我的输入数据格式正确。