mpc

package
v0.0.0-...-ebe581b Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Evaluator_name = map[int32]string{
	0: "NORMAL",
	1: "LIVE",
}
View Source
var Evaluator_value = map[string]int32{
	"NORMAL": 0,
	"LIVE":   1,
}
View Source
var TriggerMsgType_name = map[int32]string{
	0: "MsgSetAndRun",
	1: "MsgGoOn",
}
View Source
var TriggerMsgType_value = map[string]int32{
	"MsgSetAndRun": 0,
	"MsgGoOn":      1,
}

Functions

func RegisterClusterServer

func RegisterClusterServer(s *grpc.Server, srv ClusterServer)

Types

type ClusterClient

type ClusterClient interface {
	// Step passes an implementation-specific message to another cluster member.
	Step(ctx context.Context, in *StepRequest, opts ...grpc.CallOption) (*StepResponse, error)
}

ClusterClient is the client API for Cluster service.

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

func NewClusterClient

func NewClusterClient(cc *grpc.ClientConn) ClusterClient

type ClusterServer

type ClusterServer interface {
	// Step passes an implementation-specific message to another cluster member.
	Step(context.Context, *StepRequest) (*StepResponse, error)
}

ClusterServer is the server API for Cluster service.

type Evaluator

type Evaluator int32

Evaluator defines types of evaluator

const (
	Evaluator_NORMAL Evaluator = 0
	Evaluator_LIVE   Evaluator = 1
)

func (Evaluator) EnumDescriptor

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

func (Evaluator) String

func (x Evaluator) String() string

type LiveEvaluationTriggerMsg

type LiveEvaluationTriggerMsg struct {
	Type       TriggerMsgType `protobuf:"varint,1,opt,name=type,proto3,enum=mpc.TriggerMsgType" json:"type,omitempty"`
	PauseRound uint64         `protobuf:"varint,2,opt,name=pauseRound,proto3" json:"pauseRound,omitempty"`
	// trainSet is training set after Sample Alignment, and will be split at the beginning of evaluation
	TrainSet []*common.TrainTaskResult_FileRow `protobuf:"bytes,3,rep,name=trainSet,proto3" json:"trainSet,omitempty"`
	// callbackPayload is message sent back to local learner that triggered evaluation
	CallbackPayload []byte `protobuf:"bytes,4,opt,name=callbackPayload,proto3" json:"callbackPayload,omitempty"`
	// payload is message sent to local learner that is used to evaluation
	Payload              []byte   `protobuf:"bytes,5,opt,name=payload,proto3" json:"payload,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

LiveEvaluationTriggerMsg is a message sent when trigger live evaluation

func (*LiveEvaluationTriggerMsg) Descriptor

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

func (*LiveEvaluationTriggerMsg) GetCallbackPayload

func (m *LiveEvaluationTriggerMsg) GetCallbackPayload() []byte

func (*LiveEvaluationTriggerMsg) GetPauseRound

func (m *LiveEvaluationTriggerMsg) GetPauseRound() uint64

func (*LiveEvaluationTriggerMsg) GetPayload

func (m *LiveEvaluationTriggerMsg) GetPayload() []byte

func (*LiveEvaluationTriggerMsg) GetTrainSet

func (*LiveEvaluationTriggerMsg) GetType

func (*LiveEvaluationTriggerMsg) ProtoMessage

func (*LiveEvaluationTriggerMsg) ProtoMessage()

func (*LiveEvaluationTriggerMsg) Reset

func (m *LiveEvaluationTriggerMsg) Reset()

func (*LiveEvaluationTriggerMsg) String

func (m *LiveEvaluationTriggerMsg) String() string

func (*LiveEvaluationTriggerMsg) XXX_DiscardUnknown

func (m *LiveEvaluationTriggerMsg) XXX_DiscardUnknown()

func (*LiveEvaluationTriggerMsg) XXX_Marshal

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

func (*LiveEvaluationTriggerMsg) XXX_Merge

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

func (*LiveEvaluationTriggerMsg) XXX_Size

func (m *LiveEvaluationTriggerMsg) XXX_Size() int

func (*LiveEvaluationTriggerMsg) XXX_Unmarshal

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

type PredictRequest

type PredictRequest struct {
	TaskID               string           `protobuf:"bytes,2,opt,name=taskID,proto3" json:"taskID,omitempty"`
	Algo                 common.Algorithm `protobuf:"varint,3,opt,name=algo,proto3,enum=common.Algorithm" json:"algo,omitempty"`
	Payload              []byte           `protobuf:"bytes,4,opt,name=payload,proto3" json:"payload,omitempty"`
	XXX_NoUnkeyedLiteral struct{}         `json:"-"`
	XXX_unrecognized     []byte           `json:"-"`
	XXX_sizecache        int32            `json:"-"`
}

PredictRequest is a message sent in predicting progress.

func (*PredictRequest) Descriptor

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

func (*PredictRequest) GetAlgo

func (m *PredictRequest) GetAlgo() common.Algorithm

func (*PredictRequest) GetPayload

func (m *PredictRequest) GetPayload() []byte

func (*PredictRequest) GetTaskID

func (m *PredictRequest) GetTaskID() string

func (*PredictRequest) ProtoMessage

func (*PredictRequest) ProtoMessage()

func (*PredictRequest) Reset

func (m *PredictRequest) Reset()

func (*PredictRequest) String

func (m *PredictRequest) String() string

func (*PredictRequest) XXX_DiscardUnknown

func (m *PredictRequest) XXX_DiscardUnknown()

func (*PredictRequest) XXX_Marshal

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

func (*PredictRequest) XXX_Merge

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

func (*PredictRequest) XXX_Size

func (m *PredictRequest) XXX_Size() int

func (*PredictRequest) XXX_Unmarshal

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

type PredictResponse

type PredictResponse struct {
	TaskID string `protobuf:"bytes,2,opt,name=taskID,proto3" json:"taskID,omitempty"`
	// payload can be processed by the specific algorithm and predicting phase
	Payload              []byte   `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

PredictResponse is a message responsed in predicting progress

func (*PredictResponse) Descriptor

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

func (*PredictResponse) GetPayload

func (m *PredictResponse) GetPayload() []byte

func (*PredictResponse) GetTaskID

func (m *PredictResponse) GetTaskID() string

func (*PredictResponse) ProtoMessage

func (*PredictResponse) ProtoMessage()

func (*PredictResponse) Reset

func (m *PredictResponse) Reset()

func (*PredictResponse) String

func (m *PredictResponse) String() string

func (*PredictResponse) XXX_DiscardUnknown

func (m *PredictResponse) XXX_DiscardUnknown()

func (*PredictResponse) XXX_Marshal

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

func (*PredictResponse) XXX_Merge

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

func (*PredictResponse) XXX_Size

func (m *PredictResponse) XXX_Size() int

func (*PredictResponse) XXX_Unmarshal

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

type StepRequest

type StepRequest struct {
	// Types that are valid to be assigned to Payload:
	//	*StepRequest_TrainRequest
	//	*StepRequest_PredictRequest
	Payload              isStepRequest_Payload `protobuf_oneof:"payload"`
	XXX_NoUnkeyedLiteral struct{}              `json:"-"`
	XXX_unrecognized     []byte                `json:"-"`
	XXX_sizecache        int32                 `json:"-"`
}

StepRequest wraps a message that is sent to a cluster member.

func (*StepRequest) Descriptor

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

func (*StepRequest) GetPayload

func (m *StepRequest) GetPayload() isStepRequest_Payload

func (*StepRequest) GetPredictRequest

func (m *StepRequest) GetPredictRequest() *PredictRequest

func (*StepRequest) GetTrainRequest

func (m *StepRequest) GetTrainRequest() *TrainRequest

func (*StepRequest) ProtoMessage

func (*StepRequest) ProtoMessage()

func (*StepRequest) Reset

func (m *StepRequest) Reset()

func (*StepRequest) String

func (m *StepRequest) String() string

func (*StepRequest) XXX_DiscardUnknown

func (m *StepRequest) XXX_DiscardUnknown()

func (*StepRequest) XXX_Marshal

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

func (*StepRequest) XXX_Merge

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

func (*StepRequest) XXX_OneofWrappers

func (*StepRequest) XXX_OneofWrappers() []interface{}

XXX_OneofWrappers is for the internal use of the proto package.

func (*StepRequest) XXX_Size

func (m *StepRequest) XXX_Size() int

func (*StepRequest) XXX_Unmarshal

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

type StepRequest_PredictRequest

type StepRequest_PredictRequest struct {
	PredictRequest *PredictRequest `protobuf:"bytes,3,opt,name=predict_request,json=predictRequest,proto3,oneof"`
}

type StepRequest_TrainRequest

type StepRequest_TrainRequest struct {
	TrainRequest *TrainRequest `protobuf:"bytes,2,opt,name=train_request,json=trainRequest,proto3,oneof"`
}

type StepResponse

type StepResponse struct {
	// Types that are valid to be assigned to Payload:
	//	*StepResponse_TrainResponse
	//	*StepResponse_PredictResponse
	Payload              isStepResponse_Payload `protobuf_oneof:"payload"`
	XXX_NoUnkeyedLiteral struct{}               `json:"-"`
	XXX_unrecognized     []byte                 `json:"-"`
	XXX_sizecache        int32                  `json:"-"`
}

StepResponse is a message received from a cluster member.

func (*StepResponse) Descriptor

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

func (*StepResponse) GetPayload

func (m *StepResponse) GetPayload() isStepResponse_Payload

func (*StepResponse) GetPredictResponse

func (m *StepResponse) GetPredictResponse() *PredictResponse

func (*StepResponse) GetTrainResponse

func (m *StepResponse) GetTrainResponse() *TrainResponse

func (*StepResponse) ProtoMessage

func (*StepResponse) ProtoMessage()

func (*StepResponse) Reset

func (m *StepResponse) Reset()

func (*StepResponse) String

func (m *StepResponse) String() string

func (*StepResponse) XXX_DiscardUnknown

func (m *StepResponse) XXX_DiscardUnknown()

func (*StepResponse) XXX_Marshal

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

func (*StepResponse) XXX_Merge

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

func (*StepResponse) XXX_OneofWrappers

func (*StepResponse) XXX_OneofWrappers() []interface{}

XXX_OneofWrappers is for the internal use of the proto package.

func (*StepResponse) XXX_Size

func (m *StepResponse) XXX_Size() int

func (*StepResponse) XXX_Unmarshal

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

type StepResponse_PredictResponse

type StepResponse_PredictResponse struct {
	PredictResponse *PredictResponse `protobuf:"bytes,3,opt,name=predict_response,json=predictResponse,proto3,oneof"`
}

type StepResponse_TrainResponse

type StepResponse_TrainResponse struct {
	TrainResponse *TrainResponse `protobuf:"bytes,2,opt,name=train_response,json=trainResponse,proto3,oneof"`
}

type TrainRequest

type TrainRequest struct {
	TaskID string           `protobuf:"bytes,2,opt,name=taskID,proto3" json:"taskID,omitempty"`
	Algo   common.Algorithm `protobuf:"varint,3,opt,name=algo,proto3,enum=common.Algorithm" json:"algo,omitempty"`
	// payload can be processed by the specific algorithm
	Payload              []byte   `protobuf:"bytes,4,opt,name=payload,proto3" json:"payload,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

TrainRequest is a message sent in training progress.

func (*TrainRequest) Descriptor

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

func (*TrainRequest) GetAlgo

func (m *TrainRequest) GetAlgo() common.Algorithm

func (*TrainRequest) GetPayload

func (m *TrainRequest) GetPayload() []byte

func (*TrainRequest) GetTaskID

func (m *TrainRequest) GetTaskID() string

func (*TrainRequest) ProtoMessage

func (*TrainRequest) ProtoMessage()

func (*TrainRequest) Reset

func (m *TrainRequest) Reset()

func (*TrainRequest) String

func (m *TrainRequest) String() string

func (*TrainRequest) XXX_DiscardUnknown

func (m *TrainRequest) XXX_DiscardUnknown()

func (*TrainRequest) XXX_Marshal

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

func (*TrainRequest) XXX_Merge

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

func (*TrainRequest) XXX_Size

func (m *TrainRequest) XXX_Size() int

func (*TrainRequest) XXX_Unmarshal

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

type TrainResponse

type TrainResponse struct {
	TaskID string `protobuf:"bytes,2,opt,name=taskID,proto3" json:"taskID,omitempty"`
	// payload can be processed by the specific algorithm and training phase
	Payload              []byte   `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

TrainResponse is a message responsed in training progress

func (*TrainResponse) Descriptor

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

func (*TrainResponse) GetPayload

func (m *TrainResponse) GetPayload() []byte

func (*TrainResponse) GetTaskID

func (m *TrainResponse) GetTaskID() string

func (*TrainResponse) ProtoMessage

func (*TrainResponse) ProtoMessage()

func (*TrainResponse) Reset

func (m *TrainResponse) Reset()

func (*TrainResponse) String

func (m *TrainResponse) String() string

func (*TrainResponse) XXX_DiscardUnknown

func (m *TrainResponse) XXX_DiscardUnknown()

func (*TrainResponse) XXX_Marshal

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

func (*TrainResponse) XXX_Merge

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

func (*TrainResponse) XXX_Size

func (m *TrainResponse) XXX_Size() int

func (*TrainResponse) XXX_Unmarshal

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

type TriggerMsgType

type TriggerMsgType int32

TriggerMsgType defines the type of `LiveEvaluationTriggerMsg`

const (
	TriggerMsgType_MsgSetAndRun TriggerMsgType = 0
	TriggerMsgType_MsgGoOn      TriggerMsgType = 1
)

func (TriggerMsgType) EnumDescriptor

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

func (TriggerMsgType) String

func (x TriggerMsgType) String() string

type UnimplementedClusterServer

type UnimplementedClusterServer struct {
}

UnimplementedClusterServer can be embedded to have forward compatible implementations.

func (*UnimplementedClusterServer) Step

type VLPsiReEncIDsRequest

type VLPsiReEncIDsRequest struct {
	TaskID               string   `protobuf:"bytes,2,opt,name=taskID,proto3" json:"taskID,omitempty"`
	EncIDs               []byte   `protobuf:"bytes,3,opt,name=EncIDs,proto3" json:"EncIDs,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

VLReEncIDsRequest is a message sent in Vertical-Learning-PSI Re-Encrypt-IDSet requesting.

func (*VLPsiReEncIDsRequest) Descriptor

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

func (*VLPsiReEncIDsRequest) GetEncIDs

func (m *VLPsiReEncIDsRequest) GetEncIDs() []byte

func (*VLPsiReEncIDsRequest) GetTaskID

func (m *VLPsiReEncIDsRequest) GetTaskID() string

func (*VLPsiReEncIDsRequest) ProtoMessage

func (*VLPsiReEncIDsRequest) ProtoMessage()

func (*VLPsiReEncIDsRequest) Reset

func (m *VLPsiReEncIDsRequest) Reset()

func (*VLPsiReEncIDsRequest) String

func (m *VLPsiReEncIDsRequest) String() string

func (*VLPsiReEncIDsRequest) XXX_DiscardUnknown

func (m *VLPsiReEncIDsRequest) XXX_DiscardUnknown()

func (*VLPsiReEncIDsRequest) XXX_Marshal

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

func (*VLPsiReEncIDsRequest) XXX_Merge

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

func (*VLPsiReEncIDsRequest) XXX_Size

func (m *VLPsiReEncIDsRequest) XXX_Size() int

func (*VLPsiReEncIDsRequest) XXX_Unmarshal

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

type VLPsiReEncIDsResponse

type VLPsiReEncIDsResponse struct {
	TaskID               string   `protobuf:"bytes,2,opt,name=taskID,proto3" json:"taskID,omitempty"`
	ReEncIDs             []byte   `protobuf:"bytes,3,opt,name=ReEncIDs,proto3" json:"ReEncIDs,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*VLPsiReEncIDsResponse) Descriptor

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

func (*VLPsiReEncIDsResponse) GetReEncIDs

func (m *VLPsiReEncIDsResponse) GetReEncIDs() []byte

func (*VLPsiReEncIDsResponse) GetTaskID

func (m *VLPsiReEncIDsResponse) GetTaskID() string

func (*VLPsiReEncIDsResponse) ProtoMessage

func (*VLPsiReEncIDsResponse) ProtoMessage()

func (*VLPsiReEncIDsResponse) Reset

func (m *VLPsiReEncIDsResponse) Reset()

func (*VLPsiReEncIDsResponse) String

func (m *VLPsiReEncIDsResponse) String() string

func (*VLPsiReEncIDsResponse) XXX_DiscardUnknown

func (m *VLPsiReEncIDsResponse) XXX_DiscardUnknown()

func (*VLPsiReEncIDsResponse) XXX_Marshal

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

func (*VLPsiReEncIDsResponse) XXX_Merge

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

func (*VLPsiReEncIDsResponse) XXX_Size

func (m *VLPsiReEncIDsResponse) XXX_Size() int

func (*VLPsiReEncIDsResponse) XXX_Unmarshal

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

type ValidateRequest

type ValidateRequest struct {
	TaskID               string                    `protobuf:"bytes,2,opt,name=taskID,proto3" json:"taskID,omitempty"`
	From                 Evaluator                 `protobuf:"varint,3,opt,name=from,proto3,enum=mpc.Evaluator" json:"from,omitempty"`
	FoldIdx              int32                     `protobuf:"varint,4,opt,name=foldIdx,proto3" json:"foldIdx,omitempty"`
	PredictResult        *common.PredictTaskResult `protobuf:"bytes,5,opt,name=predictResult,proto3" json:"predictResult,omitempty"`
	XXX_NoUnkeyedLiteral struct{}                  `json:"-"`
	XXX_unrecognized     []byte                    `json:"-"`
	XXX_sizecache        int32                     `json:"-"`
}

ValidateRequest is a message sent when start validation on validation set during evaluation(and live evaluation) process.

func (*ValidateRequest) Descriptor

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

func (*ValidateRequest) GetFoldIdx

func (m *ValidateRequest) GetFoldIdx() int32

func (*ValidateRequest) GetFrom

func (m *ValidateRequest) GetFrom() Evaluator

func (*ValidateRequest) GetPredictResult

func (m *ValidateRequest) GetPredictResult() *common.PredictTaskResult

func (*ValidateRequest) GetTaskID

func (m *ValidateRequest) GetTaskID() string

func (*ValidateRequest) ProtoMessage

func (*ValidateRequest) ProtoMessage()

func (*ValidateRequest) Reset

func (m *ValidateRequest) Reset()

func (*ValidateRequest) String

func (m *ValidateRequest) String() string

func (*ValidateRequest) XXX_DiscardUnknown

func (m *ValidateRequest) XXX_DiscardUnknown()

func (*ValidateRequest) XXX_Marshal

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

func (*ValidateRequest) XXX_Merge

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

func (*ValidateRequest) XXX_Size

func (m *ValidateRequest) XXX_Size() int

func (*ValidateRequest) XXX_Unmarshal

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

Directories

Path Synopsis
learners

Jump to

Keyboard shortcuts

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