This enables creation of generic DPOptimizers by user's passing queries. The most common Gaussian query is automatically performed for convenience and backwards compatibility.
Byproducts of this update:
-ensures consistent implementations between the internal (and legacy) `get_gradients` and newer `_compute_gradients` for all queries.
-refactors for python readability.
-includes new tests ensuring that `_num_microbatches=None` is tested.
-changes the `_global_state` to to be initialized in the init function for `_compute_gradients`.
PiperOrigin-RevId: 480668376
This matches the documentation for specifying version for this project. Additionally, recent version of `tensorflow-probability` are releasing breaking changes and the existing version specifier allows these to breaking changes to be unintentionally pulled in.
PiperOrigin-RevId: 476443999
This enables creation of generic DPOptimizers by user's passing queries. The most common Gaussian query is automatically performed for convenience and backwards compatibility.
Byproducts of this update:
-ensures consistent implementations between the internal (and legacy) `get_gradients` and newer `_compute_gradients` for all queries.
-refactors for python readability.
PiperOrigin-RevId: 470883774
* For packages that have a stable release, we use a version that is compatible with that release (e.g. `~=x.y`).
* For packages that do not have a stable release, we use a version that matches a release that has been tested (e.g. `==x.y.z`).
Additionally, added documentation to the requirements.txt.
PiperOrigin-RevId: 468720651
* Updated the numpy version.
* Synced the pandas version.
In Python 3.10, if you invoke `pip install pandas~=1.1.4 numpy~=1.21.4` and then `import pandas` you get the following error:
```
>>> import pandas
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/tmp/venv/lib/python3.10/site-packages/pandas/__init__.py", line 30, in <module>
from pandas._libs import hashtable as _hashtable, lib as _lib, tslib as _tslib
File "/tmp/venv/lib/python3.10/site-packages/pandas/_libs/__init__.py", line 13, in <module>
from pandas._libs.interval import Interval
File "pandas/_libs/interval.pyx", line 1, in init pandas._libs.interval
ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject
```
I believe that this is the cause of the issue https://github.com/scikit-learn-contrib/hdbscan/issues/457#issuecomment-773671043
PiperOrigin-RevId: 467952859
Update WORKSPACE, setup.py, and requirements.txt to latest dp-accounting library release.
Update scipy version in setup.py.
Update version to 0.8.1.
PiperOrigin-RevId: 461944491
In Keras training in TF 2.0+, compute_gradients() is not called but apply_gradients() is called. W/o calling compute_gradients() dp gradient is not computed, and a normal gradient is used.
PiperOrigin-RevId: 461021412
Also use the strip_prefix option to only pull in the accounting WORKSPACE, not the top-level Google DP project WORKSPACE. This allows us to align the import statements to work both when pulling in the `dp_acounting` dependency via Bazel and pip.
PiperOrigin-RevId: 459807060