Skip to content

grain.experimental.device_put not exposed #1005

@DBraun

Description

@DBraun

Using grain 0.2.12 on Linux and macOS:

>>> import grain
>>> grain.__version__
'0.2.12'
>>> grain.experimental.device_put
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: module 'grain.experimental' has no attribute 'device_put'
>>>

So the example usage of grain.experimental.device_put at https://google-grain.readthedocs.io/en/latest/tutorials/dataset_advanced_tutorial.html#:~:text=.experimental.-,device_put,-(%0A%20%20%20%20%20%20%20%20ds%3D is not possible.

One must do

from grain._src.python.experimental.device_put.device_put import device_put
device_put(
    ds=ds,
    device=sharding,
    cpu_buffer_size=cpu_buffer_size,
    device_buffer_size=tpu_buffer_size,
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions