inferencesvc

package
v0.4.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthInferenceSvc        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowInferenceSvc          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupInferenceSvc = fmt.Errorf("proto: unexpected end of group")
)
View Source
var InferenceType_name = map[int32]string{
	0: "ClassificationOverload",
	1: "ClassificationUnderload",
	2: "LatencyRegression",
}
View Source
var InferenceType_value = map[string]int32{
	"ClassificationOverload":  0,
	"ClassificationUnderload": 1,
	"LatencyRegression":       2,
}

Functions

func RegisterInferenceServiceServer

func RegisterInferenceServiceServer(s *grpc.Server, srv InferenceServiceServer)

Types

type ContainerRequestEntries

type ContainerRequestEntries struct {
	ContainerFeatureValues map[string]*FeatureValues `` /* 217-byte string literal not displayed */
	XXX_NoUnkeyedLiteral   struct{}                  `json:"-"`
	XXX_sizecache          int32                     `json:"-"`
}

func (*ContainerRequestEntries) Descriptor

func (*ContainerRequestEntries) Descriptor() ([]byte, []int)

func (*ContainerRequestEntries) GetContainerFeatureValues

func (m *ContainerRequestEntries) GetContainerFeatureValues() map[string]*FeatureValues

func (*ContainerRequestEntries) Marshal

func (m *ContainerRequestEntries) Marshal() (dAtA []byte, err error)

func (*ContainerRequestEntries) MarshalTo

func (m *ContainerRequestEntries) MarshalTo(dAtA []byte) (int, error)

func (*ContainerRequestEntries) MarshalToSizedBuffer

func (m *ContainerRequestEntries) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ContainerRequestEntries) ProtoMessage

func (*ContainerRequestEntries) ProtoMessage()

func (*ContainerRequestEntries) Reset

func (m *ContainerRequestEntries) Reset()

func (*ContainerRequestEntries) Size

func (m *ContainerRequestEntries) Size() (n int)

func (*ContainerRequestEntries) String

func (this *ContainerRequestEntries) String() string

func (*ContainerRequestEntries) Unmarshal

func (m *ContainerRequestEntries) Unmarshal(dAtA []byte) error

func (*ContainerRequestEntries) XXX_DiscardUnknown

func (m *ContainerRequestEntries) XXX_DiscardUnknown()

func (*ContainerRequestEntries) XXX_Marshal

func (m *ContainerRequestEntries) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ContainerRequestEntries) XXX_Merge

func (m *ContainerRequestEntries) XXX_Merge(src proto.Message)

func (*ContainerRequestEntries) XXX_Size

func (m *ContainerRequestEntries) XXX_Size() int

func (*ContainerRequestEntries) XXX_Unmarshal

func (m *ContainerRequestEntries) XXX_Unmarshal(b []byte) error

type ContainerResponseEntries

type ContainerResponseEntries struct {
	ContainerInferenceResults map[string]*InferenceResults `` /* 226-byte string literal not displayed */
	XXX_NoUnkeyedLiteral      struct{}                     `json:"-"`
	XXX_sizecache             int32                        `json:"-"`
}

func (*ContainerResponseEntries) Descriptor

func (*ContainerResponseEntries) Descriptor() ([]byte, []int)

func (*ContainerResponseEntries) GetContainerInferenceResults

func (m *ContainerResponseEntries) GetContainerInferenceResults() map[string]*InferenceResults

func (*ContainerResponseEntries) Marshal

func (m *ContainerResponseEntries) Marshal() (dAtA []byte, err error)

func (*ContainerResponseEntries) MarshalTo

func (m *ContainerResponseEntries) MarshalTo(dAtA []byte) (int, error)

func (*ContainerResponseEntries) MarshalToSizedBuffer

func (m *ContainerResponseEntries) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ContainerResponseEntries) ProtoMessage

func (*ContainerResponseEntries) ProtoMessage()

func (*ContainerResponseEntries) Reset

func (m *ContainerResponseEntries) Reset()

func (*ContainerResponseEntries) Size

func (m *ContainerResponseEntries) Size() (n int)

func (*ContainerResponseEntries) String

func (this *ContainerResponseEntries) String() string

