Skip to content

Commit

Permalink
add suggested fix from david
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmeda14960 committed Oct 18, 2024
1 parent 37e77fb commit 7c195ba
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/levanter/callbacks.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ def log_epoch(step_info: StepInfo):
nonlocal total_tokens
if total_tokens is None:
if not total_tokens_future.done():
if step_info.step % 1000 == 0:
logger.info("Dataset not finished. Can't compute epochs.")
return # We don't have the total tokens yet, so we can't calculate epoch
total_tokens = total_tokens_future.result()

Expand Down

0 comments on commit 7c195ba

Please sign in to comment.