modeltraining

package
v0.9.1-rc2 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package modeltraining is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	ModelTraining_TrainModel_FullMethodName                 = "/modeltraining.ModelTraining/TrainModel"
	ModelTraining_PutModelTrainingStatus_FullMethodName     = "/modeltraining.ModelTraining/PutModelTrainingStatus"
	ModelTraining_ClusterWorkloadAggregation_FullMethodName = "/modeltraining.ModelTraining/ClusterWorkloadAggregation"
	ModelTraining_GetModelStatus_FullMethodName             = "/modeltraining.ModelTraining/GetModelStatus"
	ModelTraining_GetModelTrainingParameters_FullMethodName = "/modeltraining.ModelTraining/GetModelTrainingParameters"
	ModelTraining_GPUInfo_FullMethodName                    = "/modeltraining.ModelTraining/GPUInfo"
)

Variables

View Source
var File_github_com_rancher_opni_plugins_aiops_pkg_apis_modeltraining_modeltraining_proto protoreflect.FileDescriptor
View Source
var ModelTraining_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "modeltraining.ModelTraining",
	HandlerType: (*ModelTrainingServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "TrainModel",
			Handler:    _ModelTraining_TrainModel_Handler,
		},
		{
			MethodName: "PutModelTrainingStatus",
			Handler:    _ModelTraining_PutModelTrainingStatus_Handler,
		},
		{
			MethodName: "ClusterWorkloadAggregation",
			Handler:    _ModelTraining_ClusterWorkloadAggregation_Handler,
		},
		{
			MethodName: "GetModelStatus",
			Handler:    _ModelTraining_GetModelStatus_Handler,
		},
		{
			MethodName: "GetModelTrainingParameters",
			Handler:    _ModelTraining_GetModelTrainingParameters_Handler,
		},
		{
			MethodName: "GPUInfo",
			Handler:    _ModelTraining_GPUInfo_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "github.com/rancher/opni/plugins/aiops/pkg/apis/modeltraining/modeltraining.proto",
}

ModelTraining_ServiceDesc is the grpc.ServiceDesc for ModelTraining service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterModelTrainingHandler

func RegisterModelTrainingHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterModelTrainingHandler registers the http handlers for service ModelTraining to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterModelTrainingHandlerClient

func RegisterModelTrainingHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ModelTrainingClient) error

RegisterModelTrainingHandlerClient registers the http handlers for service ModelTraining to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ModelTrainingClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ModelTrainingClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "ModelTrainingClient" to call the correct interceptors.

func RegisterModelTrainingHandlerFromEndpoint

func RegisterModelTrainingHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterModelTrainingHandlerFromEndpoint is same as RegisterModelTrainingHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterModelTrainingHandlerServer

func RegisterModelTrainingHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ModelTrainingServer) error

RegisterModelTrainingHandlerServer registers the http handlers for service ModelTraining to "mux". UnaryRPC :call ModelTrainingServer 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 RegisterModelTrainingHandlerFromEndpoint instead.

func RegisterModelTrainingServer

func RegisterModelTrainingServer(s grpc.ServiceRegistrar, srv ModelTrainingServer)

Types

type GPUInfo

type GPUInfo struct {
	Name        string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Capacity    string `protobuf:"bytes,2,opt,name=capacity,proto3" json:"capacity,omitempty"`
	Allocatable string `protobuf:"bytes,3,opt,name=allocatable,proto3" json:"allocatable,omitempty"`
	// contains filtered or unexported fields
}

func (*GPUInfo) Descriptor deprecated

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

Deprecated: Use GPUInfo.ProtoReflect.Descriptor instead.

func (*GPUInfo) GetAllocatable

func (x *GPUInfo) GetAllocatable() string

func (*GPUInfo) GetCapacity

func (x *GPUInfo) GetCapacity() string

func (*GPUInfo) GetName

func (x *GPUInfo) GetName() string

func (*GPUInfo) ProtoMessage

func (*GPUInfo) ProtoMessage()