func (*ContainerResponseEntries) Unmarshal

func (m *ContainerResponseEntries) Unmarshal(dAtA []byte) error

func (*ContainerResponseEntries) XXX_DiscardUnknown

func (m *ContainerResponseEntries) XXX_DiscardUnknown()

func (*ContainerResponseEntries) XXX_Marshal

func (m *ContainerResponseEntries) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ContainerResponseEntries) XXX_Merge

func (m *ContainerResponseEntries) XXX_Merge(src proto.Message)

func (*ContainerResponseEntries) XXX_Size

func (m *ContainerResponseEntries) XXX_Size() int

func (*ContainerResponseEntries) XXX_Unmarshal

func (m *ContainerResponseEntries) XXX_Unmarshal(b []byte) error

type FeatureValues

type FeatureValues struct {
	Values               []string `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*FeatureValues) Descriptor

func (*FeatureValues) Descriptor() ([]byte, []int)

func (*FeatureValues) GetValues

func (m *FeatureValues) GetValues() []string

func (*FeatureValues) Marshal

func (m *FeatureValues) Marshal() (dAtA []byte, err error)

func (*FeatureValues) MarshalTo

func (m *FeatureValues) MarshalTo(dAtA []byte) (int, error)

func (*FeatureValues) MarshalToSizedBuffer

func (m *FeatureValues) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*FeatureValues) ProtoMessage

func (*FeatureValues) ProtoMessage()

func (*FeatureValues) Reset

func (m *FeatureValues) Reset()

func (*FeatureValues) Size

func (m *FeatureValues) Size() (n int)

func (*FeatureValues) String

func (this *FeatureValues) String() string

func (*FeatureValues) Unmarshal

func (m *FeatureValues) Unmarshal(dAtA []byte) error

func (*FeatureValues) XXX_DiscardUnknown

func (m *FeatureValues) XXX_DiscardUnknown()

func (*FeatureValues) XXX_Marshal

func (m *FeatureValues) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*FeatureValues) XXX_Merge

func (m *FeatureValues) XXX_Merge(src proto.Message)

func (*FeatureValues) XXX_Size

func (m *FeatureValues) XXX_Size() int

func (*FeatureValues) XXX_Unmarshal

func (m *FeatureValues) XXX_Unmarshal(b []byte) error

type InferenceRequest

type InferenceRequest struct {
	FeatureNames         []string                            `protobuf:"bytes,1,rep,name=feature_names,json=featureNames,proto3" json:"feature_names,omitempty"`
	PodRequestEntries    map[string]*ContainerRequestEntries `` /* 202-byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{}                            `json:"-"`
	XXX_sizecache        int32                               `json:"-"`
}

func (*InferenceRequest) Descriptor

func (*InferenceRequest) Descriptor() ([]byte, []int)

func (*InferenceRequest) GetFeatureNames

func (m *InferenceRequest) GetFeatureNames() []string

func (*InferenceRequest) GetPodRequestEntries

func (m *InferenceRequest) GetPodRequestEntries() map[string]*ContainerRequestEntries

func (*InferenceRequest) Marshal

func (m *InferenceRequest) Marshal() (dAtA []byte, err error)

func (*InferenceRequest) MarshalTo

func (m *InferenceRequest) MarshalTo(dAtA []byte) (int, error)

func (*InferenceRequest) MarshalToSizedBuffer

func (m *InferenceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*InferenceRequest) ProtoMessage

func (*InferenceRequest) ProtoMessage()

func (*InferenceRequest) Reset

func (m *InferenceRequest) Reset()

func (*InferenceRequest) Size

func (m *InferenceRequest) Size() (n int)

func (*InferenceRequest) String

func (this *InferenceRequest) String() string

func (*InferenceRequest) Unmarshal

func (m *InferenceRequest) Unmarshal(dAtA []byte) error

func (*InferenceRequest) XXX_DiscardUnknown

func (m *InferenceRequest) XXX_DiscardUnknown()

func (*InferenceRequest) XXX_Marshal

func (m *InferenceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*InferenceRequest) XXX_Merge

func (m *InferenceRequest) XXX_Merge(src proto.Message)

func (*InferenceRequest) XXX_Size

func (m *InferenceRequest) XXX_Size() int

func (*InferenceRequest) XXX_Unmarshal

func (m *InferenceRequest) XXX_Unmarshal(b []byte) error

type InferenceResponse

type InferenceResponse struct {
	PodResponseEntries   map[string]*ContainerResponseEntries `` /* 205-byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{}                             `json:"-"`
	XXX_sizecache        int32                                `json:"-"`
}

func (*InferenceResponse) Descriptor

func (*InferenceResponse) Descriptor() ([]byte, []int)

func (*InferenceResponse) GetPodResponseEntries

func (m *InferenceResponse) GetPodResponseEntries() map[string]*ContainerResponseEntries

func (*InferenceResponse) Marshal

func (m *InferenceResponse) Marshal() (dAtA []byte, err error)

func (*InferenceResponse) MarshalTo

func (m *InferenceResponse) MarshalTo(dAtA []byte) (int, error)

func (*InferenceResponse) MarshalToSizedBuffer

func (m *InferenceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*InferenceResponse) ProtoMessage

func (*InferenceResponse) ProtoMessage()

func (*InferenceResponse) Reset

func (m *InferenceResponse) Reset()

func (*InferenceResponse) Size

func (m *InferenceResponse) Size() (n int)

func (*InferenceResponse) String

func (this *InferenceResponse) String() string

func (*InferenceResponse) Unmarshal

func (m *InferenceResponse) Unmarshal(dAtA []byte) error

func (*InferenceResponse) XXX_DiscardUnknown

func (m *InferenceResponse) XXX_DiscardUnknown()

func (*InferenceResponse) XXX_Marshal

func (m *InferenceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*InferenceResponse) XXX_Merge

func (m *InferenceResponse) XXX_Merge(src proto.Message)

func (*InferenceResponse) XXX_Size

func (m *InferenceResponse) XXX_Size() int

func (*InferenceResponse) XXX_Unmarshal

func (m *InferenceResponse) XXX_Unmarshal(b []byte) error

type InferenceResult

type InferenceResult struct {
	// if use default model. default model should be trained using all service data for fallback.
	IsDefault     bool          `protobuf:"varint,1,opt,name=is_default,json=isDefault,proto3" json:"is_default,omitempty"`
	InferenceType InferenceType `` /* 133-byte string literal not displayed */
	// Inference output, values are varied by inference target.
	// For classification, the output would be range from 0 to 1.
	// For regression, the output would be the predicted value.
	// It depends on the inference target.
	Output float32 `protobuf:"fixed32,3,opt,name=output,proto3" json:"output,omitempty"`
	// threshold to judge overload or underload. should be float between 0 and 1.
	Percentile           float32  `protobuf:"fixed32,4,opt,name=percentile,proto3" json:"percentile,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*InferenceResult) Descriptor

func (*InferenceResult) Descriptor() ([]byte, []int)

func (*InferenceResult) GetInferenceType

func (m *InferenceResult) GetInferenceType() InferenceType

func (*InferenceResult) GetIsDefault

func (m *InferenceResult) GetIsDefault() bool

func (*InferenceResult) GetOutput

func (m *InferenceResult) GetOutput() float32

func (*InferenceResult) GetPercentile

func (m *InferenceResult) GetPercentile() float32

func (*InferenceResult) Marshal

func (m *InferenceResult) Marshal() (dAtA []byte, err error)

func (*InferenceResult) MarshalTo

func (m *InferenceResult) MarshalTo(dAtA []byte) (int, error)

func (*InferenceResult) MarshalToSizedBuffer

func (m *InferenceResult) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*InferenceResult) ProtoMessage

