Skip to content

Commit

Permalink
CachedDataset/HDFDataset, fix epoch None
Browse files Browse the repository at this point in the history
  • Loading branch information
albertz committed Sep 2, 2023
1 parent 871ebca commit fab627c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions returnn/datasets/cached.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,8 @@ def batch_set_generator_cache_whole_epoch(self):
def _init_alloc_intervals(self):
if self.cache_byte_size_limit_at_start == 0:
return
if self.epoch is None:
return
assert self.num_seqs > 0
assert self.num_inputs > 0
assert self.window > 0
Expand Down Expand Up @@ -183,6 +185,8 @@ def _init_start_cache(self):
return
if not self.nbytes:
return
if not self.epoch:
return

num_cached = 0
cached_bytes = 0
Expand Down

0 comments on commit fab627c

Please sign in to comment.