Skip to content

Commit

Permalink
don't block forever
Browse files Browse the repository at this point in the history
  • Loading branch information
dlwh committed Feb 12, 2025
1 parent 2451f64 commit 902b500
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/levanter/data/loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def __init__(
with local_cpu_mesh():
# It's important that all data loading happens CPU side. We might relax this one day.
current_len = blocking_wait(self.data_store.current_len())
if current_len <= 0:
if current_len is not None and current_len <= 0:
logger.warning("Data store currently has no data. We will block until data is available.")

initial_example = blocking_wait(self.data_store.getitem_async(0))
Expand Down

0 comments on commit 902b500

Please sign in to comment.