|
@@ -24,7 +24,7 @@ var _ = math.Inf
|
|
|
// proto package needs to be updated.
|
|
|
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
|
|
|
|
|
|
-type Unit struct {
|
|
|
+type UnitInfo struct {
|
|
|
Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
|
|
|
AvailableThreads int32 `protobuf:"zigzag32,2,opt,name=availableThreads,proto3" json:"availableThreads,omitempty"`
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
@@ -32,104 +32,216 @@ type Unit struct {
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
}
|
|
|
|
|
|
-func (m *Unit) Reset() { *m = Unit{} }
|
|
|
-func (m *Unit) String() string { return proto.CompactTextString(m) }
|
|
|
-func (*Unit) ProtoMessage() {}
|
|
|
-func (*Unit) Descriptor() ([]byte, []int) {
|
|
|
+func (m *UnitInfo) Reset() { *m = UnitInfo{} }
|
|
|
+func (m *UnitInfo) String() string { return proto.CompactTextString(m) }
|
|
|
+func (*UnitInfo) ProtoMessage() {}
|
|
|
+func (*UnitInfo) Descriptor() ([]byte, []int) {
|
|
|
return fileDescriptor_3cfb3b8ec240c376, []int{0}
|
|
|
}
|
|
|
|
|
|
-func (m *Unit) XXX_Unmarshal(b []byte) error {
|
|
|
- return xxx_messageInfo_Unit.Unmarshal(m, b)
|
|
|
+func (m *UnitInfo) XXX_Unmarshal(b []byte) error {
|
|
|
+ return xxx_messageInfo_UnitInfo.Unmarshal(m, b)
|
|
|
}
|
|
|
-func (m *Unit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
- return xxx_messageInfo_Unit.Marshal(b, m, deterministic)
|
|
|
+func (m *UnitInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
+ return xxx_messageInfo_UnitInfo.Marshal(b, m, deterministic)
|
|
|
}
|
|
|
-func (m *Unit) XXX_Merge(src proto.Message) {
|
|
|
- xxx_messageInfo_Unit.Merge(m, src)
|
|
|
+func (m *UnitInfo) XXX_Merge(src proto.Message) {
|
|
|
+ xxx_messageInfo_UnitInfo.Merge(m, src)
|
|
|
}
|
|
|
-func (m *Unit) XXX_Size() int {
|
|
|
- return xxx_messageInfo_Unit.Size(m)
|
|
|
+func (m *UnitInfo) XXX_Size() int {
|
|
|
+ return xxx_messageInfo_UnitInfo.Size(m)
|
|
|
}
|
|
|
-func (m *Unit) XXX_DiscardUnknown() {
|
|
|
- xxx_messageInfo_Unit.DiscardUnknown(m)
|
|
|
+func (m *UnitInfo) XXX_DiscardUnknown() {
|
|
|
+ xxx_messageInfo_UnitInfo.DiscardUnknown(m)
|
|
|
}
|
|
|
|
|
|
-var xxx_messageInfo_Unit proto.InternalMessageInfo
|
|
|
+var xxx_messageInfo_UnitInfo proto.InternalMessageInfo
|
|
|
|
|
|
-func (m *Unit) GetUrl() string {
|
|
|
+func (m *UnitInfo) GetUrl() string {
|
|
|
if m != nil {
|
|
|
return m.Url
|
|
|
}
|
|
|
return ""
|
|
|
}
|
|
|
|
|
|
-func (m *Unit) GetAvailableThreads() int32 {
|
|
|
+func (m *UnitInfo) GetAvailableThreads() int32 {
|
|
|
if m != nil {
|
|
|
return m.AvailableThreads
|
|
|
}
|
|
|
return 0
|
|
|
}
|
|
|
|
|
|
-type Units struct {
|
|
|
- List []*Unit `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"`
|
|
|
+type UnitInfos struct {
|
|
|
+ List []*UnitInfo `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"`
|
|
|
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
+ XXX_unrecognized []byte `json:"-"`
|
|
|
+ XXX_sizecache int32 `json:"-"`
|
|
|
+}
|
|
|
+
|
|
|
+func (m *UnitInfos) Reset() { *m = UnitInfos{} }
|
|
|
+func (m *UnitInfos) String() string { return proto.CompactTextString(m) }
|
|
|
+func (*UnitInfos) ProtoMessage() {}
|
|
|
+func (*UnitInfos) Descriptor() ([]byte, []int) {
|
|
|
+ return fileDescriptor_3cfb3b8ec240c376, []int{1}
|
|
|
+}
|
|
|
+
|
|
|
+func (m *UnitInfos) XXX_Unmarshal(b []byte) error {
|
|
|
+ return xxx_messageInfo_UnitInfos.Unmarshal(m, b)
|
|
|
+}
|
|
|
+func (m *UnitInfos) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
+ return xxx_messageInfo_UnitInfos.Marshal(b, m, deterministic)
|
|
|
+}
|
|
|
+func (m *UnitInfos) XXX_Merge(src proto.Message) {
|
|
|
+ xxx_messageInfo_UnitInfos.Merge(m, src)
|
|
|
+}
|
|
|
+func (m *UnitInfos) XXX_Size() int {
|
|
|
+ return xxx_messageInfo_UnitInfos.Size(m)
|
|
|
+}
|
|
|
+func (m *UnitInfos) XXX_DiscardUnknown() {
|
|
|
+ xxx_messageInfo_UnitInfos.DiscardUnknown(m)
|
|
|
+}
|
|
|
+
|
|
|
+var xxx_messageInfo_UnitInfos proto.InternalMessageInfo
|
|
|
+
|
|
|
+func (m *UnitInfos) GetList() []*UnitInfo {
|
|
|
+ if m != nil {
|
|
|
+ return m.List
|
|
|
+ }
|
|
|
+ return nil
|
|
|
+}
|
|
|
+
|
|
|
+type Matrix struct {
|
|
|
+ Matrix []byte `protobuf:"bytes,1,opt,name=matrix,proto3" json:"matrix,omitempty"`
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
}
|
|
|
|
|
|
-func (m *Units) Reset() { *m = Units{} }
|
|
|
-func (m *Units) String() string { return proto.CompactTextString(m) }
|
|
|
-func (*Units) ProtoMessage() {}
|
|
|
-func (*Units) Descriptor() ([]byte, []int) {
|
|
|
- return fileDescriptor_3cfb3b8ec240c376, []int{1}
|
|
|
+func (m *Matrix) Reset() { *m = Matrix{} }
|
|
|
+func (m *Matrix) String() string { return proto.CompactTextString(m) }
|
|
|
+func (*Matrix) ProtoMessage() {}
|
|
|
+func (*Matrix) Descriptor() ([]byte, []int) {
|
|
|
+ return fileDescriptor_3cfb3b8ec240c376, []int{2}
|
|
|
}
|
|
|
|
|
|
-func (m *Units) XXX_Unmarshal(b []byte) error {
|
|
|
- return xxx_messageInfo_Units.Unmarshal(m, b)
|
|
|
+func (m *Matrix) XXX_Unmarshal(b []byte) error {
|
|
|
+ return xxx_messageInfo_Matrix.Unmarshal(m, b)
|
|
|
}
|
|
|
-func (m *Units) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
- return xxx_messageInfo_Units.Marshal(b, m, deterministic)
|
|
|
+func (m *Matrix) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
+ return xxx_messageInfo_Matrix.Marshal(b, m, deterministic)
|
|
|
}
|
|
|
-func (m *Units) XXX_Merge(src proto.Message) {
|
|
|
- xxx_messageInfo_Units.Merge(m, src)
|
|
|
+func (m *Matrix) XXX_Merge(src proto.Message) {
|
|
|
+ xxx_messageInfo_Matrix.Merge(m, src)
|
|
|
}
|
|
|
-func (m *Units) XXX_Size() int {
|
|
|
- return xxx_messageInfo_Units.Size(m)
|
|
|
+func (m *Matrix) XXX_Size() int {
|
|
|
+ return xxx_messageInfo_Matrix.Size(m)
|
|
|
}
|
|
|
-func (m *Units) XXX_DiscardUnknown() {
|
|
|
- xxx_messageInfo_Units.DiscardUnknown(m)
|
|
|
+func (m *Matrix) XXX_DiscardUnknown() {
|
|
|
+ xxx_messageInfo_Matrix.DiscardUnknown(m)
|
|
|
}
|
|
|
|
|
|
-var xxx_messageInfo_Units proto.InternalMessageInfo
|
|
|
+var xxx_messageInfo_Matrix proto.InternalMessageInfo
|
|
|
|
|
|
-func (m *Units) GetList() []*Unit {
|
|
|
+func (m *Matrix) GetMatrix() []byte {
|
|
|
if m != nil {
|
|
|
- return m.List
|
|
|
+ return m.Matrix
|
|
|
+ }
|
|
|
+ return nil
|
|
|
+}
|
|
|
+
|
|
|
+type DataSet struct {
|
|
|
+ Biases []*Matrix `protobuf:"bytes,1,rep,name=biases,proto3" json:"biases,omitempty"`
|
|
|
+ Weights []*Matrix `protobuf:"bytes,2,rep,name=weights,proto3" json:"weights,omitempty"`
|
|
|
+ Data []*Matrix `protobuf:"bytes,3,rep,name=data,proto3" json:"data,omitempty"`
|
|
|
+ Result []*Matrix `protobuf:"bytes,4,rep,name=result,proto3" json:"result,omitempty"`
|
|
|
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
+ XXX_unrecognized []byte `json:"-"`
|
|
|
+ XXX_sizecache int32 `json:"-"`
|
|
|
+}
|
|
|
+
|
|
|
+func (m *DataSet) Reset() { *m = DataSet{} }
|
|
|
+func (m *DataSet) String() string { return proto.CompactTextString(m) }
|
|
|
+func (*DataSet) ProtoMessage() {}
|
|
|
+func (*DataSet) Descriptor() ([]byte, []int) {
|
|
|
+ return fileDescriptor_3cfb3b8ec240c376, []int{3}
|
|
|
+}
|
|
|
+
|
|
|
+func (m *DataSet) XXX_Unmarshal(b []byte) error {
|
|
|
+ return xxx_messageInfo_DataSet.Unmarshal(m, b)
|
|
|
+}
|
|
|
+func (m *DataSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
+ return xxx_messageInfo_DataSet.Marshal(b, m, deterministic)
|
|
|
+}
|
|
|
+func (m *DataSet) XXX_Merge(src proto.Message) {
|
|
|
+ xxx_messageInfo_DataSet.Merge(m, src)
|
|
|
+}
|
|
|
+func (m *DataSet) XXX_Size() int {
|
|
|
+ return xxx_messageInfo_DataSet.Size(m)
|
|
|
+}
|
|
|
+func (m *DataSet) XXX_DiscardUnknown() {
|
|
|
+ xxx_messageInfo_DataSet.DiscardUnknown(m)
|
|
|
+}
|
|
|
+
|
|
|
+var xxx_messageInfo_DataSet proto.InternalMessageInfo
|
|
|
+
|
|
|
+func (m *DataSet) GetBiases() []*Matrix {
|
|
|
+ if m != nil {
|
|
|
+ return m.Biases
|
|
|
+ }
|
|
|
+ return nil
|
|
|
+}
|
|
|
+
|
|
|
+func (m *DataSet) GetWeights() []*Matrix {
|
|
|
+ if m != nil {
|
|
|
+ return m.Weights
|
|
|
+ }
|
|
|
+ return nil
|
|
|
+}
|
|
|
+
|
|
|
+func (m *DataSet) GetData() []*Matrix {
|
|
|
+ if m != nil {
|
|
|
+ return m.Data
|
|
|
+ }
|
|
|
+ return nil
|
|
|
+}
|
|
|
+
|
|
|
+func (m *DataSet) GetResult() []*Matrix {
|
|
|
+ if m != nil {
|
|
|
+ return m.Result
|
|
|
}
|
|
|
return nil
|
|
|
}
|
|
|
|
|
|
func init() {
|
|
|
- proto.RegisterType((*Unit)(nil), "cluster.Unit")
|
|
|
- proto.RegisterType((*Units)(nil), "cluster.Units")
|
|
|
+ proto.RegisterType((*UnitInfo)(nil), "cluster.UnitInfo")
|
|
|
+ proto.RegisterType((*UnitInfos)(nil), "cluster.UnitInfos")
|
|
|
+ proto.RegisterType((*Matrix)(nil), "cluster.Matrix")
|
|
|
+ proto.RegisterType((*DataSet)(nil), "cluster.DataSet")
|
|
|
}
|
|
|
|
|
|
func init() { proto.RegisterFile("cluster.proto", fileDescriptor_3cfb3b8ec240c376) }
|
|
|
|
|
|
var fileDescriptor_3cfb3b8ec240c376 = []byte{
|
|
|
- // 173 bytes of a gzipped FileDescriptorProto
|
|
|
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x4d, 0xce, 0x29, 0x2d,
|
|
|
- 0x2e, 0x49, 0x2d, 0xd2, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x87, 0x72, 0x95, 0x5c, 0xb8,
|
|
|
- 0x58, 0x42, 0xf3, 0x32, 0x4b, 0x84, 0x04, 0xb8, 0x98, 0x4b, 0x8b, 0x72, 0x24, 0x18, 0x15, 0x18,
|
|
|
- 0x35, 0x38, 0x83, 0x40, 0x4c, 0x21, 0x2d, 0x2e, 0x81, 0xc4, 0xb2, 0xc4, 0xcc, 0x9c, 0xc4, 0xa4,
|
|
|
- 0x9c, 0xd4, 0x90, 0x8c, 0xa2, 0xd4, 0xc4, 0x94, 0x62, 0x09, 0x26, 0x05, 0x46, 0x0d, 0xc1, 0x20,
|
|
|
- 0x0c, 0x71, 0x25, 0x2d, 0x2e, 0x56, 0x90, 0x29, 0xc5, 0x42, 0x8a, 0x5c, 0x2c, 0x39, 0x99, 0xc5,
|
|
|
- 0x25, 0x12, 0x8c, 0x0a, 0xcc, 0x1a, 0xdc, 0x46, 0xbc, 0x7a, 0x30, 0x5b, 0x41, 0xb2, 0x41, 0x60,
|
|
|
- 0x29, 0x23, 0x57, 0x2e, 0x11, 0xbf, 0xd4, 0xd2, 0xa2, 0xc4, 0x1c, 0xbf, 0xd4, 0x92, 0xf2, 0xfc,
|
|
|
- 0xa2, 0x6c, 0x67, 0x88, 0x12, 0x21, 0x5d, 0x2e, 0x8e, 0xa0, 0xd4, 0xf4, 0x4c, 0x30, 0x1b, 0x55,
|
|
|
- 0xa3, 0x14, 0x1f, 0x0a, 0xb7, 0x58, 0x89, 0xc1, 0x80, 0x31, 0x89, 0x0d, 0xec, 0x11, 0x63, 0x40,
|
|
|
- 0x00, 0x00, 0x00, 0xff, 0xff, 0x5f, 0x84, 0xe4, 0x41, 0xd9, 0x00, 0x00, 0x00,
|
|
|
+ // 290 bytes of a gzipped FileDescriptorProto
|
|
|
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x91, 0xb1, 0x4e, 0xc3, 0x30,
|
|
|
+ 0x10, 0x86, 0x6b, 0x52, 0x25, 0xed, 0x01, 0x22, 0xb1, 0x10, 0x8a, 0x3a, 0x45, 0x46, 0x88, 0xd0,
|
|
|
+ 0xa1, 0x42, 0x81, 0x9d, 0x01, 0x06, 0x90, 0xa0, 0x83, 0x81, 0x07, 0x70, 0xa8, 0x69, 0x2d, 0x4c,
|
|
|
+ 0x82, 0xec, 0x0b, 0xe5, 0x9d, 0x78, 0x49, 0x14, 0x27, 0xa9, 0x04, 0x29, 0xdb, 0xdd, 0x7d, 0xbf,
|
|
|
+ 0xff, 0xff, 0x74, 0x86, 0xfd, 0x17, 0x5d, 0x59, 0x94, 0x66, 0xf6, 0x61, 0x4a, 0x2c, 0x69, 0xd0,
|
|
|
+ 0xb6, 0xec, 0x16, 0x46, 0xcf, 0x85, 0xc2, 0xbb, 0xe2, 0xb5, 0xa4, 0x21, 0x78, 0x95, 0xd1, 0x31,
|
|
|
+ 0x49, 0x48, 0x3a, 0xe6, 0x75, 0x49, 0xa7, 0x10, 0x8a, 0x4f, 0xa1, 0xb4, 0xc8, 0xb5, 0x7c, 0x5a,
|
|
|
+ 0x19, 0x29, 0x16, 0x36, 0xde, 0x49, 0x48, 0x1a, 0xf1, 0xde, 0x9c, 0x65, 0x30, 0xee, 0x9c, 0x2c,
|
|
|
+ 0x3d, 0x81, 0xa1, 0x56, 0x16, 0x63, 0x92, 0x78, 0xe9, 0x6e, 0x16, 0xcd, 0xba, 0xf4, 0x4e, 0xc1,
|
|
|
+ 0x1d, 0x66, 0x09, 0xf8, 0x0f, 0x02, 0x8d, 0xfa, 0xa2, 0x47, 0xe0, 0xbf, 0xbb, 0xca, 0xc5, 0xef,
|
|
|
+ 0xf1, 0xb6, 0x63, 0xdf, 0x04, 0x82, 0x1b, 0x81, 0xe2, 0x51, 0x22, 0x3d, 0x05, 0x3f, 0x57, 0xc2,
|
|
|
+ 0x4a, 0xdb, 0xda, 0x1e, 0x6c, 0x6c, 0x1b, 0x13, 0xde, 0x62, 0x7a, 0x06, 0xc1, 0x5a, 0xaa, 0xe5,
|
|
|
+ 0x0a, 0xeb, 0x6d, 0xb7, 0x2a, 0x3b, 0x4e, 0x8f, 0x61, 0xb8, 0x10, 0x28, 0x62, 0x6f, 0xbb, 0xce,
|
|
|
+ 0xc1, 0x3a, 0xd8, 0x48, 0x5b, 0x69, 0x8c, 0x87, 0xff, 0x04, 0x37, 0x38, 0xbb, 0x87, 0xc3, 0xb9,
|
|
|
+ 0xac, 0x8c, 0xd0, 0x73, 0x89, 0xeb, 0xd2, 0xbc, 0x5d, 0x37, 0x32, 0x7a, 0x09, 0x23, 0x2e, 0x97,
|
|
|
+ 0xca, 0xd5, 0xfd, 0x63, 0x4c, 0xfa, 0x23, 0x36, 0x38, 0x27, 0xd9, 0x15, 0x44, 0xbf, 0xdc, 0x6a,
|
|
|
+ 0x48, 0xa7, 0xe0, 0xf1, 0xaa, 0xa0, 0xe1, 0xe6, 0x49, 0x7b, 0x9d, 0xc9, 0xdf, 0xa5, 0xd8, 0x20,
|
|
|
+ 0xf7, 0xdd, 0x67, 0x5f, 0xfc, 0x04, 0x00, 0x00, 0xff, 0xff, 0xa9, 0xdf, 0x40, 0x3f, 0xfd, 0x01,
|
|
|
+ 0x00, 0x00,
|
|
|
}
|
|
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
@@ -144,7 +256,7 @@ const _ = grpc.SupportPackageIsVersion6
|
|
|
//
|
|
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
|
|
type NeuralNetworkClusterClient interface {
|
|
|
- Register(ctx context.Context, in *Unit, opts ...grpc.CallOption) (NeuralNetworkCluster_RegisterClient, error)
|
|
|
+ Register(ctx context.Context, in *UnitInfo, opts ...grpc.CallOption) (NeuralNetworkCluster_RegisterClient, error)
|
|
|
}
|
|
|
|
|
|
type neuralNetworkClusterClient struct {
|
|
@@ -155,7 +267,7 @@ func NewNeuralNetworkClusterClient(cc grpc.ClientConnInterface) NeuralNetworkClu
|
|
|
return &neuralNetworkClusterClient{cc}
|
|
|
}
|
|
|
|
|
|
-func (c *neuralNetworkClusterClient) Register(ctx context.Context, in *Unit, opts ...grpc.CallOption) (NeuralNetworkCluster_RegisterClient, error) {
|
|
|
+func (c *neuralNetworkClusterClient) Register(ctx context.Context, in *UnitInfo, opts ...grpc.CallOption) (NeuralNetworkCluster_RegisterClient, error) {
|
|
|
stream, err := c.cc.NewStream(ctx, &_NeuralNetworkCluster_serviceDesc.Streams[0], "/cluster.NeuralNetworkCluster/Register", opts...)
|
|
|
if err != nil {
|
|
|
return nil, err
|
|
@@ -171,7 +283,7 @@ func (c *neuralNetworkClusterClient) Register(ctx context.Context, in *Unit, opt
|
|
|
}
|
|
|
|
|
|
type NeuralNetworkCluster_RegisterClient interface {
|
|
|
- Recv() (*Units, error)
|
|
|
+ Recv() (*UnitInfo, error)
|
|
|
grpc.ClientStream
|
|
|
}
|
|
|
|
|
@@ -179,8 +291,8 @@ type neuralNetworkClusterRegisterClient struct {
|
|
|
grpc.ClientStream
|
|
|
}
|
|
|
|
|
|
-func (x *neuralNetworkClusterRegisterClient) Recv() (*Units, error) {
|
|
|
- m := new(Units)
|
|
|
+func (x *neuralNetworkClusterRegisterClient) Recv() (*UnitInfo, error) {
|
|
|
+ m := new(UnitInfo)
|
|
|
if err := x.ClientStream.RecvMsg(m); err != nil {
|
|
|
return nil, err
|
|
|
}
|
|
@@ -189,14 +301,14 @@ func (x *neuralNetworkClusterRegisterClient) Recv() (*Units, error) {
|
|
|
|
|
|
// NeuralNetworkClusterServer is the server API for NeuralNetworkCluster service.
|
|
|
type NeuralNetworkClusterServer interface {
|
|
|
- Register(*Unit, NeuralNetworkCluster_RegisterServer) error
|
|
|
+ Register(*UnitInfo, NeuralNetworkCluster_RegisterServer) error
|
|
|
}
|
|
|
|
|
|
// UnimplementedNeuralNetworkClusterServer can be embedded to have forward compatible implementations.
|
|
|
type UnimplementedNeuralNetworkClusterServer struct {
|
|
|
}
|
|
|
|
|
|
-func (*UnimplementedNeuralNetworkClusterServer) Register(req *Unit, srv NeuralNetworkCluster_RegisterServer) error {
|
|
|
+func (*UnimplementedNeuralNetworkClusterServer) Register(req *UnitInfo, srv NeuralNetworkCluster_RegisterServer) error {
|
|
|
return status.Errorf(codes.Unimplemented, "method Register not implemented")
|
|
|
}
|
|
|
|
|
@@ -205,7 +317,7 @@ func RegisterNeuralNetworkClusterServer(s *grpc.Server, srv NeuralNetworkCluster
|
|
|
}
|
|
|
|
|
|
func _NeuralNetworkCluster_Register_Handler(srv interface{}, stream grpc.ServerStream) error {
|
|
|
- m := new(Unit)
|
|
|
+ m := new(UnitInfo)
|
|
|
if err := stream.RecvMsg(m); err != nil {
|
|
|
return err
|
|
|
}
|
|
@@ -213,7 +325,7 @@ func _NeuralNetworkCluster_Register_Handler(srv interface{}, stream grpc.ServerS
|
|
|
}
|
|
|
|
|
|
type NeuralNetworkCluster_RegisterServer interface {
|
|
|
- Send(*Units) error
|
|
|
+ Send(*UnitInfo) error
|
|
|
grpc.ServerStream
|
|
|
}
|
|
|
|
|
@@ -221,7 +333,7 @@ type neuralNetworkClusterRegisterServer struct {
|
|
|
grpc.ServerStream
|
|
|
}
|
|
|
|
|
|
-func (x *neuralNetworkClusterRegisterServer) Send(m *Units) error {
|
|
|
+func (x *neuralNetworkClusterRegisterServer) Send(m *UnitInfo) error {
|
|
|
return x.ServerStream.SendMsg(m)
|
|
|
}
|
|
|
|
|
@@ -238,3 +350,75 @@ var _NeuralNetworkCluster_serviceDesc = grpc.ServiceDesc{
|
|
|
},
|
|
|
Metadata: "cluster.proto",
|
|
|
}
|
|
|
+
|
|
|
+// NeuralNetworkUnitClient is the client API for NeuralNetworkUnit service.
|
|
|
+//
|
|
|
+// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
|
|
+type NeuralNetworkUnitClient interface {
|
|
|
+ Run(ctx context.Context, in *DataSet, opts ...grpc.CallOption) (*Matrix, error)
|
|
|
+}
|
|
|
+
|
|
|
+type neuralNetworkUnitClient struct {
|
|
|
+ cc grpc.ClientConnInterface
|
|
|
+}
|
|
|
+
|
|
|
+func NewNeuralNetworkUnitClient(cc grpc.ClientConnInterface) NeuralNetworkUnitClient {
|
|
|
+ return &neuralNetworkUnitClient{cc}
|
|
|
+}
|
|
|
+
|
|
|
+func (c *neuralNetworkUnitClient) Run(ctx context.Context, in *DataSet, opts ...grpc.CallOption) (*Matrix, error) {
|
|
|
+ out := new(Matrix)
|
|
|
+ err := c.cc.Invoke(ctx, "/cluster.NeuralNetworkUnit/Run", in, out, opts...)
|
|
|
+ if err != nil {
|
|
|
+ return nil, err
|
|
|
+ }
|
|
|
+ return out, nil
|
|
|
+}
|
|
|
+
|
|
|
+// NeuralNetworkUnitServer is the server API for NeuralNetworkUnit service.
|
|
|
+type NeuralNetworkUnitServer interface {
|
|
|
+ Run(context.Context, *DataSet) (*Matrix, error)
|
|
|
+}
|
|
|
+
|
|
|
+// UnimplementedNeuralNetworkUnitServer can be embedded to have forward compatible implementations.
|
|
|
+type UnimplementedNeuralNetworkUnitServer struct {
|
|
|
+}
|
|
|
+
|
|
|
+func (*UnimplementedNeuralNetworkUnitServer) Run(ctx context.Context, req *DataSet) (*Matrix, error) {
|
|
|
+ return nil, status.Errorf(codes.Unimplemented, "method Run not implemented")
|
|
|
+}
|
|
|
+
|
|
|
+func RegisterNeuralNetworkUnitServer(s *grpc.Server, srv NeuralNetworkUnitServer) {
|
|
|
+ s.RegisterService(&_NeuralNetworkUnit_serviceDesc, srv)
|
|
|
+}
|
|
|
+
|
|
|
+func _NeuralNetworkUnit_Run_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
+ in := new(DataSet)
|
|
|
+ if err := dec(in); err != nil {
|
|
|
+ return nil, err
|
|
|
+ }
|
|
|
+ if interceptor == nil {
|
|
|
+ return srv.(NeuralNetworkUnitServer).Run(ctx, in)
|
|
|
+ }
|
|
|
+ info := &grpc.UnaryServerInfo{
|
|
|
+ Server: srv,
|
|
|
+ FullMethod: "/cluster.NeuralNetworkUnit/Run",
|
|
|
+ }
|
|
|
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
+ return srv.(NeuralNetworkUnitServer).Run(ctx, req.(*DataSet))
|
|
|
+ }
|
|
|
+ return interceptor(ctx, in, info, handler)
|
|
|
+}
|
|
|
+
|
|
|
+var _NeuralNetworkUnit_serviceDesc = grpc.ServiceDesc{
|
|
|
+ ServiceName: "cluster.NeuralNetworkUnit",
|
|
|
+ HandlerType: (*NeuralNetworkUnitServer)(nil),
|
|
|
+ Methods: []grpc.MethodDesc{
|
|
|
+ {
|
|
|
+ MethodName: "Run",
|
|
|
+ Handler: _NeuralNetworkUnit_Run_Handler,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ Streams: []grpc.StreamDesc{},
|
|
|
+ Metadata: "cluster.proto",
|
|
|
+}
|