Error when downloading datasets to non-traditional cache directories
CONTRIBUTOR
Same here !
2021-11-24T21:42:31Z
https://github.com/huggingface/datasets/issues/2926#issuecomment-978272927
https://api.github.com/repos/huggingface/datasets/issues/2926
IC_kwDODunzps46T0Kf
https://api.github.com/repos/huggingface/datasets/issues/comments/978272927/reactions
2021-11-24T21:42:31Z
https://api.github.com/repos/huggingface/datasets/issues/comments/978272927
https://avatars.githubusercontent.com/u/22492839?v=4
https://api.github.com/users/PierreColombo/events{/privacy}
https://api.github.com/users/PierreColombo/followers
https://api.github.com/users/PierreColombo/following{/other_user}
https://api.github.com/users/PierreColombo/gists{/gist_id}
https://github.com/PierreColombo
PierreColombo
MDQ6VXNlcjIyNDkyODM5
https://api.github.com/users/PierreColombo/orgs
https://api.github.com/users/PierreColombo/received_events
https://api.github.com/users/PierreColombo/repos
https://api.github.com/users/PierreColombo/starred{/owner}{/repo}
https://api.github.com/users/PierreColombo/subscriptions
User
https://api.github.com/users/PierreColombo
public
## Describe the bug
When the cache directory is linked (soft link) to a directory on a NetApp device, the download fails. 

## Steps to reproduce the bug
```bash
ln -s /path/to/netapp/.cache ~/.cache
```

```python
load_dataset("imdb")
```

## Expected results
Successfully loading IMDB dataset

## Actual results
```
datasets.utils.info_utils.NonMatchingSplitsSizesError: [{'expected': SplitInfo(name='train', num_bytes=33432835, 
num_examples=25000, dataset_name='imdb'), 'recorded': SplitInfo(name='train', num_bytes=0, num_examples=0,
 dataset_name='imdb')}, {'expected': SplitInfo(name='test', num_bytes=32650697, num_examples=25000, dataset_name='imdb'),
 'recorded': SplitInfo(name='test', num_bytes=659932, num_examples=503, dataset_name='imdb')}, {'expected':
 SplitInfo(name='unsupervised', num_bytes=67106814, num_examples=50000, dataset_name='imdb'), 'recorded':
 SplitInfo(name='unsupervised', num_bytes=0, num_examples=0, dataset_name='imdb')}]
```

## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.1.2
- Platform: Ubuntu 
- Python version: 3.8

## Extra notes
Stranger yet, trying to debug the phenomenon, I found the range of results to vary a lot without clear direction:
 - With `cache_dir="/path/to/netapp/.cache"` the same thing happens.
 - However, when linking `~/netapp/` to `/path/to/netapp` *and* setting `cache_dir="~/netapp/.cache/huggingface/datasets"` - it does work
 - On the other hand, when linking `~/.cache` to `~/netapp/.cache` without using `cache_dir`, it does work anymore.

While I could test it only for a NetApp device, it might have to do with any other mounted FS.

Thanks :)

