Skip to content

Commit 6da3d43

Browse files
committed
"Remove unused forward step from train.py"
Signed-off-by: Ananth Subramaniam <[email protected]>
1 parent 91ff9a1 commit 6da3d43

File tree

1 file changed

+0
-19
lines changed

1 file changed

+0
-19
lines changed

nemo/tron/train.py

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -51,25 +51,6 @@
5151
)
5252

5353

54-
def forward_step(data_iterator, loss_func, data_step: Callable, model, global_state: GlobalState):
55-
"""Forward training step.
56-
57-
Args:
58-
data_iterator : Input data iterator
59-
model (GPTModel): The GPT Model
60-
"""
61-
timers = global_state.timers
62-
63-
# Get the batch.
64-
timers("batch-generator", log_level=2).start()
65-
model_inputs = data_step(data_iterator)
66-
timers("batch-generator").stop()
67-
68-
output_tensor = model(**model_inputs)
69-
70-
return output_tensor, partial(loss_func, model_inputs.get("loss_mask", None))
71-
72-
7354
def train(
7455
forward_step_func,
7556
model,

0 commit comments

Comments
 (0)