Skip to content

Commit dd184e9

Browse files
Merge pull request #18140 from NicoWeio:pickl-e-able
PiperOrigin-RevId: 538836341
2 parents 6ca701b + d2afce2 commit dd184e9

File tree

5 files changed

+11
-10
lines changed

5 files changed

+11
-10
lines changed

keras/engine/training.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1644,7 +1644,7 @@ def fit(
16441644
`keras.utils.Sequence` input only. If `True`, use process-based
16451645
threading. If unspecified, `use_multiprocessing` will default to
16461646
`False`. Note that because this implementation relies on
1647-
multiprocessing, you should not pass non-picklable arguments to
1647+
multiprocessing, you should not pass non-pickleable arguments to
16481648
the generator as they can't be passed easily to children
16491649
processes.
16501650
@@ -2179,7 +2179,7 @@ def evaluate(
21792179
`keras.utils.Sequence` input only. If `True`, use process-based
21802180
threading. If unspecified, `use_multiprocessing` will default to
21812181
`False`. Note that because this implementation relies on
2182-
multiprocessing, you should not pass non-picklable arguments to
2182+
multiprocessing, you should not pass non-pickleable arguments to
21832183
the generator as they can't be passed easily to children
21842184
processes.
21852185
return_dict: If `True`, loss and metric results are returned as a
@@ -2537,7 +2537,7 @@ def predict(
25372537
`keras.utils.Sequence` input only. If `True`, use process-based
25382538
threading. If unspecified, `use_multiprocessing` will default to
25392539
`False`. Note that because this implementation relies on
2540-
multiprocessing, you should not pass non-picklable arguments to
2540+
multiprocessing, you should not pass non-pickleable arguments to
25412541
the generator as they can't be passed easily to children
25422542
processes.
25432543

keras/engine/training_generator_v1.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def model_iteration(
9393
use_multiprocessing: Boolean. If `True`, use process-based threading. If
9494
unspecified, `use_multiprocessing` will default to `False`. Note that
9595
because this implementation relies on multiprocessing, you should not
96-
pass non-picklable arguments to the generator as they can't be passed
96+
pass non-pickleable arguments to the generator as they can't be passed
9797
easily to children processes.
9898
shuffle: Boolean. Whether to shuffle the order of the batches at the
9999
beginning of each epoch. Only used with instances of `Sequence`
@@ -423,7 +423,7 @@ def _validate_arguments(
423423
use_multiprocessing: Boolean. If `True`, use process-based threading. If
424424
unspecified, `use_multiprocessing` will default to `False`. Note that
425425
because this implementation relies on multiprocessing, you should not
426-
pass non-picklable arguments to the generator as they can't be passed
426+
pass non-pickleable arguments to the generator as they can't be passed
427427
easily to children processes.
428428
workers: Integer. Maximum number of processes to spin up when using
429429
process-based threading. If unspecified, `workers` will default to 1. If

keras/engine/training_v1.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -823,7 +823,7 @@ def fit(
823823
`keras.utils.Sequence` input only. If `True`, use process-based
824824
threading. If unspecified, `use_multiprocessing` will default to
825825
`False`. Note that because this implementation relies on
826-
multiprocessing, you should not pass non-picklable arguments to
826+
multiprocessing, you should not pass non-pickleable arguments to
827827
the generator as they can't be passed easily to children
828828
processes.
829829
**kwargs: Used for backwards compatibility.
@@ -953,7 +953,7 @@ def evaluate(
953953
`keras.utils.Sequence` input only. If `True`, use process-based
954954
threading. If unspecified, `use_multiprocessing` will default to
955955
`False`. Note that because this implementation relies on
956-
multiprocessing, you should not pass non-picklable arguments to
956+
multiprocessing, you should not pass non-pickleable arguments to
957957
the generator as they can't be passed easily to children
958958
processes.
959959
@@ -1037,7 +1037,7 @@ def predict(
10371037
`keras.utils.Sequence` input only. If `True`, use process-based
10381038
threading. If unspecified, `use_multiprocessing` will default to
10391039
`False`. Note that because this implementation relies on
1040-
multiprocessing, you should not pass non-picklable arguments to
1040+
multiprocessing, you should not pass non-pickleable arguments to
10411041
the generator as they can't be passed easily to children
10421042
processes.
10431043

keras/layers/rnn/dropout_rnn_cell_mixin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def _create_non_trackable_mask_cache(self):
5757
ensure same mask is used every time.
5858
5959
Also the caches are created without tracking. Since they are not
60-
picklable by python when deepcopy, we don't want
60+
pickleable by python when deepcopy, we don't want
6161
`layer._obj_reference_counts_dict` to track it by default.
6262
"""
6363
self._dropout_mask_cache = backend.ContextValueCache(

keras/saving/pickle_utils_test.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ class TestPickleProtocol(test_combinations.TestCase):
4242
),
4343
)
4444
def test_built_models(self, serializer):
45-
"""Built models should be copyable and picklable for all model types."""
45+
"""Built models should be copyable and pickleable for all model
46+
types."""
4647
if not tf.__internal__.tf2.enabled():
4748
self.skipTest(
4849
"pickle model only available in v2 when tf format is used."

0 commit comments

Comments
 (0)