func (*GPUInfo) ProtoReflect

func (x *GPUInfo) ProtoReflect() protoreflect.Message

func (*GPUInfo) Reset

func (x *GPUInfo) Reset()

func (*GPUInfo) String

func (x *GPUInfo) String() string

type GPUInfoList

type GPUInfoList struct {
	Items []*GPUInfo `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
	// contains filtered or unexported fields
}

func (*GPUInfoList) Descriptor deprecated

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

Deprecated: Use GPUInfoList.ProtoReflect.Descriptor instead.

func (*GPUInfoList) GetItems

func (x *GPUInfoList) GetItems() []*GPUInfo

func (*GPUInfoList) ProtoMessage

func (*GPUInfoList) ProtoMessage()

func (*GPUInfoList) ProtoReflect

func (x *GPUInfoList) ProtoReflect() protoreflect.Message

func (*GPUInfoList) Reset

func (x *GPUInfoList) Reset()

func (*GPUInfoList) String

func (x *GPUInfoList) String() string

type ModelStatus

type ModelStatus struct {
	Status     string                   `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	Statistics *ModelTrainingStatistics `protobuf:"bytes,2,opt,name=statistics,proto3" json:"statistics,omitempty"`
	// contains filtered or unexported fields
}

func (*ModelStatus) Descriptor deprecated

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

Deprecated: Use ModelStatus.ProtoReflect.Descriptor instead.

func (*ModelStatus) GetStatistics

func (x *ModelStatus) GetStatistics() *ModelTrainingStatistics

func (*ModelStatus) GetStatus

func (x *ModelStatus) GetStatus() string

func (*ModelStatus) ProtoMessage

func (*ModelStatus) ProtoMessage()

func (*ModelStatus) ProtoReflect

func (x *ModelStatus) ProtoReflect() protoreflect.Message

func (*ModelStatus) Reset

func (x *ModelStatus) Reset()

func (*ModelStatus) String

func (x *ModelStatus) String() string

type ModelTrainingClient

type ModelTrainingClient interface {
	TrainModel(ctx context.Context, in *ModelTrainingParametersList, opts ...grpc.CallOption) (*ModelTrainingResponse, error)
	PutModelTrainingStatus(ctx context.Context, in *ModelTrainingStatistics, opts ...grpc.CallOption) (*emptypb.Empty, error)
	ClusterWorkloadAggregation(ctx context.Context, in *v1.Reference, opts ...grpc.CallOption) (*WorkloadAggregationList, error)
	GetModelStatus(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ModelStatus, error)
	GetModelTrainingParameters(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ModelTrainingParametersList, error)
	GPUInfo(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GPUInfoList, error)
}

ModelTrainingClient is the client API for ModelTraining 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.

type ModelTrainingParameters

type ModelTrainingParameters struct {
	ClusterId  string `protobuf:"bytes,1,opt,name=clusterId,proto3" json:"clusterId,omitempty"`
	Namespace  string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"`
	Deployment string `protobuf:"bytes,3,opt,name=deployment,proto3" json:"deployment,omitempty"`
	// contains filtered or unexported fields
}

func (*ModelTrainingParameters) Descriptor deprecated

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

Deprecated: Use ModelTrainingParameters.ProtoReflect.Descriptor instead.

func (*ModelTrainingParameters) GetClusterId

func (x *ModelTrainingParameters) GetClusterId() string

func (*ModelTrainingParameters) GetDeployment

func (x *ModelTrainingParameters) GetDeployment() string

func (*ModelTrainingParameters) GetNamespace

func (x *ModelTrainingParameters) GetNamespace() string

func (*ModelTrainingParameters) ProtoMessage

func (*ModelTrainingParameters) ProtoMessage()

func (*ModelTrainingParameters) ProtoReflect

func (x *ModelTrainingParameters) ProtoReflect() protoreflect.Message

func (*ModelTrainingParameters) Reset

func (x *ModelTrainingParameters) Reset()

func (*ModelTrainingParameters) String

