IterableDataset missing column_names, differs from Dataset interface
NONE
Another example is that `IterableDataset.map` does not have `fn_kwargs`, among other arguments. It makes it harder to convert code from Dataset to IterableDataset.
2022-12-22T05:30:31Z
https://github.com/huggingface/datasets/issues/5383#issuecomment-1362436944
https://api.github.com/repos/huggingface/datasets/issues/5383
IC_kwDODunzps5RNSNQ
https://api.github.com/repos/huggingface/datasets/issues/comments/1362436944/reactions
2022-12-22T05:30:31Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1362436944
https://avatars.githubusercontent.com/u/933687?v=4
https://api.github.com/users/iceboundflame/events{/privacy}
https://api.github.com/users/iceboundflame/followers
https://api.github.com/users/iceboundflame/following{/other_user}
https://api.github.com/users/iceboundflame/gists{/gist_id}
https://github.com/iceboundflame
iceboundflame
MDQ6VXNlcjkzMzY4Nw==
https://api.github.com/users/iceboundflame/orgs
https://api.github.com/users/iceboundflame/received_events
https://api.github.com/users/iceboundflame/repos
https://api.github.com/users/iceboundflame/starred{/owner}{/repo}
https://api.github.com/users/iceboundflame/subscriptions
User
https://api.github.com/users/iceboundflame
public
COLLABORATOR
Hi! `fn_kwargs` was added to `IterableDataset.map` in `datasets 2.5.0`, so please update your installation (`pip install -U datasets`) to use it.

Regarding `column_names`, I agree we should add this property to `IterableDataset`. In the meantime, you can use `list(dataset.features.keys())` instead.
2022-12-22T15:48:20Z
https://github.com/huggingface/datasets/issues/5383#issuecomment-1362993633
https://api.github.com/repos/huggingface/datasets/issues/5383
IC_kwDODunzps5RPaHh
https://api.github.com/repos/huggingface/datasets/issues/comments/1362993633/reactions
2022-12-22T15:48:20Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1362993633
https://avatars.githubusercontent.com/u/47462742?v=4
https://api.github.com/users/mariosasko/events{/privacy}
https://api.github.com/users/mariosasko/followers
https://api.github.com/users/mariosasko/following{/other_user}
https://api.github.com/users/mariosasko/gists{/gist_id}
https://github.com/mariosasko
mariosasko
MDQ6VXNlcjQ3NDYyNzQy
https://api.github.com/users/mariosasko/orgs
https://api.github.com/users/mariosasko/received_events
https://api.github.com/users/mariosasko/repos
https://api.github.com/users/mariosasko/starred{/owner}{/repo}
https://api.github.com/users/mariosasko/subscriptions
User
https://api.github.com/users/mariosasko
public
NONE
Thanks! That's great news.

On Thu, Dec 22, 2022, 07:48 Mario Šaško ***@***.***> wrote:

> Hi! fn_kwargs was added to IterableDataset.map in datasets 2.5.0, so
> please update your installation (pip install -U datasets) to use it.
>
> Regarding column_names, I agree we should add this property to
> IterableDataset. In the meantime, you can use
> list(dataset.features.keys()) instead.
>
> —
> Reply to this email directly, view it on GitHub
> <https://github.com/huggingface/datasets/issues/5383#issuecomment-1362993633>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AAHD6N2EQUFEOUFDW3VHSILWORZ45ANCNFSM6AAAAAATGKWVGM>
> .
> You are receiving this because you authored the thread.Message ID:
> ***@***.***>
>

2022-12-23T02:57:30Z
https://github.com/huggingface/datasets/issues/5383#issuecomment-1363563216
https://api.github.com/repos/huggingface/datasets/issues/5383
IC_kwDODunzps5RRlLQ
https://api.github.com/repos/huggingface/datasets/issues/comments/1363563216/reactions
2022-12-23T02:57:30Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1363563216
https://avatars.githubusercontent.com/u/933687?v=4
https://api.github.com/users/iceboundflame/events{/privacy}
https://api.github.com/users/iceboundflame/followers
https://api.github.com/users/iceboundflame/following{/other_user}
https://api.github.com/users/iceboundflame/gists{/gist_id}
https://github.com/iceboundflame
iceboundflame
MDQ6VXNlcjkzMzY4Nw==
https://api.github.com/users/iceboundflame/orgs
https://api.github.com/users/iceboundflame/received_events
https://api.github.com/users/iceboundflame/repos
https://api.github.com/users/iceboundflame/starred{/owner}{/repo}
https://api.github.com/users/iceboundflame/subscriptions
User
https://api.github.com/users/iceboundflame
public
COLLABORATOR
I'm marking this issue as a "good first issue", as it makes sense to have `IterableDataset.column_names` in the API. Besides the case when `features` are `None` (e.g., `features` are `None` after `map`), in which we can also return `column_names` as `None`, adding this property should be straightforward,
2023-02-24T16:38:16Z
https://github.com/huggingface/datasets/issues/5383#issuecomment-1443978634
https://api.github.com/repos/huggingface/datasets/issues/5383
IC_kwDODunzps5WEV2K
https://api.github.com/repos/huggingface/datasets/issues/comments/1443978634/reactions
2023-02-24T16:38:16Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1443978634
https://avatars.githubusercontent.com/u/47462742?v=4
https://api.github.com/users/mariosasko/events{/privacy}
https://api.github.com/users/mariosasko/followers
https://api.github.com/users/mariosasko/following{/other_user}
https://api.github.com/users/mariosasko/gists{/gist_id}
https://github.com/mariosasko
mariosasko
MDQ6VXNlcjQ3NDYyNzQy
https://api.github.com/users/mariosasko/orgs
https://api.github.com/users/mariosasko/received_events
https://api.github.com/users/mariosasko/repos
https://api.github.com/users/mariosasko/starred{/owner}{/repo}
https://api.github.com/users/mariosasko/subscriptions
User
https://api.github.com/users/mariosasko
public
CONTRIBUTOR
Hi @mariosasko, I can work on this if that's ok?
2023-02-25T14:48:42Z
https://github.com/huggingface/datasets/issues/5383#issuecomment-1445134999
https://api.github.com/repos/huggingface/datasets/issues/5383
IC_kwDODunzps5WIwKX
https://api.github.com/repos/huggingface/datasets/issues/comments/1445134999/reactions
2023-02-25T14:48:42Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1445134999
https://avatars.githubusercontent.com/u/50772274?v=4
https://api.github.com/users/patrickloeber/events{/privacy}
https://api.github.com/users/patrickloeber/followers
https://api.github.com/users/patrickloeber/following{/other_user}
https://api.github.com/users/patrickloeber/gists{/gist_id}
https://github.com/patrickloeber
patrickloeber
MDQ6VXNlcjUwNzcyMjc0
https://api.github.com/users/patrickloeber/orgs
https://api.github.com/users/patrickloeber/received_events
https://api.github.com/users/patrickloeber/repos
https://api.github.com/users/patrickloeber/starred{/owner}{/repo}
https://api.github.com/users/patrickloeber/subscriptions
User
https://api.github.com/users/patrickloeber
public
COLLABORATOR
Yes! I've assigned you the issue.
2023-02-26T21:41:17Z
https://github.com/huggingface/datasets/issues/5383#issuecomment-1445474626
https://api.github.com/repos/huggingface/datasets/issues/5383
IC_kwDODunzps5WKDFC
https://api.github.com/repos/huggingface/datasets/issues/comments/1445474626/reactions
2023-02-26T21:41:51Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1445474626
https://avatars.githubusercontent.com/u/47462742?v=4
https://api.github.com/users/mariosasko/events{/privacy}
https://api.github.com/users/mariosasko/followers
https://api.github.com/users/mariosasko/following{/other_user}
https://api.github.com/users/mariosasko/gists{/gist_id}
https://github.com/mariosasko
mariosasko
MDQ6VXNlcjQ3NDYyNzQy
https://api.github.com/users/mariosasko/orgs
https://api.github.com/users/mariosasko/received_events
https://api.github.com/users/mariosasko/repos
https://api.github.com/users/mariosasko/starred{/owner}{/repo}
https://api.github.com/users/mariosasko/subscriptions
User
https://api.github.com/users/mariosasko
public
### Describe the bug

The documentation on [Stream](https://huggingface.co/docs/datasets/v1.18.2/stream.html) seems to imply that IterableDataset behaves just like a Dataset. However, examples like
```
dataset.map(augment_data, batched=True, remove_columns=dataset.column_names, ...)
```
will not work because `.column_names` does not exist on IterableDataset. I cannot find any clear explanation on why this is not available, is it an oversight? We do have `iterable_ds.features` available.

### Steps to reproduce the bug

See above

### Expected behavior

Dataset and IterableDataset would be expected to have the same interface, with any differences noted in the documentation.

### Environment info

n/a