diff --git a/app/mlinference/v1/ml_inference.pb.go b/app/mlinference/v1/ml_inference.pb.go index fffd00c8d..9f727477c 100644 --- a/app/mlinference/v1/ml_inference.pb.go +++ b/app/mlinference/v1/ml_inference.pb.go @@ -8,6 +8,7 @@ package v1 import ( v1 "go.viam.com/api/app/data/v1" + v11 "go.viam.com/api/service/mlmodel/v1" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -97,6 +98,9 @@ type GetInferenceResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + OutputTensors *v11.FlatTensors `protobuf:"bytes,1,opt,name=output_tensors,json=outputTensors,proto3" json:"output_tensors,omitempty"` + Annotations *v1.Annotations `protobuf:"bytes,2,opt,name=annotations,proto3" json:"annotations,omitempty"` } func (x *GetInferenceResponse) Reset() { @@ -129,6 +133,20 @@ func (*GetInferenceResponse) Descriptor() ([]byte, []int) { return file_app_mlinference_v1_ml_inference_proto_rawDescGZIP(), []int{1} } +func (x *GetInferenceResponse) GetOutputTensors() *v11.FlatTensors { + if x != nil { + return x.OutputTensors + } + return nil +} + +func (x *GetInferenceResponse) GetAnnotations() *v1.Annotations { + if x != nil { + return x.Annotations + } + return nil +} + var File_app_mlinference_v1_ml_inference_proto protoreflect.FileDescriptor var file_app_mlinference_v1_ml_inference_proto_rawDesc = []byte{ @@ -137,33 +155,44 @@ var file_app_mlinference_v1_ml_inference_proto_rawDesc = []byte{ 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x17, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x6d, 0x6c, 0x69, 0x6e, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x16, 0x61, 0x70, 0x70, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x61, - 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd5, 0x01, 0x0a, 0x13, 0x47, 0x65, 0x74, - 0x49, 0x6e, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x28, 0x0a, 0x10, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x5f, 0x69, 0x74, 0x65, - 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, 0x67, 0x69, - 0x73, 0x74, 0x72, 0x79, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x12, 0x32, 0x0a, 0x15, 0x72, 0x65, - 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x5f, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x72, 0x65, 0x67, 0x69, 0x73, - 0x74, 0x72, 0x79, 0x49, 0x74, 0x65, 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x37, - 0x0a, 0x09, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x64, 0x61, 0x74, - 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x49, 0x44, 0x52, 0x08, 0x62, - 0x69, 0x6e, 0x61, 0x72, 0x79, 0x49, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x72, 0x67, 0x61, 0x6e, - 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, - 0x22, 0x16, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x81, 0x01, 0x0a, 0x12, 0x4d, 0x4c, 0x49, - 0x6e, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, - 0x6b, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, - 0x2c, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x6d, 0x6c, 0x69, 0x6e, 0x66, - 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, - 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, - 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x6d, 0x6c, 0x69, 0x6e, 0x66, 0x65, 0x72, - 0x65, 0x6e, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x65, 0x72, - 0x65, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x24, 0x5a, 0x22, - 0x67, 0x6f, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x61, 0x70, 0x70, 0x2f, 0x6d, 0x6c, 0x69, 0x6e, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x2f, - 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x2f, 0x6d, 0x6c, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x6c, 0x6d, + 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd5, 0x01, 0x0a, 0x13, 0x47, + 0x65, 0x74, 0x49, 0x6e, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x28, 0x0a, 0x10, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x5f, 0x69, + 0x74, 0x65, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x12, 0x32, 0x0a, 0x15, + 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x5f, 0x76, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x72, 0x65, 0x67, + 0x69, 0x73, 0x74, 0x72, 0x79, 0x49, 0x74, 0x65, 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x12, 0x37, 0x0a, 0x09, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x64, + 0x61, 0x74, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x49, 0x44, 0x52, + 0x08, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x49, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x72, 0x67, + 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x49, 0x64, 0x22, 0xa4, 0x01, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x65, 0x72, 0x65, + 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x0e, 0x6f, + 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x74, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2e, 0x6d, 0x6c, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x6c, + 0x61, 0x74, 0x54, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, 0x52, 0x0d, 0x6f, 0x75, 0x74, 0x70, 0x75, + 0x74, 0x54, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, 0x12, 0x3f, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, + 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x31, + 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0b, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x32, 0x81, 0x01, 0x0a, 0x12, 0x4d, 0x4c, + 0x49, 0x6e, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x12, 0x6b, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, + 0x12, 0x2c, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x6d, 0x6c, 0x69, 0x6e, + 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, + 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, + 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x6d, 0x6c, 0x69, 0x6e, 0x66, 0x65, + 0x72, 0x65, 0x6e, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x65, + 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x24, 0x5a, + 0x22, 0x67, 0x6f, 0x2e, 0x76, 0x69, 0x61, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x6d, 0x6c, 0x69, 0x6e, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, + 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -183,16 +212,20 @@ var file_app_mlinference_v1_ml_inference_proto_goTypes = []any{ (*GetInferenceRequest)(nil), // 0: viam.app.mlinference.v1.GetInferenceRequest (*GetInferenceResponse)(nil), // 1: viam.app.mlinference.v1.GetInferenceResponse (*v1.BinaryID)(nil), // 2: viam.app.data.v1.BinaryID + (*v11.FlatTensors)(nil), // 3: viam.service.mlmodel.v1.FlatTensors + (*v1.Annotations)(nil), // 4: viam.app.data.v1.Annotations } var file_app_mlinference_v1_ml_inference_proto_depIdxs = []int32{ 2, // 0: viam.app.mlinference.v1.GetInferenceRequest.binary_id:type_name -> viam.app.data.v1.BinaryID - 0, // 1: viam.app.mlinference.v1.MLInferenceService.GetInference:input_type -> viam.app.mlinference.v1.GetInferenceRequest - 1, // 2: viam.app.mlinference.v1.MLInferenceService.GetInference:output_type -> viam.app.mlinference.v1.GetInferenceResponse - 2, // [2:3] is the sub-list for method output_type - 1, // [1:2] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name + 3, // 1: viam.app.mlinference.v1.GetInferenceResponse.output_tensors:type_name -> viam.service.mlmodel.v1.FlatTensors + 4, // 2: viam.app.mlinference.v1.GetInferenceResponse.annotations:type_name -> viam.app.data.v1.Annotations + 0, // 3: viam.app.mlinference.v1.MLInferenceService.GetInference:input_type -> viam.app.mlinference.v1.GetInferenceRequest + 1, // 4: viam.app.mlinference.v1.MLInferenceService.GetInference:output_type -> viam.app.mlinference.v1.GetInferenceResponse + 4, // [4:5] is the sub-list for method output_type + 3, // [3:4] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name } func init() { file_app_mlinference_v1_ml_inference_proto_init() } diff --git a/gen/js/app/mlinference/v1/ml_inference_grpc_web_pb.js b/gen/js/app/mlinference/v1/ml_inference_grpc_web_pb.js index bb439b5be..a3544ce5b 100644 --- a/gen/js/app/mlinference/v1/ml_inference_grpc_web_pb.js +++ b/gen/js/app/mlinference/v1/ml_inference_grpc_web_pb.js @@ -21,6 +21,8 @@ grpc.web = require('grpc-web'); var app_data_v1_data_pb = require('../../../app/data/v1/data_pb.js') + +var service_mlmodel_v1_mlmodel_pb = require('../../../service/mlmodel/v1/mlmodel_pb.js') const proto = {}; proto.viam = {}; proto.viam.app = {}; diff --git a/gen/js/app/mlinference/v1/ml_inference_pb.d.ts b/gen/js/app/mlinference/v1/ml_inference_pb.d.ts index edc20172a..ade3f9858 100644 --- a/gen/js/app/mlinference/v1/ml_inference_pb.d.ts +++ b/gen/js/app/mlinference/v1/ml_inference_pb.d.ts @@ -3,6 +3,7 @@ import * as jspb from "google-protobuf"; import * as app_data_v1_data_pb from "../../../app/data/v1/data_pb"; +import * as service_mlmodel_v1_mlmodel_pb from "../../../service/mlmodel/v1/mlmodel_pb"; export class GetInferenceRequest extends jspb.Message { getRegistryItemId(): string; @@ -39,6 +40,16 @@ export namespace GetInferenceRequest { } export class GetInferenceResponse extends jspb.Message { + hasOutputTensors(): boolean; + clearOutputTensors(): void; + getOutputTensors(): service_mlmodel_v1_mlmodel_pb.FlatTensors | undefined; + setOutputTensors(value?: service_mlmodel_v1_mlmodel_pb.FlatTensors): void; + + hasAnnotations(): boolean; + clearAnnotations(): void; + getAnnotations(): app_data_v1_data_pb.Annotations | undefined; + setAnnotations(value?: app_data_v1_data_pb.Annotations): void; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): GetInferenceResponse.AsObject; static toObject(includeInstance: boolean, msg: GetInferenceResponse): GetInferenceResponse.AsObject; @@ -51,6 +62,8 @@ export class GetInferenceResponse extends jspb.Message { export namespace GetInferenceResponse { export type AsObject = { + outputTensors?: service_mlmodel_v1_mlmodel_pb.FlatTensors.AsObject, + annotations?: app_data_v1_data_pb.Annotations.AsObject, } } diff --git a/gen/js/app/mlinference/v1/ml_inference_pb.js b/gen/js/app/mlinference/v1/ml_inference_pb.js index e45074039..a4870a9fd 100644 --- a/gen/js/app/mlinference/v1/ml_inference_pb.js +++ b/gen/js/app/mlinference/v1/ml_inference_pb.js @@ -17,6 +17,8 @@ var global = (function() { return this || window || global || self || Function(' var app_data_v1_data_pb = require('../../../app/data/v1/data_pb.js'); goog.object.extend(proto, app_data_v1_data_pb); +var service_mlmodel_v1_mlmodel_pb = require('../../../service/mlmodel/v1/mlmodel_pb.js'); +goog.object.extend(proto, service_mlmodel_v1_mlmodel_pb); goog.exportSymbol('proto.viam.app.mlinference.v1.GetInferenceRequest', null, global); goog.exportSymbol('proto.viam.app.mlinference.v1.GetInferenceResponse', null, global); /** @@ -334,7 +336,8 @@ proto.viam.app.mlinference.v1.GetInferenceResponse.prototype.toObject = function */ proto.viam.app.mlinference.v1.GetInferenceResponse.toObject = function(includeInstance, msg) { var f, obj = { - + outputTensors: (f = msg.getOutputTensors()) && service_mlmodel_v1_mlmodel_pb.FlatTensors.toObject(includeInstance, f), + annotations: (f = msg.getAnnotations()) && app_data_v1_data_pb.Annotations.toObject(includeInstance, f) }; if (includeInstance) { @@ -371,6 +374,16 @@ proto.viam.app.mlinference.v1.GetInferenceResponse.deserializeBinaryFromReader = } var field = reader.getFieldNumber(); switch (field) { + case 1: + var value = new service_mlmodel_v1_mlmodel_pb.FlatTensors; + reader.readMessage(value,service_mlmodel_v1_mlmodel_pb.FlatTensors.deserializeBinaryFromReader); + msg.setOutputTensors(value); + break; + case 2: + var value = new app_data_v1_data_pb.Annotations; + reader.readMessage(value,app_data_v1_data_pb.Annotations.deserializeBinaryFromReader); + msg.setAnnotations(value); + break; default: reader.skipField(); break; @@ -400,6 +413,96 @@ proto.viam.app.mlinference.v1.GetInferenceResponse.prototype.serializeBinary = f */ proto.viam.app.mlinference.v1.GetInferenceResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; + f = message.getOutputTensors(); + if (f != null) { + writer.writeMessage( + 1, + f, + service_mlmodel_v1_mlmodel_pb.FlatTensors.serializeBinaryToWriter + ); + } + f = message.getAnnotations(); + if (f != null) { + writer.writeMessage( + 2, + f, + app_data_v1_data_pb.Annotations.serializeBinaryToWriter + ); + } +}; + + +/** + * optional viam.service.mlmodel.v1.FlatTensors output_tensors = 1; + * @return {?proto.viam.service.mlmodel.v1.FlatTensors} + */ +proto.viam.app.mlinference.v1.GetInferenceResponse.prototype.getOutputTensors = function() { + return /** @type{?proto.viam.service.mlmodel.v1.FlatTensors} */ ( + jspb.Message.getWrapperField(this, service_mlmodel_v1_mlmodel_pb.FlatTensors, 1)); +}; + + +/** + * @param {?proto.viam.service.mlmodel.v1.FlatTensors|undefined} value + * @return {!proto.viam.app.mlinference.v1.GetInferenceResponse} returns this +*/ +proto.viam.app.mlinference.v1.GetInferenceResponse.prototype.setOutputTensors = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.app.mlinference.v1.GetInferenceResponse} returns this + */ +proto.viam.app.mlinference.v1.GetInferenceResponse.prototype.clearOutputTensors = function() { + return this.setOutputTensors(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.app.mlinference.v1.GetInferenceResponse.prototype.hasOutputTensors = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional viam.app.data.v1.Annotations annotations = 2; + * @return {?proto.viam.app.data.v1.Annotations} + */ +proto.viam.app.mlinference.v1.GetInferenceResponse.prototype.getAnnotations = function() { + return /** @type{?proto.viam.app.data.v1.Annotations} */ ( + jspb.Message.getWrapperField(this, app_data_v1_data_pb.Annotations, 2)); +}; + + +/** + * @param {?proto.viam.app.data.v1.Annotations|undefined} value + * @return {!proto.viam.app.mlinference.v1.GetInferenceResponse} returns this +*/ +proto.viam.app.mlinference.v1.GetInferenceResponse.prototype.setAnnotations = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.viam.app.mlinference.v1.GetInferenceResponse} returns this + */ +proto.viam.app.mlinference.v1.GetInferenceResponse.prototype.clearAnnotations = function() { + return this.setAnnotations(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.viam.app.mlinference.v1.GetInferenceResponse.prototype.hasAnnotations = function() { + return jspb.Message.getField(this, 2) != null; }; diff --git a/gen/js/google/rpc/error_details_pb.d.ts b/gen/js/google/rpc/error_details_pb.d.ts index 976e40691..c272531ab 100644 --- a/gen/js/google/rpc/error_details_pb.d.ts +++ b/gen/js/google/rpc/error_details_pb.d.ts @@ -203,6 +203,14 @@ export namespace BadRequest { getDescription(): string; setDescription(value: string): void; + getReason(): string; + setReason(value: string): void; + + hasLocalizedMessage(): boolean; + clearLocalizedMessage(): void; + getLocalizedMessage(): LocalizedMessage | undefined; + setLocalizedMessage(value?: LocalizedMessage): void; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): FieldViolation.AsObject; static toObject(includeInstance: boolean, msg: FieldViolation): FieldViolation.AsObject; @@ -217,6 +225,8 @@ export namespace BadRequest { export type AsObject = { field: string, description: string, + reason: string, + localizedMessage?: LocalizedMessage.AsObject, } } } diff --git a/gen/js/google/rpc/error_details_pb.js b/gen/js/google/rpc/error_details_pb.js index 86650ffc3..08b496f1a 100644 --- a/gen/js/google/rpc/error_details_pb.js +++ b/gen/js/google/rpc/error_details_pb.js @@ -1680,7 +1680,9 @@ proto.google.rpc.BadRequest.FieldViolation.prototype.toObject = function(opt_inc proto.google.rpc.BadRequest.FieldViolation.toObject = function(includeInstance, msg) { var f, obj = { field: jspb.Message.getFieldWithDefault(msg, 1, ""), - description: jspb.Message.getFieldWithDefault(msg, 2, "") + description: jspb.Message.getFieldWithDefault(msg, 2, ""), + reason: jspb.Message.getFieldWithDefault(msg, 3, ""), + localizedMessage: (f = msg.getLocalizedMessage()) && proto.google.rpc.LocalizedMessage.toObject(includeInstance, f) }; if (includeInstance) { @@ -1725,6 +1727,15 @@ proto.google.rpc.BadRequest.FieldViolation.deserializeBinaryFromReader = functio var value = /** @type {string} */ (reader.readString()); msg.setDescription(value); break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setReason(value); + break; + case 4: + var value = new proto.google.rpc.LocalizedMessage; + reader.readMessage(value,proto.google.rpc.LocalizedMessage.deserializeBinaryFromReader); + msg.setLocalizedMessage(value); + break; default: reader.skipField(); break; @@ -1768,6 +1779,21 @@ proto.google.rpc.BadRequest.FieldViolation.serializeBinaryToWriter = function(me f ); } + f = message.getReason(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getLocalizedMessage(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.google.rpc.LocalizedMessage.serializeBinaryToWriter + ); + } }; @@ -1807,6 +1833,61 @@ proto.google.rpc.BadRequest.FieldViolation.prototype.setDescription = function(v }; +/** + * optional string reason = 3; + * @return {string} + */ +proto.google.rpc.BadRequest.FieldViolation.prototype.getReason = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.rpc.BadRequest.FieldViolation} returns this + */ +proto.google.rpc.BadRequest.FieldViolation.prototype.setReason = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional LocalizedMessage localized_message = 4; + * @return {?proto.google.rpc.LocalizedMessage} + */ +proto.google.rpc.BadRequest.FieldViolation.prototype.getLocalizedMessage = function() { + return /** @type{?proto.google.rpc.LocalizedMessage} */ ( + jspb.Message.getWrapperField(this, proto.google.rpc.LocalizedMessage, 4)); +}; + + +/** + * @param {?proto.google.rpc.LocalizedMessage|undefined} value + * @return {!proto.google.rpc.BadRequest.FieldViolation} returns this +*/ +proto.google.rpc.BadRequest.FieldViolation.prototype.setLocalizedMessage = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.rpc.BadRequest.FieldViolation} returns this + */ +proto.google.rpc.BadRequest.FieldViolation.prototype.clearLocalizedMessage = function() { + return this.setLocalizedMessage(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.rpc.BadRequest.FieldViolation.prototype.hasLocalizedMessage = function() { + return jspb.Message.getField(this, 4) != null; +}; + + /** * repeated FieldViolation field_violations = 1; * @return {!Array} diff --git a/proto/viam/app/mlinference/v1/ml_inference.proto b/proto/viam/app/mlinference/v1/ml_inference.proto index e4da72e8b..04327e540 100644 --- a/proto/viam/app/mlinference/v1/ml_inference.proto +++ b/proto/viam/app/mlinference/v1/ml_inference.proto @@ -3,6 +3,7 @@ syntax = "proto3"; package viam.app.mlinference.v1; import "app/data/v1/data.proto"; +import "service/mlmodel/v1/mlmodel.proto"; option go_package = "go.viam.com/api/app/mlinference/v1"; @@ -20,4 +21,7 @@ message GetInferenceRequest { string organization_id = 4; } -message GetInferenceResponse {} +message GetInferenceResponse { + viam.service.mlmodel.v1.FlatTensors output_tensors = 1; + viam.app.data.v1.Annotations annotations = 2; +}