flwr 1.21.0__tar.gz → 1.22.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (447) hide show
  1. {flwr-1.21.0 → flwr-1.22.0}/PKG-INFO +6 -16
  2. {flwr-1.21.0 → flwr-1.22.0}/README.md +5 -15
  3. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/cli/app.py +2 -0
  4. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/cli/new/new.py +9 -7
  5. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/cli/new/templates/app/README.flowertune.md.tpl +1 -1
  6. flwr-1.22.0/py/flwr/cli/new/templates/app/code/client.baseline.py.tpl +75 -0
  7. flwr-1.22.0/py/flwr/cli/new/templates/app/code/client.huggingface.py.tpl +93 -0
  8. flwr-1.22.0/py/flwr/cli/new/templates/app/code/client.jax.py.tpl +71 -0
  9. flwr-1.22.0/py/flwr/cli/new/templates/app/code/client.mlx.py.tpl +102 -0
  10. flwr-1.22.0/py/flwr/cli/new/templates/app/code/client.numpy.py.tpl +46 -0
  11. flwr-1.22.0/py/flwr/cli/new/templates/app/code/client.sklearn.py.tpl +108 -0
  12. flwr-1.22.0/py/flwr/cli/new/templates/app/code/client.tensorflow.py.tpl +82 -0
  13. flwr-1.22.0/py/flwr/cli/new/templates/app/code/client.xgboost.py.tpl +110 -0
  14. flwr-1.22.0/py/flwr/cli/new/templates/app/code/flwr_tune/client_app.py.tpl +92 -0
  15. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/cli/new/templates/app/code/flwr_tune/models.py.tpl +1 -23
  16. flwr-1.22.0/py/flwr/cli/new/templates/app/code/flwr_tune/server_app.py.tpl +73 -0
  17. flwr-1.22.0/py/flwr/cli/new/templates/app/code/flwr_tune/strategy.py.tpl +78 -0
  18. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/cli/new/templates/app/code/model.baseline.py.tpl +0 -14
  19. flwr-1.22.0/py/flwr/cli/new/templates/app/code/server.baseline.py.tpl +43 -0
  20. flwr-1.22.0/py/flwr/cli/new/templates/app/code/server.huggingface.py.tpl +42 -0
  21. flwr-1.22.0/py/flwr/cli/new/templates/app/code/server.jax.py.tpl +39 -0
  22. flwr-1.22.0/py/flwr/cli/new/templates/app/code/server.mlx.py.tpl +41 -0
  23. flwr-1.22.0/py/flwr/cli/new/templates/app/code/server.numpy.py.tpl +38 -0
  24. flwr-1.22.0/py/flwr/cli/new/templates/app/code/server.sklearn.py.tpl +44 -0
  25. flwr-1.22.0/py/flwr/cli/new/templates/app/code/server.tensorflow.py.tpl +38 -0
  26. flwr-1.22.0/py/flwr/cli/new/templates/app/code/server.xgboost.py.tpl +56 -0
  27. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/cli/new/templates/app/code/task.huggingface.py.tpl +16 -20
  28. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/cli/new/templates/app/code/task.jax.py.tpl +1 -1
  29. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/cli/new/templates/app/code/task.numpy.py.tpl +1 -1
  30. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/cli/new/templates/app/code/task.tensorflow.py.tpl +1 -2
  31. flwr-1.22.0/py/flwr/cli/new/templates/app/code/task.xgboost.py.tpl +67 -0
  32. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/cli/new/templates/app/pyproject.baseline.toml.tpl +4 -4
  33. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/cli/new/templates/app/pyproject.flowertune.toml.tpl +2 -2
  34. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/cli/new/templates/app/pyproject.huggingface.toml.tpl +4 -4
  35. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/cli/new/templates/app/pyproject.jax.toml.tpl +1 -1
  36. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/cli/new/templates/app/pyproject.mlx.toml.tpl +2 -2
  37. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/cli/new/templates/app/pyproject.numpy.toml.tpl +1 -1
  38. flwr-1.21.0/py/flwr/cli/new/templates/app/pyproject.pytorch_msg_api.toml.tpl → flwr-1.22.0/py/flwr/cli/new/templates/app/pyproject.pytorch.toml.tpl +1 -1
  39. flwr-1.21.0/py/flwr/cli/new/templates/app/pyproject.pytorch.toml.tpl → flwr-1.22.0/py/flwr/cli/new/templates/app/pyproject.pytorch_legacy_api.toml.tpl +1 -1
  40. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/cli/new/templates/app/pyproject.sklearn.toml.tpl +1 -1
  41. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/cli/new/templates/app/pyproject.tensorflow.toml.tpl +1 -1
  42. flwr-1.22.0/py/flwr/cli/new/templates/app/pyproject.xgboost.toml.tpl +61 -0
  43. flwr-1.22.0/py/flwr/cli/pull.py +100 -0
  44. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/cli/utils.py +17 -0
  45. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/clientapp/mod/__init__.py +4 -1
  46. flwr-1.22.0/py/flwr/clientapp/mod/centraldp_mods.py +248 -0
  47. flwr-1.22.0/py/flwr/clientapp/mod/localdp_mod.py +169 -0
  48. flwr-1.22.0/py/flwr/clientapp/typing.py +22 -0
  49. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/common/constant.py +3 -0
  50. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/common/exit/exit_code.py +4 -0
  51. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/common/record/typeddict.py +12 -0
  52. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/proto/control_pb2.py +7 -3
  53. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/proto/control_pb2.pyi +24 -0
  54. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/proto/control_pb2_grpc.py +34 -0
  55. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/proto/control_pb2_grpc.pyi +13 -0
  56. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/server/app.py +13 -0
  57. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/serverapp/strategy/__init__.py +26 -0
  58. flwr-1.22.0/py/flwr/serverapp/strategy/bulyan.py +238 -0
  59. flwr-1.22.0/py/flwr/serverapp/strategy/dp_adaptive_clipping.py +335 -0
  60. {flwr-1.21.0/py/flwr/serverapp → flwr-1.22.0/py/flwr/serverapp/strategy}/dp_fixed_clipping.py +71 -49
  61. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/serverapp/strategy/fedadagrad.py +0 -3
  62. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/serverapp/strategy/fedadam.py +0 -3
  63. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/serverapp/strategy/fedavg.py +89 -64
  64. flwr-1.22.0/py/flwr/serverapp/strategy/fedavgm.py +198 -0
  65. flwr-1.22.0/py/flwr/serverapp/strategy/fedmedian.py +105 -0
  66. flwr-1.22.0/py/flwr/serverapp/strategy/fedprox.py +174 -0
  67. flwr-1.22.0/py/flwr/serverapp/strategy/fedtrimmedavg.py +176 -0
  68. flwr-1.22.0/py/flwr/serverapp/strategy/fedxgb_bagging.py +117 -0
  69. flwr-1.22.0/py/flwr/serverapp/strategy/fedxgb_cyclic.py +220 -0
  70. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/serverapp/strategy/fedyogi.py +0 -3
  71. flwr-1.22.0/py/flwr/serverapp/strategy/krum.py +112 -0
  72. flwr-1.22.0/py/flwr/serverapp/strategy/multikrum.py +247 -0
  73. flwr-1.22.0/py/flwr/serverapp/strategy/qfedavg.py +252 -0
  74. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/serverapp/strategy/strategy_utils.py +48 -0
  75. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/simulation/app.py +1 -1
  76. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/simulation/run_simulation.py +25 -30
  77. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/supercore/cli/flower_superexec.py +26 -1
  78. flwr-1.22.0/py/flwr/supercore/constant.py +19 -0
  79. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/supercore/superexec/plugin/exec_plugin.py +11 -1
  80. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/supercore/superexec/run_superexec.py +16 -2
  81. flwr-1.22.0/py/flwr/superlink/artifact_provider/__init__.py +22 -0
  82. flwr-1.22.0/py/flwr/superlink/artifact_provider/artifact_provider.py +37 -0
  83. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/superlink/servicer/control/control_grpc.py +3 -0
  84. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/superlink/servicer/control/control_servicer.py +59 -2
  85. {flwr-1.21.0 → flwr-1.22.0}/pyproject.toml +1 -1
  86. flwr-1.21.0/py/flwr/cli/new/templates/app/code/client.baseline.py.tpl +0 -58
  87. flwr-1.21.0/py/flwr/cli/new/templates/app/code/client.huggingface.py.tpl +0 -55
  88. flwr-1.21.0/py/flwr/cli/new/templates/app/code/client.jax.py.tpl +0 -50
  89. flwr-1.21.0/py/flwr/cli/new/templates/app/code/client.mlx.py.tpl +0 -73
  90. flwr-1.21.0/py/flwr/cli/new/templates/app/code/client.numpy.py.tpl +0 -23
  91. flwr-1.21.0/py/flwr/cli/new/templates/app/code/client.sklearn.py.tpl +0 -63
  92. flwr-1.21.0/py/flwr/cli/new/templates/app/code/client.tensorflow.py.tpl +0 -57
  93. flwr-1.21.0/py/flwr/cli/new/templates/app/code/flwr_tune/client_app.py.tpl +0 -126
  94. flwr-1.21.0/py/flwr/cli/new/templates/app/code/flwr_tune/server_app.py.tpl +0 -94
  95. flwr-1.21.0/py/flwr/cli/new/templates/app/code/flwr_tune/strategy.py.tpl +0 -83
  96. flwr-1.21.0/py/flwr/cli/new/templates/app/code/server.baseline.py.tpl +0 -45
  97. flwr-1.21.0/py/flwr/cli/new/templates/app/code/server.huggingface.py.tpl +0 -38
  98. flwr-1.21.0/py/flwr/cli/new/templates/app/code/server.jax.py.tpl +0 -26
  99. flwr-1.21.0/py/flwr/cli/new/templates/app/code/server.mlx.py.tpl +0 -31
  100. flwr-1.21.0/py/flwr/cli/new/templates/app/code/server.numpy.py.tpl +0 -25
  101. flwr-1.21.0/py/flwr/cli/new/templates/app/code/server.sklearn.py.tpl +0 -36
  102. flwr-1.21.0/py/flwr/cli/new/templates/app/code/server.tensorflow.py.tpl +0 -29
  103. flwr-1.21.0/py/flwr/clientapp/mod/centraldp_mods.py +0 -132
  104. flwr-1.21.0/py/flwr/serverapp/strategy/dp_fixed_clipping.py +0 -352
  105. flwr-1.21.0/py/flwr/serverapp/strategy/strategy_utils_tests.py +0 -304
  106. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/__init__.py +0 -0
  107. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/app/__init__.py +0 -0
  108. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/app/error.py +0 -0
  109. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/app/exception.py +0 -0
  110. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/app/metadata.py +0 -0
  111. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/cli/__init__.py +0 -0
  112. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/cli/auth_plugin/__init__.py +0 -0
  113. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/cli/auth_plugin/oidc_cli_plugin.py +0 -0
  114. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/cli/build.py +0 -0
  115. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/cli/cli_user_auth_interceptor.py +0 -0
  116. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/cli/config_utils.py +0 -0
  117. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/cli/constant.py +0 -0
  118. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/cli/example.py +0 -0
  119. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/cli/install.py +0 -0
  120. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/cli/log.py +0 -0
  121. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/cli/login/__init__.py +0 -0
  122. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/cli/login/login.py +0 -0
  123. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/cli/ls.py +0 -0
  124. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/cli/new/__init__.py +0 -0
  125. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/cli/new/templates/__init__.py +0 -0
  126. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/cli/new/templates/app/.gitignore.tpl +0 -0
  127. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/cli/new/templates/app/LICENSE.tpl +0 -0
  128. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/cli/new/templates/app/README.baseline.md.tpl +0 -0
  129. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/cli/new/templates/app/README.md.tpl +0 -0
  130. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/cli/new/templates/app/__init__.py +0 -0
  131. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/cli/new/templates/app/code/__init__.baseline.py.tpl +0 -0
  132. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/cli/new/templates/app/code/__init__.py +0 -0
  133. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/cli/new/templates/app/code/__init__.py.tpl +0 -0
  134. /flwr-1.21.0/py/flwr/cli/new/templates/app/code/__init__.pytorch_msg_api.py.tpl → /flwr-1.22.0/py/flwr/cli/new/templates/app/code/__init__.pytorch_legacy_api.py.tpl +0 -0
  135. /flwr-1.21.0/py/flwr/cli/new/templates/app/code/client.pytorch_msg_api.py.tpl → /flwr-1.22.0/py/flwr/cli/new/templates/app/code/client.pytorch.py.tpl +0 -0
  136. /flwr-1.21.0/py/flwr/cli/new/templates/app/code/client.pytorch.py.tpl → /flwr-1.22.0/py/flwr/cli/new/templates/app/code/client.pytorch_legacy_api.py.tpl +0 -0
  137. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/cli/new/templates/app/code/dataset.baseline.py.tpl +0 -0
  138. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/cli/new/templates/app/code/flwr_tune/__init__.py +0 -0
  139. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/cli/new/templates/app/code/flwr_tune/dataset.py.tpl +0 -0
  140. /flwr-1.21.0/py/flwr/cli/new/templates/app/code/server.pytorch_msg_api.py.tpl → /flwr-1.22.0/py/flwr/cli/new/templates/app/code/server.pytorch.py.tpl +0 -0
  141. /flwr-1.21.0/py/flwr/cli/new/templates/app/code/server.pytorch.py.tpl → /flwr-1.22.0/py/flwr/cli/new/templates/app/code/server.pytorch_legacy_api.py.tpl +0 -0
  142. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/cli/new/templates/app/code/strategy.baseline.py.tpl +0 -0
  143. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/cli/new/templates/app/code/task.mlx.py.tpl +0 -0
  144. /flwr-1.21.0/py/flwr/cli/new/templates/app/code/task.pytorch_msg_api.py.tpl → /flwr-1.22.0/py/flwr/cli/new/templates/app/code/task.pytorch.py.tpl +0 -0
  145. /flwr-1.21.0/py/flwr/cli/new/templates/app/code/task.pytorch.py.tpl → /flwr-1.22.0/py/flwr/cli/new/templates/app/code/task.pytorch_legacy_api.py.tpl +0 -0
  146. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/cli/new/templates/app/code/task.sklearn.py.tpl +0 -0
  147. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/cli/new/templates/app/code/utils.baseline.py.tpl +0 -0
  148. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/cli/run/__init__.py +0 -0
  149. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/cli/run/run.py +0 -0
  150. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/cli/stop.py +0 -0
  151. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/client/__init__.py +0 -0
  152. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/client/client.py +0 -0
  153. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/client/client_app.py +0 -0
  154. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/client/clientapp/__init__.py +0 -0
  155. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/client/clientapp/utils.py +0 -0
  156. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/client/dpfedavg_numpy_client.py +0 -0
  157. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/client/grpc_adapter_client/__init__.py +0 -0
  158. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/client/grpc_adapter_client/connection.py +0 -0
  159. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/client/grpc_rere_client/__init__.py +0 -0
  160. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/client/grpc_rere_client/client_interceptor.py +0 -0
  161. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/client/grpc_rere_client/connection.py +0 -0
  162. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/client/grpc_rere_client/grpc_adapter.py +0 -0
  163. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/client/message_handler/__init__.py +0 -0
  164. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/client/message_handler/message_handler.py +0 -0
  165. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/client/mod/__init__.py +0 -0
  166. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/client/mod/centraldp_mods.py +0 -0
  167. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/client/mod/comms_mods.py +0 -0
  168. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/client/mod/localdp_mod.py +0 -0
  169. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/client/mod/secure_aggregation/__init__.py +0 -0
  170. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/client/mod/secure_aggregation/secagg_mod.py +0 -0
  171. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/client/mod/secure_aggregation/secaggplus_mod.py +0 -0
  172. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/client/mod/utils.py +0 -0
  173. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/client/numpy_client.py +0 -0
  174. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/client/rest_client/__init__.py +0 -0
  175. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/client/rest_client/connection.py +0 -0
  176. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/client/run_info_store.py +0 -0
  177. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/client/typing.py +0 -0
  178. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/clientapp/__init__.py +0 -0
  179. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/common/__init__.py +0 -0
  180. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/common/address.py +0 -0
  181. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/common/args.py +0 -0
  182. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/common/auth_plugin/__init__.py +0 -0
  183. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/common/auth_plugin/auth_plugin.py +0 -0
  184. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/common/config.py +0 -0
  185. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/common/context.py +0 -0
  186. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/common/date.py +0 -0
  187. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/common/differential_privacy.py +0 -0
  188. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/common/differential_privacy_constants.py +0 -0
  189. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/common/dp.py +0 -0
  190. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/common/event_log_plugin/__init__.py +0 -0
  191. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/common/event_log_plugin/event_log_plugin.py +0 -0
  192. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/common/exit/__init__.py +0 -0
  193. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/common/exit/exit.py +0 -0
  194. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/common/exit/exit_handler.py +0 -0
  195. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/common/exit/signal_handler.py +0 -0
  196. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/common/grpc.py +0 -0
  197. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/common/heartbeat.py +0 -0
  198. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/common/inflatable.py +0 -0
  199. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/common/inflatable_protobuf_utils.py +0 -0
  200. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/common/inflatable_utils.py +0 -0
  201. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/common/logger.py +0 -0
  202. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/common/message.py +0 -0
  203. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/common/object_ref.py +0 -0
  204. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/common/parameter.py +0 -0
  205. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/common/pyproject.py +0 -0
  206. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/common/record/__init__.py +0 -0
  207. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/common/record/array.py +0 -0
  208. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/common/record/arraychunk.py +0 -0
  209. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/common/record/arrayrecord.py +0 -0
  210. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/common/record/configrecord.py +0 -0
  211. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/common/record/conversion_utils.py +0 -0
  212. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/common/record/metricrecord.py +0 -0
  213. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/common/record/recorddict.py +0 -0
  214. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/common/recorddict_compat.py +0 -0
  215. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/common/retry_invoker.py +0 -0
  216. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/common/secure_aggregation/__init__.py +0 -0
  217. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/common/secure_aggregation/crypto/__init__.py +0 -0
  218. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/common/secure_aggregation/crypto/shamir.py +0 -0
  219. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/common/secure_aggregation/crypto/symmetric_encryption.py +0 -0
  220. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/common/secure_aggregation/ndarrays_arithmetic.py +0 -0
  221. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/common/secure_aggregation/quantization.py +0 -0
  222. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/common/secure_aggregation/secaggplus_constants.py +0 -0
  223. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/common/secure_aggregation/secaggplus_utils.py +0 -0
  224. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/common/serde.py +0 -0
  225. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/common/serde_utils.py +0 -0
  226. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/common/telemetry.py +0 -0
  227. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/common/typing.py +0 -0
  228. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/common/version.py +0 -0
  229. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/compat/__init__.py +0 -0
  230. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/compat/client/__init__.py +0 -0
  231. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/compat/client/app.py +0 -0
  232. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/compat/client/grpc_client/__init__.py +0 -0
  233. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/compat/client/grpc_client/connection.py +0 -0
  234. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/compat/common/__init__.py +0 -0
  235. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/compat/server/__init__.py +0 -0
  236. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/compat/server/app.py +0 -0
  237. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/compat/simulation/__init__.py +0 -0
  238. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/proto/__init__.py +0 -0
  239. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/proto/appio_pb2.py +0 -0
  240. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/proto/appio_pb2.pyi +0 -0
  241. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/proto/appio_pb2_grpc.py +0 -0
  242. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/proto/appio_pb2_grpc.pyi +0 -0
  243. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/proto/clientappio_pb2.py +0 -0
  244. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/proto/clientappio_pb2.pyi +0 -0
  245. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/proto/clientappio_pb2_grpc.py +0 -0
  246. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/proto/clientappio_pb2_grpc.pyi +0 -0
  247. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/proto/error_pb2.py +0 -0
  248. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/proto/error_pb2.pyi +0 -0
  249. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/proto/error_pb2_grpc.py +0 -0
  250. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/proto/error_pb2_grpc.pyi +0 -0
  251. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/proto/fab_pb2.py +0 -0
  252. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/proto/fab_pb2.pyi +0 -0
  253. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/proto/fab_pb2_grpc.py +0 -0
  254. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/proto/fab_pb2_grpc.pyi +0 -0
  255. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/proto/fleet_pb2.py +0 -0
  256. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/proto/fleet_pb2.pyi +0 -0
  257. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/proto/fleet_pb2_grpc.py +0 -0
  258. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/proto/fleet_pb2_grpc.pyi +0 -0
  259. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/proto/grpcadapter_pb2.py +0 -0
  260. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/proto/grpcadapter_pb2.pyi +0 -0
  261. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/proto/grpcadapter_pb2_grpc.py +0 -0
  262. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/proto/grpcadapter_pb2_grpc.pyi +0 -0
  263. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/proto/heartbeat_pb2.py +0 -0
  264. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/proto/heartbeat_pb2.pyi +0 -0
  265. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/proto/heartbeat_pb2_grpc.py +0 -0
  266. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/proto/heartbeat_pb2_grpc.pyi +0 -0
  267. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/proto/log_pb2.py +0 -0
  268. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/proto/log_pb2.pyi +0 -0
  269. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/proto/log_pb2_grpc.py +0 -0
  270. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/proto/log_pb2_grpc.pyi +0 -0
  271. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/proto/message_pb2.py +0 -0
  272. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/proto/message_pb2.pyi +0 -0
  273. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/proto/message_pb2_grpc.py +0 -0
  274. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/proto/message_pb2_grpc.pyi +0 -0
  275. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/proto/node_pb2.py +0 -0
  276. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/proto/node_pb2.pyi +0 -0
  277. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/proto/node_pb2_grpc.py +0 -0
  278. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/proto/node_pb2_grpc.pyi +0 -0
  279. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/proto/recorddict_pb2.py +0 -0
  280. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/proto/recorddict_pb2.pyi +0 -0
  281. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/proto/recorddict_pb2_grpc.py +0 -0
  282. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/proto/recorddict_pb2_grpc.pyi +0 -0
  283. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/proto/run_pb2.py +0 -0
  284. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/proto/run_pb2.pyi +0 -0
  285. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/proto/run_pb2_grpc.py +0 -0
  286. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/proto/run_pb2_grpc.pyi +0 -0
  287. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/proto/serverappio_pb2.py +0 -0
  288. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/proto/serverappio_pb2.pyi +0 -0
  289. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/proto/serverappio_pb2_grpc.py +0 -0
  290. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/proto/serverappio_pb2_grpc.pyi +0 -0
  291. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/proto/simulationio_pb2.py +0 -0
  292. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/proto/simulationio_pb2.pyi +0 -0
  293. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/proto/simulationio_pb2_grpc.py +0 -0
  294. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/proto/simulationio_pb2_grpc.pyi +0 -0
  295. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/proto/transport_pb2.py +0 -0
  296. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/proto/transport_pb2.pyi +0 -0
  297. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/proto/transport_pb2_grpc.py +0 -0
  298. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/proto/transport_pb2_grpc.pyi +0 -0
  299. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/py.typed +0 -0
  300. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/server/__init__.py +0 -0
  301. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/server/client_manager.py +0 -0
  302. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/server/client_proxy.py +0 -0
  303. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/server/compat/__init__.py +0 -0
  304. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/server/compat/app.py +0 -0
  305. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/server/compat/app_utils.py +0 -0
  306. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/server/compat/grid_client_proxy.py +0 -0
  307. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/server/compat/legacy_context.py +0 -0
  308. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/server/criterion.py +0 -0
  309. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/server/fleet_event_log_interceptor.py +0 -0
  310. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/server/grid/__init__.py +0 -0
  311. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/server/grid/grid.py +0 -0
  312. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/server/grid/grpc_grid.py +0 -0
  313. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/server/grid/inmemory_grid.py +0 -0
  314. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/server/history.py +0 -0
  315. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/server/run_serverapp.py +0 -0
  316. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/server/server.py +0 -0
  317. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/server/server_app.py +0 -0
  318. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/server/server_config.py +0 -0
  319. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/server/serverapp/__init__.py +0 -0
  320. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/server/serverapp/app.py +0 -0
  321. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/server/serverapp_components.py +0 -0
  322. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/server/strategy/__init__.py +0 -0
  323. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/server/strategy/aggregate.py +0 -0
  324. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/server/strategy/bulyan.py +0 -0
  325. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/server/strategy/dp_adaptive_clipping.py +0 -0
  326. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/server/strategy/dp_fixed_clipping.py +0 -0
  327. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/server/strategy/dpfedavg_adaptive.py +0 -0
  328. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/server/strategy/dpfedavg_fixed.py +0 -0
  329. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/server/strategy/fault_tolerant_fedavg.py +0 -0
  330. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/server/strategy/fedadagrad.py +0 -0
  331. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/server/strategy/fedadam.py +0 -0
  332. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/server/strategy/fedavg.py +0 -0
  333. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/server/strategy/fedavg_android.py +0 -0
  334. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/server/strategy/fedavgm.py +0 -0
  335. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/server/strategy/fedmedian.py +0 -0
  336. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/server/strategy/fedopt.py +0 -0
  337. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/server/strategy/fedprox.py +0 -0
  338. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/server/strategy/fedtrimmedavg.py +0 -0
  339. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/server/strategy/fedxgb_bagging.py +0 -0
  340. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/server/strategy/fedxgb_cyclic.py +0 -0
  341. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/server/strategy/fedxgb_nn_avg.py +0 -0
  342. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/server/strategy/fedyogi.py +0 -0
  343. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/server/strategy/krum.py +0 -0
  344. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/server/strategy/qfedavg.py +0 -0
  345. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/server/strategy/strategy.py +0 -0
  346. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/server/superlink/__init__.py +0 -0
  347. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/server/superlink/fleet/__init__.py +0 -0
  348. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/server/superlink/fleet/grpc_adapter/__init__.py +0 -0
  349. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/server/superlink/fleet/grpc_adapter/grpc_adapter_servicer.py +0 -0
  350. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/server/superlink/fleet/grpc_bidi/__init__.py +0 -0
  351. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/server/superlink/fleet/grpc_bidi/flower_service_servicer.py +0 -0
  352. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/server/superlink/fleet/grpc_bidi/grpc_bridge.py +0 -0
  353. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/server/superlink/fleet/grpc_bidi/grpc_client_proxy.py +0 -0
  354. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/server/superlink/fleet/grpc_bidi/grpc_server.py +0 -0
  355. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/server/superlink/fleet/grpc_rere/__init__.py +0 -0
  356. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/server/superlink/fleet/grpc_rere/fleet_servicer.py +0 -0
  357. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/server/superlink/fleet/grpc_rere/server_interceptor.py +0 -0
  358. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/server/superlink/fleet/message_handler/__init__.py +0 -0
  359. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/server/superlink/fleet/message_handler/message_handler.py +0 -0
  360. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/server/superlink/fleet/rest_rere/__init__.py +0 -0
  361. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/server/superlink/fleet/rest_rere/rest_api.py +0 -0
  362. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/server/superlink/fleet/vce/__init__.py +0 -0
  363. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/server/superlink/fleet/vce/backend/__init__.py +0 -0
  364. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/server/superlink/fleet/vce/backend/backend.py +0 -0
  365. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/server/superlink/fleet/vce/backend/raybackend.py +0 -0
  366. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/server/superlink/fleet/vce/vce_api.py +0 -0
  367. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/server/superlink/linkstate/__init__.py +0 -0
  368. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/server/superlink/linkstate/in_memory_linkstate.py +0 -0
  369. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/server/superlink/linkstate/linkstate.py +0 -0
  370. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/server/superlink/linkstate/linkstate_factory.py +0 -0
  371. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/server/superlink/linkstate/sqlite_linkstate.py +0 -0
  372. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/server/superlink/linkstate/utils.py +0 -0
  373. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/server/superlink/serverappio/__init__.py +0 -0
  374. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/server/superlink/serverappio/serverappio_grpc.py +0 -0
  375. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/server/superlink/serverappio/serverappio_servicer.py +0 -0
  376. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/server/superlink/simulation/__init__.py +0 -0
  377. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/server/superlink/simulation/simulationio_grpc.py +0 -0
  378. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/server/superlink/simulation/simulationio_servicer.py +0 -0
  379. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/server/superlink/utils.py +0 -0
  380. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/server/typing.py +0 -0
  381. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/server/utils/__init__.py +0 -0
  382. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/server/utils/tensorboard.py +0 -0
  383. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/server/utils/validator.py +0 -0
  384. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/server/workflow/__init__.py +0 -0
  385. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/server/workflow/constant.py +0 -0
  386. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/server/workflow/default_workflows.py +0 -0
  387. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/server/workflow/secure_aggregation/__init__.py +0 -0
  388. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/server/workflow/secure_aggregation/secagg_workflow.py +0 -0
  389. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/server/workflow/secure_aggregation/secaggplus_workflow.py +0 -0
  390. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/serverapp/__init__.py +0 -0
  391. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/serverapp/exception.py +0 -0
  392. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/serverapp/strategy/fedopt.py +0 -0
  393. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/serverapp/strategy/result.py +0 -0
  394. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/serverapp/strategy/strategy.py +0 -0
  395. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/simulation/__init__.py +0 -0
  396. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/simulation/legacy_app.py +0 -0
  397. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/simulation/ray_transport/__init__.py +0 -0
  398. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/simulation/ray_transport/ray_actor.py +0 -0
  399. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/simulation/ray_transport/ray_client_proxy.py +0 -0
  400. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/simulation/ray_transport/utils.py +0 -0
  401. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/simulation/simulationio_connection.py +0 -0
  402. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/supercore/__init__.py +0 -0
  403. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/supercore/app_utils.py +0 -0
  404. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/supercore/cli/__init__.py +0 -0
  405. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/supercore/corestate/__init__.py +0 -0
  406. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/supercore/corestate/corestate.py +0 -0
  407. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/supercore/ffs/__init__.py +0 -0
  408. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/supercore/ffs/disk_ffs.py +0 -0
  409. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/supercore/ffs/ffs.py +0 -0
  410. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/supercore/ffs/ffs_factory.py +0 -0
  411. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/supercore/grpc_health/__init__.py +0 -0
  412. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/supercore/grpc_health/health_server.py +0 -0
  413. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/supercore/grpc_health/simple_health_servicer.py +0 -0
  414. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/supercore/license_plugin/__init__.py +0 -0
  415. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/supercore/license_plugin/license_plugin.py +0 -0
  416. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/supercore/object_store/__init__.py +0 -0
  417. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/supercore/object_store/in_memory_object_store.py +0 -0
  418. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/supercore/object_store/object_store.py +0 -0
  419. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/supercore/object_store/object_store_factory.py +0 -0
  420. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/supercore/object_store/utils.py +0 -0
  421. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/supercore/superexec/__init__.py +0 -0
  422. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/supercore/superexec/plugin/__init__.py +0 -0
  423. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/supercore/superexec/plugin/base_exec_plugin.py +0 -0
  424. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/supercore/superexec/plugin/clientapp_exec_plugin.py +0 -0
  425. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/supercore/superexec/plugin/serverapp_exec_plugin.py +0 -0
  426. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/supercore/superexec/plugin/simulation_exec_plugin.py +0 -0
  427. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/supercore/utils.py +0 -0
  428. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/superlink/__init__.py +0 -0
  429. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/superlink/servicer/__init__.py +0 -0
  430. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/superlink/servicer/control/__init__.py +0 -0
  431. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/superlink/servicer/control/control_event_log_interceptor.py +0 -0
  432. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/superlink/servicer/control/control_license_interceptor.py +0 -0
  433. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/superlink/servicer/control/control_user_auth_interceptor.py +0 -0
  434. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/supernode/__init__.py +0 -0
  435. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/supernode/cli/__init__.py +0 -0
  436. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/supernode/cli/flower_supernode.py +0 -0
  437. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/supernode/cli/flwr_clientapp.py +0 -0
  438. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/supernode/nodestate/__init__.py +0 -0
  439. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/supernode/nodestate/in_memory_nodestate.py +0 -0
  440. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/supernode/nodestate/nodestate.py +0 -0
  441. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/supernode/nodestate/nodestate_factory.py +0 -0
  442. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/supernode/runtime/__init__.py +0 -0
  443. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/supernode/runtime/run_clientapp.py +0 -0
  444. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/supernode/servicer/__init__.py +0 -0
  445. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/supernode/servicer/clientappio/__init__.py +0 -0
  446. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/supernode/servicer/clientappio/clientappio_servicer.py +0 -0
  447. {flwr-1.21.0 → flwr-1.22.0}/py/flwr/supernode/start_client_internal.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: flwr
