Google Cloud AI Platform 在线预测请求中是否可以指定服务默认值以外的签名?

Can a signature other than the serving default be specified in a Google Cloud AI Platform online prediction request?

gcloud ai-platform predict 支持 --signature-name 参数来指定 SavedModel 中的签名:https://cloud.google.com/sdk/gcloud/reference/ai-platform/predict

用于在线预测的 python SDK 和 REST API 不会: https://cloud.google.com/ml-engine/reference/rest/v1/projects/predict

有谁知道如何从与在线预测设置中服务默认值以外的签名关联的方法中获取预测?

我想让一个版本的推荐模型处理各种任务,每个任务都有不同的输入特征,同时避免必须创建和部署 AI Platform "custom prediction routines."

signature_name 被指定为 JSON 请求的一部分:

{
  // If unspecifed default serving signature is used.
  "signature_name": <string>,

  // List of objects
  "instances": [
    {
      "<feature_name1>": <value>|<list>,
      "<feature_name2>": <value>|<list>,
      ...
    },
    {
      // Example 2
      "<feature_name1>": <value>|<list>,
      "<feature_name2>": <value>|<list>,
      ...
    }
    ...
  ]
}