model_service.proto 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. syntax = "proto3";
  2. package com.webank.ai.fate.api.mlmodel.manager;
  3. option java_outer_classname = "ModelServiceProto";
  4. message Party{
  5. repeated string partyId = 1;
  6. }
  7. message LocalInfo{
  8. string role = 1;
  9. string partyId = 2;
  10. }
  11. message ModelInfo{
  12. string tableName = 1;
  13. string namespace = 2;
  14. }
  15. message RoleModelInfo{
  16. map<string, ModelInfo> roleModelInfo = 1;
  17. }
  18. message UnloadRequest{
  19. string tableName = 1;
  20. string namespace = 2;
  21. }
  22. message UnloadResponse{
  23. string statusCode = 1;
  24. string message = 2;
  25. }
  26. message UnbindRequest{
  27. string serviceId = 1;
  28. string tableName = 2;
  29. string namespace = 3;
  30. }
  31. message UnbindResponse{
  32. string statusCode = 1;
  33. string message = 2;
  34. }
  35. message QueryModelRequest{
  36. string serviceId = 1;
  37. string tableName = 2;
  38. string namespace = 3;
  39. int32 beginIndex = 4;
  40. int32 endIndex = 5;
  41. int32 queryType = 6;
  42. }
  43. message ModelBindInfo{
  44. }
  45. message ModelInfoEx{
  46. string tableName = 1;
  47. string namespace = 2;
  48. string serviceId = 3;
  49. string content = 4;
  50. int32 index = 5;
  51. }
  52. message QueryModelResponse{
  53. string retcode = 1;
  54. string message = 2;
  55. repeated ModelInfoEx modelInfos = 3;
  56. }
  57. message PublishRequest{
  58. LocalInfo local = 1;
  59. map<string, Party> role = 2;
  60. map<string, RoleModelInfo> model = 3;
  61. string serviceId = 4;
  62. string tableName = 5;
  63. string namespace = 6;
  64. string loadType = 7;
  65. string filePath = 8;
  66. }
  67. message PublishResponse{
  68. int32 statusCode = 1;
  69. string message = 2;
  70. string error = 3;
  71. bytes data = 4;
  72. }
  73. service ModelService{
  74. rpc publishLoad(PublishRequest) returns (PublishResponse);
  75. rpc publishBind(PublishRequest) returns (PublishResponse);
  76. rpc publishOnline(PublishRequest) returns (PublishResponse);
  77. rpc queryModel(QueryModelRequest) returns (QueryModelResponse);
  78. rpc unload(UnloadRequest) returns (UnloadResponse);
  79. rpc unbind(UnbindRequest) returns (UnbindResponse);
  80. }