func (x *ModelTrainingParameters) String() string

type ModelTrainingParametersList

type ModelTrainingParametersList struct {
	Items []*ModelTrainingParameters `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
	// contains filtered or unexported fields
}

func (*ModelTrainingParametersList) Descriptor deprecated

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

Deprecated: Use ModelTrainingParametersList.ProtoReflect.Descriptor instead.

func (*ModelTrainingParametersList) GetItems

func (*ModelTrainingParametersList) ProtoMessage

func (*ModelTrainingParametersList) ProtoMessage()

func (*ModelTrainingParametersList) ProtoReflect

func (*ModelTrainingParametersList) Reset

func (x *ModelTrainingParametersList) Reset()

func (*ModelTrainingParametersList) String

func (x *ModelTrainingParametersList) String() string

type ModelTrainingResponse

type ModelTrainingResponse struct {
	Response string `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"`
	// contains filtered or unexported fields
}

func (*ModelTrainingResponse) Descriptor deprecated

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

Deprecated: Use ModelTrainingResponse.ProtoReflect.Descriptor instead.

func (*ModelTrainingResponse) GetResponse

func (x *ModelTrainingResponse) GetResponse() string

func (*ModelTrainingResponse) ProtoMessage

func (*ModelTrainingResponse) ProtoMessage()

func (*ModelTrainingResponse) ProtoReflect

func (x *ModelTrainingResponse) ProtoReflect() protoreflect.Message

func (*ModelTrainingResponse) Reset

func (x *ModelTrainingResponse) Reset()

func (*ModelTrainingResponse) String

func (x *ModelTrainingResponse) String() string

type ModelTrainingServer

type ModelTrainingServer interface {
	TrainModel(context.Context, *ModelTrainingParametersList) (*ModelTrainingResponse, error)
	PutModelTrainingStatus(context.Context, *ModelTrainingStatistics) (*emptypb.Empty, error)
	ClusterWorkloadAggregation(context.Context, *v1.Reference) (*WorkloadAggregationList, error)
	GetModelStatus(context.Context, *emptypb.Empty) (*ModelStatus, error)
	GetModelTrainingParameters(context.Context, *emptypb.Empty) (*ModelTrainingParametersList, error)
	GPUInfo(context.Context, *emptypb.Empty) (*GPUInfoList, error)
	// contains filtered or unexported methods
}

ModelTrainingServer is the server API for ModelTraining service. All implementations must embed UnimplementedModelTrainingServer for forward compatibility

type ModelTrainingStatistics

type ModelTrainingStatistics struct {
	TimeElapsed         int64   `protobuf:"varint,1,opt,name=timeElapsed,proto3" json:"timeElapsed,omitempty"`
	PercentageCompleted int64   `protobuf:"varint,2,opt,name=percentageCompleted,proto3" json:"percentageCompleted,omitempty"`
	RemainingTime       int64   `protobuf:"varint,3,opt,name=remainingTime,proto3" json:"remainingTime,omitempty"`
	CurrentEpoch        int64   `protobuf:"varint,4,opt,name=currentEpoch,proto3" json:"currentEpoch,omitempty"`
	ModelAccuracy       float64 `protobuf:"fixed64,5,opt,name=modelAccuracy,proto3" json:"modelAccuracy,omitempty"`
	Stage               string  `protobuf:"bytes,6,opt,name=stage,proto3" json:"stage,omitempty"`
	// contains filtered or unexported fields
}

func (*ModelTrainingStatistics) Descriptor deprecated

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

Deprecated: Use ModelTrainingStatistics.ProtoReflect.Descriptor instead.

func (*ModelTrainingStatistics) GetCurrentEpoch

func (x *ModelTrainingStatistics) GetCurrentEpoch() int64

func (*ModelTrainingStatistics) GetModelAccuracy

func (x *ModelTrainingStatistics) GetModelAccuracy() float64

func (*ModelTrainingStatistics) GetPercentageCompleted

