Skip to content

Commit bc43944

Browse files
rxsangtensorflower-gardener
authored andcommitted
Clarify which part of the StandardEvaluator functions is in eager or graph mode.
PiperOrigin-RevId: 365133146
1 parent e773b9b commit bc43944

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

orbit/standard_runner.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,9 +244,11 @@ class StandardEvaluator(runner.AbstractEvaluator, metaclass=abc.ABCMeta):
244244
state = eval_reduce(state, step_outputs)
245245
return eval_end(state)
246246
247-
Calls to `eval_begin`, `eval_reduce`, and `eval_end` are always done in eager
247+
Calls to `eval_begin` and `eval_end` are always done in eager
248248
mode, while `eval_step` may be compiled with `tf.function` as determined by
249-
the `options` passed to `__init__`.
249+
the `options` passed to `__init__`. `eval_reduce` is in eager mode if
250+
`use_tf_while_loop=False` in `StandardEvaluatorOptions`, but in graph mode if
251+
`use_tf_while_loop=True`.
250252
251253
This class does not support completely evaluating multiple different datasets
252254
(i.e., where every example of each dataset should be processed, as opposed to

0 commit comments

Comments
 (0)