Fix misleading add_column() usage example in docstring
MEMBER
I believe there are other occurences of cases like this, like select_columns, select, filter, shard and flatten, could you also fix the docstring for them as well before we merge ?
2025-07-07T15:11:04Z
https://github.com/huggingface/datasets/pull/7648#issuecomment-3045569776
https://api.github.com/repos/huggingface/datasets/issues/7648
IC_kwDODunzps61h7Tw
https://api.github.com/repos/huggingface/datasets/issues/comments/3045569776/reactions
2025-07-07T15:11:04Z
https://api.github.com/repos/huggingface/datasets/issues/comments/3045569776
https://avatars.githubusercontent.com/u/42851186?v=4
https://api.github.com/users/lhoestq/events{/privacy}
https://api.github.com/users/lhoestq/followers
https://api.github.com/users/lhoestq/following{/other_user}
https://api.github.com/users/lhoestq/gists{/gist_id}
https://github.com/lhoestq
lhoestq
MDQ6VXNlcjQyODUxMTg2
https://api.github.com/users/lhoestq/orgs
https://api.github.com/users/lhoestq/received_events
https://api.github.com/users/lhoestq/repos
https://api.github.com/users/lhoestq/starred{/owner}{/repo}
https://api.github.com/users/lhoestq/subscriptions
User
https://api.github.com/users/lhoestq
public
CONTRIBUTOR
Done! @lhoestq! I've updated the docstring examples for the following methods to clarify that they return new datasets instead of modifying in-place:

- `select_columns`
- `select`
- `filter`
- `shard`
- `flatten`

2025-07-07T18:11:25Z
https://github.com/huggingface/datasets/pull/7648#issuecomment-3046111777
https://api.github.com/repos/huggingface/datasets/issues/7648
IC_kwDODunzps61j_oh
https://api.github.com/repos/huggingface/datasets/issues/comments/3046111777/reactions
2025-07-07T18:11:25Z
https://api.github.com/repos/huggingface/datasets/issues/comments/3046111777
https://avatars.githubusercontent.com/u/142811259?v=4
https://api.github.com/users/ArjunJagdale/events{/privacy}
https://api.github.com/users/ArjunJagdale/followers
https://api.github.com/users/ArjunJagdale/following{/other_user}
https://api.github.com/users/ArjunJagdale/gists{/gist_id}
https://github.com/ArjunJagdale
ArjunJagdale
U_kgDOCIMgew
https://api.github.com/users/ArjunJagdale/orgs
https://api.github.com/users/ArjunJagdale/received_events
https://api.github.com/users/ArjunJagdale/repos
https://api.github.com/users/ArjunJagdale/starred{/owner}{/repo}
https://api.github.com/users/ArjunJagdale/subscriptions
User
https://api.github.com/users/ArjunJagdale
public
CONTRIBUTOR
Also, any suggestions on what kind of issues I should work on next? I tried looking on my own, but I’d be happy if you could assign me something — I’ll do my best!

2025-07-08T07:25:26Z
https://github.com/huggingface/datasets/pull/7648#issuecomment-3047694093
https://api.github.com/repos/huggingface/datasets/issues/7648
IC_kwDODunzps61qB8N
https://api.github.com/repos/huggingface/datasets/issues/comments/3047694093/reactions
2025-07-08T07:25:26Z
https://api.github.com/repos/huggingface/datasets/issues/comments/3047694093
https://avatars.githubusercontent.com/u/142811259?v=4
https://api.github.com/users/ArjunJagdale/events{/privacy}
https://api.github.com/users/ArjunJagdale/followers
https://api.github.com/users/ArjunJagdale/following{/other_user}
https://api.github.com/users/ArjunJagdale/gists{/gist_id}
https://github.com/ArjunJagdale
ArjunJagdale
U_kgDOCIMgew
https://api.github.com/users/ArjunJagdale/orgs
https://api.github.com/users/ArjunJagdale/received_events
https://api.github.com/users/ArjunJagdale/repos
https://api.github.com/users/ArjunJagdale/starred{/owner}{/repo}
https://api.github.com/users/ArjunJagdale/subscriptions
User
https://api.github.com/users/ArjunJagdale
public
CONTRIBUTOR
Hi! any update on this PR?
2025-07-14T10:42:21Z
https://github.com/huggingface/datasets/pull/7648#issuecomment-3068913005
https://api.github.com/repos/huggingface/datasets/issues/7648
IC_kwDODunzps626-Vt
https://api.github.com/repos/huggingface/datasets/issues/comments/3068913005/reactions
2025-07-14T10:42:21Z
https://api.github.com/repos/huggingface/datasets/issues/comments/3068913005
https://avatars.githubusercontent.com/u/142811259?v=4
https://api.github.com/users/ArjunJagdale/events{/privacy}
https://api.github.com/users/ArjunJagdale/followers
https://api.github.com/users/ArjunJagdale/following{/other_user}
https://api.github.com/users/ArjunJagdale/gists{/gist_id}
https://github.com/ArjunJagdale
ArjunJagdale
U_kgDOCIMgew
https://api.github.com/users/ArjunJagdale/orgs
https://api.github.com/users/ArjunJagdale/received_events
https://api.github.com/users/ArjunJagdale/repos
https://api.github.com/users/ArjunJagdale/starred{/owner}{/repo}
https://api.github.com/users/ArjunJagdale/subscriptions
User
https://api.github.com/users/ArjunJagdale
public
NONE
The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/datasets/pr_7648). All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.
2025-07-17T13:13:51Z
https://github.com/huggingface/datasets/pull/7648#issuecomment-3084030640
https://api.github.com/repos/huggingface/datasets/issues/7648
IC_kwDODunzps630pKw
https://api.github.com/repos/huggingface/datasets/issues/comments/3084030640/reactions
2025-07-17T13:13:51Z
https://api.github.com/repos/huggingface/datasets/issues/comments/3084030640
https://avatars.githubusercontent.com/u/99929124?v=4
https://api.github.com/users/HuggingFaceDocBuilderDev/events{/privacy}
https://api.github.com/users/HuggingFaceDocBuilderDev/followers
https://api.github.com/users/HuggingFaceDocBuilderDev/following{/other_user}
https://api.github.com/users/HuggingFaceDocBuilderDev/gists{/gist_id}
https://github.com/HuggingFaceDocBuilderDev
HuggingFaceDocBuilderDev
U_kgDOBfTMJA
https://api.github.com/users/HuggingFaceDocBuilderDev/orgs
https://api.github.com/users/HuggingFaceDocBuilderDev/received_events
https://api.github.com/users/HuggingFaceDocBuilderDev/repos
https://api.github.com/users/HuggingFaceDocBuilderDev/starred{/owner}{/repo}
https://api.github.com/users/HuggingFaceDocBuilderDev/subscriptions
User
https://api.github.com/users/HuggingFaceDocBuilderDev
public
MEMBER
> Also, any suggestions on what kind of issues I should work on next? I tried looking on my own, but I’d be happy if you could assign me something — I’ll do my best!

Hmm. One long lasting issue is the one about being able to download only one split of a dataset (currently `load_dataset()` downloads all the splits, even when only one of train/test/validation is passed with `load_dataset(..., split=split)`)

This makes some downloads pretty long, I remember Mario started to work on this in this PR but couldn't finish it: https://github.com/huggingface/datasets/pull/6832

I think it would be a challenging but pretty impactful addition, and feel free to ping me if you have questions or if I can help. You can also take a look at Mario's first PR which was already in an advanced state. 

