我已经使用谷歌云 AutoML Vision API 训练了一个模型,但是当我专门尝试通过 Python 包获取模型性能指标时,我不断收到 403 响应:
PermissionDenied: 403 Permission 'automl.modelEvaluations.list' denied on resource 'projects/MY_BUCKET_ID/locations/us-central1/models/MY_MODEL_ID' (or it may not exist).
我正在使用文档中列出的 python 代码,并且在其他操作(创建数据集、训练模型)中也没有任何未经授权的操作,所以真的很难理解为什么会这样。这是代码:
# Get the full path of the model.
model_full_id = client.model_path(project_id, compute_region, model_id)
print(model_full_id)
# List all the model evaluations in the model by applying filter.
response = client.list_model_evaluations(model_full_id, filter_)
谢谢你的帮助