mirror of
https://github.com/facebookresearch/blt.git
synced 2025-01-31 10:02:15 +00:00
parent
bc42cebd7d
commit
a809259e71
|
@ -150,11 +150,13 @@ class DataloaderArgs(BaseModel):
|
||||||
enable_byte_ngrams=self.enable_byte_ngrams,
|
enable_byte_ngrams=self.enable_byte_ngrams,
|
||||||
)
|
)
|
||||||
packing_iterator = PackingIterator(sampling_iterator, packing_args=packing_args)
|
packing_iterator = PackingIterator(sampling_iterator, packing_args=packing_args)
|
||||||
|
if self.load_async:
|
||||||
mp_iterator = MultiprocessIterator(
|
mp_iterator = MultiprocessIterator(
|
||||||
packing_iterator, n_batches_to_prefetch=self.prefetch_size
|
packing_iterator, n_batches_to_prefetch=self.prefetch_size
|
||||||
)
|
)
|
||||||
|
|
||||||
return mp_iterator
|
return mp_iterator
|
||||||
|
else:
|
||||||
|
return packing_iterator
|
||||||
|
|
||||||
|
|
||||||
class TrainArgs(BaseModel):
|
class TrainArgs(BaseModel):
|
||||||
|
|
Loading…
Reference in a new issue