diff --git a/pkg/apis/manager/v1/manager.pb.go b/pkg/apis/manager/v1/manager.pb.go index bb4baf4..6e31684 100644 --- a/pkg/apis/manager/v1/manager.pb.go +++ b/pkg/apis/manager/v1/manager.pb.go @@ -1769,11 +1769,11 @@ type CreateGNNRequest struct { // Protocol buffer file of model. Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` // Recall of the model. - Recall float32 `protobuf:"fixed32,2,opt,name=recall,proto3" json:"recall,omitempty"` + Recall float64 `protobuf:"fixed64,2,opt,name=recall,proto3" json:"recall,omitempty"` // Precision of the model. - Precision float32 `protobuf:"fixed32,3,opt,name=precision,proto3" json:"precision,omitempty"` + Precision float64 `protobuf:"fixed64,3,opt,name=precision,proto3" json:"precision,omitempty"` // F1-Score of the model. - F1Score float32 `protobuf:"fixed32,4,opt,name=f1_score,json=f1Score,proto3" json:"f1_score,omitempty"` + F1Score float64 `protobuf:"fixed64,4,opt,name=f1_score,json=f1Score,proto3" json:"f1_score,omitempty"` } func (x *CreateGNNRequest) Reset() { @@ -1815,21 +1815,21 @@ func (x *CreateGNNRequest) GetData() []byte { return nil } -func (x *CreateGNNRequest) GetRecall() float32 { +func (x *CreateGNNRequest) GetRecall() float64 { if x != nil { return x.Recall } return 0 } -func (x *CreateGNNRequest) GetPrecision() float32 { +func (x *CreateGNNRequest) GetPrecision() float64 { if x != nil { return x.Precision } return 0 } -func (x *CreateGNNRequest) GetF1Score() float32 { +func (x *CreateGNNRequest) GetF1Score() float64 { if x != nil { return x.F1Score } @@ -1845,9 +1845,9 @@ type CreateMLPRequest struct { // Protocol buffer file of model. Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` // MSE of the model. - Mse float32 `protobuf:"fixed32,2,opt,name=mse,proto3" json:"mse,omitempty"` + Mse float64 `protobuf:"fixed64,2,opt,name=mse,proto3" json:"mse,omitempty"` // MAE of the model. - Mae float32 `protobuf:"fixed32,3,opt,name=mae,proto3" json:"mae,omitempty"` + Mae float64 `protobuf:"fixed64,3,opt,name=mae,proto3" json:"mae,omitempty"` } func (x *CreateMLPRequest) Reset() { @@ -1889,14 +1889,14 @@ func (x *CreateMLPRequest) GetData() []byte { return nil } -func (x *CreateMLPRequest) GetMse() float32 { +func (x *CreateMLPRequest) GetMse() float64 { if x != nil { return x.Mse } return 0 } -func (x *CreateMLPRequest) GetMae() float32 { +func (x *CreateMLPRequest) GetMae() float64 { if x != nil { return x.Mae } @@ -2357,25 +2357,27 @@ var file_pkg_apis_manager_v1_manager_proto_rawDesc = []byte{ 0x38, 0x0a, 0x0c, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x61, 0x70, 0x70, - 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xb3, 0x01, 0x0a, 0x10, 0x43, 0x72, + 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xcb, 0x01, 0x0a, 0x10, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x4e, 0x4e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x07, 0xfa, 0x42, - 0x04, 0x7a, 0x02, 0x10, 0x01, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x27, 0x0a, 0x06, 0x72, - 0x65, 0x63, 0x61, 0x6c, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x02, 0x42, 0x0f, 0xfa, 0x42, 0x0c, - 0x0a, 0x0a, 0x1d, 0x00, 0x00, 0x80, 0x3f, 0x2d, 0x00, 0x00, 0x00, 0x00, 0x52, 0x06, 0x72, 0x65, - 0x63, 0x61, 0x6c, 0x6c, 0x12, 0x2d, 0x0a, 0x09, 0x70, 0x72, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, - 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x02, 0x42, 0x0f, 0xfa, 0x42, 0x0c, 0x0a, 0x0a, 0x1d, 0x00, - 0x00, 0x80, 0x3f, 0x2d, 0x00, 0x00, 0x00, 0x00, 0x52, 0x09, 0x70, 0x72, 0x65, 0x63, 0x69, 0x73, - 0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x0a, 0x08, 0x66, 0x31, 0x5f, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x02, 0x42, 0x0f, 0xfa, 0x42, 0x0c, 0x0a, 0x0a, 0x1d, 0x00, 0x00, 0x80, - 0x3f, 0x2d, 0x00, 0x00, 0x00, 0x00, 0x52, 0x07, 0x66, 0x31, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x22, - 0x6b, 0x0a, 0x10, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x4c, 0x50, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0c, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x7a, 0x02, 0x10, 0x01, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, - 0x12, 0x1c, 0x0a, 0x03, 0x6d, 0x73, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x02, 0x42, 0x0a, 0xfa, - 0x42, 0x07, 0x0a, 0x05, 0x2d, 0x00, 0x00, 0x00, 0x00, 0x52, 0x03, 0x6d, 0x73, 0x65, 0x12, 0x1c, - 0x0a, 0x03, 0x6d, 0x61, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x02, 0x42, 0x0a, 0xfa, 0x42, 0x07, - 0x0a, 0x05, 0x2d, 0x00, 0x00, 0x00, 0x00, 0x52, 0x03, 0x6d, 0x61, 0x65, 0x22, 0xa0, 0x02, 0x0a, + 0x04, 0x7a, 0x02, 0x10, 0x01, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x2f, 0x0a, 0x06, 0x72, + 0x65, 0x63, 0x61, 0x6c, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x42, 0x17, 0xfa, 0x42, 0x14, + 0x12, 0x12, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x3f, 0x29, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x52, 0x06, 0x72, 0x65, 0x63, 0x61, 0x6c, 0x6c, 0x12, 0x35, 0x0a, 0x09, + 0x70, 0x72, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x42, + 0x17, 0xfa, 0x42, 0x14, 0x12, 0x12, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x3f, 0x29, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x09, 0x70, 0x72, 0x65, 0x63, 0x69, 0x73, + 0x69, 0x6f, 0x6e, 0x12, 0x32, 0x0a, 0x08, 0x66, 0x31, 0x5f, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x01, 0x42, 0x17, 0xfa, 0x42, 0x14, 0x12, 0x12, 0x19, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xf0, 0x3f, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x07, + 0x66, 0x31, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x22, 0x73, 0x0a, 0x10, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x4d, 0x4c, 0x50, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x04, 0x64, + 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x7a, 0x02, + 0x10, 0x01, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x20, 0x0a, 0x03, 0x6d, 0x73, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x01, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x12, 0x09, 0x29, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x03, 0x6d, 0x73, 0x65, 0x12, 0x20, 0x0a, 0x03, 0x6d, 0x61, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x12, 0x09, 0x29, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x03, 0x6d, 0x61, 0x65, 0x22, 0xa0, 0x02, 0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x08, diff --git a/pkg/apis/manager/v1/manager.proto b/pkg/apis/manager/v1/manager.proto index 84ef1b7..c1d1810 100644 --- a/pkg/apis/manager/v1/manager.proto +++ b/pkg/apis/manager/v1/manager.proto @@ -317,13 +317,13 @@ message CreateGNNRequest { bytes data = 1 [(validate.rules).bytes.min_len = 1]; // Recall of the model. - float recall = 2 [(validate.rules).float = {gte: 0, lte: 1}]; + double recall = 2 [(validate.rules).double = {gte: 0, lte: 1}]; // Precision of the model. - float precision = 3 [(validate.rules).float = {gte: 0, lte: 1}]; + double precision = 3 [(validate.rules).double = {gte: 0, lte: 1}]; // F1-Score of the model. - float f1_score = 4 [(validate.rules).float = {gte: 0, lte: 1}]; + double f1_score = 4 [(validate.rules).double = {gte: 0, lte: 1}]; } // CreateMLPRequest represents to create MLP model request of TrainRequest. @@ -332,10 +332,10 @@ message CreateMLPRequest { bytes data = 1 [(validate.rules).bytes.min_len = 1]; // MSE of the model. - float mse = 2 [(validate.rules).float = {gte: 0}]; + double mse = 2 [(validate.rules).double = {gte: 0}]; // MAE of the model. - float mae = 3 [(validate.rules).float = {gte: 0}]; + double mae = 3 [(validate.rules).double = {gte: 0}]; } // CreateModelRequest represents request of CreateModel. diff --git a/pkg/apis/manager/v2/manager.pb.go b/pkg/apis/manager/v2/manager.pb.go index f3dde0c..a6e5486 100644 --- a/pkg/apis/manager/v2/manager.pb.go +++ b/pkg/apis/manager/v2/manager.pb.go @@ -1742,11 +1742,11 @@ type CreateGNNRequest struct { // Protocol buffer file of model. Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` // Recall of the model. - Recall float32 `protobuf:"fixed32,2,opt,name=recall,proto3" json:"recall,omitempty"` + Recall float64 `protobuf:"fixed64,2,opt,name=recall,proto3" json:"recall,omitempty"` // Precision of the model. - Precision float32 `protobuf:"fixed32,3,opt,name=precision,proto3" json:"precision,omitempty"` + Precision float64 `protobuf:"fixed64,3,opt,name=precision,proto3" json:"precision,omitempty"` // F1-Score of the model. - F1Score float32 `protobuf:"fixed32,4,opt,name=f1_score,json=f1Score,proto3" json:"f1_score,omitempty"` + F1Score float64 `protobuf:"fixed64,4,opt,name=f1_score,json=f1Score,proto3" json:"f1_score,omitempty"` } func (x *CreateGNNRequest) Reset() { @@ -1788,21 +1788,21 @@ func (x *CreateGNNRequest) GetData() []byte { return nil } -func (x *CreateGNNRequest) GetRecall() float32 { +func (x *CreateGNNRequest) GetRecall() float64 { if x != nil { return x.Recall } return 0 } -func (x *CreateGNNRequest) GetPrecision() float32 { +func (x *CreateGNNRequest) GetPrecision() float64 { if x != nil { return x.Precision } return 0 } -func (x *CreateGNNRequest) GetF1Score() float32 { +func (x *CreateGNNRequest) GetF1Score() float64 { if x != nil { return x.F1Score } @@ -1818,9 +1818,9 @@ type CreateMLPRequest struct { // Protocol buffer file of model. Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` // MSE of the model. - Mse float32 `protobuf:"fixed32,2,opt,name=mse,proto3" json:"mse,omitempty"` + Mse float64 `protobuf:"fixed64,2,opt,name=mse,proto3" json:"mse,omitempty"` // MAE of the model. - Mae float32 `protobuf:"fixed32,3,opt,name=mae,proto3" json:"mae,omitempty"` + Mae float64 `protobuf:"fixed64,3,opt,name=mae,proto3" json:"mae,omitempty"` } func (x *CreateMLPRequest) Reset() { @@ -1862,14 +1862,14 @@ func (x *CreateMLPRequest) GetData() []byte { return nil } -func (x *CreateMLPRequest) GetMse() float32 { +func (x *CreateMLPRequest) GetMse() float64 { if x != nil { return x.Mse } return 0 } -func (x *CreateMLPRequest) GetMae() float32 { +func (x *CreateMLPRequest) GetMae() float64 { if x != nil { return x.Mae } @@ -2328,25 +2328,27 @@ var file_pkg_apis_manager_v2_manager_proto_rawDesc = []byte{ 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x61, 0x70, 0x70, 0x6c, 0x69, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xb3, 0x01, 0x0a, 0x10, 0x43, 0x72, 0x65, 0x61, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xcb, 0x01, 0x0a, 0x10, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x4e, 0x4e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x7a, - 0x02, 0x10, 0x01, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x27, 0x0a, 0x06, 0x72, 0x65, 0x63, - 0x61, 0x6c, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x02, 0x42, 0x0f, 0xfa, 0x42, 0x0c, 0x0a, 0x0a, - 0x1d, 0x00, 0x00, 0x80, 0x3f, 0x2d, 0x00, 0x00, 0x00, 0x00, 0x52, 0x06, 0x72, 0x65, 0x63, 0x61, - 0x6c, 0x6c, 0x12, 0x2d, 0x0a, 0x09, 0x70, 0x72, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x02, 0x42, 0x0f, 0xfa, 0x42, 0x0c, 0x0a, 0x0a, 0x1d, 0x00, 0x00, 0x80, - 0x3f, 0x2d, 0x00, 0x00, 0x00, 0x00, 0x52, 0x09, 0x70, 0x72, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, - 0x6e, 0x12, 0x2a, 0x0a, 0x08, 0x66, 0x31, 0x5f, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x02, 0x42, 0x0f, 0xfa, 0x42, 0x0c, 0x0a, 0x0a, 0x1d, 0x00, 0x00, 0x80, 0x3f, 0x2d, - 0x00, 0x00, 0x00, 0x00, 0x52, 0x07, 0x66, 0x31, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x22, 0x6b, 0x0a, - 0x10, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x4c, 0x50, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x1b, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, - 0x07, 0xfa, 0x42, 0x04, 0x7a, 0x02, 0x10, 0x01, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1c, - 0x0a, 0x03, 0x6d, 0x73, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x02, 0x42, 0x0a, 0xfa, 0x42, 0x07, - 0x0a, 0x05, 0x2d, 0x00, 0x00, 0x00, 0x00, 0x52, 0x03, 0x6d, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x03, - 0x6d, 0x61, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x02, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x0a, 0x05, - 0x2d, 0x00, 0x00, 0x00, 0x00, 0x52, 0x03, 0x6d, 0x61, 0x65, 0x22, 0xa6, 0x02, 0x0a, 0x12, 0x43, + 0x02, 0x10, 0x01, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x2f, 0x0a, 0x06, 0x72, 0x65, 0x63, + 0x61, 0x6c, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x42, 0x17, 0xfa, 0x42, 0x14, 0x12, 0x12, + 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x3f, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x52, 0x06, 0x72, 0x65, 0x63, 0x61, 0x6c, 0x6c, 0x12, 0x35, 0x0a, 0x09, 0x70, 0x72, + 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x42, 0x17, 0xfa, + 0x42, 0x14, 0x12, 0x12, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x3f, 0x29, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x09, 0x70, 0x72, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, + 0x6e, 0x12, 0x32, 0x0a, 0x08, 0x66, 0x31, 0x5f, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x01, 0x42, 0x17, 0xfa, 0x42, 0x14, 0x12, 0x12, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xf0, 0x3f, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x07, 0x66, 0x31, + 0x53, 0x63, 0x6f, 0x72, 0x65, 0x22, 0x73, 0x0a, 0x10, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, + 0x4c, 0x50, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x04, 0x64, 0x61, 0x74, + 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x7a, 0x02, 0x10, 0x01, + 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x20, 0x0a, 0x03, 0x6d, 0x73, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x01, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x12, 0x09, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x52, 0x03, 0x6d, 0x73, 0x65, 0x12, 0x20, 0x0a, 0x03, 0x6d, 0x61, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x01, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x12, 0x09, 0x29, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x03, 0x6d, 0x61, 0x65, 0x22, 0xa6, 0x02, 0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x08, 0x68, 0x6f, diff --git a/pkg/apis/manager/v2/manager.proto b/pkg/apis/manager/v2/manager.proto index ed05fdc..cc908ac 100644 --- a/pkg/apis/manager/v2/manager.proto +++ b/pkg/apis/manager/v2/manager.proto @@ -311,13 +311,13 @@ message CreateGNNRequest { bytes data = 1 [(validate.rules).bytes.min_len = 1]; // Recall of the model. - float recall = 2 [(validate.rules).float = {gte: 0, lte: 1}]; + double recall = 2 [(validate.rules).double = {gte: 0, lte: 1}]; // Precision of the model. - float precision = 3 [(validate.rules).float = {gte: 0, lte: 1}]; + double precision = 3 [(validate.rules).double = {gte: 0, lte: 1}]; // F1-Score of the model. - float f1_score = 4 [(validate.rules).float = {gte: 0, lte: 1}]; + double f1_score = 4 [(validate.rules).double = {gte: 0, lte: 1}]; } // CreateMLPRequest represents to create MLP model request of TrainRequest. @@ -326,10 +326,10 @@ message CreateMLPRequest { bytes data = 1 [(validate.rules).bytes.min_len = 1]; // MSE of the model. - float mse = 2 [(validate.rules).float = {gte: 0}]; + double mse = 2 [(validate.rules).double = {gte: 0}]; // MAE of the model. - float mae = 3 [(validate.rules).float = {gte: 0}]; + double mae = 3 [(validate.rules).double = {gte: 0}]; } // CreateModelRequest represents request of CreateModel. diff --git a/proto/manager.proto b/proto/manager.proto index 4114942..9da17c2 100644 --- a/proto/manager.proto +++ b/proto/manager.proto @@ -302,6 +302,48 @@ message ListApplicationsResponse { repeated Application applications = 1; } +// CreateGNNRequest represents to create GNN model request of TrainRequest. +message CreateGNNRequest { + // Protocol buffer file of model. + bytes data = 1; + + // Recall of the model. + double recall = 2; + + // Precision of the model. + double precision = 3; + + // F1-Score of the model. + double f1_score = 4; +} + +// CreateMLPRequest represents to create MLP model request of TrainRequest. +message CreateMLPRequest { + // Protocol buffer file of model. + bytes data = 1; + + // MSE of the model. + double mse = 2; + + // MAE of the model. + double mae = 3; +} + +// CreateModelRequest represents request of CreateModel. +message CreateModelRequest { + // Scheduler hostname. + string hostname = 1; + // Scheduler ip. + string ip = 2; + // Scheduler cluster id. + uint64 cluster_id = 3; + + oneof request { + CreateGNNRequest create_gnn_request = 4; + CreateMLPRequest create_mlp_request = 5; + } +} + // KeepAliveRequest represents request of KeepAlive. message KeepAliveRequest { // Request source type. @@ -340,6 +382,9 @@ service Manager { // List applications configuration. rpc ListApplications(ListApplicationsRequest)returns(ListApplicationsResponse); + // Create model and update data of model to object storage. + rpc CreateModel(CreateModelRequest)returns(google.protobuf.Empty); + // KeepAlive with manager. rpc KeepAlive(stream KeepAliveRequest)returns(google.protobuf.Empty); } diff --git a/src/manager.rs b/src/manager.rs index b0985a4..c3550fb 100644 --- a/src/manager.rs +++ b/src/manager.rs @@ -385,6 +385,64 @@ pub struct ListApplicationsResponse { #[prost(message, repeated, tag = "1")] pub applications: ::prost::alloc::vec::Vec, } +/// CreateGNNRequest represents to create GNN model request of TrainRequest. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateGnnRequest { + /// Protocol buffer file of model. + #[prost(bytes = "vec", tag = "1")] + pub data: ::prost::alloc::vec::Vec, + /// Recall of the model. + #[prost(double, tag = "2")] + pub recall: f64, + /// Precision of the model. + #[prost(double, tag = "3")] + pub precision: f64, + /// F1-Score of the model. + #[prost(double, tag = "4")] + pub f1_score: f64, +} +/// CreateMLPRequest represents to create MLP model request of TrainRequest. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateMlpRequest { + /// Protocol buffer file of model. + #[prost(bytes = "vec", tag = "1")] + pub data: ::prost::alloc::vec::Vec, + /// MSE of the model. + #[prost(double, tag = "2")] + pub mse: f64, + /// MAE of the model. + #[prost(double, tag = "3")] + pub mae: f64, +} +/// CreateModelRequest represents request of CreateModel. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateModelRequest { + /// Scheduler hostname. + #[prost(string, tag = "1")] + pub hostname: ::prost::alloc::string::String, + /// Scheduler ip. + #[prost(string, tag = "2")] + pub ip: ::prost::alloc::string::String, + /// Scheduler cluster id. + #[prost(uint64, tag = "3")] + pub cluster_id: u64, + #[prost(oneof = "create_model_request::Request", tags = "4, 5")] + pub request: ::core::option::Option, +} +/// Nested message and enum types in `CreateModelRequest`. +pub mod create_model_request { + #[allow(clippy::derive_partial_eq_without_eq)] + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Request { + #[prost(message, tag = "4")] + CreateGnnRequest(super::CreateGnnRequest), + #[prost(message, tag = "5")] + CreateMlpRequest(super::CreateMlpRequest), + } +} /// KeepAliveRequest represents request of KeepAlive. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -714,6 +772,29 @@ pub mod manager_client { .insert(GrpcMethod::new("manager.Manager", "ListApplications")); self.inner.unary(req, path, codec).await } + /// Create model and update data of model to object storage. + pub async fn create_model( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/manager.Manager/CreateModel", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("manager.Manager", "CreateModel")); + self.inner.unary(req, path, codec).await + } /// KeepAlive with manager. pub async fn keep_alive( &mut self, @@ -794,6 +875,11 @@ pub mod manager_server { tonic::Response, tonic::Status, >; + /// Create model and update data of model to object storage. + async fn create_model( + &self, + request: tonic::Request, + ) -> std::result::Result, tonic::Status>; /// KeepAlive with manager. async fn keep_alive( &self, @@ -1248,6 +1334,52 @@ pub mod manager_server { }; Box::pin(fut) } + "/manager.Manager/CreateModel" => { + #[allow(non_camel_case_types)] + struct CreateModelSvc(pub Arc); + impl< + T: Manager, + > tonic::server::UnaryService + for CreateModelSvc { + type Response = (); + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + (*inner).create_model(request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = CreateModelSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } "/manager.Manager/KeepAlive" => { #[allow(non_camel_case_types)] struct KeepAliveSvc(pub Arc);