Let me know if it sounds like the kind of contribution you're looking for :)
2025-07-17T13:20:08Z
https://github.com/huggingface/datasets/pull/7648#issuecomment-3084050130
https://api.github.com/repos/huggingface/datasets/issues/7648
IC_kwDODunzps630t7S
https://api.github.com/repos/huggingface/datasets/issues/comments/3084050130/reactions
2025-07-17T13:20:08Z
https://api.github.com/repos/huggingface/datasets/issues/comments/3084050130
https://avatars.githubusercontent.com/u/42851186?v=4
https://api.github.com/users/lhoestq/events{/privacy}
https://api.github.com/users/lhoestq/followers
https://api.github.com/users/lhoestq/following{/other_user}
https://api.github.com/users/lhoestq/gists{/gist_id}
https://github.com/lhoestq
lhoestq
MDQ6VXNlcjQyODUxMTg2
https://api.github.com/users/lhoestq/orgs
https://api.github.com/users/lhoestq/received_events
https://api.github.com/users/lhoestq/repos
https://api.github.com/users/lhoestq/starred{/owner}{/repo}
https://api.github.com/users/lhoestq/subscriptions
User
https://api.github.com/users/lhoestq
public
CONTRIBUTOR
Hi @lhoestq, thanks for the thoughtful suggestion!

The issue you mentioned sounds like a meaningful problem to tackle, and I’d love to take a closer look at it. I’ll start by reviewing Mario’s PR (#6832), understand what was implemented so far, and what remains to be done.

If I have any questions or run into anything unclear, I’ll be sure to reach out. 

I plan to give this a solid try. Thanks again — contributing to Hugging Face is something I truly hope to grow into.

---
Once again the the main Issue is to - 

>Allow users to download only the requested split(s) in load_dataset(...), avoiding unnecessary processing/downloading of the full dataset (especially important for large datasets like svhn, squad, glue).

right?

Also I have gone through some related / mentioned issues and PRs - 

- PR #6832 | Mario's main implementation for per-split download logic. Introduces splits param, _available_splits, and conditional logic in download_and_prepare()

- PR #6639 | Your earlier PR to trigger download_and_prepare() only when splits are missing from disk

- Issue #4101 / #2538 / #6529 | Real-world user complaints about load_dataset(..., split=...) still downloading everything. Confirm the need for this fix

- #2249 | Referenced by albertvillanova — old idea of caching only specific splits

---
IF I am not wrong, #2249 had some limitations - 
- Only worked for some dataset scripts where the download dict had split names as keys (like natural_questions).

- Would fail or cause confusing behavior on datasets with: 
1] Custom download keys (TRAIN_DOWNLOAD_URL, val_nyt, metadata)
2] Files passed one by one to dl_manager.download(), not as a dict

- Reused DownloadConfig, which led to blurry separation between cached_path, DownloadManager, and dataset logic.

- Needed to modify each dataset's _split_generators() to fully support split filtering.

- Risked partial or inconsistent caching if logic wasn’t tight.

