Skip to content

Commit

Permalink
corrected warning message
Browse files Browse the repository at this point in the history
  • Loading branch information
levongh committed Sep 5, 2023
1 parent d7ce137 commit c4849ca
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions deeplake/enterprise/dataloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,11 @@ def sampler(self):

@property
def batch_sampler(self):
return BatchSampler(self.sampler, self.batch_size, self.drop_last) if BatchSampler else None
return (
BatchSampler(self.sampler, self.batch_size, self.drop_last)
if BatchSampler
else None
)

@property
def generator(self):
Expand Down Expand Up @@ -688,7 +692,9 @@ def __get_indra_dataloader(
seed = DeeplakeRandom().get_seed()
if self._offset is not None and self._shuffle and seed is None:
warnings.warn(
"To keep dataloader consistent during setting offset and shuffling params please confider seeting deeplake.random.seed"
"offset and shuffle parameters are set without a random seed. This means that the ordering of the samples are "
"not equal after each initialization and iteration through the dataloader. If you intend to shuffle data while "
"preserving the offset for resuming iteration at a predictable index and order, please set a random seed using deeplake.random()"
)

return INDRA_LOADER(
Expand Down

0 comments on commit c4849ca

Please sign in to comment.