Skip to content

Commit 73fdc74

Browse files
SamuelMarkstensorflower-gardener
authored andcommitted
PR #17957: [keras/estimator] Standardise docstring usage of "Default to"
Imported from GitHub PR #17957 This is one of many PRs. Discussion + request to split into multiple PRs @ #17748 Copybara import of the project: -- 037fc4a by Samuel Marks <[email protected]>: [keras/estimator/__init__.py] Standardise docstring usage of "Default to" Merging this change closes #17957 FUTURE_COPYBARA_INTEGRATE_REVIEW=#17957 from SamuelMarks:keras.estimator-defaults-to 037fc4a PiperOrigin-RevId: 535275444
1 parent 2b457af commit 73fdc74

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

keras/estimator/__init__.py

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -114,18 +114,17 @@ def input_fn():
114114
`tempfile.mkdtemp`
115115
config: `RunConfig` to config `Estimator`. Allows setting up things in
116116
`model_fn` based on configuration such as `num_ps_replicas`, or
117-
`model_dir`. Defaults to `None`. If both `config.model_dir` and the
117+
`model_dir`. If both `config.model_dir` and the
118118
`model_dir` argument (above) are specified the `model_dir` **argument**
119-
takes precedence.
119+
takes precedence. Defaults to `None`.
120120
checkpoint_format: Sets the format of the checkpoint saved by the
121121
estimator when training. May be `saver` or `checkpoint`, depending on
122122
whether to save checkpoints from `tf.train.Saver` or
123-
`tf.train.Checkpoint`. This argument currently defaults to `saver`. When
124-
2.0 is released, the default will be `checkpoint`. Estimators use
125-
name-based `tf.train.Saver` checkpoints, while Keras models use
126-
object-based checkpoints from `tf.train.Checkpoint`. Currently, saving
127-
object-based checkpoints from `model_to_estimator` is only supported by
128-
Functional and Sequential models. Defaults to 'saver'.
123+
`tf.train.Checkpoint`. Estimators use name-based `tf.train.Saver`
124+
checkpoints, while Keras models use object-based checkpoints from
125+
`tf.train.Checkpoint`. Currently, saving object-based checkpoints
126+
from `model_to_estimator` is only supported by Functional and
127+
Sequential models. Defaults to 'saver'.
129128
metric_names_map: Optional dictionary mapping Keras model output metric
130129
names to custom names. This can be used to override the default Keras
131130
model output metrics names in a multi IO model use case and provide
@@ -312,9 +311,9 @@ def input_fn():
312311
`tempfile.mkdtemp`
313312
config: `RunConfig` to config `Estimator`. Allows setting up things in
314313
`model_fn` based on configuration such as `num_ps_replicas`, or
315-
`model_dir`. Defaults to `None`. If both `config.model_dir` and the
314+
`model_dir`. If both `config.model_dir` and the
316315
`model_dir` argument (above) are specified the `model_dir` **argument**
317-
takes precedence.
316+
takes precedence. Defaults to `None`.
318317
checkpoint_format: Sets the format of the checkpoint saved by the
319318
estimator when training. May be `saver` or `checkpoint`, depending on
320319
whether to save checkpoints from `tf.compat.v1.train.Saver` or

0 commit comments

Comments
 (0)