func (x *ModelTrainingStatistics) GetPercentageCompleted() int64

func (*ModelTrainingStatistics) GetRemainingTime

func (x *ModelTrainingStatistics) GetRemainingTime() int64

func (*ModelTrainingStatistics) GetStage

func (x *ModelTrainingStatistics) GetStage() string

func (*ModelTrainingStatistics) GetTimeElapsed

func (x *ModelTrainingStatistics) GetTimeElapsed() int64

func (*ModelTrainingStatistics) ProtoMessage

func (*ModelTrainingStatistics) ProtoMessage()

func (*ModelTrainingStatistics) ProtoReflect

func (x *ModelTrainingStatistics) ProtoReflect() protoreflect.Message

func (*ModelTrainingStatistics) Reset

func (x *ModelTrainingStatistics) Reset()

func (*ModelTrainingStatistics) String

func (x *ModelTrainingStatistics) String() string

type UnimplementedModelTrainingServer

type UnimplementedModelTrainingServer struct {
}

UnimplementedModelTrainingServer must be embedded to have forward compatible implementations.

func (UnimplementedModelTrainingServer) ClusterWorkloadAggregation

func (UnimplementedModelTrainingServer) GPUInfo

func (UnimplementedModelTrainingServer) GetModelStatus

func (UnimplementedModelTrainingServer) GetModelTrainingParameters

func (UnimplementedModelTrainingServer) PutModelTrainingStatus

func (UnimplementedModelTrainingServer) TrainModel

type UnsafeModelTrainingServer

type UnsafeModelTrainingServer interface {
	// contains filtered or unexported methods
}

UnsafeModelTrainingServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ModelTrainingServer will result in compilation errors.

type WorkloadAggregation

type WorkloadAggregation struct {
	ClusterId  string `protobuf:"bytes,1,opt,name=clusterId,proto3" json:"clusterId,omitempty"`
	Namespace  string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"`
	Deployment string `protobuf:"bytes,3,opt,name=deployment,proto3" json:"deployment,omitempty"`
	LogCount   int64  `protobuf:"varint,4,opt,name=logCount,proto3" json:"logCount,omitempty"`
	// contains filtered or unexported fields
}

func (*WorkloadAggregation) Descriptor deprecated

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

Deprecated: Use WorkloadAggregation.ProtoReflect.Descriptor instead.

func (*WorkloadAggregation) GetClusterId

func (x *WorkloadAggregation) GetClusterId() string

func (*WorkloadAggregation) GetDeployment

func (x *WorkloadAggregation) GetDeployment() string

func (*WorkloadAggregation) GetLogCount

func (x *WorkloadAggregation) GetLogCount() int64

func (*WorkloadAggregation) GetNamespace

func (x *WorkloadAggregation) GetNamespace() string

func (*WorkloadAggregation) ProtoMessage

func (*WorkloadAggregation) ProtoMessage()

func (*WorkloadAggregation) ProtoReflect

func (x *WorkloadAggregation) ProtoReflect() protoreflect.Message

func (*WorkloadAggregation) Reset

func (x *WorkloadAggregation) Reset()

func (*WorkloadAggregation) String

func (x *WorkloadAggregation) String() string

type WorkloadAggregationList

type WorkloadAggregationList struct {
	Items []*WorkloadAggregation `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
	// contains filtered or unexported fields
}

func (*WorkloadAggregationList) Descriptor deprecated

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

Deprecated: Use WorkloadAggregationList.ProtoReflect.Descriptor instead.

func (*WorkloadAggregationList) GetItems

func (*WorkloadAggregationList) ProtoMessage

func (*WorkloadAggregationList) ProtoMessage()

func (*WorkloadAggregationList) ProtoReflect

func (x *WorkloadAggregationList) ProtoReflect() protoreflect.Message

func (*WorkloadAggregationList) Reset

func (x *WorkloadAggregationList) Reset()

func (*WorkloadAggregationList) String

func (x *WorkloadAggregationList) String() string

Jump to

Keyboard shortcuts

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