Skip to content

Commit

Permalink
validation timestamp type change: string => timestamp (#526)
Browse files Browse the repository at this point in the history
  • Loading branch information
niklastheman authored Feb 9, 2024
1 parent f2f8fea commit ea0042b
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 300 deletions.
4 changes: 2 additions & 2 deletions fedn/fedn/network/clients/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -652,9 +652,9 @@ def process_request(self):
validation.receiver.role = request.sender.role
validation.model_id = str(request.model_id)
validation.data = json.dumps(metrics)
self.str = str(datetime.now())
validation.timestamp = self.str
validation.timestamp.GetCurrentTime()
validation.correlation_id = request.correlation_id

_ = self.combinerStub.SendModelValidation(
validation, metadata=self.metadata)

Expand Down
4 changes: 3 additions & 1 deletion fedn/fedn/network/grpc/fedn.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ syntax = "proto3";

package grpc;

import "google/protobuf/timestamp.proto";

message Response {
Client sender = 1;
string response = 2;
Expand Down Expand Up @@ -83,7 +85,7 @@ message ModelValidation {
string model_id = 3;
string data = 4;
string correlation_id = 5;
string timestamp = 6;
google.protobuf.Timestamp timestamp = 6;
string meta = 7;
}

Expand Down
Loading

0 comments on commit ea0042b

Please sign in to comment.