client_service.proto 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. syntax = "proto3";
  2. import "easyfl/pb/common.proto";
  3. package easyfl.pb;
  4. enum OperationType {
  5. OP_TYPE_TRAIN = 0;
  6. OP_TYPE_TEST = 1;
  7. }
  8. message OperateRequest {
  9. // Operation type: train or test
  10. OperationType type = 1;
  11. // Model parameters for client to start next round of training
  12. bytes model = 2;
  13. // Data index for selecting data partition for training.
  14. // Optional, depends on the data loading type of client.
  15. int32 data_index = 3;
  16. // Configs for executing operation
  17. OperateConfig config = 4;
  18. }
  19. message OperateConfig {
  20. int32 batch_size = 1;
  21. int32 local_epoch = 2;
  22. int64 seed = 3;
  23. Optimizer optimizer = 4;
  24. // Whether execute test before uploading model.
  25. bool local_test = 5;
  26. // task id for current operation
  27. string task_id = 6;
  28. // round id for current operation
  29. int32 round_id = 7;
  30. // whether to track clients
  31. bool track = 8;
  32. // testing batch size
  33. int32 test_batch_size = 9;
  34. }
  35. message Optimizer {
  36. string type = 1;
  37. float lr = 2;
  38. float momentum = 3;
  39. }
  40. message OperateResponse {
  41. Status status = 1;
  42. }
  43. service ClientService {
  44. rpc Operate (OperateRequest) returns (OperateResponse) {}
  45. }