Documentation ¶
Overview ¶
Package v1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterMLModelServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterMLModelServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MLModelServiceClient) error
- func RegisterMLModelServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterMLModelServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MLModelServiceServer) error
- func RegisterMLModelServiceServer(s grpc.ServiceRegistrar, srv MLModelServiceServer)
- type File
- type FlatTensor
- func (*FlatTensor) Descriptor() ([]byte, []int)deprecated
- func (x *FlatTensor) GetDoubleTensor() *FlatTensorDataDouble
- func (x *FlatTensor) GetFloatTensor() *FlatTensorDataFloat
- func (x *FlatTensor) GetInt16Tensor() *FlatTensorDataInt16
- func (x *FlatTensor) GetInt32Tensor() *FlatTensorDataInt32
- func (x *FlatTensor) GetInt64Tensor() *FlatTensorDataInt64
- func (x *FlatTensor) GetInt8Tensor() *FlatTensorDataInt8
- func (x *FlatTensor) GetShape() []uint64
- func (m *FlatTensor) GetTensor() isFlatTensor_Tensor
- func (x *FlatTensor) GetUint16Tensor() *FlatTensorDataUInt16
- func (x *FlatTensor) GetUint32Tensor() *FlatTensorDataUInt32
- func (x *FlatTensor) GetUint64Tensor() *FlatTensorDataUInt64
- func (x *FlatTensor) GetUint8Tensor() *FlatTensorDataUInt8
- func (*FlatTensor) ProtoMessage()
- func (x *FlatTensor) ProtoReflect() protoreflect.Message
- func (x *FlatTensor) Reset()
- func (x *FlatTensor) String() string
- type FlatTensorDataDouble
- func (*FlatTensorDataDouble) Descriptor() ([]byte, []int)deprecated
- func (x *FlatTensorDataDouble) GetData() []float64
- func (*FlatTensorDataDouble) ProtoMessage()
- func (x *FlatTensorDataDouble) ProtoReflect() protoreflect.Message
- func (x *FlatTensorDataDouble) Reset()
- func (x *FlatTensorDataDouble) String() string
- type FlatTensorDataFloat
- func (*FlatTensorDataFloat) Descriptor() ([]byte, []int)deprecated
- func (x *FlatTensorDataFloat) GetData() []float32
- func (*FlatTensorDataFloat) ProtoMessage()
- func (x *FlatTensorDataFloat) ProtoReflect() protoreflect.Message
- func (x *FlatTensorDataFloat) Reset()
- func (x *FlatTensorDataFloat) String() string
- type FlatTensorDataInt16
- func (*FlatTensorDataInt16) Descriptor() ([]byte, []int)deprecated
- func (x *FlatTensorDataInt16) GetData() []uint32
- func (*FlatTensorDataInt16) ProtoMessage()
- func (x *FlatTensorDataInt16) ProtoReflect() protoreflect.Message
- func (x *FlatTensorDataInt16) Reset()
- func (x *FlatTensorDataInt16) String() string
- type FlatTensorDataInt32
- func (*FlatTensorDataInt32) Descriptor() ([]byte, []int)deprecated
- func (x *FlatTensorDataInt32) GetData() []int32
- func (*FlatTensorDataInt32) ProtoMessage()
- func (x *FlatTensorDataInt32) ProtoReflect() protoreflect.Message
- func (x *FlatTensorDataInt32) Reset()
- func (x *FlatTensorDataInt32) String() string
- type FlatTensorDataInt64
- func (*FlatTensorDataInt64) Descriptor() ([]byte, []int)deprecated
- func (x *FlatTensorDataInt64) GetData() []int64
- func (*FlatTensorDataInt64) ProtoMessage()
- func (x *FlatTensorDataInt64) ProtoReflect() protoreflect.Message
- func (x *FlatTensorDataInt64) Reset()
- func (x *FlatTensorDataInt64) String() string
- type FlatTensorDataInt8
- func (*FlatTensorDataInt8) Descriptor() ([]byte, []int)deprecated
- func (x *FlatTensorDataInt8) GetData() []byte
- func (*FlatTensorDataInt8) ProtoMessage()
- func (x *FlatTensorDataInt8) ProtoReflect() protoreflect.Message
- func (x *FlatTensorDataInt8) Reset()
- func (x *FlatTensorDataInt8) String() string
- type FlatTensorDataUInt16
- func (*FlatTensorDataUInt16) Descriptor() ([]byte, []int)deprecated
- func (x *FlatTensorDataUInt16) GetData() []uint32
- func (*FlatTensorDataUInt16) ProtoMessage()
- func (x *FlatTensorDataUInt16) ProtoReflect() protoreflect.Message
- func (x *FlatTensorDataUInt16) Reset()
- func (x *FlatTensorDataUInt16) String() string
- type FlatTensorDataUInt32
- func (*FlatTensorDataUInt32) Descriptor() ([]byte, []int)deprecated
- func (x *FlatTensorDataUInt32) GetData() []uint32
- func (*FlatTensorDataUInt32) ProtoMessage()
- func (x *FlatTensorDataUInt32) ProtoReflect() protoreflect.Message
- func (x *FlatTensorDataUInt32) Reset()
- func (x *FlatTensorDataUInt32) String() string
- type FlatTensorDataUInt64
- func (*FlatTensorDataUInt64) Descriptor() ([]byte, []int)deprecated
- func (x *FlatTensorDataUInt64) GetData() []uint64
- func (*FlatTensorDataUInt64) ProtoMessage()
- func (x *FlatTensorDataUInt64) ProtoReflect() protoreflect.Message
- func (x *FlatTensorDataUInt64) Reset()
- func (x *FlatTensorDataUInt64) String() string
- type FlatTensorDataUInt8
- func (*FlatTensorDataUInt8) Descriptor() ([]byte, []int)deprecated
- func (x *FlatTensorDataUInt8) GetData() []byte
- func (*FlatTensorDataUInt8) ProtoMessage()
- func (x *FlatTensorDataUInt8) ProtoReflect() protoreflect.Message
- func (x *FlatTensorDataUInt8) Reset()
- func (x *FlatTensorDataUInt8) String() string
- type FlatTensor_DoubleTensor
- type FlatTensor_FloatTensor
- type FlatTensor_Int16Tensor
- type FlatTensor_Int32Tensor
- type FlatTensor_Int64Tensor
- type FlatTensor_Int8Tensor
- type FlatTensor_Uint16Tensor
- type FlatTensor_Uint32Tensor
- type FlatTensor_Uint64Tensor
- type FlatTensor_Uint8Tensor
- type FlatTensors
- type InferRequest
- func (*InferRequest) Descriptor() ([]byte, []int)deprecated
- func (x *InferRequest) GetExtra() *structpb.Struct
- func (x *InferRequest) GetInputTensors() *FlatTensors
- func (x *InferRequest) GetName() string
- func (*InferRequest) ProtoMessage()
- func (x *InferRequest) ProtoReflect() protoreflect.Message
- func (x *InferRequest) Reset()
- func (x *InferRequest) String() string
- type InferResponse
- type LabelType
- type MLModelServiceClient
- type MLModelServiceServer
- type Metadata
- func (*Metadata) Descriptor() ([]byte, []int)deprecated
- func (x *Metadata) GetDescription() string
- func (x *Metadata) GetInputInfo() []*TensorInfo
- func (x *Metadata) GetName() string
- func (x *Metadata) GetOutputInfo() []*TensorInfo
- func (x *Metadata) GetType() string
- func (*Metadata) ProtoMessage()
- func (x *Metadata) ProtoReflect() protoreflect.Message
- func (x *Metadata) Reset()
- func (x *Metadata) String() string
- type MetadataRequest
- func (*MetadataRequest) Descriptor() ([]byte, []int)deprecated
- func (x *MetadataRequest) GetExtra() *structpb.Struct
- func (x *MetadataRequest) GetName() string
- func (*MetadataRequest) ProtoMessage()
- func (x *MetadataRequest) ProtoReflect() protoreflect.Message
- func (x *MetadataRequest) Reset()
- func (x *MetadataRequest) String() string
- type MetadataResponse
- type TensorInfo
- func (*TensorInfo) Descriptor() ([]byte, []int)deprecated
- func (x *TensorInfo) GetAssociatedFiles() []*File
- func (x *TensorInfo) GetDataType() string
- func (x *TensorInfo) GetDescription() string
- func (x *TensorInfo) GetExtra() *structpb.Struct
- func (x *TensorInfo) GetName() string
- func (x *TensorInfo) GetShape() []int32
- func (*TensorInfo) ProtoMessage()
- func (x *TensorInfo) ProtoReflect() protoreflect.Message
- func (x *TensorInfo) Reset()
- func (x *TensorInfo) String() string
- type UnimplementedMLModelServiceServer
- type UnsafeMLModelServiceServer
Constants ¶
This section is empty.
Variables ¶
var ( LabelType_name = map[int32]string{ 0: "LABEL_TYPE_UNSPECIFIED", 1: "LABEL_TYPE_TENSOR_VALUE", 2: "LABEL_TYPE_TENSOR_AXIS", } LabelType_value = map[string]int32{ "LABEL_TYPE_UNSPECIFIED": 0, "LABEL_TYPE_TENSOR_VALUE": 1, "LABEL_TYPE_TENSOR_AXIS": 2, } )
Enum value maps for LabelType.
var File_service_mlmodel_v1_mlmodel_proto protoreflect.FileDescriptor
var MLModelService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "viam.service.mlmodel.v1.MLModelService", HandlerType: (*MLModelServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Infer", Handler: _MLModelService_Infer_Handler, }, { MethodName: "Metadata", Handler: _MLModelService_Metadata_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "service/mlmodel/v1/mlmodel.proto", }
MLModelService_ServiceDesc is the grpc.ServiceDesc for MLModelService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterMLModelServiceHandler ¶
func RegisterMLModelServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterMLModelServiceHandler registers the http handlers for service MLModelService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterMLModelServiceHandlerClient ¶
func RegisterMLModelServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MLModelServiceClient) error
RegisterMLModelServiceHandlerClient registers the http handlers for service MLModelService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "MLModelServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "MLModelServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "MLModelServiceClient" to call the correct interceptors.
func RegisterMLModelServiceHandlerFromEndpoint ¶
func RegisterMLModelServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterMLModelServiceHandlerFromEndpoint is same as RegisterMLModelServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterMLModelServiceHandlerServer ¶
func RegisterMLModelServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MLModelServiceServer) error
RegisterMLModelServiceHandlerServer registers the http handlers for service MLModelService to "mux". UnaryRPC :call MLModelServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterMLModelServiceHandlerFromEndpoint instead.
func RegisterMLModelServiceServer ¶
func RegisterMLModelServiceServer(s grpc.ServiceRegistrar, srv MLModelServiceServer)
Types ¶
type File ¶
type File struct { // name of the file, with file extension Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // description of what the file contains Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` // How to associate the arrays/tensors to the labels in the file LabelType LabelType `` /* 128-byte string literal not displayed */ // contains filtered or unexported fields }
func (*File) Descriptor
deprecated
func (*File) GetDescription ¶
func (*File) GetLabelType ¶
func (*File) ProtoMessage ¶
func (*File) ProtoMessage()
func (*File) ProtoReflect ¶
func (x *File) ProtoReflect() protoreflect.Message
type FlatTensor ¶ added in v0.1.166
type FlatTensor struct { // the shape of the provided tensor as a list of integer extents Shape []uint64 `protobuf:"fixed64,1,rep,packed,name=shape,proto3" json:"shape,omitempty"` // the flat data to be interpreted per the above shape information // // Types that are assignable to Tensor: // // *FlatTensor_Int8Tensor // *FlatTensor_Uint8Tensor // *FlatTensor_Int16Tensor // *FlatTensor_Uint16Tensor // *FlatTensor_Int32Tensor // *FlatTensor_Uint32Tensor // *FlatTensor_Int64Tensor // *FlatTensor_Uint64Tensor // *FlatTensor_FloatTensor // *FlatTensor_DoubleTensor Tensor isFlatTensor_Tensor `protobuf_oneof:"tensor"` // contains filtered or unexported fields }
func (*FlatTensor) Descriptor
deprecated
added in
v0.1.166
func (*FlatTensor) Descriptor() ([]byte, []int)
Deprecated: Use FlatTensor.ProtoReflect.Descriptor instead.
func (*FlatTensor) GetDoubleTensor ¶ added in v0.1.166
func (x *FlatTensor) GetDoubleTensor() *FlatTensorDataDouble
func (*FlatTensor) GetFloatTensor ¶ added in v0.1.166
func (x *FlatTensor) GetFloatTensor() *FlatTensorDataFloat
func (*FlatTensor) GetInt16Tensor ¶ added in v0.1.166
func (x *FlatTensor) GetInt16Tensor() *FlatTensorDataInt16
func (*FlatTensor) GetInt32Tensor ¶ added in v0.1.166
func (x *FlatTensor) GetInt32Tensor() *FlatTensorDataInt32
func (*FlatTensor) GetInt64Tensor ¶ added in v0.1.166
func (x *FlatTensor) GetInt64Tensor() *FlatTensorDataInt64
func (*FlatTensor) GetInt8Tensor ¶ added in v0.1.166
func (x *FlatTensor) GetInt8Tensor() *FlatTensorDataInt8
func (*FlatTensor) GetShape ¶ added in v0.1.166
func (x *FlatTensor) GetShape() []uint64
func (*FlatTensor) GetTensor ¶ added in v0.1.166
func (m *FlatTensor) GetTensor() isFlatTensor_Tensor
func (*FlatTensor) GetUint16Tensor ¶ added in v0.1.166
func (x *FlatTensor) GetUint16Tensor() *FlatTensorDataUInt16
func (*FlatTensor) GetUint32Tensor ¶ added in v0.1.166
func (x *FlatTensor) GetUint32Tensor() *FlatTensorDataUInt32
func (*FlatTensor) GetUint64Tensor ¶ added in v0.1.166
func (x *FlatTensor) GetUint64Tensor() *FlatTensorDataUInt64
func (*FlatTensor) GetUint8Tensor ¶ added in v0.1.166
func (x *FlatTensor) GetUint8Tensor() *FlatTensorDataUInt8
func (*FlatTensor) ProtoMessage ¶ added in v0.1.166
func (*FlatTensor) ProtoMessage()
func (*FlatTensor) ProtoReflect ¶ added in v0.1.166
func (x *FlatTensor) ProtoReflect() protoreflect.Message
func (*FlatTensor) Reset ¶ added in v0.1.166
func (x *FlatTensor) Reset()
func (*FlatTensor) String ¶ added in v0.1.166
func (x *FlatTensor) String() string
type FlatTensorDataDouble ¶ added in v0.1.166
type FlatTensorDataDouble struct { Data []float64 `protobuf:"fixed64,1,rep,packed,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*FlatTensorDataDouble) Descriptor
deprecated
added in
v0.1.166
func (*FlatTensorDataDouble) Descriptor() ([]byte, []int)
Deprecated: Use FlatTensorDataDouble.ProtoReflect.Descriptor instead.
func (*FlatTensorDataDouble) GetData ¶ added in v0.1.166
func (x *FlatTensorDataDouble) GetData() []float64
func (*FlatTensorDataDouble) ProtoMessage ¶ added in v0.1.166
func (*FlatTensorDataDouble) ProtoMessage()
func (*FlatTensorDataDouble) ProtoReflect ¶ added in v0.1.166
func (x *FlatTensorDataDouble) ProtoReflect() protoreflect.Message
func (*FlatTensorDataDouble) Reset ¶ added in v0.1.166
func (x *FlatTensorDataDouble) Reset()
func (*FlatTensorDataDouble) String ¶ added in v0.1.166
func (x *FlatTensorDataDouble) String() string
type FlatTensorDataFloat ¶ added in v0.1.166
type FlatTensorDataFloat struct { Data []float32 `protobuf:"fixed32,1,rep,packed,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*FlatTensorDataFloat) Descriptor
deprecated
added in
v0.1.166
func (*FlatTensorDataFloat) Descriptor() ([]byte, []int)
Deprecated: Use FlatTensorDataFloat.ProtoReflect.Descriptor instead.
func (*FlatTensorDataFloat) GetData ¶ added in v0.1.166
func (x *FlatTensorDataFloat) GetData() []float32
func (*FlatTensorDataFloat) ProtoMessage ¶ added in v0.1.166
func (*FlatTensorDataFloat) ProtoMessage()
func (*FlatTensorDataFloat) ProtoReflect ¶ added in v0.1.166
func (x *FlatTensorDataFloat) ProtoReflect() protoreflect.Message
func (*FlatTensorDataFloat) Reset ¶ added in v0.1.166
func (x *FlatTensorDataFloat) Reset()
func (*FlatTensorDataFloat) String ¶ added in v0.1.166
func (x *FlatTensorDataFloat) String() string
type FlatTensorDataInt16 ¶ added in v0.1.166
type FlatTensorDataInt16 struct { // packs two 16-bit numbers per entry - explicitly little-endian // so big-endian producers/consumers must compensate Data []uint32 `protobuf:"fixed32,1,rep,packed,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*FlatTensorDataInt16) Descriptor
deprecated
added in
v0.1.166
func (*FlatTensorDataInt16) Descriptor() ([]byte, []int)
Deprecated: Use FlatTensorDataInt16.ProtoReflect.Descriptor instead.
func (*FlatTensorDataInt16) GetData ¶ added in v0.1.166
func (x *FlatTensorDataInt16) GetData() []uint32
func (*FlatTensorDataInt16) ProtoMessage ¶ added in v0.1.166
func (*FlatTensorDataInt16) ProtoMessage()
func (*FlatTensorDataInt16) ProtoReflect ¶ added in v0.1.166
func (x *FlatTensorDataInt16) ProtoReflect() protoreflect.Message
func (*FlatTensorDataInt16) Reset ¶ added in v0.1.166
func (x *FlatTensorDataInt16) Reset()
func (*FlatTensorDataInt16) String ¶ added in v0.1.166
func (x *FlatTensorDataInt16) String() string
type FlatTensorDataInt32 ¶ added in v0.1.166
type FlatTensorDataInt32 struct { Data []int32 `protobuf:"fixed32,1,rep,packed,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*FlatTensorDataInt32) Descriptor
deprecated
added in
v0.1.166
func (*FlatTensorDataInt32) Descriptor() ([]byte, []int)
Deprecated: Use FlatTensorDataInt32.ProtoReflect.Descriptor instead.
func (*FlatTensorDataInt32) GetData ¶ added in v0.1.166
func (x *FlatTensorDataInt32) GetData() []int32
func (*FlatTensorDataInt32) ProtoMessage ¶ added in v0.1.166
func (*FlatTensorDataInt32) ProtoMessage()
func (*FlatTensorDataInt32) ProtoReflect ¶ added in v0.1.166
func (x *FlatTensorDataInt32) ProtoReflect() protoreflect.Message
func (*FlatTensorDataInt32) Reset ¶ added in v0.1.166
func (x *FlatTensorDataInt32) Reset()
func (*FlatTensorDataInt32) String ¶ added in v0.1.166
func (x *FlatTensorDataInt32) String() string
type FlatTensorDataInt64 ¶ added in v0.1.166
type FlatTensorDataInt64 struct { Data []int64 `protobuf:"fixed64,1,rep,packed,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*FlatTensorDataInt64) Descriptor
deprecated
added in
v0.1.166
func (*FlatTensorDataInt64) Descriptor() ([]byte, []int)
Deprecated: Use FlatTensorDataInt64.ProtoReflect.Descriptor instead.
func (*FlatTensorDataInt64) GetData ¶ added in v0.1.166
func (x *FlatTensorDataInt64) GetData() []int64
func (*FlatTensorDataInt64) ProtoMessage ¶ added in v0.1.166
func (*FlatTensorDataInt64) ProtoMessage()
func (*FlatTensorDataInt64) ProtoReflect ¶ added in v0.1.166
func (x *FlatTensorDataInt64) ProtoReflect() protoreflect.Message
func (*FlatTensorDataInt64) Reset ¶ added in v0.1.166
func (x *FlatTensorDataInt64) Reset()
func (*FlatTensorDataInt64) String ¶ added in v0.1.166
func (x *FlatTensorDataInt64) String() string
type FlatTensorDataInt8 ¶ added in v0.1.166
type FlatTensorDataInt8 struct { Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*FlatTensorDataInt8) Descriptor
deprecated
added in
v0.1.166
func (*FlatTensorDataInt8) Descriptor() ([]byte, []int)
Deprecated: Use FlatTensorDataInt8.ProtoReflect.Descriptor instead.
func (*FlatTensorDataInt8) GetData ¶ added in v0.1.166
func (x *FlatTensorDataInt8) GetData() []byte
func (*FlatTensorDataInt8) ProtoMessage ¶ added in v0.1.166
func (*FlatTensorDataInt8) ProtoMessage()
func (*FlatTensorDataInt8) ProtoReflect ¶ added in v0.1.166
func (x *FlatTensorDataInt8) ProtoReflect() protoreflect.Message
func (*FlatTensorDataInt8) Reset ¶ added in v0.1.166
func (x *FlatTensorDataInt8) Reset()
func (*FlatTensorDataInt8) String ¶ added in v0.1.166
func (x *FlatTensorDataInt8) String() string
type FlatTensorDataUInt16 ¶ added in v0.1.166
type FlatTensorDataUInt16 struct { // packs two 16-bit numbers per entry - explicitly little-endian // so big-endian producers/consumers must compensate Data []uint32 `protobuf:"fixed32,1,rep,packed,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*FlatTensorDataUInt16) Descriptor
deprecated
added in
v0.1.166
func (*FlatTensorDataUInt16) Descriptor() ([]byte, []int)
Deprecated: Use FlatTensorDataUInt16.ProtoReflect.Descriptor instead.
func (*FlatTensorDataUInt16) GetData ¶ added in v0.1.166
func (x *FlatTensorDataUInt16) GetData() []uint32
func (*FlatTensorDataUInt16) ProtoMessage ¶ added in v0.1.166
func (*FlatTensorDataUInt16) ProtoMessage()
func (*FlatTensorDataUInt16) ProtoReflect ¶ added in v0.1.166
func (x *FlatTensorDataUInt16) ProtoReflect() protoreflect.Message
func (*FlatTensorDataUInt16) Reset ¶ added in v0.1.166
func (x *FlatTensorDataUInt16) Reset()
func (*FlatTensorDataUInt16) String ¶ added in v0.1.166
func (x *FlatTensorDataUInt16) String() string
type FlatTensorDataUInt32 ¶ added in v0.1.166
type FlatTensorDataUInt32 struct { Data []uint32 `protobuf:"fixed32,1,rep,packed,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*FlatTensorDataUInt32) Descriptor
deprecated
added in
v0.1.166
func (*FlatTensorDataUInt32) Descriptor() ([]byte, []int)
Deprecated: Use FlatTensorDataUInt32.ProtoReflect.Descriptor instead.
func (*FlatTensorDataUInt32) GetData ¶ added in v0.1.166
func (x *FlatTensorDataUInt32) GetData() []uint32
func (*FlatTensorDataUInt32) ProtoMessage ¶ added in v0.1.166
func (*FlatTensorDataUInt32) ProtoMessage()
func (*FlatTensorDataUInt32) ProtoReflect ¶ added in v0.1.166
func (x *FlatTensorDataUInt32) ProtoReflect() protoreflect.Message
func (*FlatTensorDataUInt32) Reset ¶ added in v0.1.166
func (x *FlatTensorDataUInt32) Reset()
func (*FlatTensorDataUInt32) String ¶ added in v0.1.166
func (x *FlatTensorDataUInt32) String() string
type FlatTensorDataUInt64 ¶ added in v0.1.166
type FlatTensorDataUInt64 struct { Data []uint64 `protobuf:"fixed64,1,rep,packed,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*FlatTensorDataUInt64) Descriptor
deprecated
added in
v0.1.166
func (*FlatTensorDataUInt64) Descriptor() ([]byte, []int)
Deprecated: Use FlatTensorDataUInt64.ProtoReflect.Descriptor instead.
func (*FlatTensorDataUInt64) GetData ¶ added in v0.1.166
func (x *FlatTensorDataUInt64) GetData() []uint64
func (*FlatTensorDataUInt64) ProtoMessage ¶ added in v0.1.166
func (*FlatTensorDataUInt64) ProtoMessage()
func (*FlatTensorDataUInt64) ProtoReflect ¶ added in v0.1.166
func (x *FlatTensorDataUInt64) ProtoReflect() protoreflect.Message
func (*FlatTensorDataUInt64) Reset ¶ added in v0.1.166
func (x *FlatTensorDataUInt64) Reset()
func (*FlatTensorDataUInt64) String ¶ added in v0.1.166
func (x *FlatTensorDataUInt64) String() string
type FlatTensorDataUInt8 ¶ added in v0.1.166
type FlatTensorDataUInt8 struct { Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*FlatTensorDataUInt8) Descriptor
deprecated
added in
v0.1.166
func (*FlatTensorDataUInt8) Descriptor() ([]byte, []int)
Deprecated: Use FlatTensorDataUInt8.ProtoReflect.Descriptor instead.
func (*FlatTensorDataUInt8) GetData ¶ added in v0.1.166
func (x *FlatTensorDataUInt8) GetData() []byte
func (*FlatTensorDataUInt8) ProtoMessage ¶ added in v0.1.166
func (*FlatTensorDataUInt8) ProtoMessage()
func (*FlatTensorDataUInt8) ProtoReflect ¶ added in v0.1.166
func (x *FlatTensorDataUInt8) ProtoReflect() protoreflect.Message
func (*FlatTensorDataUInt8) Reset ¶ added in v0.1.166
func (x *FlatTensorDataUInt8) Reset()
func (*FlatTensorDataUInt8) String ¶ added in v0.1.166
func (x *FlatTensorDataUInt8) String() string
type FlatTensor_DoubleTensor ¶ added in v0.1.166
type FlatTensor_DoubleTensor struct {
DoubleTensor *FlatTensorDataDouble `protobuf:"bytes,11,opt,name=double_tensor,json=doubleTensor,proto3,oneof"`
}
type FlatTensor_FloatTensor ¶ added in v0.1.166
type FlatTensor_FloatTensor struct {
FloatTensor *FlatTensorDataFloat `protobuf:"bytes,10,opt,name=float_tensor,json=floatTensor,proto3,oneof"`
}
type FlatTensor_Int16Tensor ¶ added in v0.1.166
type FlatTensor_Int16Tensor struct {
Int16Tensor *FlatTensorDataInt16 `protobuf:"bytes,4,opt,name=int16_tensor,json=int16Tensor,proto3,oneof"`
}
type FlatTensor_Int32Tensor ¶ added in v0.1.166
type FlatTensor_Int32Tensor struct {
Int32Tensor *FlatTensorDataInt32 `protobuf:"bytes,6,opt,name=int32_tensor,json=int32Tensor,proto3,oneof"`
}
type FlatTensor_Int64Tensor ¶ added in v0.1.166
type FlatTensor_Int64Tensor struct {
Int64Tensor *FlatTensorDataInt64 `protobuf:"bytes,8,opt,name=int64_tensor,json=int64Tensor,proto3,oneof"`
}
type FlatTensor_Int8Tensor ¶ added in v0.1.166
type FlatTensor_Int8Tensor struct {
Int8Tensor *FlatTensorDataInt8 `protobuf:"bytes,2,opt,name=int8_tensor,json=int8Tensor,proto3,oneof"`
}
type FlatTensor_Uint16Tensor ¶ added in v0.1.166
type FlatTensor_Uint16Tensor struct {
Uint16Tensor *FlatTensorDataUInt16 `protobuf:"bytes,5,opt,name=uint16_tensor,json=uint16Tensor,proto3,oneof"`
}
type FlatTensor_Uint32Tensor ¶ added in v0.1.166
type FlatTensor_Uint32Tensor struct {
Uint32Tensor *FlatTensorDataUInt32 `protobuf:"bytes,7,opt,name=uint32_tensor,json=uint32Tensor,proto3,oneof"`
}
type FlatTensor_Uint64Tensor ¶ added in v0.1.166
type FlatTensor_Uint64Tensor struct {
Uint64Tensor *FlatTensorDataUInt64 `protobuf:"bytes,9,opt,name=uint64_tensor,json=uint64Tensor,proto3,oneof"`
}
type FlatTensor_Uint8Tensor ¶ added in v0.1.166
type FlatTensor_Uint8Tensor struct {
Uint8Tensor *FlatTensorDataUInt8 `protobuf:"bytes,3,opt,name=uint8_tensor,json=uint8Tensor,proto3,oneof"`
}
type FlatTensors ¶ added in v0.1.166
type FlatTensors struct { // A name-indexed collection of flat tensor objects Tensors map[string]*FlatTensor `` /* 155-byte string literal not displayed */ // contains filtered or unexported fields }
func (*FlatTensors) Descriptor
deprecated
added in
v0.1.166
func (*FlatTensors) Descriptor() ([]byte, []int)
Deprecated: Use FlatTensors.ProtoReflect.Descriptor instead.
func (*FlatTensors) GetTensors ¶ added in v0.1.166
func (x *FlatTensors) GetTensors() map[string]*FlatTensor
func (*FlatTensors) ProtoMessage ¶ added in v0.1.166
func (*FlatTensors) ProtoMessage()
func (*FlatTensors) ProtoReflect ¶ added in v0.1.166
func (x *FlatTensors) ProtoReflect() protoreflect.Message
func (*FlatTensors) Reset ¶ added in v0.1.166
func (x *FlatTensors) Reset()
func (*FlatTensors) String ¶ added in v0.1.166
func (x *FlatTensors) String() string
type InferRequest ¶
type InferRequest struct { // name of the model service Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // the input data is provided as set of named flat tensors InputTensors *FlatTensors `protobuf:"bytes,3,opt,name=input_tensors,json=inputTensors,proto3" json:"input_tensors,omitempty"` // Additional arguments to the method Extra *structpb.Struct `protobuf:"bytes,99,opt,name=extra,proto3" json:"extra,omitempty"` // contains filtered or unexported fields }
func (*InferRequest) Descriptor
deprecated
func (*InferRequest) Descriptor() ([]byte, []int)
Deprecated: Use InferRequest.ProtoReflect.Descriptor instead.
func (*InferRequest) GetExtra ¶ added in v0.1.166
func (x *InferRequest) GetExtra() *structpb.Struct
func (*InferRequest) GetInputTensors ¶ added in v0.1.166
func (x *InferRequest) GetInputTensors() *FlatTensors
func (*InferRequest) GetName ¶
func (x *InferRequest) GetName() string
func (*InferRequest) ProtoMessage ¶
func (*InferRequest) ProtoMessage()
func (*InferRequest) ProtoReflect ¶
func (x *InferRequest) ProtoReflect() protoreflect.Message
func (*InferRequest) Reset ¶
func (x *InferRequest) Reset()
func (*InferRequest) String ¶
func (x *InferRequest) String() string
type InferResponse ¶
type InferResponse struct { // the output data is provided as a set of named flat tensors OutputTensors *FlatTensors `protobuf:"bytes,3,opt,name=output_tensors,json=outputTensors,proto3" json:"output_tensors,omitempty"` // contains filtered or unexported fields }
func (*InferResponse) Descriptor
deprecated
func (*InferResponse) Descriptor() ([]byte, []int)
Deprecated: Use InferResponse.ProtoReflect.Descriptor instead.
func (*InferResponse) GetOutputTensors ¶ added in v0.1.166
func (x *InferResponse) GetOutputTensors() *FlatTensors
func (*InferResponse) ProtoMessage ¶
func (*InferResponse) ProtoMessage()
func (*InferResponse) ProtoReflect ¶
func (x *InferResponse) ProtoReflect() protoreflect.Message
func (*InferResponse) Reset ¶
func (x *InferResponse) Reset()
func (*InferResponse) String ¶
func (x *InferResponse) String() string
type LabelType ¶
type LabelType int32
func (LabelType) Descriptor ¶
func (LabelType) Descriptor() protoreflect.EnumDescriptor
func (LabelType) EnumDescriptor
deprecated
func (LabelType) Number ¶
func (x LabelType) Number() protoreflect.EnumNumber
func (LabelType) Type ¶
func (LabelType) Type() protoreflect.EnumType
type MLModelServiceClient ¶
type MLModelServiceClient interface { // Infer takes an already ordered input tensor as a map, makes an inference on the model, and returns an output data map. Infer(ctx context.Context, in *InferRequest, opts ...grpc.CallOption) (*InferResponse, error) // Metadata returns the metadata associated with the ML model. Metadata(ctx context.Context, in *MetadataRequest, opts ...grpc.CallOption) (*MetadataResponse, error) }
MLModelServiceClient is the client API for MLModelService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewMLModelServiceClient ¶
func NewMLModelServiceClient(cc grpc.ClientConnInterface) MLModelServiceClient
type MLModelServiceServer ¶
type MLModelServiceServer interface { // Infer takes an already ordered input tensor as a map, makes an inference on the model, and returns an output data map. Infer(context.Context, *InferRequest) (*InferResponse, error) // Metadata returns the metadata associated with the ML model. Metadata(context.Context, *MetadataRequest) (*MetadataResponse, error) // contains filtered or unexported methods }
MLModelServiceServer is the server API for MLModelService service. All implementations must embed UnimplementedMLModelServiceServer for forward compatibility
type Metadata ¶
type Metadata struct { // name of the model Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // type of model e.g. object_detector, text_classifier Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` // description of the model Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` // the necessary input arrays/tensors for an inference, order matters InputInfo []*TensorInfo `protobuf:"bytes,4,rep,name=input_info,json=inputInfo,proto3" json:"input_info,omitempty"` // the output arrays/tensors of the model, order matters OutputInfo []*TensorInfo `protobuf:"bytes,5,rep,name=output_info,json=outputInfo,proto3" json:"output_info,omitempty"` // contains filtered or unexported fields }
func (*Metadata) Descriptor
deprecated
func (*Metadata) GetDescription ¶
func (*Metadata) GetInputInfo ¶
func (x *Metadata) GetInputInfo() []*TensorInfo
func (*Metadata) GetOutputInfo ¶
func (x *Metadata) GetOutputInfo() []*TensorInfo
func (*Metadata) ProtoMessage ¶
func (*Metadata) ProtoMessage()
func (*Metadata) ProtoReflect ¶
func (x *Metadata) ProtoReflect() protoreflect.Message
type MetadataRequest ¶
type MetadataRequest struct { // name of the model service Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Additional arguments to the method Extra *structpb.Struct `protobuf:"bytes,99,opt,name=extra,proto3" json:"extra,omitempty"` // contains filtered or unexported fields }
func (*MetadataRequest) Descriptor
deprecated
func (*MetadataRequest) Descriptor() ([]byte, []int)
Deprecated: Use MetadataRequest.ProtoReflect.Descriptor instead.
func (*MetadataRequest) GetExtra ¶ added in v0.1.166
func (x *MetadataRequest) GetExtra() *structpb.Struct
func (*MetadataRequest) GetName ¶
func (x *MetadataRequest) GetName() string
func (*MetadataRequest) ProtoMessage ¶
func (*MetadataRequest) ProtoMessage()
func (*MetadataRequest) ProtoReflect ¶
func (x *MetadataRequest) ProtoReflect() protoreflect.Message
func (*MetadataRequest) Reset ¶
func (x *MetadataRequest) Reset()
func (*MetadataRequest) String ¶
func (x *MetadataRequest) String() string
type MetadataResponse ¶
type MetadataResponse struct { // this is the metadata associated with the ML model Metadata *Metadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` // contains filtered or unexported fields }
func (*MetadataResponse) Descriptor
deprecated
func (*MetadataResponse) Descriptor() ([]byte, []int)
Deprecated: Use MetadataResponse.ProtoReflect.Descriptor instead.
func (*MetadataResponse) GetMetadata ¶
func (x *MetadataResponse) GetMetadata() *Metadata
func (*MetadataResponse) ProtoMessage ¶
func (*MetadataResponse) ProtoMessage()
func (*MetadataResponse) ProtoReflect ¶
func (x *MetadataResponse) ProtoReflect() protoreflect.Message
func (*MetadataResponse) Reset ¶
func (x *MetadataResponse) Reset()
func (*MetadataResponse) String ¶
func (x *MetadataResponse) String() string
type TensorInfo ¶
type TensorInfo struct { // name of the data in the array/tensor Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // description of the data in the array/tensor Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` // data type of the array/tensor, e.g. float32, float64, uint8 DataType string `protobuf:"bytes,3,opt,name=data_type,json=dataType,proto3" json:"data_type,omitempty"` // shape of the array/tensor (-1 for unknown) Shape []int32 `protobuf:"varint,4,rep,packed,name=shape,proto3" json:"shape,omitempty"` // files associated with the array/tensor, like for category labels AssociatedFiles []*File `protobuf:"bytes,5,rep,name=associated_files,json=associatedFiles,proto3" json:"associated_files,omitempty"` // anything else you want to say Extra *structpb.Struct `protobuf:"bytes,99,opt,name=extra,proto3" json:"extra,omitempty"` // contains filtered or unexported fields }
func (*TensorInfo) Descriptor
deprecated
func (*TensorInfo) Descriptor() ([]byte, []int)
Deprecated: Use TensorInfo.ProtoReflect.Descriptor instead.
func (*TensorInfo) GetAssociatedFiles ¶
func (x *TensorInfo) GetAssociatedFiles() []*File
func (*TensorInfo) GetDataType ¶
func (x *TensorInfo) GetDataType() string
func (*TensorInfo) GetDescription ¶
func (x *TensorInfo) GetDescription() string
func (*TensorInfo) GetExtra ¶
func (x *TensorInfo) GetExtra() *structpb.Struct
func (*TensorInfo) GetName ¶
func (x *TensorInfo) GetName() string
func (*TensorInfo) GetShape ¶ added in v0.1.109
func (x *TensorInfo) GetShape() []int32
func (*TensorInfo) ProtoMessage ¶
func (*TensorInfo) ProtoMessage()
func (*TensorInfo) ProtoReflect ¶
func (x *TensorInfo) ProtoReflect() protoreflect.Message
func (*TensorInfo) Reset ¶
func (x *TensorInfo) Reset()
func (*TensorInfo) String ¶
func (x *TensorInfo) String() string
type UnimplementedMLModelServiceServer ¶
type UnimplementedMLModelServiceServer struct { }
UnimplementedMLModelServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedMLModelServiceServer) Infer ¶
func (UnimplementedMLModelServiceServer) Infer(context.Context, *InferRequest) (*InferResponse, error)
func (UnimplementedMLModelServiceServer) Metadata ¶
func (UnimplementedMLModelServiceServer) Metadata(context.Context, *MetadataRequest) (*MetadataResponse, error)
type UnsafeMLModelServiceServer ¶
type UnsafeMLModelServiceServer interface {
// contains filtered or unexported methods
}
UnsafeMLModelServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to MLModelServiceServer will result in compilation errors.