Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/MaxText/data_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ def load_next_batch(self):
self.check_example_batch()
except Exception as e: # pylint: disable=broad-except
if isinstance(e, StopIteration):
raise exceptions.StopTraining(f"You may have run out of training data. Received {type(e)} exception: ({e})")
raise exceptions.StopTraining(f"You may have run out of training data. Received {type(e)} exception: ({e})") from e
else:
raise exceptions.StopTraining(f"`load_next_batch()` failed with {type(e)} exception: ({e}).")
raise exceptions.StopTraining(f"`load_next_batch()` failed with {type(e)} exception: ({e}).") from e
return self.last_batch

def check_example_batch(self):
Expand Down
Loading