- Jun 19, 2024
-
-
ANDREY Paul authored
-
ANDREY Paul authored
-
ANDREY Paul authored
- Run `Aggregator` unit tests for available frameworks only. - Skip `gRPC`-dedicated tests when grpc is not installed. - Skip `DPTrainingManager` tests when opacus is not installed. - Fix toy regression functional tests failing when some frameworks are missing due to the use of too-specific type hints.
-
ANDREY Paul authored
Recent JAX versions have deprecated, then dropped, the `device()` method of jax (numpy) arrays, in favor of the already-existing, distinct-return-type `devices()` one. This commit therefore replaces calls to `device` with operations that include calling `devices` and extracting its content. This is not very elegant, but seems to be the proper way to do things based on the current JAX documentation.
-
ANDREY Paul authored
-
ANDREY Paul authored
-
- Mar 26, 2024
-
-
ANDREY Paul authored
-
- Mar 18, 2024
-
-
ANDREY Paul authored
-
ANDREY Paul authored
-
ANDREY Paul authored
Finalize DecLearn v2.4.0. See merge request !63
-
- Mar 15, 2024
-
-
ANDREY Paul authored
-
ANDREY Paul authored
- Apply some minor backward changes (and, when required, branches) to support breaking changes in Keras 3 (the default for TensorFlow 2.16 and onwards), while preserving support for older versions. - On the side, split a test about 'Model' serialization in two tests, one for config serializability, the other for instantiation from a non-serialized config dict. - The current code has been tested (by running all unit tests) with both TensorFlow 2.11 and 2.16, in a Python 3.10 environment.
-
- Mar 13, 2024
-
-
ANDREY Paul authored
-
ANDREY Paul authored
-
- Mar 12, 2024
-
-
ANDREY Paul authored
- Add new 'declearn.communication.utils' submodule. - Move existing utils there, but keep re-exporting them from the parent level to avoid breaking existing code. - Refactor some backend code used to verify exchanged messages' type as part of federated learning processes into two new utils.
-
ANDREY Paul authored
-
- Mar 01, 2024
-
-
ANDREY Paul authored
-
ANDREY Paul authored
- Until now, in the main FL process, clients would always receive global model weights twice, due to their being shared both with training and evaluation requests. - This commit fixes that via the introduction of backend mechanisms to keep track of which clients hold the latest model weights, and sparingly attach them to requests based on this. - As a side effect, `TrainRequest` and `EvaluationRequest` messages now specify `weights` to be an `Optional[Vector]` field.
-
ANDREY Paul authored
This commit introduces imports of 'tf.keras' as 'tf_keras' so that false-positive pylint errors can be silenced in one place per file rather than on each and every call. This remains tiresome, but might in fact be useful to switch to the newer TensorFlow versions in the future.
-
- Feb 29, 2024
-
-
ANDREY Paul authored
Set minimal version to 2.11.0 (rather than 2.5.0): - 'TensorflowOptiModule' adapter is based on the "new" Optimizer API introduced with TensorFlow/Keras v2.11, but the required dependency version had not been updated until now. Set maximal version to 2.15.X: - TensorFlow 2.16 (the first release candidate of which was added to PyPI three days ago) is switching to Keras 3 by default, which is bound to introduce breaking changes (current unit tests fail with 'tensorflow==2.16.0rc0'). - For now, the maximal version is thus set to 2.15.X. This may change in the near future when some time and effort is put in understanding changes and/or configuring dependencies to keep using Keras 2 rather than Keras 3 in TensorFlow's backend.
-
ANDREY Paul authored
-
ANDREY Paul authored
- The previous implementation would result in dropping some kwargs (namely, 'name' and 'queue') when running a function as process. - The new backend implementation prevents this using a wrapped instead of a partial function (still relying on 'functools').
-
ANDREY Paul authored
-
ANDREY Paul authored
- Document changes in the registration and initialization processes. - Document changes of the Optimizer AuxVar API. - Document requirement for peers using the same DecLearn version.
-
ANDREY Paul authored
-
ANDREY Paul authored
-
ANDREY Paul authored
-
ANDREY Paul authored
-
- Feb 16, 2024
-
-
ANDREY Paul authored
-
ANDREY Paul authored
Revise network communication backend and message-parsing logic. See merge request !62
-
ANDREY Paul authored
Set up a low heartbeat for localhost-running tests, resulting in drastic runtime gains (notably due to time gains during the join and initialization phase for functional tests).
-
ANDREY Paul authored
-
ANDREY Paul authored
-
ANDREY Paul authored
-
ANDREY Paul authored
-
ANDREY Paul authored
-
ANDREY Paul authored
- Update the way received messages are type-checked and have them be deserialized after type-checking only. - Move up metadata collection and use to a new optional and sparse step during the initialization phase. - Implement new message subtypes for metadata query and reply, and for signalling that initializations steps went well.
-
ANDREY Paul authored
- Revert some changes from a previous commit, that may be envisioned again when revising APIs in-depth for DecLearn 3.0. - Stitch back the 'communication' and 'messaging' submodules together, having 'NetworkClient' and 'NetworkServer' send 'Message' instances (that are merely serialized to string prior to being exchanged) and parse received strings into 'SerializedMessage' instances. - This change is a compromise between keeping things as before (which would not benefit from the introduced delayed-parsing capability of 'SerializedMessage'), and changing them so deeply that current code making use of communication endpoint would require heavy revisions.
-
ANDREY Paul authored
* Introduce new 'declearn.messaging' submodule, that is meant to replace the now-deprecated 'declearn.communication.messaging'. * Make 'Message' extendable via subclassing and type-registration (which is automatically performed by default). * Introduce 'SerializedMessage' as a wrapper for received messages, that parses the exact message subtype (enabling logic tests and message filtering) but delays actual content deserialization and Message object recovery (enabling to prevent undue resources use for unwanted messages that end up being discarded). * Deprecate some old 'Message' classes, that are still exported by the deprecated submodule but not by the new one.
-
ANDREY Paul authored
- Introduce a new 'declearn.communication.api.backend' submodule: - Introduce a new 'ActionMessage' minimal backend API, that defines hard-coded, lightweight and easily-parsed data structures designed to convey information and content across network communications agnostic to the content's nature. - Move 'declearn.communication.messaging.flags' submodule to 'declearn.communication.api.backend.flags'. - Move 'MessagesHandler' semi-private class to the 'backend' submodule, where it is now properly exposed. - Revise 'MessagesHandler': - Have it use the new 'ActionMessage's to wrap up messages, and delay their content's parsing to other times and parts of the code. - Quit sending information together with registration requests. In the future, we may want to introduce some callback system to validate or complete a registration request's processing. - Turn 'heartbeat' into an instantiation parameter. - Revise 'NetworkClient' and 'NetworkServer': - Quit passing of 'data_info' with registration requests. - Have message-sending and message-receiving methods expect str inputs and return str outputs: the actual parsing into objects is therefore delayed and left to be defined elsewhere. - Rename 'NetworkClient.check_message' into 'recv_message' (keep the former as an alias, with a DeprecationWarning). - Improve the use of (optional) timeouts when sending or expecting messages and overall exceptions handling: - 'NetworkClient.recv_message' may either raise a TimeoutError (in case of timeout) or RuntimeError (in case of rejection). - 'NeworkServer.send_messages' and 'broadcast_message' quietly stops waiting for clients to collect messages after the (opt.) timeout delay has passed. Messages may still be collected. - 'NetworkServer.wait_for_messages' no longer accepts a timeout. - 'NetworkServer.wait_for_messages_with_timeout' implements the possibility to setup a timeout. It returns both received client replies and a list of clients that failed to answer.
-