func (*InferenceResult) ProtoMessage()

func (*InferenceResult) Reset

func (m *InferenceResult) Reset()

func (*InferenceResult) Size

func (m *InferenceResult) Size() (n int)

func (*InferenceResult) String

func (this *InferenceResult) String() string

func (*InferenceResult) Unmarshal

func (m *InferenceResult) Unmarshal(dAtA []byte) error

func (*InferenceResult) XXX_DiscardUnknown

func (m *InferenceResult) XXX_DiscardUnknown()

func (*InferenceResult) XXX_Marshal

func (m *InferenceResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*InferenceResult) XXX_Merge

func (m *InferenceResult) XXX_Merge(src proto.Message)

func (*InferenceResult) XXX_Size

func (m *InferenceResult) XXX_Size() int

func (*InferenceResult) XXX_Unmarshal

func (m *InferenceResult) XXX_Unmarshal(b []byte) error

type InferenceResults

type InferenceResults struct {
	InferenceResults     []*InferenceResult `protobuf:"bytes,1,rep,name=inference_results,json=inferenceResults,proto3" json:"inference_results,omitempty"`
	XXX_NoUnkeyedLiteral struct{}           `json:"-"`
	XXX_sizecache        int32              `json:"-"`
}

func (*InferenceResults) Descriptor

