load_dataset hang on file_lock
{'login': 'tomacai', 'id': 69860107, 'node_id': 'MDQ6VXNlcjY5ODYwMTA3', 'avatar_url': 'https://avatars.githubusercontent.com/u/69860107?v=4', 'gravatar_id': '', 'url': 'https://api.github.com/users/tomacai', 'html_url': 'https://github.com/tomacai', 'followers_url': 'https://api.github.com/users/tomacai/followers', 'following_url': 'https://api.github.com/users/tomacai/following{/other_user}', 'gists_url': 'https://api.github.com/users/tomacai/gists{/gist_id}', 'starred_url': 'https://api.github.com/users/tomacai/starred{/owner}{/repo}', 'subscriptions_url': 'https://api.github.com/users/tomacai/subscriptions', 'organizations_url': 'https://api.github.com/users/tomacai/orgs', 'repos_url': 'https://api.github.com/users/tomacai/repos', 'events_url': 'https://api.github.com/users/tomacai/events{/privacy}', 'received_events_url': 'https://api.github.com/users/tomacai/received_events', 'type': 'User', 'site_admin': False}
[]
[]
['Can you try to upgrade to a more recent version of datasets?'
 'Thank, upgrading to 1.1.3 resolved the issue.'
 'Having the same issue with `datasets 1.1.3` of `1.5.0` (both tracebacks look the same) and `kilt_wikipedia`, Ubuntu 20.04\r\n\r\n```py\r\nIn [1]: from datasets import load_dataset                                                                                                                                                                          \r\n\r\nIn [2]: wikipedia = load_dataset(\'kilt_wikipedia\')[\'full\']                                                                                                                   \r\nDownloading: 7.37kB [00:00, 2.74MB/s]                                                                                                                                                                              \r\nDownloading: 3.33kB [00:00, 1.44MB/s]                                                                                                                                                                              \r\n^C---------------------------------------------------------------------------\r\nOSError                                   Traceback (most recent call last)\r\n~/anaconda3/envs/transformers2/lib/python3.7/site-packages/datasets/utils/filelock.py in _acquire(self)\r\n    380         try:\r\n--> 381             fcntl.flock(fd, fcntl.LOCK_EX | fcntl.LOCK_NB)\r\n    382         except (IOError, OSError):\r\n\r\nOSError: [Errno 37] No locks available\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nKeyboardInterrupt                         Traceback (most recent call last)\r\n<ipython-input-2-f412d3d46ec9> in <module>\r\n----> 1 wikipedia = load_dataset(\'kilt_wikipedia\')[\'full\']\r\n\r\n~/anaconda3/envs/transformers2/lib/python3.7/site-packages/datasets/load.py in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, sav\r\ne_infos, script_version, **config_kwargs)\r\n    601         hash=hash,\r\n    602         features=features,\r\n--> 603         **config_kwargs,\r\n    604     )\r\n    605 \r\n\r\n~/anaconda3/envs/transformers2/lib/python3.7/site-packages/datasets/builder.py in __init__(self, *args, **kwargs)\r\n    841     def __init__(self, *args, **kwargs):\r\n    842         self._writer_batch_size = kwargs.pop("writer_batch_size", self._writer_batch_size)\r\n--> 843         super(GeneratorBasedBuilder, self).__init__(*args, **kwargs)\r\n    844 \r\n    845     @abc.abstractmethod\r\n\r\n~/anaconda3/envs/transformers2/lib/python3.7/site-packages/datasets/builder.py in __init__(self, cache_dir, name, hash, features, **config_kwargs)\r\n    174             os.makedirs(self._cache_dir_root, exist_ok=True)\r\n    175         lock_path = os.path.join(self._cache_dir_root, self._cache_dir.replace(os.sep, "_") + ".lock")\r\n--> 176         with FileLock(lock_path):\r\n    177             if os.path.exists(self._cache_dir):  # check if data exist\r\n    178                 if len(os.listdir(self._cache_dir)) > 0:\r\n\r\n~/anaconda3/envs/transformers2/lib/python3.7/site-packages/datasets/utils/filelock.py in __enter__(self)\r\n    312 \r\n    313     def __enter__(self):\r\n--> 314         self.acquire()\r\n    315         return self\r\n    316 \r\n\r\n~/anaconda3/envs/transformers2/lib/python3.7/site-packages/datasets/utils/filelock.py in acquire(self, timeout, poll_intervall)\r\n    261                     if not self.is_locked:\r\n    262                         logger().debug("Attempting to acquire lock %s on %s", lock_id, lock_filename)\r\n--> 263                         self._acquire()\r\n    264 \r\n    265                 if self.is_locked:\r\n\r\n~/anaconda3/envs/transformers2/lib/python3.7/site-packages/datasets/utils/filelock.py in _acquire(self)\r\n    379 \r\n    380         try:\r\n--> 381             fcntl.flock(fd, fcntl.LOCK_EX | fcntl.LOCK_NB)\r\n    382         except (IOError, OSError):\r\n    383             os.close(fd)\r\n\r\nKeyboardInterrupt: \r\n\r\n```']
