Skip to content

Commit

Permalink
minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmeda14960 committed Oct 16, 2024
1 parent 50500b9 commit 49afb5d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 16 deletions.
2 changes: 0 additions & 2 deletions src/levanter/main/train_lm.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,6 @@ def compute_log_probs(model, example):

## OK, actually run training!
trainer.train(state, train_loader)

## OK, actually run training!

# checkpointer.on_step(last_step, force=True)

Expand Down
14 changes: 0 additions & 14 deletions src/levanter/trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,26 +376,12 @@ def training_steps(self, state: S, train_loader, run_hooks: bool = True) -> typi
while int(state.step) < self.num_train_steps:
with capture_time() as loading_time:
example = next(iter_data)
# while int(state.step) < target_steps and (epochs is None or current_epoch < epochs):
# current_epoch += 1
# print(f"Starting epoch {current_epoch}")
# levanter.tracker.log_metrics({"epochs": current_epoch }, step=state.step)
info = self.train_step(state, example)
state = info.state

if run_hooks:
with capture_time() as hook_time:
self.run_hooks(info)
# while True:
# try:
# with capture_time() as loading_time:
# example = next(iter_data)
# except StopIteration:
# # End of DataLoader iterator, proceed to next epoch
# train_loader = train_loader.iter_from_step(int(state.step))
# print(f"End of epoch {current_epoch}")
# levanter.tracker.log_metrics({"epochs": current_epoch }, step=state.step)
# current_epoch += 1

levanter.tracker.log_metrics({"throughput/hook_time": hook_time()}, step=info.step)

Expand Down

0 comments on commit 49afb5d

Please sign in to comment.