PredictionResult

Represents a line of JSONL in the batch prediction output file.

Fields
prediction value (Value format)

The prediction result. value is used here instead of Any so that JsonFormat does not append an extra "@type" field when we convert the proto to JSON and so we can represent array of objects. Do not set error if this is set.

error object (Error)

The error result. Do not set prediction if this is set.

input Union type
Some identifier from the input so that the prediction can be mapped back to the input instance. input can be only one of the following:
instance object (Struct format)

user's input instance. Struct is used here instead of Any so that JsonFormat does not append an extra "@type" field when we convert the proto to JSON.

key string

Optional user-provided key from the input instance.

JSON representation
{
  "prediction": value,
  "error": {
    object (Error)
  },

  // input
  "instance": {
    object
  },
  "key": string
  // Union type
}

Error

Fields
status enum (Code)

Error status. This will be serialized into the enum name e.g. "NOT_FOUND".

message string

Error message with additional details.

JSON representation
{
  "status": enum (Code),
  "message": string
}