Grain 0.2.13
-
New features
- Adds
reseed_each_epochoption toMapDataset.repeatthat allows to replay
the first epoch exactly if set to False (True by default). - Introduces
grain.experimental.RebatchIterDatasetfor efficient rebatch. - Migrates data loader to use dataset API under the hood.
- Improves first-fit packing speed by up to 12x.
- Adds best-fit packing implementation which reduces padding in benchmarks by
over 27% compared to first-fit. - Adds
max_sequences_per_binto packing transformations to limit the number
of sequences packed into a single bin. - Introduces
grain.experimental.RepeatIterDataset. - Adds custom batching function support to
grain.DataLoader. - Adds
grain.experimental.FlatMapTransformsupport tograin.DataLoader.
- Adds
-
Breaking changes:
- SliceMapDataset updated to use the full index relative to the parent
dataset, instead index%len(self).
- SliceMapDataset updated to use the full index relative to the parent
-
Deprecations:
- Graduates
grain.experimental.apply_transformationsto
grain.{MapDataset|IterDataset}.apply. The experimental API will soon be
deprecated.
- Graduates
-
Bug fixes
- Fixes memory leak on
ThreadPrefetchDatasetIteratordeletion.
- Fixes memory leak on