Commit graph

818 commits

Author SHA1 Message Date
Michael Reneer
592ed995f1 Update the direct scipy dependency to ~=1.2.1.
This means that we would accept a hot fix, but not accept major or minor version changes without releasing TFP.

PiperOrigin-RevId: 427916084
2022-02-10 21:19:53 -08:00
Michael Reneer
93bd134947 Add direct pandas dependency.
PiperOrigin-RevId: 427915591
2022-02-10 21:15:39 -08:00
Michael Reneer
28f8a5ff61 Add direct numpy dependency.
PiperOrigin-RevId: 427915040
2022-02-10 21:10:52 -08:00
Michael Reneer
1f229dbaf5 Update the direct attrs dependency to ~=21.2.0.
This means that we would accept a hot fix, but not accept major or minor version changes without releasing TFP.

PiperOrigin-RevId: 427914787
2022-02-10 21:08:42 -08:00
Michael Reneer
6aa31d95dd Add direct matplotlib dependency.
PiperOrigin-RevId: 427914629
2022-02-10 21:06:59 -08:00
Michael Reneer
d1e045ed88 Add direct absl-py dependency.
PiperOrigin-RevId: 427914169
2022-02-10 21:04:06 -08:00
Francois Chollet
cd38172f35 Remove usage of deprecated layer method.
PiperOrigin-RevId: 427339701
2022-02-08 17:45:45 -08:00
Michael Reneer
bb153c1f9d Internal
PiperOrigin-RevId: 427327078
2022-02-08 16:44:37 -08:00
Michael Reneer
28db674240 Ensure that TF 1.0 API is referenced at the call site in TensorFlow Privacy.
This change makes it easy to search for usage of TF 1.0 API and updates the TF imports across TFP to be written consistently.

PiperOrigin-RevId: 427043028
2022-02-07 16:06:22 -08:00
Michael Reneer
5dc3475e17 Fix lint errors in tensorflow_privacy/tutorials/walkthrough/README.md.
PiperOrigin-RevId: 427030504
2022-02-07 15:17:11 -08:00
Shuang Song
ceced43d0b For seq2seq MIA test, call threshold attacker directly.
PiperOrigin-RevId: 426941426
2022-02-07 09:46:03 -08:00
Zheng Xu
2fe51d2eeb Minor fix of tree aggregation accounting docstring.
PiperOrigin-RevId: 426398939
2022-02-04 07:32:22 -08:00
Michael Reneer
c3e7f08fa5 Update to import TF 2.0 in many TensorFlow Privacy Python modules.
PiperOrigin-RevId: 425901093
2022-02-02 09:17:30 -08:00
Michael Reneer
778c804d1b Delete unused TF 1.0 API in TensorFlow Privacy.
PiperOrigin-RevId: 425900761
2022-02-02 09:16:06 -08:00
Zheng Xu
6fde7b0480 Add clearer connection of TFP tree aggregation query and accounting arguments.
PiperOrigin-RevId: 425790945
2022-02-01 21:34:37 -08:00
Michael Reneer
8a6827b27c Update to use TF 2.0 API in TensorFlow Privacy:
tf.logging -> Removed for absl
tf.assert_type -> tf.debugging.assert_type
tf.assert_less_equal -> tf.debugging.assert_less_equal
tf.global_norm -> tf.linalg.global_norm

PiperOrigin-RevId: 425730344
2022-02-01 15:29:09 -08:00
Shuang Song
438da5a09b For secret sharer exposures, allow more dictionary key types, and break ties for the same perplexities. Fix a bug in the test.
PiperOrigin-RevId: 425446829
2022-01-31 13:27:55 -08:00
Michael Reneer
fd242e76b9 Internal
PiperOrigin-RevId: 425430059
2022-01-31 12:17:02 -08:00
Michael Reneer
36b8ea34ef Internal
PiperOrigin-RevId: 424965569
2022-01-28 15:01:34 -08:00
Michael Reneer
25571aaf87 Fix up remaining lint and format in TensorFlow Privacy.
PiperOrigin-RevId: 424948247
2022-01-28 13:44:12 -08:00
Michael Reneer
dd31737cb7 Update the setup.py for TensorFlow Privacy.
* Removed stale documentation.
* Updated to read version from the `version.py` module.
* Remove test only dependency.

PiperOrigin-RevId: 424932559
2022-01-28 12:34:01 -08:00
Michael Reneer
b37aef1751 Fixed some lint errors in TensorFlow Privacy.
* Fixed `g-backslash-continuation`
* Fixed `g-generic-assert`
* Fixed `g-generic-assert`
* Fixed `raise-missing-from`
* Fixed `unused-argument`

PiperOrigin-RevId: 424931881
2022-01-28 12:31:00 -08:00
Michael Reneer
e6536597c5 Fixed some lint errors in TensorFlow Privacy.
* Fixed `g-importing-member`
* Fixed `g-bad-import-order`

