Documentation ¶
Index ¶
- Variables
- func RegisterInferenceAPIsServiceServer(s grpc.ServiceRegistrar, srv InferenceAPIsServiceServer)
- type InferenceAPIsServiceClient
- type InferenceAPIsServiceServer
- type PredictionResponse
- func (*PredictionResponse) Descriptor() ([]byte, []int)deprecated
- func (x *PredictionResponse) GetPrediction() []byte
- func (*PredictionResponse) ProtoMessage()
- func (x *PredictionResponse) ProtoReflect() protoreflect.Message
- func (x *PredictionResponse) Reset()
- func (x *PredictionResponse) String() string
- type PredictionsRequest
- func (*PredictionsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *PredictionsRequest) GetInput() map[string][]byte
- func (x *PredictionsRequest) GetModelName() string
- func (x *PredictionsRequest) GetModelVersion() string
- func (*PredictionsRequest) ProtoMessage()
- func (x *PredictionsRequest) ProtoReflect() protoreflect.Message
- func (x *PredictionsRequest) Reset()
- func (x *PredictionsRequest) String() string
- type TorchServeHealthResponse
- func (*TorchServeHealthResponse) Descriptor() ([]byte, []int)deprecated
- func (x *TorchServeHealthResponse) GetHealth() string
- func (*TorchServeHealthResponse) ProtoMessage()
- func (x *TorchServeHealthResponse) ProtoReflect() protoreflect.Message
- func (x *TorchServeHealthResponse) Reset()
- func (x *TorchServeHealthResponse) String() string
- type UnimplementedInferenceAPIsServiceServer
- type UnsafeInferenceAPIsServiceServer
Constants ¶
This section is empty.
Variables ¶
var File_inference_proto protoreflect.FileDescriptor
var InferenceAPIsService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "org.pytorch.serve.grpc.inference.InferenceAPIsService", HandlerType: (*InferenceAPIsServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Ping", Handler: _InferenceAPIsService_Ping_Handler, }, { MethodName: "Predictions", Handler: _InferenceAPIsService_Predictions_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "inference.proto", }
InferenceAPIsService_ServiceDesc is the grpc.ServiceDesc for InferenceAPIsService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterInferenceAPIsServiceServer ¶
func RegisterInferenceAPIsServiceServer(s grpc.ServiceRegistrar, srv InferenceAPIsServiceServer)
Types ¶
type InferenceAPIsServiceClient ¶
type InferenceAPIsServiceClient interface { // Check health status of the TorchServe server. Ping(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*TorchServeHealthResponse, error) // Predictions entry point to get inference using default model version. Predictions(ctx context.Context, in *PredictionsRequest, opts ...grpc.CallOption) (*PredictionResponse, error) }
InferenceAPIsServiceClient is the client API for InferenceAPIsService 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 NewInferenceAPIsServiceClient ¶
func NewInferenceAPIsServiceClient(cc grpc.ClientConnInterface) InferenceAPIsServiceClient
type InferenceAPIsServiceServer ¶
type InferenceAPIsServiceServer interface { // Check health status of the TorchServe server. Ping(context.Context, *emptypb.Empty) (*TorchServeHealthResponse, error) // Predictions entry point to get inference using default model version. Predictions(context.Context, *PredictionsRequest) (*PredictionResponse, error) // contains filtered or unexported methods }
InferenceAPIsServiceServer is the server API for InferenceAPIsService service. All implementations must embed UnimplementedInferenceAPIsServiceServer for forward compatibility
type PredictionResponse ¶
type PredictionResponse struct { // Response content for prediction Prediction []byte `protobuf:"bytes,1,opt,name=prediction,proto3" json:"prediction,omitempty"` // contains filtered or unexported fields }
func (*PredictionResponse) Descriptor
deprecated
func (*PredictionResponse) Descriptor() ([]byte, []int)
Deprecated: Use PredictionResponse.ProtoReflect.Descriptor instead.
func (*PredictionResponse) GetPrediction ¶
func (x *PredictionResponse) GetPrediction() []byte
func (*PredictionResponse) ProtoMessage ¶
func (*PredictionResponse) ProtoMessage()
func (*PredictionResponse) ProtoReflect ¶
func (x *PredictionResponse) ProtoReflect() protoreflect.Message
func (*PredictionResponse) Reset ¶
func (x *PredictionResponse) Reset()
func (*PredictionResponse) String ¶
func (x *PredictionResponse) String() string
type PredictionsRequest ¶
type PredictionsRequest struct { // Name of model. ModelName string `protobuf:"bytes,1,opt,name=model_name,json=modelName,proto3" json:"model_name,omitempty"` //required // Version of model to run prediction on. ModelVersion string `protobuf:"bytes,2,opt,name=model_version,json=modelVersion,proto3" json:"model_version,omitempty"` //optional // Input data for model prediction Input map[string][]byte `` //required /* 151-byte string literal not displayed */ // contains filtered or unexported fields }
func (*PredictionsRequest) Descriptor
deprecated
func (*PredictionsRequest) Descriptor() ([]byte, []int)
Deprecated: Use PredictionsRequest.ProtoReflect.Descriptor instead.
func (*PredictionsRequest) GetInput ¶
func (x *PredictionsRequest) GetInput() map[string][]byte
func (*PredictionsRequest) GetModelName ¶
func (x *PredictionsRequest) GetModelName() string
func (*PredictionsRequest) GetModelVersion ¶
func (x *PredictionsRequest) GetModelVersion() string
func (*PredictionsRequest) ProtoMessage ¶
func (*PredictionsRequest) ProtoMessage()
func (*PredictionsRequest) ProtoReflect ¶
func (x *PredictionsRequest) ProtoReflect() protoreflect.Message
func (*PredictionsRequest) Reset ¶
func (x *PredictionsRequest) Reset()
func (*PredictionsRequest) String ¶
func (x *PredictionsRequest) String() string
type TorchServeHealthResponse ¶
type TorchServeHealthResponse struct { // TorchServe health Health string `protobuf:"bytes,1,opt,name=health,proto3" json:"health,omitempty"` // contains filtered or unexported fields }
func (*TorchServeHealthResponse) Descriptor
deprecated
func (*TorchServeHealthResponse) Descriptor() ([]byte, []int)
Deprecated: Use TorchServeHealthResponse.ProtoReflect.Descriptor instead.
func (*TorchServeHealthResponse) GetHealth ¶
func (x *TorchServeHealthResponse) GetHealth() string
func (*TorchServeHealthResponse) ProtoMessage ¶
func (*TorchServeHealthResponse) ProtoMessage()
func (*TorchServeHealthResponse) ProtoReflect ¶
func (x *TorchServeHealthResponse) ProtoReflect() protoreflect.Message
func (*TorchServeHealthResponse) Reset ¶
func (x *TorchServeHealthResponse) Reset()
func (*TorchServeHealthResponse) String ¶
func (x *TorchServeHealthResponse) String() string
type UnimplementedInferenceAPIsServiceServer ¶
type UnimplementedInferenceAPIsServiceServer struct { }
UnimplementedInferenceAPIsServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedInferenceAPIsServiceServer) Ping ¶
func (UnimplementedInferenceAPIsServiceServer) Ping(context.Context, *emptypb.Empty) (*TorchServeHealthResponse, error)
func (UnimplementedInferenceAPIsServiceServer) Predictions ¶
func (UnimplementedInferenceAPIsServiceServer) Predictions(context.Context, *PredictionsRequest) (*PredictionResponse, error)
type UnsafeInferenceAPIsServiceServer ¶
type UnsafeInferenceAPIsServiceServer interface {
// contains filtered or unexported methods
}
UnsafeInferenceAPIsServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to InferenceAPIsServiceServer will result in compilation errors.