flwr-nightly 1.7.0.dev20240119__tar.gz → 1.7.0.dev20240123__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/PKG-INFO +1 -1
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/pyproject.toml +1 -1
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/common/configsrecord.py +11 -2
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/common/metricsrecord.py +11 -2
- flwr_nightly-1.7.0.dev20240123/src/py/flwr/common/recordset_compat.py +401 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/common/serde.py +195 -17
- flwr_nightly-1.7.0.dev20240123/src/py/flwr/proto/recordset_pb2.py +68 -0
- flwr_nightly-1.7.0.dev20240123/src/py/flwr/proto/recordset_pb2.pyi +305 -0
- flwr_nightly-1.7.0.dev20240123/src/py/flwr/proto/task_pb2.py +47 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/proto/task_pb2.pyi +20 -70
- flwr_nightly-1.7.0.dev20240123/src/py/flwr/proto/task_pb2_grpc.py +4 -0
- flwr_nightly-1.7.0.dev20240123/src/py/flwr/proto/task_pb2_grpc.pyi +4 -0
- flwr_nightly-1.7.0.dev20240119/src/py/flwr/common/recordset_utils.py +0 -87
- flwr_nightly-1.7.0.dev20240119/src/py/flwr/proto/task_pb2.py +0 -54
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/LICENSE +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/README.md +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/__init__.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/client/__init__.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/client/app.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/client/client.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/client/dpfedavg_numpy_client.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/client/flower.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/client/grpc_client/__init__.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/client/grpc_client/connection.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/client/grpc_rere_client/__init__.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/client/grpc_rere_client/connection.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/client/message_handler/__init__.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/client/message_handler/message_handler.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/client/message_handler/task_handler.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/client/middleware/__init__.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/client/middleware/utils.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/client/node_state.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/client/node_state_tests.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/client/numpy_client.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/client/rest_client/__init__.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/client/rest_client/connection.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/client/run_state.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/client/secure_aggregation/__init__.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/client/secure_aggregation/handler.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/client/secure_aggregation/secaggplus_handler.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/client/typing.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/common/__init__.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/common/address.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/common/constant.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/common/date.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/common/dp.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/common/flowercontext.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/common/grpc.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/common/logger.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/common/parameter.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/common/parametersrecord.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/common/recordset.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/common/retry_invoker.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/common/secure_aggregation/__init__.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/common/secure_aggregation/crypto/__init__.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/common/secure_aggregation/crypto/shamir.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/common/secure_aggregation/crypto/symmetric_encryption.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/common/secure_aggregation/ndarrays_arithmetic.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/common/secure_aggregation/quantization.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/common/secure_aggregation/secaggplus_constants.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/common/secure_aggregation/secaggplus_utils.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/common/telemetry.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/common/typing.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/common/version.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/driver/__init__.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/driver/app.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/driver/driver.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/driver/driver_client_proxy.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/driver/grpc_driver.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/flower/__init__.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/proto/__init__.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/proto/driver_pb2.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/proto/driver_pb2.pyi +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/proto/driver_pb2_grpc.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/proto/driver_pb2_grpc.pyi +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/proto/fleet_pb2.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/proto/fleet_pb2.pyi +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/proto/fleet_pb2_grpc.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/proto/fleet_pb2_grpc.pyi +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/proto/node_pb2.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/proto/node_pb2.pyi +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/proto/node_pb2_grpc.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/proto/node_pb2_grpc.pyi +0 -0
- /flwr_nightly-1.7.0.dev20240119/src/py/flwr/proto/task_pb2_grpc.py → /flwr_nightly-1.7.0.dev20240123/src/py/flwr/proto/recordset_pb2_grpc.py +0 -0
- /flwr_nightly-1.7.0.dev20240119/src/py/flwr/proto/task_pb2_grpc.pyi → /flwr_nightly-1.7.0.dev20240123/src/py/flwr/proto/recordset_pb2_grpc.pyi +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/proto/transport_pb2.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/proto/transport_pb2.pyi +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/proto/transport_pb2_grpc.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/proto/transport_pb2_grpc.pyi +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/py.typed +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/server/__init__.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/server/app.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/server/client_manager.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/server/client_proxy.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/server/criterion.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/server/driver/__init__.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/server/driver/driver_servicer.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/server/fleet/__init__.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/server/fleet/grpc_bidi/__init__.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/server/fleet/grpc_bidi/driver_client_manager.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/server/fleet/grpc_bidi/flower_service_servicer.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/server/fleet/grpc_bidi/grpc_bridge.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/server/fleet/grpc_bidi/grpc_client_proxy.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/server/fleet/grpc_bidi/grpc_server.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/server/fleet/grpc_bidi/ins_scheduler.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/server/fleet/grpc_rere/__init__.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/server/fleet/grpc_rere/fleet_servicer.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/server/fleet/message_handler/__init__.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/server/fleet/message_handler/message_handler.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/server/fleet/rest_rere/__init__.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/server/fleet/rest_rere/rest_api.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/server/history.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/server/server.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/server/state/__init__.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/server/state/in_memory_state.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/server/state/sqlite_state.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/server/state/state.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/server/state/state_factory.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/server/strategy/__init__.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/server/strategy/aggregate.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/server/strategy/bulyan.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/server/strategy/dpfedavg_adaptive.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/server/strategy/dpfedavg_fixed.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/server/strategy/fault_tolerant_fedavg.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/server/strategy/fedadagrad.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/server/strategy/fedadam.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/server/strategy/fedavg.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/server/strategy/fedavg_android.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/server/strategy/fedavgm.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/server/strategy/fedmedian.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/server/strategy/fedopt.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/server/strategy/fedprox.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/server/strategy/fedtrimmedavg.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/server/strategy/fedxgb_bagging.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/server/strategy/fedxgb_cyclic.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/server/strategy/fedxgb_nn_avg.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/server/strategy/fedyogi.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/server/strategy/krum.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/server/strategy/qfedavg.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/server/strategy/strategy.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/server/utils/__init__.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/server/utils/tensorboard.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/server/utils/validator.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/simulation/__init__.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/simulation/app.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/simulation/ray_transport/__init__.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/simulation/ray_transport/ray_actor.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/simulation/ray_transport/ray_client_proxy.py +0 -0
- {flwr_nightly-1.7.0.dev20240119 → flwr_nightly-1.7.0.dev20240123}/src/py/flwr/simulation/ray_transport/utils.py +0 -0
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
|
|
4
4
|
|
5
5
|
[tool.poetry]
|
6
6
|
name = "flwr-nightly"
|
7
|
-
version = "1.7.0-
|
7
|
+
version = "1.7.0-dev20240123"
|
8
8
|
description = "Flower: A Friendly Federated Learning Framework"
|
9
9
|
license = "Apache-2.0"
|
10
10
|
authors = ["The Flower Authors <hello@flower.dev>"]
|
@@ -87,8 +87,17 @@ class ConfigsRecord:
|
|
87
87
|
# 1s to check 10M element list on a M2 Pro
|
88
88
|
# In such settings, you'd be better of treating such config as
|
89
89
|
# an array and pass it to a ParametersRecord.
|
90
|
-
|
91
|
-
|
90
|
+
# Empty lists are valid
|
91
|
+
if len(value) > 0:
|
92
|
+
is_valid(value[0])
|
93
|
+
# all elements in the list must be of the same valid type
|
94
|
+
# this is needed for protobuf
|
95
|
+
value_type = type(value[0])
|
96
|
+
if not all(isinstance(v, value_type) for v in value):
|
97
|
+
raise TypeError(
|
98
|
+
"All values in a list must be of the same valid type. "
|
99
|
+
f"One of {ConfigsScalar}."
|
100
|
+
)
|
92
101
|
else:
|
93
102
|
is_valid(value)
|
94
103
|
|
@@ -87,8 +87,17 @@ class MetricsRecord:
|
|
87
87
|
# 1s to check 10M element list on a M2 Pro
|
88
88
|
# In such settings, you'd be better of treating such metric as
|
89
89
|
# an array and pass it to a ParametersRecord.
|
90
|
-
|
91
|
-
|
90
|
+
# Empty lists are valid
|
91
|
+
if len(value) > 0:
|
92
|
+
is_valid(value[0])
|
93
|
+
# all elements in the list must be of the same valid type
|
94
|
+
# this is needed for protobuf
|
95
|
+
value_type = type(value[0])
|
96
|
+
if not all(isinstance(v, value_type) for v in value):
|
97
|
+
raise TypeError(
|
98
|
+
"All values in a list must be of the same valid type. "
|
99
|
+
f"One of {MetricsScalar}."
|
100
|
+
)
|
92
101
|
else:
|
93
102
|
is_valid(value)
|
94
103
|
|
@@ -0,0 +1,401 @@
|
|
1
|
+
# Copyright 2024 Flower Labs GmbH. All Rights Reserved.
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
# ==============================================================================
|
15
|
+
"""RecordSet utilities."""
|
16
|
+
|
17
|
+
|
18
|
+
from typing import Dict, Mapping, OrderedDict, Tuple, Union, cast, get_args
|
19
|
+
|
20
|
+
from .configsrecord import ConfigsRecord
|
21
|
+
from .metricsrecord import MetricsRecord
|
22
|
+
from .parametersrecord import Array, ParametersRecord
|
23
|
+
from .recordset import RecordSet
|
24
|
+
from .typing import (
|
25
|
+
Code,
|
26
|
+
ConfigsRecordValues,
|
27
|
+
EvaluateIns,
|
28
|
+
EvaluateRes,
|
29
|
+
FitIns,
|
30
|
+
FitRes,
|
31
|
+
GetParametersIns,
|
32
|
+
GetParametersRes,
|
33
|
+
GetPropertiesIns,
|
34
|
+
GetPropertiesRes,
|
35
|
+
MetricsRecordValues,
|
36
|
+
Parameters,
|
37
|
+
Scalar,
|
38
|
+
Status,
|
39
|
+
)
|
40
|
+
|
41
|
+
|
42
|
+
def parametersrecord_to_parameters(
|
43
|
+
record: ParametersRecord, keep_input: bool = False
|
44
|
+
) -> Parameters:
|
45
|
+
"""Convert ParameterRecord to legacy Parameters.
|
46
|
+
|
47
|
+
Warning: Because `Arrays` in `ParametersRecord` encode more information of the
|
48
|
+
array-like or tensor-like data (e.g their datatype, shape) than `Parameters` it
|
49
|
+
might not be possible to reconstruct such data structures from `Parameters` objects
|
50
|
+
alone. Additional information or metadta must be provided from elsewhere.
|
51
|
+
|
52
|
+
Parameters
|
53
|
+
----------
|
54
|
+
record : ParametersRecord
|
55
|
+
The record to be conveted into Parameters.
|
56
|
+
keep_input : bool (default: False)
|
57
|
+
A boolean indicating whether entries in the record should be deleted from the
|
58
|
+
input dictionary immediately after adding them to the record.
|
59
|
+
"""
|
60
|
+
parameters = Parameters(tensors=[], tensor_type="")
|
61
|
+
|
62
|
+
for key in list(record.data.keys()):
|
63
|
+
parameters.tensors.append(record[key].data)
|
64
|
+
|
65
|
+
if not parameters.tensor_type:
|
66
|
+
# Setting from first array in record. Recall the warning in the docstrings
|
67
|
+
# of this function.
|
68
|
+
parameters.tensor_type = record[key].stype
|
69
|
+
|
70
|
+
if not keep_input:
|
71
|
+
del record.data[key]
|
72
|
+
|
73
|
+
return parameters
|
74
|
+
|
75
|
+
|
76
|
+
def parameters_to_parametersrecord(
|
77
|
+
parameters: Parameters, keep_input: bool = False
|
78
|
+
) -> ParametersRecord:
|
79
|
+
"""Convert legacy Parameters into a single ParametersRecord.
|
80
|
+
|
81
|
+
Because there is no concept of names in the legacy Parameters, arbitrary keys will
|
82
|
+
be used when constructing the ParametersRecord. Similarly, the shape and data type
|
83
|
+
won't be recorded in the Array objects.
|
84
|
+
|
85
|
+
Parameters
|
86
|
+
----------
|
87
|
+
parameters : Parameters
|
88
|
+
Parameters object to be represented as a ParametersRecord.
|
89
|
+
keep_input : bool (default: False)
|
90
|
+
A boolean indicating whether parameters should be deleted from the input
|
91
|
+
Parameters object (i.e. a list of serialized NumPy arrays) immediately after
|
92
|
+
adding them to the record.
|
93
|
+
"""
|
94
|
+
tensor_type = parameters.tensor_type
|
95
|
+
|
96
|
+
p_record = ParametersRecord()
|
97
|
+
|
98
|
+
num_arrays = len(parameters.tensors)
|
99
|
+
for idx in range(num_arrays):
|
100
|
+
if keep_input:
|
101
|
+
tensor = parameters.tensors[idx]
|
102
|
+
else:
|
103
|
+
tensor = parameters.tensors.pop(0)
|
104
|
+
p_record.set_parameters(
|
105
|
+
OrderedDict(
|
106
|
+
{str(idx): Array(data=tensor, dtype="", stype=tensor_type, shape=[])}
|
107
|
+
)
|
108
|
+
)
|
109
|
+
|
110
|
+
return p_record
|
111
|
+
|
112
|
+
|
113
|
+
def _check_mapping_from_recordscalartype_to_scalar(
|
114
|
+
record_data: Mapping[str, Union[ConfigsRecordValues, MetricsRecordValues]]
|
115
|
+
) -> Dict[str, Scalar]:
|
116
|
+
"""Check mapping `common.*RecordValues` into `common.Scalar` is possible."""
|
117
|
+
for value in record_data.values():
|
118
|
+
if not isinstance(value, get_args(Scalar)):
|
119
|
+
raise TypeError(
|
120
|
+
"There is not a 1:1 mapping between `common.Scalar` types and those "
|
121
|
+
"supported in `common.ConfigsRecordValues` or "
|
122
|
+
"`common.ConfigsRecordValues`. Consider casting your values to a type "
|
123
|
+
"supported by the `common.RecordSet` infrastructure. "
|
124
|
+
f"You used type: {type(value)}"
|
125
|
+
)
|
126
|
+
return cast(Dict[str, Scalar], record_data)
|
127
|
+
|
128
|
+
|
129
|
+
def _recordset_to_fit_or_evaluate_ins_components(
|
130
|
+
recordset: RecordSet,
|
131
|
+
ins_str: str,
|
132
|
+
keep_input: bool,
|
133
|
+
) -> Tuple[Parameters, Dict[str, Scalar]]:
|
134
|
+
"""Derive Fit/Evaluate Ins from a RecordSet."""
|
135
|
+
# get Array and construct Parameters
|
136
|
+
parameters_record = recordset.get_parameters(f"{ins_str}.parameters")
|
137
|
+
|
138
|
+
parameters = parametersrecord_to_parameters(
|
139
|
+
parameters_record, keep_input=keep_input
|
140
|
+
)
|
141
|
+
|
142
|
+
# get config dict
|
143
|
+
config_record = recordset.get_configs(f"{ins_str}.config")
|
144
|
+
|
145
|
+
config_dict = _check_mapping_from_recordscalartype_to_scalar(config_record.data)
|
146
|
+
|
147
|
+
return parameters, config_dict
|
148
|
+
|
149
|
+
|
150
|
+
def _fit_or_evaluate_ins_to_recordset(
|
151
|
+
ins: Union[FitIns, EvaluateIns], keep_input: bool
|
152
|
+
) -> RecordSet:
|
153
|
+
recordset = RecordSet()
|
154
|
+
|
155
|
+
ins_str = "fitins" if isinstance(ins, FitIns) else "evaluateins"
|
156
|
+
recordset.set_parameters(
|
157
|
+
name=f"{ins_str}.parameters",
|
158
|
+
record=parameters_to_parametersrecord(ins.parameters, keep_input=keep_input),
|
159
|
+
)
|
160
|
+
|
161
|
+
recordset.set_configs(
|
162
|
+
name=f"{ins_str}.config", record=ConfigsRecord(ins.config) # type: ignore
|
163
|
+
)
|
164
|
+
|
165
|
+
return recordset
|
166
|
+
|
167
|
+
|
168
|
+
def _embed_status_into_recordset(
|
169
|
+
res_str: str, status: Status, recordset: RecordSet
|
170
|
+
) -> RecordSet:
|
171
|
+
status_dict: Dict[str, ConfigsRecordValues] = {
|
172
|
+
"code": int(status.code.value),
|
173
|
+
"message": status.message,
|
174
|
+
}
|
175
|
+
# we add it to a `ConfigsRecord`` because the `status.message`` is a string
|
176
|
+
# and `str` values aren't supported in `MetricsRecords`
|
177
|
+
recordset.set_configs(f"{res_str}.status", record=ConfigsRecord(status_dict))
|
178
|
+
return recordset
|
179
|
+
|
180
|
+
|
181
|
+
def _extract_status_from_recordset(res_str: str, recordset: RecordSet) -> Status:
|
182
|
+
status = recordset.get_configs(f"{res_str}.status")
|
183
|
+
code = cast(int, status["code"])
|
184
|
+
return Status(code=Code(code), message=str(status["message"]))
|
185
|
+
|
186
|
+
|
187
|
+
def recordset_to_fitins(recordset: RecordSet, keep_input: bool) -> FitIns:
|
188
|
+
"""Derive FitIns from a RecordSet object."""
|
189
|
+
parameters, config = _recordset_to_fit_or_evaluate_ins_components(
|
190
|
+
recordset,
|
191
|
+
ins_str="fitins",
|
192
|
+
keep_input=keep_input,
|
193
|
+
)
|
194
|
+
|
195
|
+
return FitIns(parameters=parameters, config=config)
|
196
|
+
|
197
|
+
|
198
|
+
def fitins_to_recordset(fitins: FitIns, keep_input: bool) -> RecordSet:
|
199
|
+
"""Construct a RecordSet from a FitIns object."""
|
200
|
+
return _fit_or_evaluate_ins_to_recordset(fitins, keep_input)
|
201
|
+
|
202
|
+
|
203
|
+
def recordset_to_fitres(recordset: RecordSet, keep_input: bool) -> FitRes:
|
204
|
+
"""Derive FitRes from a RecordSet object."""
|
205
|
+
ins_str = "fitres"
|
206
|
+
parameters = parametersrecord_to_parameters(
|
207
|
+
recordset.get_parameters(f"{ins_str}.parameters"), keep_input=keep_input
|
208
|
+
)
|
209
|
+
|
210
|
+
num_examples = cast(
|
211
|
+
int, recordset.get_metrics(f"{ins_str}.num_examples")["num_examples"]
|
212
|
+
)
|
213
|
+
configs_record = recordset.get_configs(f"{ins_str}.metrics")
|
214
|
+
|
215
|
+
metrics = _check_mapping_from_recordscalartype_to_scalar(configs_record.data)
|
216
|
+
status = _extract_status_from_recordset(ins_str, recordset)
|
217
|
+
|
218
|
+
return FitRes(
|
219
|
+
status=status, parameters=parameters, num_examples=num_examples, metrics=metrics
|
220
|
+
)
|
221
|
+
|
222
|
+
|
223
|
+
def fitres_to_recordset(fitres: FitRes, keep_input: bool) -> RecordSet:
|
224
|
+
"""Construct a RecordSet from a FitRes object."""
|
225
|
+
recordset = RecordSet()
|
226
|
+
|
227
|
+
res_str = "fitres"
|
228
|
+
|
229
|
+
recordset.set_configs(
|
230
|
+
name=f"{res_str}.metrics", record=ConfigsRecord(fitres.metrics) # type: ignore
|
231
|
+
)
|
232
|
+
recordset.set_metrics(
|
233
|
+
name=f"{res_str}.num_examples",
|
234
|
+
record=MetricsRecord({"num_examples": fitres.num_examples}),
|
235
|
+
)
|
236
|
+
recordset.set_parameters(
|
237
|
+
name=f"{res_str}.parameters",
|
238
|
+
record=parameters_to_parametersrecord(fitres.parameters, keep_input),
|
239
|
+
)
|
240
|
+
|
241
|
+
# status
|
242
|
+
recordset = _embed_status_into_recordset(res_str, fitres.status, recordset)
|
243
|
+
|
244
|
+
return recordset
|
245
|
+
|
246
|
+
|
247
|
+
def recordset_to_evaluateins(recordset: RecordSet, keep_input: bool) -> EvaluateIns:
|
248
|
+
"""Derive EvaluateIns from a RecordSet object."""
|
249
|
+
parameters, config = _recordset_to_fit_or_evaluate_ins_components(
|
250
|
+
recordset,
|
251
|
+
ins_str="evaluateins",
|
252
|
+
keep_input=keep_input,
|
253
|
+
)
|
254
|
+
|
255
|
+
return EvaluateIns(parameters=parameters, config=config)
|
256
|
+
|
257
|
+
|
258
|
+
def evaluateins_to_recordset(evaluateins: EvaluateIns, keep_input: bool) -> RecordSet:
|
259
|
+
"""Construct a RecordSet from a EvaluateIns object."""
|
260
|
+
return _fit_or_evaluate_ins_to_recordset(evaluateins, keep_input)
|
261
|
+
|
262
|
+
|
263
|
+
def recordset_to_evaluateres(recordset: RecordSet) -> EvaluateRes:
|
264
|
+
"""Derive EvaluateRes from a RecordSet object."""
|
265
|
+
ins_str = "evaluateres"
|
266
|
+
|
267
|
+
loss = cast(int, recordset.get_metrics(f"{ins_str}.loss")["loss"])
|
268
|
+
|
269
|
+
num_examples = cast(
|
270
|
+
int, recordset.get_metrics(f"{ins_str}.num_examples")["num_examples"]
|
271
|
+
)
|
272
|
+
configs_record = recordset.get_configs(f"{ins_str}.metrics")
|
273
|
+
|
274
|
+
metrics = _check_mapping_from_recordscalartype_to_scalar(configs_record.data)
|
275
|
+
status = _extract_status_from_recordset(ins_str, recordset)
|
276
|
+
|
277
|
+
return EvaluateRes(
|
278
|
+
status=status, loss=loss, num_examples=num_examples, metrics=metrics
|
279
|
+
)
|
280
|
+
|
281
|
+
|
282
|
+
def evaluateres_to_recordset(evaluateres: EvaluateRes) -> RecordSet:
|
283
|
+
"""Construct a RecordSet from a EvaluateRes object."""
|
284
|
+
recordset = RecordSet()
|
285
|
+
|
286
|
+
res_str = "evaluateres"
|
287
|
+
# loss
|
288
|
+
recordset.set_metrics(
|
289
|
+
name=f"{res_str}.loss",
|
290
|
+
record=MetricsRecord({"loss": evaluateres.loss}),
|
291
|
+
)
|
292
|
+
|
293
|
+
# num_examples
|
294
|
+
recordset.set_metrics(
|
295
|
+
name=f"{res_str}.num_examples",
|
296
|
+
record=MetricsRecord({"num_examples": evaluateres.num_examples}),
|
297
|
+
)
|
298
|
+
|
299
|
+
# metrics
|
300
|
+
recordset.set_configs(
|
301
|
+
name=f"{res_str}.metrics",
|
302
|
+
record=ConfigsRecord(evaluateres.metrics), # type: ignore
|
303
|
+
)
|
304
|
+
|
305
|
+
# status
|
306
|
+
recordset = _embed_status_into_recordset(
|
307
|
+
f"{res_str}", evaluateres.status, recordset
|
308
|
+
)
|
309
|
+
|
310
|
+
return recordset
|
311
|
+
|
312
|
+
|
313
|
+
def recordset_to_getparametersins(recordset: RecordSet) -> GetParametersIns:
|
314
|
+
"""Derive GetParametersIns from a RecordSet object."""
|
315
|
+
config_record = recordset.get_configs("getparametersins.config")
|
316
|
+
|
317
|
+
config_dict = _check_mapping_from_recordscalartype_to_scalar(config_record.data)
|
318
|
+
|
319
|
+
return GetParametersIns(config=config_dict)
|
320
|
+
|
321
|
+
|
322
|
+
def getparametersins_to_recordset(getparameters_ins: GetParametersIns) -> RecordSet:
|
323
|
+
"""Construct a RecordSet from a GetParametersIns object."""
|
324
|
+
recordset = RecordSet()
|
325
|
+
|
326
|
+
recordset.set_configs(
|
327
|
+
name="getparametersins.config",
|
328
|
+
record=ConfigsRecord(getparameters_ins.config), # type: ignore
|
329
|
+
)
|
330
|
+
return recordset
|
331
|
+
|
332
|
+
|
333
|
+
def getparametersres_to_recordset(getparametersres: GetParametersRes) -> RecordSet:
|
334
|
+
"""Construct a RecordSet from a GetParametersRes object."""
|
335
|
+
recordset = RecordSet()
|
336
|
+
res_str = "getparametersres"
|
337
|
+
parameters_record = parameters_to_parametersrecord(getparametersres.parameters)
|
338
|
+
recordset.set_parameters(f"{res_str}.parameters", parameters_record)
|
339
|
+
|
340
|
+
# status
|
341
|
+
recordset = _embed_status_into_recordset(
|
342
|
+
res_str, getparametersres.status, recordset
|
343
|
+
)
|
344
|
+
|
345
|
+
return recordset
|
346
|
+
|
347
|
+
|
348
|
+
def recordset_to_getparametersres(recordset: RecordSet) -> GetParametersRes:
|
349
|
+
"""Derive GetParametersRes from a RecordSet object."""
|
350
|
+
res_str = "getparametersres"
|
351
|
+
parameters = parametersrecord_to_parameters(
|
352
|
+
recordset.get_parameters(f"{res_str}.parameters")
|
353
|
+
)
|
354
|
+
|
355
|
+
status = _extract_status_from_recordset(res_str, recordset)
|
356
|
+
return GetParametersRes(status=status, parameters=parameters)
|
357
|
+
|
358
|
+
|
359
|
+
def recordset_to_getpropertiesins(recordset: RecordSet) -> GetPropertiesIns:
|
360
|
+
"""Derive GetPropertiesIns from a RecordSet object."""
|
361
|
+
config_record = recordset.get_configs("getpropertiesins.config")
|
362
|
+
config_dict = _check_mapping_from_recordscalartype_to_scalar(config_record.data)
|
363
|
+
|
364
|
+
return GetPropertiesIns(config=config_dict)
|
365
|
+
|
366
|
+
|
367
|
+
def getpropertiesins_to_recordset(getpropertiesins: GetPropertiesIns) -> RecordSet:
|
368
|
+
"""Construct a RecordSet from a GetPropertiesRes object."""
|
369
|
+
recordset = RecordSet()
|
370
|
+
recordset.set_configs(
|
371
|
+
name="getpropertiesins.config",
|
372
|
+
record=ConfigsRecord(getpropertiesins.config), # type: ignore
|
373
|
+
)
|
374
|
+
return recordset
|
375
|
+
|
376
|
+
|
377
|
+
def recordset_to_getpropertiesres(recordset: RecordSet) -> GetPropertiesRes:
|
378
|
+
"""Derive GetPropertiesRes from a RecordSet object."""
|
379
|
+
res_str = "getpropertiesres"
|
380
|
+
config_record = recordset.get_configs(f"{res_str}.properties")
|
381
|
+
properties = _check_mapping_from_recordscalartype_to_scalar(config_record.data)
|
382
|
+
|
383
|
+
status = _extract_status_from_recordset(res_str, recordset=recordset)
|
384
|
+
|
385
|
+
return GetPropertiesRes(status=status, properties=properties)
|
386
|
+
|
387
|
+
|
388
|
+
def getpropertiesres_to_recordset(getpropertiesres: GetPropertiesRes) -> RecordSet:
|
389
|
+
"""Construct a RecordSet from a GetPropertiesRes object."""
|
390
|
+
recordset = RecordSet()
|
391
|
+
res_str = "getpropertiesres"
|
392
|
+
recordset.set_configs(
|
393
|
+
name=f"{res_str}.properties",
|
394
|
+
record=ConfigsRecord(getpropertiesres.properties), # type: ignore
|
395
|
+
)
|
396
|
+
# status
|
397
|
+
recordset = _embed_status_into_recordset(
|
398
|
+
res_str, getpropertiesres.status, recordset
|
399
|
+
)
|
400
|
+
|
401
|
+
return recordset
|