Skip to content
This repository was archived by the owner on Feb 25, 2022. It is now read-only.

Commit 8f55f6c

Browse files
removed a consider-using-in pitfall case
1 parent 7fbd31b commit 8f55f6c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

model_fns.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ def scaffold_fn():
135135
prediction_hooks=[mtf.MtfRestoreHook(lowering)])
136136

137137
# We're not predicting, so we better be training or evaluating
138-
assert (mode == tf.estimator.ModeKeys.TRAIN or mode == tf.estimator.ModeKeys.EVAL)
138+
assert mode in [tf.estimator.ModeKeys.TRAIN, tf.estimator.ModeKeys.EVAL]
139139

140140
if mode == tf.estimator.ModeKeys.TRAIN:
141141
# Gets number of microbatches per batch for serialized training

0 commit comments

Comments
 (0)