func (*InferenceResults) Descriptor() ([]byte, []int)

func (*InferenceResults) GetInferenceResults

func (m *InferenceResults) GetInferenceResults() []*InferenceResult

func (*InferenceResults) Marshal

func (m *InferenceResults) Marshal() (dAtA []byte, err error)

func (*InferenceResults) MarshalTo

func (m *InferenceResults) MarshalTo(dAtA []byte) (int, error)

func (*InferenceResults) MarshalToSizedBuffer

func (m *InferenceResults) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*InferenceResults) ProtoMessage

func (*InferenceResults) ProtoMessage()

func (*InferenceResults) Reset

func (m *InferenceResults) Reset()

func (*InferenceResults) Size

func (m *InferenceResults) Size() (n int)

func (*InferenceResults) String

func (this *InferenceResults) String() string

func (*InferenceResults) Unmarshal

func (m *InferenceResults) Unmarshal(dAtA []byte) error

func (*InferenceResults) XXX_DiscardUnknown

func (m *InferenceResults) XXX_DiscardUnknown()

func (*InferenceResults) XXX_Marshal

func (m *InferenceResults) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*InferenceResults) XXX_Merge

func (m *InferenceResults) XXX_Merge(src proto.Message)

func (*InferenceResults) XXX_Size

func (m *InferenceResults) XXX_Size() int

func (*InferenceResults) XXX_Unmarshal

func (m *InferenceResults) XXX_Unmarshal(b []byte) error

type InferenceServiceClient

type InferenceServiceClient interface {
	Inference(ctx context.Context, in *InferenceRequest, opts ...grpc.CallOption) (*InferenceResponse, error)
}

InferenceServiceClient is the client API for InferenceService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewInferenceServiceClient

func NewInferenceServiceClient(cc *grpc.ClientConn) InferenceServiceClient

type InferenceServiceServer

type InferenceServiceServer interface {
	Inference(context.Context, *InferenceRequest) (*InferenceResponse, error)
}

InferenceServiceServer is the server API for InferenceService service.

type InferenceServiceStubClient

type InferenceServiceStubClient struct {
	// contains filtered or unexported fields
}

func NewInferenceServiceStubClient

func NewInferenceServiceStubClient() *InferenceServiceStubClient

func (*InferenceServiceStubClient) Inference

func (*InferenceServiceStubClient) RestFakeResp

func (isc *InferenceServiceStubClient) RestFakeResp(fakeResp *InferenceResponse)

func (*InferenceServiceStubClient) SetFakeResp

func (isc *InferenceServiceStubClient) SetFakeResp(fakeResp *InferenceResponse)

func (*InferenceServiceStubClient) SetWantError

func (isc *InferenceServiceStubClient) SetWantError(wantErr bool)

type InferenceType

type InferenceType int32
const (
	InferenceType_ClassificationOverload  InferenceType = 0
	InferenceType_ClassificationUnderload InferenceType = 1
	InferenceType_LatencyRegression       InferenceType = 2
)

func (InferenceType) EnumDescriptor

func (InferenceType) EnumDescriptor() ([]byte, []int)

func (InferenceType) String

func (x InferenceType) String() string

type UnimplementedInferenceServiceServer

type UnimplementedInferenceServiceServer struct {
}

UnimplementedInferenceServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedInferenceServiceServer) Inference

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL