-
New features:
- Adds support for filtering Grain-internal stack frames from user-thrown
errors. - Adds experimental support for
get_next_indexandset_next_indexto fetch
and advance agrain.DatasetIteratorto the given produced element index. - Switches to multithreading instead of multiprocessing in
IterDataset.mp_prefetchwhen free-threaded Python is detected. grain.DataLoaderIteratorcan now asynchronously start processing elements
in background withstart_prefetchcall.- Immediately starts processing elements in the background after restoring
from a checkpoint with Orbax. - Exposes
SharedMemoryArrayMetadatain a public API as a metadata descriptor forSharedMemoryArray.
- Adds support for filtering Grain-internal stack frames from user-thrown
-
Breaking changes:
- Custom implementations of
RandomAccessDataSourceshould acceptint
index in__getitem__. Legacy paths that handleSupportsIndexwill still
work at runtime, but depending on the type checker in use, if you're
directly inheriting fromgrain.RandomAccessDataSourceand call
super().__getitem__withSupportsindexyou may see a type checking
error. Switch tointto fix it.
- Custom implementations of
-
Deprecations:
- Deprecates
grain.python.experimental.MultiprocessPrefetchIterDataset,
use the graduated version instead:grain.IterDataset.mp_prefetch. - Deprecates
grain.python.experimental.ConcatenateMapDataset, use the
graduated version instead:grain.MapDataset.concatenate.
- Deprecates
-
Bug fixes:
- Fixes bug in
WindowShuffleIterDatasetcheckpointing.
- Fixes bug in