train_test_split returns empty dataset item
NONE
The problem still exists after removing the cache files.
2020-09-28T07:22:01Z
https://github.com/huggingface/datasets/issues/676#issuecomment-699828594
https://api.github.com/repos/huggingface/datasets/issues/676
MDEyOklzc3VlQ29tbWVudDY5OTgyODU5NA==
https://api.github.com/repos/huggingface/datasets/issues/comments/699828594/reactions
2020-09-28T07:22:01Z
https://api.github.com/repos/huggingface/datasets/issues/comments/699828594
https://avatars.githubusercontent.com/u/26648528?v=4
https://api.github.com/users/mojave-pku/events{/privacy}
https://api.github.com/users/mojave-pku/followers
https://api.github.com/users/mojave-pku/following{/other_user}
https://api.github.com/users/mojave-pku/gists{/gist_id}
https://github.com/mojave-pku
mojave-pku
MDQ6VXNlcjI2NjQ4NTI4
https://api.github.com/users/mojave-pku/orgs
https://api.github.com/users/mojave-pku/received_events
https://api.github.com/users/mojave-pku/repos
https://api.github.com/users/mojave-pku/starred{/owner}{/repo}
https://api.github.com/users/mojave-pku/subscriptions
User
https://api.github.com/users/mojave-pku
public
MEMBER
Can you reproduce this example in a Colab so we can investigate? (or give more information on your software/hardware config)
2020-09-28T13:48:35Z
https://github.com/huggingface/datasets/issues/676#issuecomment-700018823
https://api.github.com/repos/huggingface/datasets/issues/676
MDEyOklzc3VlQ29tbWVudDcwMDAxODgyMw==
https://api.github.com/repos/huggingface/datasets/issues/comments/700018823/reactions
2020-09-28T13:48:35Z
https://api.github.com/repos/huggingface/datasets/issues/comments/700018823
https://avatars.githubusercontent.com/u/7353373?v=4
https://api.github.com/users/thomwolf/events{/privacy}
https://api.github.com/users/thomwolf/followers
https://api.github.com/users/thomwolf/following{/other_user}
https://api.github.com/users/thomwolf/gists{/gist_id}
https://github.com/thomwolf
thomwolf
MDQ6VXNlcjczNTMzNzM=
https://api.github.com/users/thomwolf/orgs
https://api.github.com/users/thomwolf/received_events
https://api.github.com/users/thomwolf/repos
https://api.github.com/users/thomwolf/starred{/owner}{/repo}
https://api.github.com/users/thomwolf/subscriptions
User
https://api.github.com/users/thomwolf
public
MEMBER
Thanks for reporting.
I just found the issue, I'm creating a PR
2020-10-07T12:32:00Z
https://github.com/huggingface/datasets/issues/676#issuecomment-704903193
https://api.github.com/repos/huggingface/datasets/issues/676
MDEyOklzc3VlQ29tbWVudDcwNDkwMzE5Mw==
https://api.github.com/repos/huggingface/datasets/issues/comments/704903193/reactions
2020-10-07T12:32:00Z
https://api.github.com/repos/huggingface/datasets/issues/comments/704903193
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
MEMBER
We'll do a release pretty soon to include the fix :)
In the meantime you can install the lib from source if you want to 
2020-10-07T13:46:33Z
https://github.com/huggingface/datasets/issues/676#issuecomment-704947115
https://api.github.com/repos/huggingface/datasets/issues/676
MDEyOklzc3VlQ29tbWVudDcwNDk0NzExNQ==
https://api.github.com/repos/huggingface/datasets/issues/comments/704947115/reactions
2020-10-07T13:46:33Z
https://api.github.com/repos/huggingface/datasets/issues/comments/704947115
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
I try to split my dataset by `train_test_split`, but after that the item in `train` and `test` `Dataset` is empty.
The codes:
```
yelp_data = datasets.load_from_disk('/home/ssd4/huanglianzhe/test_yelp')
    print(yelp_data[0])
    yelp_data = yelp_data.train_test_split(test_size=0.1)
    print(yelp_data)
    print(yelp_data['test'])
    print(yelp_data['test'][0])
```
The outputs:
```
{'stars': 2.0, 'text': 'xxxx'}
Loading cached split indices for dataset at /home/ssd4/huanglianzhe/test_yelp/cache-f9b22d8b9d5a7346.arrow and /home/ssd4/huanglianzhe/test_yelp/cache-4aa26fa4005059d1.arrow
DatasetDict({'train': Dataset(features: {'stars': Value(dtype='float64', id=None), 'text': Value(dtype='string', id=None)}, num_rows: 7219009), 'test': Dataset(features: {'stars': Value(dtype='float64', id=None), 'text': Value(dtype='string', id=None)}, num_rows: 802113)})
Dataset(features: {'stars': Value(dtype='float64', id=None), 'text': Value(dtype='string', id=None)}, num_rows: 802113)
{}    # yelp_data['test'][0] is empty
```