Skip to content

Commit cbc71ae

Browse files
SamuelMarkstensorflower-gardener
authored andcommitted
PR #17979: [keras/testing_infra] Standardise docstring usage of "Default to"
Imported from GitHub PR #17979 This is one of many PRs. Discussion + request to split into multiple PRs @ #17748 Copybara import of the project: -- 5c24834 by Samuel Marks <[email protected]>: [keras/testing_infra/test_combinations.py,keras/testing_infra/test_utils.py] Standardise docstring usage of "Default to" Merging this change closes #17979 FUTURE_COPYBARA_INTEGRATE_REVIEW=#17979 from SamuelMarks:keras.testing_infra-defaults-to 5c24834 PiperOrigin-RevId: 530509950
1 parent 000b9eb commit cbc71ae

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

keras/testing_infra/test_combinations.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ def test_foo(self):
112112
test or class.
113113
exclude_formats: A collection of Keras saved model formats to not run.
114114
(May also be a single format not wrapped in a collection).
115-
Defaults to None.
115+
Defaults to `None`.
116116
117117
Returns:
118118
Returns a decorator that will run the decorated test method multiple
@@ -258,7 +258,7 @@ def test_foo(self):
258258
test or class.
259259
exclude_models: A collection of Keras model types to not run.
260260
(May also be a single model type not wrapped in a collection).
261-
Defaults to None.
261+
Defaults to `None`.
262262
263263
Returns:
264264
Returns a decorator that will run the decorated test method multiple
@@ -497,12 +497,13 @@ def keras_mode_combinations(mode=None, run_eagerly=None):
497497
498498
Args:
499499
mode: List of modes to run the tests. The valid options are 'graph' and
500-
'eager'. Default to ['graph', 'eager'] if not specified. If a empty list
501-
is provide, then the test will run under the context based on tf's
502-
version, eg graph for v1 and eager for v2.
500+
'eager'. If None, uses ['graph', 'eager']. If an empty
501+
list is provided, then the test will run under the context based on
502+
tensorflow's version, e.g., graph for v1 and eager for v2. Defaults to
503+
`None`.
503504
run_eagerly: List of `run_eagerly` value to be run with the tests.
504-
Default to [True, False] if not specified. Note that for `graph` mode,
505-
run_eagerly value will only be False.
505+
When None, uses [True, False]. Note that for `graph` mode,
506+
run_eagerly value will only be False. Defaults to `None`.
506507
507508
Returns:
508509
A list contains all the combinations to be used to generate test cases.

keras/testing_infra/test_utils.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -880,10 +880,11 @@ def get_multi_io_model(
880880
shared_input_branch: An optional sequence of layers to apply to a single
881881
input, before applying both branches to that intermediate result. If
882882
set, the model will take only one input instead of two. Defaults to
883-
None.
883+
`None`.
884884
shared_output_branch: An optional sequence of layers to merge the
885885
intermediate results produced by branch a and branch b. If set,
886-
the model will produce only one output instead of two. Defaults to None.
886+
the model will produce only one output instead of two.
887+
Defaults to `None`.
887888
888889
Returns:
889890
A multi-io model of the type specified by `get_model_type`, specified

0 commit comments

Comments
 (0)