Skip to content

Commit 7609e52

Browse files
alanchiaotensorflower-gardener
authored andcommitted
Rename to allowlist instead of whitelist.
https://developers.google.com/style/word-list#blacklist PiperOrigin-RevId: 319123968
1 parent d0ef35e commit 7609e52

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

tensorflow_model_optimization/python/core/quantization/keras/default_8bit/default_8bit_quantize_registry.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class QuantizeRegistry(quantize_registry.QuantizeRegistry, _RNNHelper):
7373
"""QuantizationRegistry for built-in Keras classes for default 8-bit scheme."""
7474

7575
# TODO(tfmot): expand layers test in quantize_functional_test.py
76-
# to add more layers to whitelist.
76+
# to add more layers to allowlist.
7777
_LAYER_QUANTIZE_INFO = [
7878
# Activation Layers
7979
_QuantizeInfo(layers.ReLU, [], [], True),
@@ -149,7 +149,7 @@ class QuantizeRegistry(quantize_registry.QuantizeRegistry, _RNNHelper):
149149

150150
# RNN Cells
151151
# TODO(pulkitb): Verify RNN layers behavior.
152-
# TODO(tfmot): check if we still need to whitelist via compat.v1 and
152+
# TODO(tfmot): check if we still need to allowlist via compat.v1 and
153153
# compat.v2 to support legacy TensorFlow 2.X
154154
# behavior where the v2 RNN uses the v1 RNNCell instead of the v2 RNNCell.
155155
# See b/145939875 for details.

tensorflow_model_optimization/python/core/quantization/keras/quantize_functional_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def testQuantizesMnist(self):
8282
rtol=0.2, atol=0.2)
8383

8484

85-
# Set of tests to determine what we can include in the whitelisted layers
85+
# Set of tests to determine what we can include in the allowlisted layers
8686
# for the default API.
8787
#
8888
# TFLite in TF 2.X currently does not support creation of full-integer models.

tensorflow_model_optimization/python/core/quantization/keras/quantize_wrapper_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def testQuantizesWeightsInLayer(self):
6868
# 1. Only layers with 'kernel' attribute work. Need to extend to others.
6969
# 2. Activations are not tested currently.
7070
# 3. RNN layers need to be added
71-
# TODO(tfmot): reenable some of these once added back to whitelist
71+
# TODO(tfmot): reenable some of these once added back to allowlist
7272
# after testing in quantize_functional_test.py.
7373
@parameterized.parameters(
7474
# (layers.Conv1D, (3, 6), {

tensorflow_model_optimization/python/core/sparsity/keras/prune_registry.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ class PruneRegistry(object):
9797
}
9898

9999
_RNN_CELLS_WEIGHTS_MAP = {
100-
# Whitelist via compat.v1 and compat.v2 to support legacy TensorFlow 2.X
100+
# Allowlist via compat.v1 and compat.v2 to support legacy TensorFlow 2.X
101101
# behavior where the v2 RNN uses the v1 RNNCell instead of the v2 RNNCell.
102102
# See b/145939875 for details.
103103
tf.compat.v1.keras.layers.GRUCell: ['kernel', 'recurrent_kernel'],

0 commit comments

Comments
 (0)