I am trying to load the squad dataset. Fails on Windows 10 but succeeds in Colab.
Transformers:  3.3.1
Datasets:  1.0.2
Windows 10 (also tested in WSL)

```
datasets.logging.set_verbosity_debug()
datasets.
train_dataset = load_dataset('squad', split='train')
valid_dataset = load_dataset('squad', split='validation')

train_dataset.features
```

```
https://raw.githubusercontent.com/huggingface/datasets/1.0.2/datasets/squad/squad.py not found in cache or force_download set to True, downloading to C:\Users\simpl\.cache\huggingface\datasets\tmpzj_o_6u7
Downloading:
5.24k/? [00:00<00:00, 134kB/s]
storing https://raw.githubusercontent.com/huggingface/datasets/1.0.2/datasets/squad/squad.py in cache at C:\Users\simpl\.cache\huggingface\datasets\f6877c8d2e01e8fcb60dc101be28b54a7522feac756deb9ac5c39c6d8ebef1ce.85f43de978b9b25921cb78d7a2f2b350c04acdbaedb9ecb5f7101cd7c0950e68.py
creating metadata file for C:\Users\simpl\.cache\huggingface\datasets\f6877c8d2e01e8fcb60dc101be28b54a7522feac756deb9ac5c39c6d8ebef1ce.85f43de978b9b25921cb78d7a2f2b350c04acdbaedb9ecb5f7101cd7c0950e68.py

Checking C:\Users\simpl\.cache\huggingface\datasets\f6877c8d2e01e8fcb60dc101be28b54a7522feac756deb9ac5c39c6d8ebef1ce.85f43de978b9b25921cb78d7a2f2b350c04acdbaedb9ecb5f7101cd7c0950e68.py for additional imports.
Found main folder for dataset https://raw.githubusercontent.com/huggingface/datasets/1.0.2/datasets/squad/squad.py at C:\Users\simpl\.cache\huggingface\modules\datasets_modules\datasets\squad
Found specific version folder for dataset https://raw.githubusercontent.com/huggingface/datasets/1.0.2/datasets/squad/squad.py at C:\Users\simpl\.cache\huggingface\modules\datasets_modules\datasets\squad\1244d044b266a5e4dbd4174d23cb995eead372fbca31a03edc3f8a132787af41
Found script file from https://raw.githubusercontent.com/huggingface/datasets/1.0.2/datasets/squad/squad.py to C:\Users\simpl\.cache\huggingface\modules\datasets_modules\datasets\squad\1244d044b266a5e4dbd4174d23cb995eead372fbca31a03edc3f8a132787af41\squad.py
Couldn't find dataset infos file at https://raw.githubusercontent.com/huggingface/datasets/1.0.2/datasets/squad\dataset_infos.json
Found metadata file for dataset https://raw.githubusercontent.com/huggingface/datasets/1.0.2/datasets/squad/squad.py at C:\Users\simpl\.cache\huggingface\modules\datasets_modules\datasets\squad\1244d044b266a5e4dbd4174d23cb995eead372fbca31a03edc3f8a132787af41\squad.json
No config specified, defaulting to first: squad/plain_text
```

Interrupting the jupyter kernel we are in a file lock.

In Google Colab the download is ok. In contrast to a local run in colab dataset_infos.json is downloaded
```
https://raw.githubusercontent.com/huggingface/datasets/1.0.2/datasets/squad/dataset_infos.json not found in cache or force_download set to True, downloading to /root/.cache/huggingface/datasets/tmptl9ha_ad

Downloading:
2.19k/? [00:00<00:00, 26.2kB/s]
```
{'url': 'https://api.github.com/repos/huggingface/datasets/issues/1672/reactions', 'total_count': 0, '+1': 0, '-1': 0, 'laugh': 0, 'hooray': 0, 'confused': 0, 'heart': 0, 'rocket': 0, 'eyes': 0}