Skip to content

Commit

Permalink
feat: change GNN and MLP field type (#134)
Browse files Browse the repository at this point in the history
Signed-off-by: Gaius <[email protected]>
  • Loading branch information
gaius-qi committed Jul 10, 2023
1 parent 0259ed8 commit 32635e1
Show file tree
Hide file tree
Showing 6 changed files with 245 additions and 64 deletions.
56 changes: 29 additions & 27 deletions pkg/apis/manager/v1/manager.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions pkg/apis/manager/v1/manager.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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.
Expand Down
56 changes: 29 additions & 27 deletions pkg/apis/manager/v2/manager.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions pkg/apis/manager/v2/manager.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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.
Expand Down
45 changes: 45 additions & 0 deletions proto/manager.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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);
}
Loading

0 comments on commit 32635e1

Please sign in to comment.