Mentions légales du service

Skip to content
Snippets Groups Projects
  1. Aug 04, 2023
  2. Mar 27, 2023
  3. Mar 25, 2023
  4. Mar 02, 2023
  5. Mar 01, 2023
  6. Feb 28, 2023
  7. Feb 23, 2023
  8. Feb 22, 2023
    • ANDREY Paul's avatar
      Make network communication dependencies optional. · 3c82f5ce
      ANDREY Paul authored
      This removal was supposed to be part of a past commit
      (cd1d0cb1) but had in
      fact not been properly finished.
      
      With this commit, install declearn no longer results
      in the automatic installation of gRPC and websockets,
      which are properly relegated to being optional, user-
      triggered-installation, dependencies.
      Verified
      3c82f5ce
    • ANDREY Paul's avatar
      Merge branch 'handle-frozen-weights' into 'develop' · dba20501
      ANDREY Paul authored
      Enable skipping frozen weights when using `Model.get_weights` and `Model.set_weights`
      
      Closes #15
      
      See merge request !29
      dba20501
    • ANDREY Paul's avatar
      Add 'trainable' argument to 'Model.get_weights' and 'Model.set_weights'. · 28865db8
      ANDREY Paul authored
      This commit squashes the following modifications:
      
      * Add `trainable` argument to `Model.get_weights`:
        - Add `trainable: bool = False` argument to `Model.get_weights`,
          enabling accessing only trainable weights of a neural network
          (or any model that supports using frozen weights).
        - Use the former to fix support for models with frozen weights by
          the `Optimizer`'s weight-decay and loss-regularization plug-ins.
        - Add unit tests for `get_weights(trainable=True)` to the Torch
          and Tensorflow Model tests.
      
      * Add `trainable` argument to `Model.set_weights`:
        - Add `trainable: bool = False` argument to `Model.set_weights`, enabling
          to update model weights with the exclusion of frozen ones.
        - Improve the documentation and exception-raising of `Model.set_weights`.
          Notably refactor some code into a private util used by tensorflow and
          torch models' backend code.
        - Add some related tests to the tensorflow and torch Model test suites.
          Note that there is redundancy that could be tackled later, as part of
          an effort to improve the `Model` test suite template.
      
      * Restrict round-wise weights sharing to trainable weights:
        - Update `FederatedClient`, `FederatedServer` and `TrainingManager`
          so that only the trainable model weights' values and updates are
          communicated during training and evaluation rounds.
        - This reduces communication costs when some weights are frozen.
        - This also avoids including non-trainable weights in server-side
          optimization computations (which should have resulted in zero at
          any rate, properly leaving these weights unaltered -- but may not
          have done so in the rare case when weight decay or regularization
          was used on the server side).
      
      * Add 'MLP-tune' test case for 'TorchModel' and 'TensorflowModel':
        - This case is the same as the base MLP, but with a frozen first layer.
        - This case would fail if the `get_weights(trainable=False)` was badly
          implemented (or used), since the gradients-and-weights comparison in
          the `Model.apply_updates` test would raise an error.
      
      * Improve unit test for 'Optimizer.compute_updates_from_gradients':
        - Ensure the pipelined plug-ins were called in proper order and
          with proper input values. In other words, test the formula.
        - Ensure the model weights are only accessed once, and with the
          proper restriction to trainable weights.
      28865db8
    • ANDREY Paul's avatar
      Merge branch 'gpu-support' into 'develop' · ae0c0796
      ANDREY Paul authored
      Improve GPU support for TensorFlow and Torch
      
      Closes #11
      
      See merge request !24
      ae0c0796
    • ANDREY Paul's avatar
    • BIGAUD Nathan's avatar
      Improve the documentation of GPU support and of 'Vector' subclasses. · 5c1dc54a
      BIGAUD Nathan authored and ANDREY Paul's avatar ANDREY Paul committed
      
      Co-authored-by: default avatarPaul Andrey <paul.andrey@inria.fr>
      Verified
      5c1dc54a
    • ANDREY Paul's avatar
      Document GPU support in the README. · cce29e1a
      ANDREY Paul authored
      Verified
      cce29e1a
    • ANDREY Paul's avatar
      Enhance unit tests to take device-placement policy into account. · 996b22a6
      ANDREY Paul authored
      Core changes to the global test suite:
      * Add some device-placement verifications to the generic Model test
        suite. This should be refactored into more unitary tests as part
        of a distinct effort to revise and improve this test suite.
      * For TensorFlow and Torch, parametrize the whole test suite to run
        either on CPU and GPU, and run it once per available device type.
      * Ensure Vector and OptiModule unit tests run on CPU.
      
      Changes to some 'Model' tests to run on GPU:
      * `test_compute_batch_gradients_np`: allow for small numerical
        discrepancies that may result from running the test on GPU.
      * `test_apply_updates`: correct the test, that had not been
        updated since `Model.get_weights` stopped to systematically
        use `NumpyVector` as return type.
      
      Changes to 'TorchModel' tests to run on GPU:
      * Override `test_serialization` due to torch-serialization relying
        on pickle. Replace pickles' comparison with a more shallow (but
        less susceptible to fail for unknown reasons) test that ensures
        a reloaded model shares the same structure of modules.
      Verified
      996b22a6
Loading