2025-07-17T15:04:44Z
https://github.com/huggingface/datasets/pull/7648#issuecomment-3084425516
https://api.github.com/repos/huggingface/datasets/issues/7648
IC_kwDODunzps632Jks
https://api.github.com/repos/huggingface/datasets/issues/comments/3084425516/reactions
2025-07-20T16:07:49Z
https://api.github.com/repos/huggingface/datasets/issues/comments/3084425516
https://avatars.githubusercontent.com/u/142811259?v=4
https://api.github.com/users/ArjunJagdale/events{/privacy}
https://api.github.com/users/ArjunJagdale/followers
https://api.github.com/users/ArjunJagdale/following{/other_user}
https://api.github.com/users/ArjunJagdale/gists{/gist_id}
https://github.com/ArjunJagdale
ArjunJagdale
U_kgDOCIMgew
https://api.github.com/users/ArjunJagdale/orgs
https://api.github.com/users/ArjunJagdale/received_events
https://api.github.com/users/ArjunJagdale/repos
https://api.github.com/users/ArjunJagdale/starred{/owner}{/repo}
https://api.github.com/users/ArjunJagdale/subscriptions
User
https://api.github.com/users/ArjunJagdale
public
CONTRIBUTOR
> Hi @lhoestq, thanks for the thoughtful suggestion!
> 
> The issue you mentioned sounds like a meaningful problem to tackle, and I’d love to take a closer look at it. I’ll start by reviewing Mario’s PR (#6832), understand what was implemented so far, and what remains to be done.
> 
> If I have any questions or run into anything unclear, I’ll be sure to reach out.
> 
> I plan to give this a solid try. Thanks again — contributing to Hugging Face is something I truly hope to grow into.
> 
> Once again the the main Issue is to -
> 
> > Allow users to download only the requested split(s) in load_dataset(...), avoiding unnecessary processing/downloading of the full dataset (especially important for large datasets like svhn, squad, glue).
> 
> right?
> 
> Also I have gone through some related / mentioned issues and PRs -
> 
> * PR [Support downloading specific splits in `load_dataset` #6832](https://github.com/huggingface/datasets/pull/6832) | Mario's main implementation for per-split download logic. Introduces splits param, _available_splits, and conditional logic in download_and_prepare()
> * PR [Run download_and_prepare if missing splits #6639](https://github.com/huggingface/datasets/pull/6639) | Your earlier PR to trigger download_and_prepare() only when splits are missing from disk
> * Issue [How can I download only the train and test split for full numbers using load_dataset()?  #4101](https://github.com/huggingface/datasets/issues/4101) / [Loading partial dataset when debugging #2538](https://github.com/huggingface/datasets/issues/2538) / [Impossible to only download a test split #6529](https://github.com/huggingface/datasets/issues/6529) | Real-world user complaints about load_dataset(..., split=...) still downloading everything. Confirm the need for this fix
> * [Allow downloading/processing/caching only specific splits #2249](https://github.com/huggingface/datasets/pull/2249) | Referenced by albertvillanova — old idea of caching only specific splits
> 
> IF I am not wrong, #2249 had some limitations -
> 
> * Only worked for some dataset scripts where the download dict had split names as keys (like natural_questions).
> * Would fail or cause confusing behavior on datasets with:
>   1] Custom download keys (TRAIN_DOWNLOAD_URL, val_nyt, metadata)
>   2] Files passed one by one to dl_manager.download(), not as a dict
> * Reused DownloadConfig, which led to blurry separation between cached_path, DownloadManager, and dataset logic.
> * Needed to modify each dataset's _split_generators() to fully support split filtering.
> * Risked partial or inconsistent caching if logic wasn’t tight.

Also This one is in the charge now - https://github.com/huggingface/datasets/pull/7706#issue-3271129240
2025-07-28T19:42:05Z
https://github.com/huggingface/datasets/pull/7648#issuecomment-3129063346
https://api.github.com/repos/huggingface/datasets/issues/7648
IC_kwDODunzps66gbey
https://api.github.com/repos/huggingface/datasets/issues/comments/3129063346/reactions
2025-07-28T19:42:34Z
https://api.github.com/repos/huggingface/datasets/issues/comments/3129063346
https://avatars.githubusercontent.com/u/142811259?v=4
https://api.github.com/users/ArjunJagdale/events{/privacy}
https://api.github.com/users/ArjunJagdale/followers
https://api.github.com/users/ArjunJagdale/following{/other_user}
https://api.github.com/users/ArjunJagdale/gists{/gist_id}
https://github.com/ArjunJagdale
ArjunJagdale
U_kgDOCIMgew
https://api.github.com/users/ArjunJagdale/orgs
https://api.github.com/users/ArjunJagdale/received_events
https://api.github.com/users/ArjunJagdale/repos
https://api.github.com/users/ArjunJagdale/starred{/owner}{/repo}
https://api.github.com/users/ArjunJagdale/subscriptions
User
https://api.github.com/users/ArjunJagdale
public
Fixes #7611

This PR fixes the usage example in the Dataset.add_column() docstring, which previously implied that add_column() modifies the dataset in-place.

Why:
The method returns a new dataset with the additional column, and users must assign the result to a variable to preserve the change.

This should make the behavior clearer for users.
@lhoestq @davanstrien 