Skip to content

declearn v2.3.1

Released: 06/09/2023

This is a subminor release that patches a regression introduced in v2.2.0 but was undetected before. It also introduces a revision of the non-core-package util for generating SSL certificates.

Hotfix: fix DP-SGD with TorchModel

Since version 2.2.0, the functorch-based backend for computing and clipping sample-wise gradients of a TorchModel has attempted to benefit from the experimental functorch.compile API. However, this change, which has been tested to yield performance gains on fixed-size batches of inputs, turns out not to be compatible with variable-size batches - which are mandatory as part of DP-SGD due to the use of Poisson sampling.

As a consequence, this version drops the use of functorch.compile, restoring DP-SGD features with `TorchModel``.

Rewrite 'declearn.test_utils.generate_ssl_certificates'

The declearn.test_utils.generate_ssl_certificates, that is still excluded from the actual package API but is useful to set up examples, tests and even some real-life applications, was rewritten entirely to make use of the python cryptography third-party library rather than rely on subprocess calls to openssl, which make it more robust and avoid incompatibilities with OpenSSL 1.1 as to specifying multiple DNS and/or IPs for the server certificate. The util's API remains unchanged, save for the addition of a duration parameter that controls the validity duration of the generated CA and certificate files.