3
- Version: 1.21.0
3
+ Version: 1.22.0
4
4
  Summary: Flower: A Friendly Federated AI Framework
5
5
  License: Apache-2.0
6
6
  Keywords: Artificial Intelligence,Federated AI,Federated Analytics,Federated Evaluation,Federated Learning,Flower,Machine Learning
@@ -102,25 +102,15 @@ Meet the Flower community on [flower.ai](https://flower.ai)!
102
102
 
103
103
  Flower's goal is to make federated learning accessible to everyone. This series of tutorials introduces the fundamentals of federated learning and how to implement them in Flower.
104
104
 
105
- 0. **What is Federated Learning?**
105
+ 0. **[What is Federated Learning?](https://flower.ai/docs/framework/main/en/tutorial-series-what-is-federated-learning.html)**
106
106
 
107
- [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/adap/flower/blob/main/framework/docs/source/tutorial-series-what-is-federated-learning.ipynb) (or open the [Jupyter Notebook](https://github.com/adap/flower/blob/main/framework/docs/source/tutorial-series-what-is-federated-learning.ipynb))
107
+ 1. **[An Introduction to Federated Learning](https://flower.ai/docs/framework/main/en/tutorial-series-get-started-with-flower-pytorch.html)**
108
108
 
109
- 1. **An Introduction to Federated Learning**
109
+ 2. **[Using Strategies in Federated Learning](https://flower.ai/docs/framework/main/en/tutorial-series-use-a-federated-learning-strategy-pytorch.html)**
110
110
 
111
- [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/adap/flower/blob/main/framework/docs/source/tutorial-series-get-started-with-flower-pytorch.ipynb) (or open the [Jupyter Notebook](https://github.com/adap/flower/blob/main/framework/docs/source/tutorial-series-get-started-with-flower-pytorch.ipynb))
111
+ 3. **[Customize a Flower Strategy](https://flower.ai/docs/framework/main/en/tutorial-series-build-a-strategy-from-scratch-pytorch.html)**
112
112
 
113
- 2. **Using Strategies in Federated Learning**
114
-
115
- [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/adap/flower/blob/main/framework/docs/source/tutorial-series-use-a-federated-learning-strategy-pytorch.ipynb) (or open the [Jupyter Notebook](https://github.com/adap/flower/blob/main/framework/docs/source/tutorial-series-use-a-federated-learning-strategy-pytorch.ipynb))
116
-
117
- 3. **Building Strategies for Federated Learning**
118
-
119
- [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/adap/flower/blob/main/framework/docs/source/tutorial-series-build-a-strategy-from-scratch-pytorch.ipynb) (or open the [Jupyter Notebook](https://github.com/adap/flower/blob/main/framework/docs/source/tutorial-series-build-a-strategy-from-scratch-pytorch.ipynb))
120
-
121
- 4. **Custom Clients for Federated Learning**
122
-
123
- [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/adap/flower/blob/main/framework/docs/source/tutorial-series-customize-the-client-pytorch.ipynb) (or open the [Jupyter Notebook](https://github.com/adap/flower/blob/main/framework/docs/source/tutorial-series-customize-the-client-pytorch.ipynb))
113
+ 4. **[Communicate Custom Messages](https://flower.ai/docs/framework/main/en/tutorial-series-customize-the-client-pytorch.html)**
124
114
 
125
115
  Stay tuned, more tutorials are coming soon. Topics include **Privacy and Security in Federated Learning**, and **Scaling Federated Learning**.
126
116
 
@@ -46,25 +46,15 @@ Meet the Flower community on [flower.ai](https://flower.ai)!
46
46
 
47
47
  Flower's goal is to make federated learning accessible to everyone. This series of tutorials introduces the fundamentals of federated learning and how to implement them in Flower.
48
48
 
49
- 0. **What is Federated Learning?**
49
+ 0. **[What is Federated Learning?](https://flower.ai/docs/framework/main/en/tutorial-series-what-is-federated-learning.html)**
50
50
 
51
- [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/adap/flower/blob/main/framework/docs/source/tutorial-series-what-is-federated-learning.ipynb) (or open the [Jupyter Notebook](https://github.com/adap/flower/blob/main/framework/docs/source/tutorial-series-what-is-federated-learning.ipynb))
51
+ 1. **[An Introduction to Federated Learning](https://flower.ai/docs/framework/main/en/tutorial-series-get-started-with-flower-pytorch.html)**
52
52
 
53
- 1. **An Introduction to Federated Learning**
53
+ 2. **[Using Strategies in Federated Learning](https://flower.ai/docs/framework/main/en/tutorial-series-use-a-federated-learning-strategy-pytorch.html)**
54
54
 
55
- [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/adap/flower/blob/main/framework/docs/source/tutorial-series-get-started-with-flower-pytorch.ipynb) (or open the [Jupyter Notebook](https://github.com/adap/flower/blob/main/framework/docs/source/tutorial-series-get-started-with-flower-pytorch.ipynb))
55
+ 3. **[Customize a Flower Strategy](https://flower.ai/docs/framework/main/en/tutorial-series-build-a-strategy-from-scratch-pytorch.html)**
56
56
 
57
- 2. **Using Strategies in Federated Learning**
58
-
59
- [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/adap/flower/blob/main/framework/docs/source/tutorial-series-use-a-federated-learning-strategy-pytorch.ipynb) (or open the [Jupyter Notebook](https://github.com/adap/flower/blob/main/framework/docs/source/tutorial-series-use-a-federated-learning-strategy-pytorch.ipynb))
60
-
61
- 3. **Building Strategies for Federated Learning**
62
-
63
- [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/adap/flower/blob/main/framework/docs/source/tutorial-series-build-a-strategy-from-scratch-pytorch.ipynb) (or open the [Jupyter Notebook](https://github.com/adap/flower/blob/main/framework/docs/source/tutorial-series-build-a-strategy-from-scratch-pytorch.ipynb))
64
-
65
- 4. **Custom Clients for Federated Learning**
66
-
67
- [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/adap/flower/blob/main/framework/docs/source/tutorial-series-customize-the-client-pytorch.ipynb) (or open the [Jupyter Notebook](https://github.com/adap/flower/blob/main/framework/docs/source/tutorial-series-customize-the-client-pytorch.ipynb))
57
+ 4. **[Communicate Custom Messages](https://flower.ai/docs/framework/main/en/tutorial-series-customize-the-client-pytorch.html)**
68
58
 
69
59
  Stay tuned, more tutorials are coming soon. Topics include **Privacy and Security in Federated Learning**, and **Scaling Federated Learning**.
70
60
 
@@ -25,6 +25,7 @@ from .log import log
25
25
  from .login import login
26
26
  from .ls import ls
27
27
  from .new import new
28
+ from .pull import pull
28
29
  from .run import run
29
30
  from .stop import stop
30
31
 
@@ -46,6 +47,7 @@ app.command()(log)
46
47
  app.command()(ls)
47
48
  app.command()(stop)
48
49
  app.command()(login)
50
+ app.command()(pull)
49
51
 
50
52
  typer_click_object = get_command(app)
51
53
 
@@ -35,15 +35,16 @@ class MlFramework(str, Enum):
35
35
  """Available frameworks."""
36
36
 
37
37
  PYTORCH = "PyTorch"
38
- PYTORCH_MSG_API = "PyTorch (Message API)"
39
38
  TENSORFLOW = "TensorFlow"
40
39
  SKLEARN = "sklearn"
41
40
  HUGGINGFACE = "HuggingFace"
42
41
  JAX = "JAX"
43
42
  MLX = "MLX"
44
43
  NUMPY = "NumPy"
44
+ XGBOOST = "XGBoost"
45
45
  FLOWERTUNE = "FlowerTune"
46
46
  BASELINE = "Flower Baseline"
47
+ PYTORCH_LEGACY_API = "PyTorch (Legacy API, deprecated)"
47
48
 
48
49
 
49
50
  class LlmChallengeName(str, Enum):
@@ -155,8 +156,8 @@ def new(
155
156
  if framework_str == MlFramework.BASELINE:
156
157
  framework_str = "baseline"
157
158
 
158
- if framework_str == MlFramework.PYTORCH_MSG_API:
159
- framework_str = "pytorch_msg_api"
159
+ if framework_str == MlFramework.PYTORCH_LEGACY_API:
160
+ framework_str = "pytorch_legacy_api"
160
161
 
161
162
  print(
162
163
  typer.style(
@@ -201,7 +202,7 @@ def new(
201
202
  }
202
203
 
203
204
  # Challenge specific context
204
- fraction_fit = "0.2" if llm_challenge_str == "code" else "0.1"
205
+ fraction_train = "0.2" if llm_challenge_str == "code" else "0.1"
205
206
  if llm_challenge_str == "generalnlp":
206
207
  challenge_name = "General NLP"
207
208
  num_clients = "20"
@@ -220,7 +221,7 @@ def new(
220
221
  dataset_name = "flwrlabs/code-alpaca-20k"
221
222
 
222
223
  context["llm_challenge_str"] = llm_challenge_str
223
- context["fraction_fit"] = fraction_fit
224
+ context["fraction_train"] = fraction_train
224
225
  context["challenge_name"] = challenge_name
225
226
  context["num_clients"] = num_clients
226
227
  context["dataset_name"] = dataset_name
@@ -247,14 +248,15 @@ def new(
247
248
  MlFramework.TENSORFLOW.value,
248
249
  MlFramework.SKLEARN.value,
249
250
  MlFramework.NUMPY.value,
250
- "pytorch_msg_api",
251
+ MlFramework.XGBOOST.value,
252
+ "pytorch_legacy_api",
251
253
  ]
252
254
  if framework_str in frameworks_with_tasks:
253
255
  files[f"{import_name}/task.py"] = {
254
256
  "template": f"app/code/task.{template_name}.py.tpl"
255
257
  }
256
258
 
257
- if framework_str == "pytorch_msg_api":
259
+ if framework_str == "pytorch_legacy_api":
258
260
  # Use custom __init__ that better captures name of framework
259
261
  files[f"{import_name}/__init__.py"] = {
260
262
  "template": f"app/code/__init__.{framework_str}.py.tpl"
@@ -26,7 +26,7 @@ pip install -e .
26
26
  ## Experimental setup
27
27
 
28
28
  The dataset is divided into $num_clients partitions in an IID fashion, a partition is assigned to each ClientApp.
29
- We randomly sample a fraction ($fraction_fit) of the total nodes to participate in each round, for a total of `200` rounds.
29
+ We randomly sample a fraction ($fraction_train) of the total nodes to participate in each round, for a total of `200` rounds.
30
30
  All settings are defined in `pyproject.toml`.
31
31
 
32
32
  > [!IMPORTANT]
@@ -0,0 +1,75 @@
1
+ """$project_name: A Flower Baseline."""
2
+
3
+ import torch
4
+ from flwr.app import ArrayRecord, Context, Message, MetricRecord, RecordDict
5
+ from flwr.clientapp import ClientApp
6
+
7
+ from $import_name.dataset import load_data
8
+ from $import_name.model import Net
9
+ from $import_name.model import test as test_fn
10
+ from $import_name.model import train as train_fn
11
+
12
+ # Flower ClientApp
13
+ app = ClientApp()
14
+
15
+
16
+ @app.train()
17
+ def train(msg: Message, context: Context):
18
+ """Train the model on local data."""
19
+
20
+ # Load the model and initialize it with the received weights
21
+ model = Net()
22
+ model.load_state_dict(msg.content["arrays"].to_torch_state_dict())
23
+ device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
24
+
25
+ # Load the data
26
+ partition_id = int(context.node_config["partition-id"])
27
+ num_partitions = int(context.node_config["num-partitions"])
28
+ trainloader, _ = load_data(partition_id, num_partitions)
29
+ local_epochs = context.run_config["local-epochs"]
30
+
31
+ # Call the training function
32
+ train_loss = train_fn(
33
+ model,
34
+ trainloader,
35
+ local_epochs,
36
+ device,
37
+ )
38
+
39
+ # Construct and return reply Message
40
+ model_record = ArrayRecord(model.state_dict())
41
+ metrics = {
42
+ "train_loss": train_loss,
43
+ "num-examples": len(trainloader.dataset),
44
+ }
45
+ metric_record = MetricRecord(metrics)
46
+ content = RecordDict({"arrays": model_record, "metrics": metric_record})
47
+ return Message(content=content, reply_to=msg)
48
+
49
+
50
+ @app.evaluate()
51
+ def evaluate(msg: Message, context: Context):
52
+ """Evaluate the model on local data."""
53
+
54
+ # Load the model and initialize it with the received weights
55
+ model = Net()
56
+ model.load_state_dict(msg.content["arrays"].to_torch_state_dict())
57
+ device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
58
+
59
+ # Load the data
60
+ partition_id = int(context.node_config["partition-id"])
61
+ num_partitions = int(context.node_config["num-partitions"])
62
+ _, valloader = load_data(partition_id, num_partitions)
63
+
64
+ # Call the evaluation function
65
+ eval_loss, eval_acc = test_fn(model, valloader, device)
66
+
67
+ # Construct and return reply Message
68
+ metrics = {
69
+ "eval_loss": eval_loss,
70
+ "eval_acc": eval_acc,
71
+ "num-examples": len(valloader.dataset),
72
+ }
73
+ metric_record = MetricRecord(metrics)
74
+ content = RecordDict({"metrics": metric_record})
75
+ return Message(content=content, reply_to=msg)
@@ -0,0 +1,93 @@
1
+ """$project_name: A Flower / $framework_str app."""
2
+
3
+ import torch
4
+ from flwr.app import ArrayRecord, Context, Message, MetricRecord, RecordDict
5
+ from flwr.clientapp import ClientApp
6
+ from transformers import AutoModelForSequenceClassification
7
+
8
+ from $import_name.task import load_data
9
+ from $import_name.task import test as test_fn
10
+ from $import_name.task import train as train_fn
11
+
12
+ # Flower ClientApp
13
+ app = ClientApp()
14
+
15
+
16
+ @app.train()
17
+ def train(msg: Message, context: Context):
18
+ """Train the model on local data."""
19
+
20
+ # Get this client's dataset partition
21
+ partition_id = context.node_config["partition-id"]
22
+ num_partitions = context.node_config["num-partitions"]
23
+ model_name = context.run_config["model-name"]
24
+ trainloader, _ = load_data(partition_id, num_partitions, model_name)
25
+
26
+ # Load model
27
+ num_labels = context.run_config["num-labels"]
28
+ net = AutoModelForSequenceClassification.from_pretrained(
29
+ model_name, num_labels=num_labels
30
+ )
31
+
32
+ # Initialize it with the received weights
33
+ net.load_state_dict(msg.content["arrays"].to_torch_state_dict())
34
+ device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
35
+ net.to(device)
36
+
37
+ # Train the model on local data
38
+ train_loss = train_fn(
39
+ net,
40
+ trainloader,
41
+ context.run_config["local-steps"],
42
+ device,
43
+ )
44
+
45
+ # Construct and return reply Message
46
+ model_record = ArrayRecord(net.state_dict())
47
+ metrics = {
48
+ "train_loss": train_loss,
49
+ "num-examples": len(trainloader.dataset),
50
+ }
51
+ metric_record = MetricRecord(metrics)
52
+ content = RecordDict({"arrays": model_record, "metrics": metric_record})
53
+ return Message(content=content, reply_to=msg)
54
+
55
+
56
+ @app.evaluate()
57
+ def evaluate(msg: Message, context: Context):
58
+ """Evaluate the model on local data."""
59
+
60
+ # Get this client's dataset partition
61
+ partition_id = context.node_config["partition-id"]
62
+ num_partitions = context.node_config["num-partitions"]
63
+ model_name = context.run_config["model-name"]
64
+ _, valloader = load_data(partition_id, num_partitions, model_name)
65
+
66
+ # Load model
67
+ num_labels = context.run_config["num-labels"]
68
+ net = AutoModelForSequenceClassification.from_pretrained(
69
+ model_name, num_labels=num_labels
70
+ )
71
+
72
+ # Initialize it with the received weights
73
+ net.load_state_dict(msg.content["arrays"].to_torch_state_dict())
74
+ device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
75
+ net.to(device)
76
+
77
+ # Evaluate the model on local data
78
+ val_loss, val_accuracy = test_fn(
79
+ net,
80
+ valloader,
81
+ device,
82
+ )
83
+
84
+ # Construct and return reply Message
85
+ model_record = ArrayRecord(net.state_dict())
86
+ metrics = {
87
+ "val_loss": val_loss,
88
+ "val_accuracy": val_accuracy,
89
+ "num-examples": len(valloader.dataset),
90
+ }
91
+ metric_record = MetricRecord(metrics)
92
+ content = RecordDict({"arrays": model_record, "metrics": metric_record})
93
+ return Message(content=content, reply_to=msg)
@@ -0,0 +1,71 @@
1
+ """$project_name: A Flower / $framework_str app."""
2
+
3
+ import jax
4
+ from flwr.app import ArrayRecord, Context, Message, MetricRecord, RecordDict
5
+ from flwr.clientapp import ClientApp
6
+
7
+ from $import_name.task import evaluation as evaluation_fn
8
+ from $import_name.task import get_params, load_data, load_model, loss_fn, set_params
9
+ from $import_name.task import train as train_fn
10
+
11
+ # Flower ClientApp
12
+ app = ClientApp()
13
+
14
+
15
+ @app.train()
16
+ def train(msg: Message, context: Context):
17
+ """Train the model on local data."""
18
+
19
+ # Read from config
20
+ input_dim = context.run_config["input-dim"]
21
+
22
+ # Load data and model
23
+ train_x, train_y, _, _ = load_data()
24
+ model = load_model((input_dim,))
25
+ grad_fn = jax.grad(loss_fn)
26
+
27
+ # Set model parameters
28
+ ndarrays = msg.content["arrays"].to_numpy_ndarrays()
29
+ set_params(model, ndarrays)
30
+
31
+ # Train the model on local data
32
+ model, loss, num_examples = train_fn(model, grad_fn, train_x, train_y)
33
+
34
+ # Construct and return reply Message
35
+ model_record = ArrayRecord(get_params(model))
36
+ metrics = {
37
+ "train_loss": float(loss),
38
+ "num-examples": num_examples,
39
+ }
40
+ metric_record = MetricRecord(metrics)
41
+ content = RecordDict({"arrays": model_record, "metrics": metric_record})
42
+ return Message(content=content, reply_to=msg)
43
+
44
+
45
+ @app.evaluate()
46
+ def evaluate(msg: Message, context: Context):
47
+ """Evaluate the model on local data."""
48
+
49
+ # Read from config
50
+ input_dim = context.run_config["input-dim"]
51
+
52
+ # Load data and model
53
+ _, _, test_x, test_y = load_data()
54
+ model = load_model((input_dim,))
55
+ grad_fn = jax.grad(loss_fn)
56
+
57
+ # Set model parameters
58
+ ndarrays = msg.content["arrays"].to_numpy_ndarrays()
59
+ set_params(model, ndarrays)
60
+
61
+ # Evaluate the model on local data
62
+ loss, num_examples = evaluation_fn(model, grad_fn, test_x, test_y)
63
+
64
+ # Construct and return reply Message
65
+ metrics = {
66
+ "test_loss": float(loss),
67
+ "num-examples": num_examples,
68
+ }
69
+ metric_record = MetricRecord(metrics)
70
+ content = RecordDict({"metrics": metric_record})
71
+ return Message(content=content, reply_to=msg)
@@ -0,0 +1,102 @@
1
+ """$project_name: A Flower / $framework_str app."""
2
+
3
+ import mlx.core as mx
4
+ import mlx.nn as nn
5
+ import mlx.optimizers as optim
6
+ from flwr.app import ArrayRecord, Context, Message, MetricRecord, RecordDict
7
+ from flwr.clientapp import ClientApp
8
+
9
+ from $import_name.task import (
10
+ MLP,
11
+ batch_iterate,
12
+ eval_fn,
13
+ get_params,
14
+ load_data,
15
+ loss_fn,
16
+ set_params,
17
+ )
18
+
19
+ # Flower ClientApp
20
+ app = ClientApp()
21
+
22
+
23
+ @app.train()
24
+ def train(msg: Message, context: Context):
25
+ """Train the model on local data."""
26
+
27
+ # Read config
28
+ num_layers = context.run_config["num-layers"]
29
+ input_dim = context.run_config["input-dim"]
30
+ hidden_dim = context.run_config["hidden-dim"]
31
+ batch_size = context.run_config["batch-size"]
32
+ learning_rate = context.run_config["lr"]
33
+ num_epochs = context.run_config["local-epochs"]
34
+
35
+ # Instantiate model and apply global parameters
36
+ model = MLP(num_layers, input_dim, hidden_dim, output_dim=10)
37
+ ndarrays = msg.content["arrays"].to_numpy_ndarrays()
38
+ set_params(model, ndarrays)
39
+
40
+ # Define optimizer and loss function
41
+ optimizer = optim.SGD(learning_rate=learning_rate)
42
+ loss_and_grad_fn = nn.value_and_grad(model, loss_fn)
43
+
44
+ # Load data
45
+ partition_id = context.node_config["partition-id"]
46
+ num_partitions = context.node_config["num-partitions"]
47
+ train_images, train_labels, _, _ = load_data(partition_id, num_partitions)
48
+
49
+ # Train the model on local data
50
+ for _ in range(num_epochs):
51
+ for X, y in batch_iterate(batch_size, train_images, train_labels):
52
+ _, grads = loss_and_grad_fn(model, X, y)
53
+ optimizer.update(model, grads)
54
+ mx.eval(model.parameters(), optimizer.state)
55
+
56
+ # Compute train accuracy and loss
57
+ accuracy = eval_fn(model, train_images, train_labels)
58
+ loss = loss_fn(model, train_images, train_labels)
59
+ # Construct and return reply Message
60
+ model_record = ArrayRecord(get_params(model))
61
+ metrics = {
62
+ "num-examples": len(train_images),
63
+ "accuracy": float(accuracy.item()),
64
+ "loss": float(loss.item()),
65
+ }
66
+ metric_record = MetricRecord(metrics)
67
+ content = RecordDict({"arrays": model_record, "metrics": metric_record})
68
+ return Message(content=content, reply_to=msg)
69
+
70
+
71
+ @app.evaluate()
72
+ def evaluate(msg: Message, context: Context):
73
+ """Evaluate the model on local data."""
74
+
75
+ # Read config
76
+ num_layers = context.run_config["num-layers"]
77
+ input_dim = context.run_config["input-dim"]
78
+ hidden_dim = context.run_config["hidden-dim"]
79
+
80
+ # Instantiate model and apply global parameters
81
+ model = MLP(num_layers, input_dim, hidden_dim, output_dim=10)
82
+ ndarrays = msg.content["arrays"].to_numpy_ndarrays()
83
+ set_params(model, ndarrays)
84
+
85
+ # Load data
86
+ partition_id = context.node_config["partition-id"]
87
+ num_partitions = context.node_config["num-partitions"]
88
+ _, _, test_images, test_labels = load_data(partition_id, num_partitions)
89
+
90
+ # Evaluate the model on local data
91
+ accuracy = eval_fn(model, test_images, test_labels)
92
+ loss = loss_fn(model, test_images, test_labels)
93
+
94
+ # Construct and return reply Message
95
+ metrics = {
96
+ "num-examples": len(test_images),
97
+ "accuracy": float(accuracy.item()),
98
+ "loss": float(loss.item()),
99
+ }
100
+ metric_record = MetricRecord(metrics)
101
+ content = RecordDict({"metrics": metric_record})
102
+ return Message(content=content, reply_to=msg)
@@ -0,0 +1,46 @@
1
+ """$project_name: A Flower / $framework_str app."""
2
+
3
+ import numpy as np
4
+ from flwr.app import ArrayRecord, Context, Message, MetricRecord, RecordDict
5
+ from flwr.clientapp import ClientApp
6
+
7
+ # Flower ClientApp
8
+ app = ClientApp()
9
+
10
+
11
+ @app.train()
12
+ def train(msg: Message, context: Context):
13
+ """Train the model on local data."""
14
+
15
+ # The model is the global arrays
16
+ ndarrays = msg.content["arrays"].to_numpy_ndarrays()
17
+
18
+ # Simulate local training (here we just add random noise to model parameters)
19
+ model = [m + np.random.rand(*m.shape) for m in ndarrays]
20
+
21
+ # Construct and return reply Message
22
+ model_record = ArrayRecord(model)
23
+ metrics = {
24
+ "random_metric": np.random.rand(),
25
+ "num-examples": 1,
26
+ }
27
+ metric_record = MetricRecord(metrics)
28
+ content = RecordDict({"arrays": model_record, "metrics": metric_record})
29
+ return Message(content=content, reply_to=msg)
30
+
31
+
32
+ @app.evaluate()
33
+ def evaluate(msg: Message, context: Context):
34
+ """Evaluate the model on local data."""
35
+
36
+ # The model is the global arrays
37
+ ndarrays = msg.content["arrays"].to_numpy_ndarrays()
38
+
39
+ # Return reply Message
40
+ metrics = {
41
+ "random_metric": np.random.rand(3).tolist(),
42
+ "num-examples": 1,
43
+ }
44
+ metric_record = MetricRecord(metrics)
45
+ content = RecordDict({"metrics": metric_record})
46
+ return Message(content=content, reply_to=msg)
@@ -0,0 +1,108 @@
1
+ """$project_name: A Flower / $framework_str app."""
2
+
3
+ import warnings
4
+
5
+ from flwr.app import ArrayRecord, Context, Message, MetricRecord, RecordDict
6
+ from flwr.clientapp import ClientApp
7
+ from sklearn.metrics import (
8
+ accuracy_score,
9
+ f1_score,
10
+ log_loss,
11
+ precision_score,
12
+ recall_score,
13
+ )
14
+
15
+ from $import_name.task import (
16
+ get_model,
17
+ get_model_params,
18
+ load_data,
19
+ set_initial_params,
20
+ set_model_params,
21
+ )
22
+
23
+ # Flower ClientApp
24
+ app = ClientApp()
25
+
26
+
27
+ @app.train()
28
+ def train(msg: Message, context: Context):
29
+ """Train the model on local data."""
30
+
31
+ # Create LogisticRegression Model
32
+ penalty = context.run_config["penalty"]
33
+ local_epochs = context.run_config["local-epochs"]
34
+ model = get_model(penalty, local_epochs)
35
+ # Setting initial parameters, akin to model.compile for keras models
36
+ set_initial_params(model)
37
+
38
+ # Apply received pararameters
39
+ ndarrays = msg.content["arrays"].to_numpy_ndarrays()
40
+ set_model_params(model, ndarrays)
41
+
42
+ # Load the data
43
+ partition_id = context.node_config["partition-id"]
44
+ num_partitions = context.node_config["num-partitions"]
45
+ X_train, _, y_train, _ = load_data(partition_id, num_partitions)
46
+
47
+ # Ignore convergence failure due to low local epochs
48
+ with warnings.catch_warnings():
49
+ warnings.simplefilter("ignore")
50
+ # Train the model on local data
51
+ model.fit(X_train, y_train)
52
+
53
+ # Let's compute train loss
54
+ y_train_pred_proba = model.predict_proba(X_train)
55
+ train_logloss = log_loss(y_train, y_train_pred_proba)
56
+
57
+ # Construct and return reply Message
58
+ ndarrays = get_model_params(model)
59
+ model_record = ArrayRecord(ndarrays)
60
+ metrics = {"num-examples": len(X_train), "train_logloss": train_logloss}
61
+ metric_record = MetricRecord(metrics)
62
+ content = RecordDict({"arrays": model_record, "metrics": metric_record})
63
+ return Message(content=content, reply_to=msg)
64
+
65
+
66
+ @app.evaluate()
67
+ def evaluate(msg: Message, context: Context):
68
+ """Evaluate the model on test data."""
69
+
70
+ # Create LogisticRegression Model
71
+ penalty = context.run_config["penalty"]
72
+ local_epochs = context.run_config["local-epochs"]
73
+ model = get_model(penalty, local_epochs)
74
+
75
+ # Setting initial parameters, akin to model.compile for keras models
76
+ set_initial_params(model)
77
+
78
+ # Apply received pararameters
79
+ ndarrays = msg.content["arrays"].to_numpy_ndarrays()
80
+ set_model_params(model, ndarrays)
81
+
82
+ # Load the data
83
+ partition_id = context.node_config["partition-id"]
84
+ num_partitions = context.node_config["num-partitions"]
85
+ _, X_test, _, y_test = load_data(partition_id, num_partitions)
86
+
87
+ # Evaluate the model on local data
88
+ y_train_pred = model.predict(X_test)
89
+ y_train_pred_proba = model.predict_proba(X_test)
90
+
91
+ accuracy = accuracy_score(y_test, y_train_pred)
92
+ loss = log_loss(y_test, y_train_pred_proba)
93
+ precision = precision_score(y_test, y_train_pred, average="macro", zero_division=0)
94
+ recall = recall_score(y_test, y_train_pred, average="macro", zero_division=0)
95
+ f1 = f1_score(y_test, y_train_pred, average="macro", zero_division=0)
96
+
97
+ # Construct and return reply Message
98
+ metrics = {
99
+ "num-examples": len(X_test),
100
+ "test_logloss": loss,
101
+ "accuracy": accuracy,
102
+ "precision": precision,
103
+ "recall": recall,
104
+ "f1": f1,
105
+ }
106
+ metric_record = MetricRecord(metrics)
107
+ content = RecordDict({"metrics": metric_record})
108
+ return Message(content=content, reply_to=msg)