PiperOrigin-RevId: 424926847
2022-01-28 12:10:05 -08:00
Michael Reneer
943ef91ee9 Format TensorFlow Privacy files.
PiperOrigin-RevId: 424923635
2022-01-28 11:57:24 -08:00
Michael Reneer
07230a161a Internal
PiperOrigin-RevId: 424922009
2022-01-28 11:50:35 -08:00
Michael Reneer
7396ad62da Update TensorFlow Privacy to use Python 3 super().
PiperOrigin-RevId: 424916118
2022-01-28 11:26:34 -08:00
Michael Reneer
9050f18b59 Update TensorFlow Privacy to use Python 3 metaclass.
PiperOrigin-RevId: 424773127
2022-01-27 20:32:04 -08:00
Michael Reneer
b0803999ad Add license and missing build targets to __init__.py files in TensorFlow Privacy.
* Added license.
* Removed `.../membership_inference_attack/codelabs/__init__.py`, this code does not look like it needs to be part of the Python package.
* Removed `.../research/pate_2017/__init__.py`, this code does not look like it needs to be part of the Python package.

PiperOrigin-RevId: 424682641
2022-01-27 12:40:23 -08:00
Michael Reneer
c36ce6d799 Normalize mpmath imports in TensorFlow Privacy to be more friendly with strict dependencies and lint.
PiperOrigin-RevId: 424681602
2022-01-27 12:35:43 -08:00
Michael Reneer
81a11eb824 Remove the mock dependency from TensorFlow Privacy, this is now part of the Python standard library.
PiperOrigin-RevId: 424681527
2022-01-27 12:34:59 -08:00
Michael Reneer
a749ce4e30 Remove TensorFlow Privacy __future__ imports.
Note: Exclude changes to the research directory.
PiperOrigin-RevId: 424650953
2022-01-27 10:37:22 -08:00
Michael Reneer
cfb1b881d8 Normalize scipy imports in TensorFlow Privacy to be more friendly with strict dependencies and lint.
PiperOrigin-RevId: 424649853
2022-01-27 10:33:23 -08:00
Michael Reneer
47b439e376 Remove TensorFlow Privacy dependency on six.
Python 2 is not supported, please use Python 3.

PiperOrigin-RevId: 424435761
2022-01-26 13:56:30 -08:00
Michael Reneer
1424cb2418 Rename TensorFlow Privacy Python tests to have the name foo_test.
* Renamed Python test.
* Fixed usage of deprecated `assertRaisesRegexp`.

Python tooling pattern matches on file name, so it is important for tests to end with the suffix "_test" in order to interact with such tooling well.

In this case, these test are getting lint errors they should not and not getting lint errors they should.

PiperOrigin-RevId: 424433864
2022-01-26 13:48:31 -08:00
Michael Reneer
75f88f8120 Sort TensorFlow Privacy requirements and required dependencies.
Sorting alphabetically this can help keep these lists maintained, in sync, and current.

PiperOrigin-RevId: 424433354
2022-01-26 13:46:23 -08:00
Michael Reneer
28dbbbb9e5 Remove TensorFlow Privacy Python lint as directive.
This is now the default behavior.

PiperOrigin-RevId: 424403961
2022-01-26 11:47:14 -08:00
Michael Reneer
b309916927 Fix TensorFlow Privacy g-importing-member lint error.
PiperOrigin-RevId: 424356142
2022-01-26 08:40:57 -08:00
Michael Reneer
4b76e882bc Fix lint errors in dp_optimizer_test.
PiperOrigin-RevId: 424183036
2022-01-25 14:36:57 -08:00
Shuang Song
3a4c4400a6 For MIA in seq2seq model, add support for graph mode, add data information and fix small typo in seq2seq_membership_inference_codelab.ipynb.
PiperOrigin-RevId: 422909904
2022-01-19 14:50:48 -08:00
David Marn
f47200f60d Updates the path for seq2seq codelab colab button.
PiperOrigin-RevId: 421607919
2022-01-13 10:53:33 -08:00
Shuang Song
f301595ba5 Fix a bug in keras_evaluation and its example.
PiperOrigin-RevId: 420787967
2022-01-10 09:58:39 -08:00
Galen Andrew
867f3d4c55 Minor bug in tree aggregation accountant test.
PiperOrigin-RevId: 420145652
2022-01-06 14:32:52 -08:00
Galen Andrew
dd1e6f2d0c Automated rollback of commit 668afa892e
PiperOrigin-RevId: 419910568
2022-01-05 14:13:54 -08:00
Galen Andrew
668afa892e Migrate references to dp_event to Google DP libraries.
PiperOrigin-RevId: 419663382
2022-01-04 13:11:10 -08:00
Shuang Song
8d147bc9d7 For MIA plotting, allow customized plotting function and set equal x and y aspects.
PiperOrigin-RevId: 417852309
2021-12-22 11:08:54 -08:00
Steve Chien
c6576f60c4 Ensure that apply_gradients in dp_optimizer.py is using intended arguments for calls to superclass.
PiperOrigin-RevId: 417654563
2021-12-21 11:06:10 -08:00
Steve Chien
347b99d412 Apply fix to apply_gradients method in vectorized DP Keras optimizer that affected gradient aggregation in multi-replica training.
PiperOrigin-RevId: 417506496
2021-12-20 17:10:39 -08:00
A. Unique TensorFlower
31f110698d Fix of the apply_gradients in Keras DP optimizer.
PiperOrigin-RevId: 417503887
2021-12-20 16:52:50 -08:00
David Marn
03014d0e99 Adds an init file to secret sharer.
PiperOrigin-RevId: 416819054
2021-12-16 08:38:46 -08:00
Nicholas Carlini
f8d516c1c7
Merge branch 'tensorflow:master' into neuracrypt 2021-12-14 13:14:29 -08:00