We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
After calling the with_format("torch") method on an IterableDataset instance, the data format is unchanged.
from datasets import IterableDataset def gen(): for i in range(4): yield {"a": [i] * 4} dataset = IterableDataset.from_generator(gen).with_format("torch") next(iter(dataset))
{"a": torch.tensor([0, 0, 0, 0])} is expected, but {"a": [0, 0, 0, 0]} is observed.
{"a": torch.tensor([0, 0, 0, 0])}
{"a": [0, 0, 0, 0]}
platform==ubuntu 22.04.01 python==3.10.9 datasets==2.11.0
The text was updated successfully, but these errors were encountered:
Hi ! Thanks for reporting, I'm working on it ;)
Sorry, something went wrong.
lhoestq
Successfully merging a pull request may close this issue.
Describe the bug
After calling the with_format("torch") method on an IterableDataset instance, the data format is unchanged.
Steps to reproduce the bug
Expected behavior
{"a": torch.tensor([0, 0, 0, 0])}
is expected, but{"a": [0, 0, 0, 0]}
is observed.Environment info
The text was updated successfully, but these errors were encountered: