trainer

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2023 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_pkg_apis_trainer_v1_trainer_proto protoreflect.FileDescriptor
View Source
var Trainer_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "trainer.v1.Trainer",
	HandlerType: (*TrainerServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Train",
			Handler:       _Trainer_Train_Handler,
			ClientStreams: true,
		},
	},
	Metadata: "pkg/apis/trainer/v1/trainer.proto",
}

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

Functions

func RegisterTrainerServer

func RegisterTrainerServer(s grpc.ServiceRegistrar, srv TrainerServer)

Types

type GNNRequest

type GNNRequest struct {

	// Dataset of training gnn.
	Dataset []byte `protobuf:"bytes,1,opt,name=dataset,proto3" json:"dataset,omitempty"`
	// contains filtered or unexported fields
}

GNNRequest represents gnn model request of TrainRequest.

func (*GNNRequest) Descriptor deprecated

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

Deprecated: Use GNNRequest.ProtoReflect.Descriptor instead.

func (*GNNRequest) GetDataset

func (x *GNNRequest) GetDataset() []byte

func (*GNNRequest) ProtoMessage

func (*GNNRequest) ProtoMessage()

func (*GNNRequest) ProtoReflect

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

func (*GNNRequest) Reset

func (x *GNNRequest) Reset()

func (*GNNRequest) String

func (x *GNNRequest) String() string

func (*GNNRequest) Validate

func (m *GNNRequest) Validate() error

Validate checks the field values on GNNRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*GNNRequest) ValidateAll

func (m *GNNRequest) ValidateAll() error

ValidateAll checks the field values on GNNRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in GNNRequestMultiError, or nil if none found.

type GNNRequestMultiError

type GNNRequestMultiError []error

GNNRequestMultiError is an error wrapping multiple validation errors returned by GNNRequest.ValidateAll() if the designated constraints aren't met.

func (GNNRequestMultiError) AllErrors

func (m GNNRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (GNNRequestMultiError) Error

func (m GNNRequestMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type GNNRequestValidationError

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

GNNRequestValidationError is the validation error returned by GNNRequest.Validate if the designated constraints aren't met.

func (GNNRequestValidationError) Cause

func (e GNNRequestValidationError) Cause() error

Cause function returns cause value.

func (GNNRequestValidationError) Error

Error satisfies the builtin error interface

func (GNNRequestValidationError) ErrorName

func (e GNNRequestValidationError) ErrorName() string

ErrorName returns error name.

func (GNNRequestValidationError) Field

Field function returns field value.

func (GNNRequestValidationError) Key

Key function returns key value.

func (GNNRequestValidationError) Reason

func (e GNNRequestValidationError) Reason() string

Reason function returns reason value.

type MLPRequest

type MLPRequest struct {

	// Dataset of training mlp.
	Dataset []byte `protobuf:"bytes,1,opt,name=dataset,proto3" json:"dataset,omitempty"`
	// contains filtered or unexported fields
}

MLPRequest represents mlp model request of TrainRequest.

func (*MLPRequest) Descriptor deprecated

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

Deprecated: Use MLPRequest.ProtoReflect.Descriptor instead.

func (*MLPRequest) GetDataset

func (x *MLPRequest) GetDataset() []byte

func (*MLPRequest) ProtoMessage

func (*MLPRequest) ProtoMessage()

func (*MLPRequest) ProtoReflect

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

func (*MLPRequest) Reset

func (x *MLPRequest) Reset()

func (*MLPRequest) String

func (x *MLPRequest) String() string

func (*MLPRequest) Validate

func (m *MLPRequest) Validate() error

Validate checks the field values on MLPRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*MLPRequest) ValidateAll

func (m *MLPRequest) ValidateAll() error

ValidateAll checks the field values on MLPRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in MLPRequestMultiError, or nil if none found.

type MLPRequestMultiError

type MLPRequestMultiError []error

MLPRequestMultiError is an error wrapping multiple validation errors returned by MLPRequest.ValidateAll() if the designated constraints aren't met.

func (MLPRequestMultiError) AllErrors

func (m MLPRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (MLPRequestMultiError) Error

func (m MLPRequestMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type MLPRequestValidationError

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

MLPRequestValidationError is the validation error returned by MLPRequest.Validate if the designated constraints aren't met.

func (MLPRequestValidationError) Cause

func (e MLPRequestValidationError) Cause() error

Cause function returns cause value.

func (MLPRequestValidationError) Error

Error satisfies the builtin error interface

func (MLPRequestValidationError) ErrorName

func (e MLPRequestValidationError) ErrorName() string

ErrorName returns error name.

func (MLPRequestValidationError) Field

Field function returns field value.

func (MLPRequestValidationError) Key

Key function returns key value.

func (MLPRequestValidationError) Reason

func (e MLPRequestValidationError) Reason() string

Reason function returns reason value.

type TrainRequest

type TrainRequest struct {

	// Scheduler hostname.
	Hostname string `protobuf:"bytes,1,opt,name=hostname,proto3" json:"hostname,omitempty"`
	// Scheduler ip.
	Ip string `protobuf:"bytes,2,opt,name=ip,proto3" json:"ip,omitempty"`
	// Scheduler cluster id.
	ClusterId uint64 `protobuf:"varint,3,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"`
	// Types that are assignable to Request:
	//
	//	*TrainRequest_GnnRequest
	//	*TrainRequest_MlpRequest
	Request isTrainRequest_Request `protobuf_oneof:"request"`
	// contains filtered or unexported fields
}

TrainRequest represents request of Train.

func (*TrainRequest) Descriptor deprecated

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

Deprecated: Use TrainRequest.ProtoReflect.Descriptor instead.

func (*TrainRequest) GetClusterId

func (x *TrainRequest) GetClusterId() uint64

func (*TrainRequest) GetGnnRequest

func (x *TrainRequest) GetGnnRequest() *GNNRequest

func (*TrainRequest) GetHostname

func (x *TrainRequest) GetHostname() string

func (*TrainRequest) GetIp

func (x *TrainRequest) GetIp() string

func (*TrainRequest) GetMlpRequest

func (x *TrainRequest) GetMlpRequest() *MLPRequest

func (*TrainRequest) GetRequest

func (m *TrainRequest) GetRequest() isTrainRequest_Request

func (*TrainRequest) ProtoMessage

func (*TrainRequest) ProtoMessage()

func (*TrainRequest) ProtoReflect

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

func (*TrainRequest) Reset

func (x *TrainRequest) Reset()

func (*TrainRequest) String

func (x *TrainRequest) String() string

func (*TrainRequest) Validate

func (m *TrainRequest) Validate() error

Validate checks the field values on TrainRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*TrainRequest) ValidateAll

func (m *TrainRequest) ValidateAll() error

ValidateAll checks the field values on TrainRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in TrainRequestMultiError, or nil if none found.

type TrainRequestMultiError

type TrainRequestMultiError []error

TrainRequestMultiError is an error wrapping multiple validation errors returned by TrainRequest.ValidateAll() if the designated constraints aren't met.

func (TrainRequestMultiError) AllErrors

func (m TrainRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (TrainRequestMultiError) Error

func (m TrainRequestMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type TrainRequestValidationError

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

TrainRequestValidationError is the validation error returned by TrainRequest.Validate if the designated constraints aren't met.

func (TrainRequestValidationError) Cause

Cause function returns cause value.

func (TrainRequestValidationError) Error

Error satisfies the builtin error interface

func (TrainRequestValidationError) ErrorName

func (e TrainRequestValidationError) ErrorName() string

ErrorName returns error name.

func (TrainRequestValidationError) Field

Field function returns field value.

func (TrainRequestValidationError) Key

Key function returns key value.

func (TrainRequestValidationError) Reason

Reason function returns reason value.

type TrainRequest_GnnRequest

type TrainRequest_GnnRequest struct {
	GnnRequest *GNNRequest `protobuf:"bytes,4,opt,name=gnn_request,json=gnnRequest,proto3,oneof"`
}

type TrainRequest_MlpRequest

type TrainRequest_MlpRequest struct {
	MlpRequest *MLPRequest `protobuf:"bytes,5,opt,name=mlp_request,json=mlpRequest,proto3,oneof"`
}

type TrainerClient

type TrainerClient interface {
	// Train trains models of scheduler using dataset.
	Train(ctx context.Context, opts ...grpc.CallOption) (Trainer_TrainClient, error)
}

TrainerClient is the client API for Trainer 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 NewTrainerClient

func NewTrainerClient(cc grpc.ClientConnInterface) TrainerClient

type TrainerServer

type TrainerServer interface {
	// Train trains models of scheduler using dataset.
	Train(Trainer_TrainServer) error
}

TrainerServer is the server API for Trainer service. All implementations should embed UnimplementedTrainerServer for forward compatibility

type Trainer_TrainClient

type Trainer_TrainClient interface {
	Send(*TrainRequest) error
	CloseAndRecv() (*emptypb.Empty, error)
	grpc.ClientStream
}

type Trainer_TrainServer

type Trainer_TrainServer interface {
	SendAndClose(*emptypb.Empty) error
	Recv() (*TrainRequest, error)
	grpc.ServerStream
}

type UnimplementedTrainerServer

type UnimplementedTrainerServer struct {
}

UnimplementedTrainerServer should be embedded to have forward compatible implementations.

func (UnimplementedTrainerServer) Train

type UnsafeTrainerServer

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

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

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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