Documentation ¶
Overview ¶
Package modeltraining is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterModelTrainingHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterModelTrainingHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ModelTrainingClient) error
- func RegisterModelTrainingHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterModelTrainingHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ModelTrainingServer) error
- func RegisterModelTrainingServer(s grpc.ServiceRegistrar, srv ModelTrainingServer)
- type GPUInfo
- func (*GPUInfo) Descriptor() ([]byte, []int)deprecated
- func (x *GPUInfo) GetAllocatable() string
- func (x *GPUInfo) GetCapacity() string
- func (x *GPUInfo) GetName() string
- func (*GPUInfo) ProtoMessage()
- func (x *GPUInfo) ProtoReflect() protoreflect.Message
- func (x *GPUInfo) Reset()
- func (x *GPUInfo) String() string
- type GPUInfoList
- type ModelStatus
- func (*ModelStatus) Descriptor() ([]byte, []int)deprecated
- func (x *ModelStatus) GetStatistics() *ModelTrainingStatistics
- func (x *ModelStatus) GetStatus() string
- func (*ModelStatus) ProtoMessage()
- func (x *ModelStatus) ProtoReflect() protoreflect.Message
- func (x *ModelStatus) Reset()
- func (x *ModelStatus) String() string
- type ModelTrainingClient
- type ModelTrainingParameters
- func (*ModelTrainingParameters) Descriptor() ([]byte, []int)deprecated
- func (x *ModelTrainingParameters) GetClusterId() string
- func (x *ModelTrainingParameters) GetDeployment() string
- func (x *ModelTrainingParameters) GetNamespace() string
- func (*ModelTrainingParameters) ProtoMessage()
- func (x *ModelTrainingParameters) ProtoReflect() protoreflect.Message
- func (x *ModelTrainingParameters) Reset()
- func (x *ModelTrainingParameters) String() string
- type ModelTrainingParametersList
- func (*ModelTrainingParametersList) Descriptor() ([]byte, []int)deprecated
- func (x *ModelTrainingParametersList) GetItems() []*ModelTrainingParameters
- func (*ModelTrainingParametersList) ProtoMessage()
- func (x *ModelTrainingParametersList) ProtoReflect() protoreflect.Message
- func (x *ModelTrainingParametersList) Reset()
- func (x *ModelTrainingParametersList) String() string
- type ModelTrainingResponse
- func (*ModelTrainingResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ModelTrainingResponse) GetResponse() string
- func (*ModelTrainingResponse) ProtoMessage()
- func (x *ModelTrainingResponse) ProtoReflect() protoreflect.Message
- func (x *ModelTrainingResponse) Reset()
- func (x *ModelTrainingResponse) String() string
- type ModelTrainingServer
- type ModelTrainingStatistics
- func (*ModelTrainingStatistics) Descriptor() ([]byte, []int)deprecated
- func (x *ModelTrainingStatistics) GetCurrentEpoch() int64
- func (x *ModelTrainingStatistics) GetModelAccuracy() float64
- func (x *ModelTrainingStatistics) GetPercentageCompleted() int64
- func (x *ModelTrainingStatistics) GetRemainingTime() int64
- func (x *ModelTrainingStatistics) GetStage() string
- func (x *ModelTrainingStatistics) GetTimeElapsed() int64
- func (*ModelTrainingStatistics) ProtoMessage()
- func (x *ModelTrainingStatistics) ProtoReflect() protoreflect.Message
- func (x *ModelTrainingStatistics) Reset()
- func (x *ModelTrainingStatistics) String() string
- type UnimplementedModelTrainingServer
- func (UnimplementedModelTrainingServer) ClusterWorkloadAggregation(context.Context, *v1.Reference) (*WorkloadAggregationList, error)
- func (UnimplementedModelTrainingServer) GPUInfo(context.Context, *emptypb.Empty) (*GPUInfoList, error)
- func (UnimplementedModelTrainingServer) GetModelStatus(context.Context, *emptypb.Empty) (*ModelStatus, error)
- func (UnimplementedModelTrainingServer) GetModelTrainingParameters(context.Context, *emptypb.Empty) (*ModelTrainingParametersList, error)
- func (UnimplementedModelTrainingServer) PutModelTrainingStatus(context.Context, *ModelTrainingStatistics) (*emptypb.Empty, error)
- func (UnimplementedModelTrainingServer) TrainModel(context.Context, *ModelTrainingParametersList) (*ModelTrainingResponse, error)
- type UnsafeModelTrainingServer
- type WorkloadAggregation
- func (*WorkloadAggregation) Descriptor() ([]byte, []int)deprecated
- func (x *WorkloadAggregation) GetClusterId() string
- func (x *WorkloadAggregation) GetDeployment() string
- func (x *WorkloadAggregation) GetLogCount() int64
- func (x *WorkloadAggregation) GetNamespace() string
- func (*WorkloadAggregation) ProtoMessage()
- func (x *WorkloadAggregation) ProtoReflect() protoreflect.Message
- func (x *WorkloadAggregation) Reset()
- func (x *WorkloadAggregation) String() string
- type WorkloadAggregationList
- func (*WorkloadAggregationList) Descriptor() ([]byte, []int)deprecated
- func (x *WorkloadAggregationList) GetItems() []*WorkloadAggregation
- func (*WorkloadAggregationList) ProtoMessage()
- func (x *WorkloadAggregationList) ProtoReflect() protoreflect.Message
- func (x *WorkloadAggregationList) Reset()
- func (x *WorkloadAggregationList) String() string
Constants ¶
This section is empty.
Variables ¶
var File_github_com_rancher_opni_plugins_aiops_pkg_apis_modeltraining_modeltraining_proto protoreflect.FileDescriptor
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) GetAllocatable ¶
func (*GPUInfo) GetCapacity ¶
func (*GPUInfo) ProtoMessage ¶
func (*GPUInfo) ProtoMessage()
func (*GPUInfo) ProtoReflect ¶
func (x *GPUInfo) ProtoReflect() protoreflect.Message
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.
func NewModelTrainingClient ¶
func NewModelTrainingClient(cc grpc.ClientConnInterface) ModelTrainingClient
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 (x *ModelTrainingParametersList) GetItems() []*ModelTrainingParameters
func (*ModelTrainingParametersList) ProtoMessage ¶
func (*ModelTrainingParametersList) ProtoMessage()
func (*ModelTrainingParametersList) ProtoReflect ¶
func (x *ModelTrainingParametersList) ProtoReflect() protoreflect.Message
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) ClusterWorkloadAggregation(context.Context, *v1.Reference) (*WorkloadAggregationList, error)
func (UnimplementedModelTrainingServer) GPUInfo ¶
func (UnimplementedModelTrainingServer) GPUInfo(context.Context, *emptypb.Empty) (*GPUInfoList, error)
func (UnimplementedModelTrainingServer) GetModelStatus ¶
func (UnimplementedModelTrainingServer) GetModelStatus(context.Context, *emptypb.Empty) (*ModelStatus, error)
func (UnimplementedModelTrainingServer) GetModelTrainingParameters ¶
func (UnimplementedModelTrainingServer) GetModelTrainingParameters(context.Context, *emptypb.Empty) (*ModelTrainingParametersList, error)
func (UnimplementedModelTrainingServer) PutModelTrainingStatus ¶
func (UnimplementedModelTrainingServer) PutModelTrainingStatus(context.Context, *ModelTrainingStatistics) (*emptypb.Empty, error)
func (UnimplementedModelTrainingServer) TrainModel ¶
func (UnimplementedModelTrainingServer) TrainModel(context.Context, *ModelTrainingParametersList) (*ModelTrainingResponse, error)
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 (x *WorkloadAggregationList) GetItems() []*WorkloadAggregation
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