Dataset viewer issue for Winoground
{'login': 'alcinos', 'id': 7438704, 'node_id': 'MDQ6VXNlcjc0Mzg3MDQ=', 'avatar_url': 'https://avatars.githubusercontent.com/u/7438704?v=4', 'gravatar_id': '', 'url': 'https://api.github.com/users/alcinos', 'html_url': 'https://github.com/alcinos', 'followers_url': 'https://api.github.com/users/alcinos/followers', 'following_url': 'https://api.github.com/users/alcinos/following{/other_user}', 'gists_url': 'https://api.github.com/users/alcinos/gists{/gist_id}', 'starred_url': 'https://api.github.com/users/alcinos/starred{/owner}{/repo}', 'subscriptions_url': 'https://api.github.com/users/alcinos/subscriptions', 'organizations_url': 'https://api.github.com/users/alcinos/orgs', 'repos_url': 'https://api.github.com/users/alcinos/repos', 'events_url': 'https://api.github.com/users/alcinos/events{/privacy}', 'received_events_url': 'https://api.github.com/users/alcinos/received_events', 'type': 'User', 'site_admin': False}
[{'id': 3470211881, 'node_id': 'LA_kwDODunzps7O1zsp', 'url': 'https://api.github.com/repos/huggingface/datasets/labels/dataset-viewer', 'name': 'dataset-viewer', 'color': 'E5583E', 'default': False, 'description': 'Related to the dataset viewer on huggingface.co'}
 {'id': 4030248571, 'node_id': 'LA_kwDODunzps7wOLZ7', 'url': 'https://api.github.com/repos/huggingface/datasets/labels/dataset-viewer-gated', 'name': 'dataset-viewer-gated', 'color': '51F745', 'default': False, 'description': ''}]
{'login': 'severo', 'id': 1676121, 'node_id': 'MDQ6VXNlcjE2NzYxMjE=', 'avatar_url': 'https://avatars.githubusercontent.com/u/1676121?v=4', 'gravatar_id': '', 'url': 'https://api.github.com/users/severo', 'html_url': 'https://github.com/severo', 'followers_url': 'https://api.github.com/users/severo/followers', 'following_url': 'https://api.github.com/users/severo/following{/other_user}', 'gists_url': 'https://api.github.com/users/severo/gists{/gist_id}', 'starred_url': 'https://api.github.com/users/severo/starred{/owner}{/repo}', 'subscriptions_url': 'https://api.github.com/users/severo/subscriptions', 'organizations_url': 'https://api.github.com/users/severo/orgs', 'repos_url': 'https://api.github.com/users/severo/repos', 'events_url': 'https://api.github.com/users/severo/events{/privacy}', 'received_events_url': 'https://api.github.com/users/severo/received_events', 'type': 'User', 'site_admin': False}
[{'login': 'severo', 'id': 1676121, 'node_id': 'MDQ6VXNlcjE2NzYxMjE=', 'avatar_url': 'https://avatars.githubusercontent.com/u/1676121?v=4', 'gravatar_id': '', 'url': 'https://api.github.com/users/severo', 'html_url': 'https://github.com/severo', 'followers_url': 'https://api.github.com/users/severo/followers', 'following_url': 'https://api.github.com/users/severo/following{/other_user}', 'gists_url': 'https://api.github.com/users/severo/gists{/gist_id}', 'starred_url': 'https://api.github.com/users/severo/starred{/owner}{/repo}', 'subscriptions_url': 'https://api.github.com/users/severo/subscriptions', 'organizations_url': 'https://api.github.com/users/severo/orgs', 'repos_url': 'https://api.github.com/users/severo/repos', 'events_url': 'https://api.github.com/users/severo/events{/privacy}', 'received_events_url': 'https://api.github.com/users/severo/received_events', 'type': 'User', 'site_admin': False}
 {'login': 'SBrandeis', 'id': 33657802, 'node_id': 'MDQ6VXNlcjMzNjU3ODAy', 'avatar_url': 'https://avatars.githubusercontent.com/u/33657802?v=4', 'gravatar_id': '', 'url': 'https://api.github.com/users/SBrandeis', 'html_url': 'https://github.com/SBrandeis', 'followers_url': 'https://api.github.com/users/SBrandeis/followers', 'following_url': 'https://api.github.com/users/SBrandeis/following{/other_user}', 'gists_url': 'https://api.github.com/users/SBrandeis/gists{/gist_id}', 'starred_url': 'https://api.github.com/users/SBrandeis/starred{/owner}{/repo}', 'subscriptions_url': 'https://api.github.com/users/SBrandeis/subscriptions', 'organizations_url': 'https://api.github.com/users/SBrandeis/orgs', 'repos_url': 'https://api.github.com/users/SBrandeis/repos', 'events_url': 'https://api.github.com/users/SBrandeis/events{/privacy}', 'received_events_url': 'https://api.github.com/users/SBrandeis/received_events', 'type': 'User', 'site_admin': False}
 {'login': 'lhoestq', 'id': 42851186, 'node_id': 'MDQ6VXNlcjQyODUxMTg2', 'avatar_url': 'https://avatars.githubusercontent.com/u/42851186?v=4', 'gravatar_id': '', 'url': 'https://api.github.com/users/lhoestq', 'html_url': 'https://github.com/lhoestq', 'followers_url': 'https://api.github.com/users/lhoestq/followers', 'following_url': 'https://api.github.com/users/lhoestq/following{/other_user}', 'gists_url': 'https://api.github.com/users/lhoestq/gists{/gist_id}', 'starred_url': 'https://api.github.com/users/lhoestq/starred{/owner}{/repo}', 'subscriptions_url': 'https://api.github.com/users/lhoestq/subscriptions', 'organizations_url': 'https://api.github.com/users/lhoestq/orgs', 'repos_url': 'https://api.github.com/users/lhoestq/repos', 'events_url': 'https://api.github.com/users/lhoestq/events{/privacy}', 'received_events_url': 'https://api.github.com/users/lhoestq/received_events', 'type': 'User', 'site_admin': False}]
