expanduser in save_to_disk
COLLABORATOR
`save_to_disk` should indeed expand `~`. Marking it as a "good first issue".
2023-03-24T15:04:02Z
https://github.com/huggingface/datasets/issues/5651#issuecomment-1482952110
https://api.github.com/repos/huggingface/datasets/issues/5651
IC_kwDODunzps5YZA2u
https://api.github.com/repos/huggingface/datasets/issues/comments/1482952110/reactions
2023-03-24T15:04:02Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1482952110
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
#self-assign

File path to code: 

https://github.com/huggingface/datasets/blob/2.13.0/src/datasets/arrow_dataset.py#L1364

@RmZeta2718 I created a pull request for this issue. 
2023-03-25T20:25:47Z
https://github.com/huggingface/datasets/issues/5651#issuecomment-1483914837
https://api.github.com/repos/huggingface/datasets/issues/5651
IC_kwDODunzps5Ycr5V
https://api.github.com/repos/huggingface/datasets/issues/comments/1483914837/reactions
2023-07-08T15:49:27Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1483914837
https://avatars.githubusercontent.com/u/35114142?v=4
https://api.github.com/users/benjaminbrown038/events{/privacy}
https://api.github.com/users/benjaminbrown038/followers
https://api.github.com/users/benjaminbrown038/following{/other_user}
https://api.github.com/users/benjaminbrown038/gists{/gist_id}
https://github.com/benjaminbrown038
benjaminbrown038
MDQ6VXNlcjM1MTE0MTQy
https://api.github.com/users/benjaminbrown038/orgs
https://api.github.com/users/benjaminbrown038/received_events
https://api.github.com/users/benjaminbrown038/repos
https://api.github.com/users/benjaminbrown038/starred{/owner}{/repo}
https://api.github.com/users/benjaminbrown038/subscriptions
User
https://api.github.com/users/benjaminbrown038
public
NONE
Hello, 
It says `save_to_disk` is deprecated in 2.8.0, so the alternative to this will be `storage_options`? 

https://huggingface.co/docs/datasets/package_reference/main_classes#datasets.Dataset.save_to_disk
2023-04-15T20:35:22Z
https://github.com/huggingface/datasets/issues/5651#issuecomment-1509958805
https://api.github.com/repos/huggingface/datasets/issues/5651
IC_kwDODunzps5aACSV
https://api.github.com/repos/huggingface/datasets/issues/comments/1509958805/reactions
2023-04-15T20:35:22Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1509958805
https://avatars.githubusercontent.com/u/45290954?v=4
https://api.github.com/users/ashikshafi08/events{/privacy}
https://api.github.com/users/ashikshafi08/followers
https://api.github.com/users/ashikshafi08/following{/other_user}
https://api.github.com/users/ashikshafi08/gists{/gist_id}
https://github.com/ashikshafi08
ashikshafi08
MDQ6VXNlcjQ1MjkwOTU0
https://api.github.com/users/ashikshafi08/orgs
https://api.github.com/users/ashikshafi08/received_events
https://api.github.com/users/ashikshafi08/repos
https://api.github.com/users/ashikshafi08/starred{/owner}{/repo}
https://api.github.com/users/ashikshafi08/subscriptions
User
https://api.github.com/users/ashikshafi08
public
CONTRIBUTOR
@ashikshafi08 I think you misunderstood the warning. The method `save_to_disk` is not deprecated only the optional parameter `fs`.
Also @benjaminbrown038 as I cannot find your PR I would like to work on this if you don't mind.
2023-07-26T16:18:06Z
https://github.com/huggingface/datasets/issues/5651#issuecomment-1652129426
https://api.github.com/repos/huggingface/datasets/issues/5651
IC_kwDODunzps5ieX6S
https://api.github.com/repos/huggingface/datasets/issues/comments/1652129426/reactions
2023-07-26T16:18:06Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1652129426
https://avatars.githubusercontent.com/u/51715864?v=4
https://api.github.com/users/Unknown3141592/events{/privacy}
https://api.github.com/users/Unknown3141592/followers
https://api.github.com/users/Unknown3141592/following{/other_user}
https://api.github.com/users/Unknown3141592/gists{/gist_id}
https://github.com/Unknown3141592
Unknown3141592
MDQ6VXNlcjUxNzE1ODY0
https://api.github.com/users/Unknown3141592/orgs
https://api.github.com/users/Unknown3141592/received_events
https://api.github.com/users/Unknown3141592/repos
https://api.github.com/users/Unknown3141592/starred{/owner}{/repo}
https://api.github.com/users/Unknown3141592/subscriptions
User
https://api.github.com/users/Unknown3141592
public
NONE
@mariosasko It's been several months and the PR is not reviewed. Could you please take a look? I assume this is not complicated and could be merged fairly soon.
2023-10-24T03:32:05Z
https://github.com/huggingface/datasets/issues/5651#issuecomment-1776466181
https://api.github.com/repos/huggingface/datasets/issues/5651
IC_kwDODunzps5p4rkF
https://api.github.com/repos/huggingface/datasets/issues/comments/1776466181/reactions
2023-10-24T03:32:05Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1776466181
https://avatars.githubusercontent.com/u/42400165?v=4
https://api.github.com/users/RmZeta2718/events{/privacy}
https://api.github.com/users/RmZeta2718/followers
https://api.github.com/users/RmZeta2718/following{/other_user}
https://api.github.com/users/RmZeta2718/gists{/gist_id}
https://github.com/RmZeta2718
RmZeta2718
MDQ6VXNlcjQyNDAwMTY1
https://api.github.com/users/RmZeta2718/orgs
https://api.github.com/users/RmZeta2718/received_events
https://api.github.com/users/RmZeta2718/repos
https://api.github.com/users/RmZeta2718/starred{/owner}{/repo}
https://api.github.com/users/RmZeta2718/subscriptions
User
https://api.github.com/users/RmZeta2718
public
### Describe the bug

save_to_disk() does not expand `~`

1. `dataset = load_datasets("any dataset")`
2. `dataset.save_to_disk("~/data")`
3. a folder named "~" created in current folder
4. FileNotFoundError is raised, because the expanded path does not exist (`/home/<user>/data`)

related issue https://github.com/huggingface/transformers/issues/10628

### Steps to reproduce the bug

As described above.

### Expected behavior

expanduser correctly

### Environment info

- datasets 2.10.1
- python 3.10