"megatron/vscode:/vscode.git/clone" did not exist on "60ffce358957caa5a2c10d93ca379dd02e87d1a3"
Commit 6e070e77 authored by Chen Chen's avatar Chen Chen Committed by A. Unique TensorFlower
Browse files

Internal change

PiperOrigin-RevId: 300115297
parent 6e910b1f
......@@ -94,9 +94,11 @@ class Controller(object):
# TODO(rxsang): Support training until exhaustion by passing
# `train_steps=-1`. Currently it cannot be supported with a host training
# loop because break statements are not supported with distributed dataset.
if train_fn is not None and train_steps is None:
raise ValueError("`train_steps` is required when `train_fn` is provided.")
if train_fn is not None and steps_per_loop is None:
if train_fn is not None:
if train_steps is None:
raise ValueError("`train_steps` is required when `train_fn` is "
"provided.")
if steps_per_loop is None:
raise ValueError("`steps_per_loop` is required when `train_fn is "
"provided.")
if not isinstance(steps_per_loop, int) or steps_per_loop < 1:
......
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