['related (same dataset): https://github.com/huggingface/datasets/issues/4149. But the issue is different. Looking at it'
 "I thought this issue was related to the error I was seeing, but upon consideration I'd think the dataset viewer would return a 500 (unable to create the split like me) or a 404 (unable to load split b/c it was never created) error if it was having the issue I was seeing in #4149. 401 message makes it look like dataset viewer isn't passing through the identity of the user who has signed the licensing agreement when making the request to GET [examples.jsonl](https://huggingface.co/datasets/facebook/winoground/resolve/a86a60456fbbd242e9a744199071a6bd3e7fd9de/examples.jsonl)."
 'Pinging @SBrandeis, as it seems related to gated datasets and access tokens.'
 'To replicate:\r\n\r\n```python\r\n>>> import datasets\r\n>>> dataset= datasets.load_dataset(\'facebook/winoground\', name=\'facebook--winoground\', split=\'train\', use_auth_token="hf_app_...", streaming=True)\r\n>>> next(iter(dataset))\r\nTraceback (most recent call last):\r\n  File "<stdin>", line 1, in <module>\r\n  File "/home/slesage/hf/datasets-preview-backend/.venv/lib/python3.9/site-packages/datasets/iterable_dataset.py", line 497, in __iter__\r\n    for key, example in self._iter():\r\n  File "/home/slesage/hf/datasets-preview-backend/.venv/lib/python3.9/site-packages/datasets/iterable_dataset.py", line 494, in _iter\r\n    yield from ex_iterable\r\n  File "/home/slesage/hf/datasets-preview-backend/.venv/lib/python3.9/site-packages/datasets/iterable_dataset.py", line 87, in __iter__\r\n    yield from self.generate_examples_fn(**self.kwargs)\r\n  File "/home/slesage/hf/datasets-preview-backend/.venv/lib/python3.9/site-packages/datasets/iterable_dataset.py", line 439, in wrapper\r\n    for key, table in generate_tables_fn(**kwargs):\r\n  File "/home/slesage/hf/datasets-preview-backend/.venv/lib/python3.9/site-packages/datasets/packaged_modules/json/json.py", line 85, in _generate_tables\r\n    for file_idx, file in enumerate(files):\r\n  File "/home/slesage/hf/datasets-preview-backend/.venv/lib/python3.9/site-packages/datasets/utils/streaming_download_manager.py", line 679, in __iter__\r\n    yield from self.generator(*self.args, **self.kwargs)\r\n  File "/home/slesage/hf/datasets-preview-backend/.venv/lib/python3.9/site-packages/datasets/utils/streaming_download_manager.py", line 731, in _iter_from_urlpaths\r\n    for dirpath, _, filenames in xwalk(urlpath, use_auth_token=use_auth_token):\r\n  File "/home/slesage/hf/datasets-preview-backend/.venv/lib/python3.9/site-packages/datasets/utils/streaming_download_manager.py", line 623, in xwalk\r\n    for dirpath, dirnames, filenames in fs.walk(main_hop):\r\n  File "/home/slesage/hf/datasets-preview-backend/.venv/lib/python3.9/site-packages/fsspec/spec.py", line 372, in walk\r\n    listing = self.ls(path, detail=True, **kwargs)\r\n  File "/home/slesage/hf/datasets-preview-backend/.venv/lib/python3.9/site-packages/fsspec/asyn.py", line 85, in wrapper\r\n    return sync(self.loop, func, *args, **kwargs)\r\n  File "/home/slesage/hf/datasets-preview-backend/.venv/lib/python3.9/site-packages/fsspec/asyn.py", line 65, in sync\r\n    raise return_result\r\n  File "/home/slesage/hf/datasets-preview-backend/.venv/lib/python3.9/site-packages/fsspec/asyn.py", line 25, in _runner\r\n    result[0] = await coro\r\n  File "/home/slesage/hf/datasets-preview-backend/.venv/lib/python3.9/site-packages/fsspec/implementations/http.py", line 196, in _ls\r\n    out = await self._ls_real(url, detail=detail, **kwargs)\r\n  File "/home/slesage/hf/datasets-preview-backend/.venv/lib/python3.9/site-packages/fsspec/implementations/http.py", line 150, in _ls_real\r\n    self._raise_not_found_for_status(r, url)\r\n  File "/home/slesage/hf/datasets-preview-backend/.venv/lib/python3.9/site-packages/fsspec/implementations/http.py", line 208, in _raise_not_found_for_status\r\n    response.raise_for_status()\r\n  File "/home/slesage/hf/datasets-preview-backend/.venv/lib/python3.9/site-packages/aiohttp/client_reqrep.py", line 1004, in raise_for_status\r\n    raise ClientResponseError(\r\naiohttp.client_exceptions.ClientResponseError: 401, message=\'Unauthorized\', url=URL(\'https://huggingface.co/datasets/facebook/winoground/resolve/a86a60456fbbd242e9a744199071a6bd3e7fd9de/examples.jsonl\')\r\n```\r\n\r\n*edited to fix `use_token` -> `use_auth_token`, thx @odellus*'
 '~~Using your command to replicate and changing `use_token` to `use_auth_token` fixes the problem I was seeing in #4149.~~\r\nNevermind it gave me an iterator to a method returning the same 401s. Changing `use_token` to `use_auth_token` does not fix the issue.'
 'After investigation with @severo , we found a potential culprit: https://github.com/huggingface/datasets/blob/3cd0a009a43f9f174056d70bfa2ca32216181926/src/datasets/utils/streaming_download_manager.py#L610-L624\r\n\r\nThe streaming manager does not seem to pass `use_auth_token` to `fsspec` when streaming and not iterating content of a zip archive\r\n\r\ncc @albertvillanova @lhoestq '
 'I was able to reproduce it on a private dataset, let me work on a fix'
 'Hey @lhoestq, Thanks for working on a fix! Any plans to merge #4173 into master? '
 'Thanks for the heads up, I still need to fix some tests that are failing in the CI before merging ;)'
 "The fix has been merged, we'll do a new release soon, and update the dataset viewer"
 'Fixed, thanks!\r\n<img width="1119" alt="Capture d’écran 2022-06-21 à 18 41 09" src="https://user-images.githubusercontent.com/1676121/174853571-afb0749c-4178-4c89-ab40-bb162a449788.png">\r\n']
## Dataset viewer issue for 'Winoground'

**Link:** [*link to the dataset viewer page*](https://huggingface.co/datasets/facebook/winoground/viewer/facebook--winoground/train)

*short description of the issue*
Getting 401, message='Unauthorized'
The dataset is subject to authorization, but I can access the files from the interface, so I assume I'm granted to access it. I'd assume the permission somehow doesn't propagate to the dataset viewer tool.

Am I the one who added this dataset ? No

{'url': 'https://api.github.com/repos/huggingface/datasets/issues/4139/reactions', 'total_count': 2, '+1': 2, '-1': 0, 'laugh': 0, 'hooray': 0, 'confused': 0, 'heart': 0, 'rocket': 0, 'eyes': 0}