common.proto 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. syntax = "proto3";
  2. package easyfl.pb;
  3. enum StatusCode {
  4. SC_OK = 0;
  5. SC_UNKNOWN = 1;
  6. SC_INVALID_REQUEST = 2;
  7. SC_DEADLINE_EXCEEDED = 3;
  8. SC_NOT_FOUND = 4;
  9. SC_ALREADY_EXISTS = 5;
  10. }
  11. message Status {
  12. StatusCode code = 1;
  13. string message = 2;
  14. }
  15. enum DataType {
  16. // Model parameters or gradients
  17. DATA_TYPE_PARAMS = 0;
  18. // Performance
  19. DATA_TYPE_PERFORMANCE = 1;
  20. }
  21. message TaskMetric {
  22. string task_id = 1;
  23. string configuration = 2;
  24. }
  25. message RoundMetric {
  26. string task_id = 1;
  27. int32 round_id = 2;
  28. float test_accuracy = 3;
  29. float test_loss = 4;
  30. float round_time = 5;
  31. float train_time = 6;
  32. float test_time = 7;
  33. float train_distribute_time = 8;
  34. float test_distribute_time = 9;
  35. float train_upload_size = 10;
  36. float train_download_size = 11;
  37. float test_upload_size = 12;
  38. float test_download_size = 13;
  39. string extra = 14;
  40. }
  41. message ClientMetric {
  42. string task_id = 1;
  43. int32 round_id = 2;
  44. string client_id = 3;
  45. repeated float train_accuracy = 4;
  46. repeated float train_loss = 5;
  47. float test_accuracy = 6;
  48. float test_loss = 7;
  49. float train_time = 8;
  50. float test_time = 9;
  51. float train_upload_time = 10;
  52. float test_upload_time = 11;
  53. float train_upload_size = 12;
  54. float train_download_size = 13;
  55. float test_upload_size = 14;
  56. float test_download_size = 15;
  57. string extra = 16;
  58. }