Commit fc724b3e authored by A. Unique TensorFlower's avatar A. Unique TensorFlower
Browse files

A minor change to model_training_utils of BERT.

PiperOrigin-RevId: 314417394
parent 3d99cc89
...@@ -235,10 +235,9 @@ def run_customized_training_loop( ...@@ -235,10 +235,9 @@ def run_customized_training_loop(
'TPUStrategy should not run eagerly as it heavily relies on graph' 'TPUStrategy should not run eagerly as it heavily relies on graph'
' optimization for the distributed system.') ' optimization for the distributed system.')
if eval_input_fn and (eval_steps is None or metric_fn is None): if eval_input_fn and eval_steps is None:
raise ValueError( raise ValueError(
'`eval_step` and `metric_fn` are required when `eval_input_fn ` ' '`eval_step` is required when `eval_input_fn ` is not none.')
'is not none.')
if metric_fn and not callable(metric_fn): if metric_fn and not callable(metric_fn):
raise ValueError( raise ValueError(
'if `metric_fn` is specified, metric_fn must be a callable.') 'if `metric_fn` is specified, metric_fn must be a callable.')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment