tracking_service.proto 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. syntax = "proto3";
  2. package easyfl.pb;
  3. import "easyfl/pb/common.proto";
  4. message TrackTaskMetricRequest{
  5. TaskMetric task_metric = 1;
  6. }
  7. message TrackTaskMetricResponse{
  8. Status status = 1;
  9. }
  10. message TrackRoundMetricRequest{
  11. RoundMetric round_metric = 1;
  12. }
  13. message TrackRoundMetricResponse{
  14. Status status = 1;
  15. }
  16. message TrackClientMetricRequest{
  17. repeated ClientMetric client_metrics = 1;
  18. }
  19. message TrackClientMetricResponse{
  20. Status status = 1;
  21. }
  22. message TrackClientTrainMetricRequest{
  23. string task_id = 1;
  24. int32 round_id = 2;
  25. string client_id = 3;
  26. repeated float train_loss = 4;
  27. float train_time = 5;
  28. float train_upload_time = 6;
  29. float train_download_size = 7;
  30. float train_upload_size = 8;
  31. }
  32. message TrackClientTrainMetricResponse{
  33. Status status = 1;
  34. }
  35. message TrackClientTestMetricRequest{
  36. string task_id = 1;
  37. int32 round_id = 2;
  38. string client_id = 3;
  39. float test_accuracy = 4;
  40. float test_loss = 5;
  41. float test_time = 6;
  42. float test_upload_time = 7;
  43. float test_download_size = 8;
  44. }
  45. message TrackClientTestMetricResponse{
  46. Status status = 1;
  47. }
  48. message GetRoundTrainTestTimeRequest{
  49. string task_id = 1;
  50. int32 rounds = 2;
  51. int32 interval = 3;
  52. }
  53. message TrainTestTime{
  54. int32 round_id = 1;
  55. float time = 2;
  56. }
  57. message GetRoundTrainTestTimeResponse{
  58. repeated TrainTestTime train_test_times = 1;
  59. Status status = 2;
  60. }
  61. message GetRoundMetricsRequest {
  62. string task_id = 1;
  63. // empty list means get all rounds;
  64. repeated int32 rounds = 2;
  65. }
  66. message GetRoundMetricsResponse {
  67. string task_id = 1;
  68. int32 round_id = 2;
  69. repeated RoundMetric metrics = 3;
  70. Status status = 4;
  71. }
  72. message GetClientMetricsRequest {
  73. string task_id = 1;
  74. int32 round_id = 2;
  75. repeated string client_ids = 3;
  76. }
  77. message GetClientMetricsResponse {
  78. string task_id = 1;
  79. int32 round_id = 2;
  80. repeated ClientMetric metrics = 3;
  81. Status status = 4;
  82. }
  83. service TrackingService {
  84. rpc TrackTaskMetric(TrackTaskMetricRequest) returns (TrackTaskMetricResponse) {}
  85. rpc TrackRoundMetric(TrackRoundMetricRequest) returns (TrackRoundMetricResponse) {}
  86. rpc TrackClientMetric(TrackClientMetricRequest) returns (TrackClientMetricResponse) {}
  87. rpc TrackClientTrainMetric(TrackClientTrainMetricRequest) returns (TrackClientTrainMetricResponse) {}
  88. rpc TrackClientTestMetric(TrackClientTestMetricRequest) returns (TrackClientTestMetricResponse) {}
  89. rpc GetRoundMetrics(GetRoundMetricsRequest) returns (GetRoundMetricsResponse) {}
  90. rpc GetClientMetrics(GetClientMetricsRequest) returns (GetClientMetricsResponse) {}
  91. rpc GetRoundTrainTestTime(GetRoundTrainTestTimeRequest) returns (GetRoundTrainTestTimeResponse) {}
  92. }