From 5c24834eeff0582290f38ef4d18bb5069ae3f1f3 Mon Sep 17 00:00:00 2001 From: Samuel Marks <807580+SamuelMarks@users.noreply.github.com> Date: Wed, 12 Apr 2023 20:36:53 -0400 Subject: [PATCH] [keras/testing_infra/test_combinations.py,keras/testing_infra/test_utils.py] Standardise docstring usage of "Default to" --- keras/testing_infra/test_combinations.py | 15 ++++++++------- keras/testing_infra/test_utils.py | 5 +++-- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/keras/testing_infra/test_combinations.py b/keras/testing_infra/test_combinations.py index d10c558a02d..2f29e1e3d5f 100644 --- a/keras/testing_infra/test_combinations.py +++ b/keras/testing_infra/test_combinations.py @@ -112,7 +112,7 @@ def test_foo(self): test or class. exclude_formats: A collection of Keras saved model formats to not run. (May also be a single format not wrapped in a collection). - Defaults to None. + Defaults to `None`. Returns: Returns a decorator that will run the decorated test method multiple @@ -258,7 +258,7 @@ def test_foo(self): test or class. exclude_models: A collection of Keras model types to not run. (May also be a single model type not wrapped in a collection). - Defaults to None. + Defaults to `None`. Returns: Returns a decorator that will run the decorated test method multiple @@ -497,12 +497,13 @@ def keras_mode_combinations(mode=None, run_eagerly=None): Args: mode: List of modes to run the tests. The valid options are 'graph' and - 'eager'. Default to ['graph', 'eager'] if not specified. If a empty list - is provide, then the test will run under the context based on tf's - version, eg graph for v1 and eager for v2. + 'eager'. If None, uses ['graph', 'eager']. If an empty + list is provided, then the test will run under the context based on + tensorflow's version, e.g., graph for v1 and eager for v2. Defaults to + `None`. run_eagerly: List of `run_eagerly` value to be run with the tests. - Default to [True, False] if not specified. Note that for `graph` mode, - run_eagerly value will only be False. + When None, uses [True, False]. Note that for `graph` mode, + run_eagerly value will only be False. Defaults to `None`. Returns: A list contains all the combinations to be used to generate test cases. diff --git a/keras/testing_infra/test_utils.py b/keras/testing_infra/test_utils.py index 0240f03c13a..0c138c1aea8 100644 --- a/keras/testing_infra/test_utils.py +++ b/keras/testing_infra/test_utils.py @@ -880,10 +880,11 @@ def get_multi_io_model( shared_input_branch: An optional sequence of layers to apply to a single input, before applying both branches to that intermediate result. If set, the model will take only one input instead of two. Defaults to - None. + `None`. shared_output_branch: An optional sequence of layers to merge the intermediate results produced by branch a and branch b. If set, - the model will produce only one output instead of two. Defaults to None. + the model will produce only one output instead of two. + Defaults to `None`. Returns: A multi-io model of the type specified by `get_model_type`, specified