You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi ! the desc parameter is only available for Dataset / DatasetDict for the progress bar of `map()``
Since IterableDataset only runs the map functions when you iterate over the dataset, there is no progress bar and desc is useless. We could still add the argument for parity but it wouldn't be used for anything
Describe the bug
IterableDatasetDict map function is missing the
desc
parameter. You can see the equivalent map function for Dataset here.There might be other parameters missing - I haven't checked.
Steps to reproduce the bug
from datasets import Dataset, IterableDataset, IterableDatasetDict
ds = IterableDatasetDict({"train": Dataset.from_dict({"a": range(6)}).to_iterable_dataset(num_shards=3),
"validate": Dataset.from_dict({"a": range(6)}).to_iterable_dataset(num_shards=3)})
for d in ds["train"]:
print(d)
ds = ds.map(lambda x: {k: v+1 for k, v in x.items()}, desc="increment")
for d in ds["train"]:
print(d)
Expected behavior
The description parameter should be available for all datasets (or none).
Environment info
datasets
version: 3.2.0huggingface_hub
version: 0.28.1fsspec
version: 2024.9.0The text was updated successfully, but these errors were encountered: