Skip to content

Commit e05a18d

Browse files
iindykcopybara-github
authored andcommitted
Expose SharedMemoryArrayMetadata in the public API.
PiperOrigin-RevId: 872892220
1 parent b12f0f4 commit e05a18d

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ changes. Best viewed [here](https://google-grain.readthedocs.io/en/latest/change
1616
in background with `start_prefetch` call.
1717
* Immediately starts processing elements in the background after restoring
1818
from a checkpoint with Orbax.
19+
* Exposes `SharedMemoryArrayMetadata` in a public API as a metadata descriptor for `SharedMemoryArray`.
1920

2021
* Breaking changes:
2122
* Custom implementations of `RandomAccessDataSource` should accept `int`

docs/grain.multiprocessing.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,6 @@ List of Members
1111
.. autoclass:: SharedMemoryArray
1212
:members:
1313

14+
.. autoclass:: SharedMemoryArrayMetadata
15+
:members:
16+

grain/multiprocessing.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@
1515

1616

1717
# pylint: disable=g-importing-member
18+
# pylint: disable=g-multiple-import
1819
# pylint: disable=unused-import
1920

20-
from grain._src.python.ipc.shared_memory_array import SharedMemoryArray
21+
from grain._src.python.ipc.shared_memory_array import (
22+
SharedMemoryArray,
23+
SharedMemoryArrayMetadata,
24+
)
2125
from grain._src.python.options import MultiprocessingOptions

0 commit comments

Comments
 (0)