io_format.proto 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. // Copyright 2021 Google LLC
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. syntax = "proto3";
  15. package google.cloud.aiplatform.v1beta1.schema;
  16. import "google/cloud/aiplatform/v1beta1/schema/annotation_spec_color.proto";
  17. import "google/cloud/aiplatform/v1beta1/schema/geometry.proto";
  18. import "google/cloud/aiplatform/v1beta1/schema/predict/instance/text_sentiment.proto";
  19. import "google/protobuf/duration.proto";
  20. import "google/protobuf/struct.proto";
  21. import "google/rpc/code.proto";
  22. import "google/api/annotations.proto";
  23. option csharp_namespace = "Google.Cloud.AIPlatform.V1Beta1.Schema";
  24. option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1/schema;schema";
  25. option java_multiple_files = true;
  26. option java_outer_classname = "IoFormatProto";
  27. option java_package = "com.google.cloud.aiplatform.v1beta1.schema";
  28. option php_namespace = "Google\\Cloud\\AIPlatform\\V1beta1\\Schema";
  29. option ruby_package = "Google::Cloud::AIPlatform::V1beta1::Schema";
  30. // Represents a line of JSONL in the batch prediction output file.
  31. message PredictionResult {
  32. message Error {
  33. // Error status. This will be serialized into the enum name e.g.
  34. // "NOT_FOUND".
  35. google.rpc.Code status = 1;
  36. // Error message with additional details.
  37. string message = 2;
  38. }
  39. // Some identifier from the input so that the prediction can be mapped back to
  40. // the input instance.
  41. oneof input {
  42. // User's input instance.
  43. // Struct is used here instead of Any so that JsonFormat does not append an
  44. // extra "@type" field when we convert the proto to JSON.
  45. google.protobuf.Struct instance = 1;
  46. // Optional user-provided key from the input instance.
  47. string key = 2;
  48. }
  49. // The prediction result.
  50. // Value is used here instead of Any so that JsonFormat does not append an
  51. // extra "@type" field when we convert the proto to JSON and so we can
  52. // represent array of objects.
  53. // Do not set error if this is set.
  54. google.protobuf.Value prediction = 3;
  55. // The error result.
  56. // Do not set prediction if this is set.
  57. Error error = 4;
  58. }