url
stringlengths
58
61
repository_url
stringclasses
1 value
labels_url
stringlengths
72
75
comments_url
stringlengths
67
70
events_url
stringlengths
65
68
html_url
stringlengths
46
51
id
int64
599M
2.12B
node_id
stringlengths
18
32
number
int64
1
6.65k
title
stringlengths
1
290
user
dict
labels
listlengths
0
4
state
stringclasses
2 values
locked
bool
1 class
assignee
dict
assignees
listlengths
0
4
milestone
dict
comments
int64
0
70
created_at
unknown
updated_at
unknown
closed_at
unknown
author_association
stringclasses
3 values
active_lock_reason
float64
draft
float64
0
1
βŒ€
pull_request
dict
body
stringlengths
0
228k
βŒ€
reactions
dict
timeline_url
stringlengths
67
70
performed_via_github_app
float64
state_reason
stringclasses
3 values
is_pull_request
bool
2 classes
https://api.github.com/repos/huggingface/datasets/issues/6029
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6029/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6029/comments
https://api.github.com/repos/huggingface/datasets/issues/6029/events
https://github.com/huggingface/datasets/pull/6029
1,803,460,046
PR_kwDODunzps5VcbPW
6,029
[docs] Fix link
{ "avatar_url": "https://avatars.githubusercontent.com/u/59462357?v=4", "events_url": "https://api.github.com/users/stevhliu/events{/privacy}", "followers_url": "https://api.github.com/users/stevhliu/followers", "following_url": "https://api.github.com/users/stevhliu/following{/other_user}", "gists_url": "https://api.github.com/users/stevhliu/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/stevhliu", "id": 59462357, "login": "stevhliu", "node_id": "MDQ6VXNlcjU5NDYyMzU3", "organizations_url": "https://api.github.com/users/stevhliu/orgs", "received_events_url": "https://api.github.com/users/stevhliu/received_events", "repos_url": "https://api.github.com/users/stevhliu/repos", "site_admin": false, "starred_url": "https://api.github.com/users/stevhliu/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/stevhliu/subscriptions", "type": "User", "url": "https://api.github.com/users/stevhliu" }
[]
closed
false
null
[]
null
3
"2023-07-13T17:24:12Z"
"2023-07-13T17:47:41Z"
"2023-07-13T17:38:59Z"
MEMBER
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/6029.diff", "html_url": "https://github.com/huggingface/datasets/pull/6029", "merged_at": "2023-07-13T17:38:59Z", "patch_url": "https://github.com/huggingface/datasets/pull/6029.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/6029" }
Fixes link to the builder classes :)
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 1, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 1, "url": "https://api.github.com/repos/huggingface/datasets/issues/6029/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/6029/timeline
null
null
true
https://api.github.com/repos/huggingface/datasets/issues/6028
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6028/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6028/comments
https://api.github.com/repos/huggingface/datasets/issues/6028/events
https://github.com/huggingface/datasets/pull/6028
1,803,294,981
PR_kwDODunzps5Vb3LJ
6,028
Use new hffs
{ "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "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}", "gravatar_id": "", "html_url": "https://github.com/lhoestq", "id": 42851186, "login": "lhoestq", "node_id": "MDQ6VXNlcjQyODUxMTg2", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "repos_url": "https://api.github.com/users/lhoestq/repos", "site_admin": false, "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "type": "User", "url": "https://api.github.com/users/lhoestq" }
[]
closed
false
null
[]
null
13
"2023-07-13T15:41:44Z"
"2023-07-17T17:09:39Z"
"2023-07-17T17:01:00Z"
MEMBER
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/6028.diff", "html_url": "https://github.com/huggingface/datasets/pull/6028", "merged_at": "2023-07-17T17:01:00Z", "patch_url": "https://github.com/huggingface/datasets/pull/6028.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/6028" }
Thanks to @janineguo 's work in https://github.com/huggingface/datasets/pull/5919 which was needed to support HfFileSystem. Switching to `HfFileSystem` will help implementing optimization in data files resolution ## Implementation details I replaced all the from_hf_repo and from_local_or_remote in data_files.py to only use a new `from_patterns` which works for any fsspec path, including hf:// paths, https:// URLs and local paths. This simplifies the codebase since there is no logic duplication anymore when it comes to data files resolution. I added `_prepare_path_and_storage_options` which returns the right storage_options to use given a path and a `DownloadConfig`. This is the only place where the logic depends on the filesystem type that must be used. I also removed the `get_metadata_data_files_list ` and `get_patterns_and_data_files` functions added recently, since data files resolution is now handled using a common interface. ## New features hf:// paths are now supported in data_files ## Breaking changes DataFilesList and DataFilesDict: - use `str` paths instead of `Union[Path, Url]` - require posix paths for windows paths close https://github.com/huggingface/datasets/issues/6017
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/6028/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/6028/timeline
null
null
true
https://api.github.com/repos/huggingface/datasets/issues/6027
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6027/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6027/comments
https://api.github.com/repos/huggingface/datasets/issues/6027/events
https://github.com/huggingface/datasets/pull/6027
1,803,008,486
PR_kwDODunzps5Va4g3
6,027
Delete `task_templates` in `IterableDataset` when they are no longer valid
{ "avatar_url": "https://avatars.githubusercontent.com/u/47462742?v=4", "events_url": "https://api.github.com/users/mariosasko/events{/privacy}", "followers_url": "https://api.github.com/users/mariosasko/followers", "following_url": "https://api.github.com/users/mariosasko/following{/other_user}", "gists_url": "https://api.github.com/users/mariosasko/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mariosasko", "id": 47462742, "login": "mariosasko", "node_id": "MDQ6VXNlcjQ3NDYyNzQy", "organizations_url": "https://api.github.com/users/mariosasko/orgs", "received_events_url": "https://api.github.com/users/mariosasko/received_events", "repos_url": "https://api.github.com/users/mariosasko/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mariosasko/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mariosasko/subscriptions", "type": "User", "url": "https://api.github.com/users/mariosasko" }
[]
closed
false
null
[]
null
3
"2023-07-13T13:16:17Z"
"2023-07-13T14:06:20Z"
"2023-07-13T13:57:35Z"
CONTRIBUTOR
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/6027.diff", "html_url": "https://github.com/huggingface/datasets/pull/6027", "merged_at": "2023-07-13T13:57:35Z", "patch_url": "https://github.com/huggingface/datasets/pull/6027.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/6027" }
Fix #6025
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/6027/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/6027/timeline
null
null
true
https://api.github.com/repos/huggingface/datasets/issues/6026
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6026/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6026/comments
https://api.github.com/repos/huggingface/datasets/issues/6026/events
https://github.com/huggingface/datasets/pull/6026
1,802,929,222
PR_kwDODunzps5VanI8
6,026
Fix style with ruff 0.0.278
{ "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "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}", "gravatar_id": "", "html_url": "https://github.com/lhoestq", "id": 42851186, "login": "lhoestq", "node_id": "MDQ6VXNlcjQyODUxMTg2", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "repos_url": "https://api.github.com/users/lhoestq/repos", "site_admin": false, "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "type": "User", "url": "https://api.github.com/users/lhoestq" }
[]
closed
false
null
[]
null
3
"2023-07-13T12:34:24Z"
"2023-07-13T12:46:26Z"
"2023-07-13T12:37:01Z"
MEMBER
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/6026.diff", "html_url": "https://github.com/huggingface/datasets/pull/6026", "merged_at": "2023-07-13T12:37:01Z", "patch_url": "https://github.com/huggingface/datasets/pull/6026.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/6026" }
null
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/6026/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/6026/timeline
null
null
true
https://api.github.com/repos/huggingface/datasets/issues/6025
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6025/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6025/comments
https://api.github.com/repos/huggingface/datasets/issues/6025/events
https://github.com/huggingface/datasets/issues/6025
1,801,852,601
I_kwDODunzps5rZha5
6,025
Using a dataset for a use other than it was intended for.
{ "avatar_url": "https://avatars.githubusercontent.com/u/17240858?v=4", "events_url": "https://api.github.com/users/surya-narayanan/events{/privacy}", "followers_url": "https://api.github.com/users/surya-narayanan/followers", "following_url": "https://api.github.com/users/surya-narayanan/following{/other_user}", "gists_url": "https://api.github.com/users/surya-narayanan/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/surya-narayanan", "id": 17240858, "login": "surya-narayanan", "node_id": "MDQ6VXNlcjE3MjQwODU4", "organizations_url": "https://api.github.com/users/surya-narayanan/orgs", "received_events_url": "https://api.github.com/users/surya-narayanan/received_events", "repos_url": "https://api.github.com/users/surya-narayanan/repos", "site_admin": false, "starred_url": "https://api.github.com/users/surya-narayanan/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/surya-narayanan/subscriptions", "type": "User", "url": "https://api.github.com/users/surya-narayanan" }
[]
closed
false
null
[]
null
1
"2023-07-12T22:33:17Z"
"2023-07-13T13:57:36Z"
"2023-07-13T13:57:36Z"
NONE
null
null
null
### Describe the bug Hi, I want to use the rotten tomatoes dataset but for a task other than classification, but when I interleave the dataset, it throws ```'ValueError: Column label is not present in features.'```. It seems that the label_col must be there in the dataset for some reason? Here is the full stacktrace ``` File "/home/suryahari/Vornoi/tryage-handoff-other-datasets.py", line 276, in create_dataloaders dataset = interleave_datasets(dsfold, stopping_strategy="all_exhausted") File "/home/suryahari/miniconda3/envs/vornoi/lib/python3.10/site-packages/datasets/combine.py", line 134, in interleave_datasets return _interleave_iterable_datasets( File "/home/suryahari/miniconda3/envs/vornoi/lib/python3.10/site-packages/datasets/iterable_dataset.py", line 1833, in _interleave_iterable_datasets info = DatasetInfo.from_merge([d.info for d in datasets]) File "/home/suryahari/miniconda3/envs/vornoi/lib/python3.10/site-packages/datasets/info.py", line 275, in from_merge dataset_infos = [dset_info.copy() for dset_info in dataset_infos if dset_info is not None] File "/home/suryahari/miniconda3/envs/vornoi/lib/python3.10/site-packages/datasets/info.py", line 275, in <listcomp> dataset_infos = [dset_info.copy() for dset_info in dataset_infos if dset_info is not None] File "/home/suryahari/miniconda3/envs/vornoi/lib/python3.10/site-packages/datasets/info.py", line 378, in copy return self.__class__(**{k: copy.deepcopy(v) for k, v in self.__dict__.items()}) File "<string>", line 20, in __init__ File "/home/suryahari/miniconda3/envs/vornoi/lib/python3.10/site-packages/datasets/info.py", line 208, in __post_init__ self.task_templates = [ File "/home/suryahari/miniconda3/envs/vornoi/lib/python3.10/site-packages/datasets/info.py", line 209, in <listcomp> template.align_with_features(self.features) for template in (self.task_templates) File "/home/suryahari/miniconda3/envs/vornoi/lib/python3.10/site-packages/datasets/tasks/text_classification.py", line 20, in align_with_features raise ValueError(f"Column {self.label_column} is not present in features.") ValueError: Column label is not present in features. ``` ### Steps to reproduce the bug Delete the column `labels` from the `rotten_tomatoes` dataset. Try to interleave it with other datasets. ### Expected behavior Should let me use the dataset with just the `text` field ### Environment info latest datasets library? I don't think this was an issue in earlier versions.
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/6025/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/6025/timeline
null
completed
false
https://api.github.com/repos/huggingface/datasets/issues/6024
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6024/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6024/comments
https://api.github.com/repos/huggingface/datasets/issues/6024/events
https://github.com/huggingface/datasets/pull/6024
1,801,708,808
PR_kwDODunzps5VWbGe
6,024
Don't reference self in Spark._validate_cache_dir
{ "avatar_url": "https://avatars.githubusercontent.com/u/106995444?v=4", "events_url": "https://api.github.com/users/maddiedawson/events{/privacy}", "followers_url": "https://api.github.com/users/maddiedawson/followers", "following_url": "https://api.github.com/users/maddiedawson/following{/other_user}", "gists_url": "https://api.github.com/users/maddiedawson/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/maddiedawson", "id": 106995444, "login": "maddiedawson", "node_id": "U_kgDOBmCe9A", "organizations_url": "https://api.github.com/users/maddiedawson/orgs", "received_events_url": "https://api.github.com/users/maddiedawson/received_events", "repos_url": "https://api.github.com/users/maddiedawson/repos", "site_admin": false, "starred_url": "https://api.github.com/users/maddiedawson/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/maddiedawson/subscriptions", "type": "User", "url": "https://api.github.com/users/maddiedawson" }
[]
closed
false
null
[]
null
4
"2023-07-12T20:31:16Z"
"2023-07-13T16:58:32Z"
"2023-07-13T12:37:09Z"
CONTRIBUTOR
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/6024.diff", "html_url": "https://github.com/huggingface/datasets/pull/6024", "merged_at": "2023-07-13T12:37:09Z", "patch_url": "https://github.com/huggingface/datasets/pull/6024.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/6024" }
Fix for https://github.com/huggingface/datasets/issues/5963
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/6024/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/6024/timeline
null
null
true
https://api.github.com/repos/huggingface/datasets/issues/6023
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6023/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6023/comments
https://api.github.com/repos/huggingface/datasets/issues/6023/events
https://github.com/huggingface/datasets/pull/6023
1,801,272,420
PR_kwDODunzps5VU7EG
6,023
Fix `ClassLabel` min max check for `None` values
{ "avatar_url": "https://avatars.githubusercontent.com/u/47462742?v=4", "events_url": "https://api.github.com/users/mariosasko/events{/privacy}", "followers_url": "https://api.github.com/users/mariosasko/followers", "following_url": "https://api.github.com/users/mariosasko/following{/other_user}", "gists_url": "https://api.github.com/users/mariosasko/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mariosasko", "id": 47462742, "login": "mariosasko", "node_id": "MDQ6VXNlcjQ3NDYyNzQy", "organizations_url": "https://api.github.com/users/mariosasko/orgs", "received_events_url": "https://api.github.com/users/mariosasko/received_events", "repos_url": "https://api.github.com/users/mariosasko/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mariosasko/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mariosasko/subscriptions", "type": "User", "url": "https://api.github.com/users/mariosasko" }
[]
closed
false
null
[]
null
3
"2023-07-12T15:46:12Z"
"2023-07-12T16:29:26Z"
"2023-07-12T16:18:04Z"
CONTRIBUTOR
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/6023.diff", "html_url": "https://github.com/huggingface/datasets/pull/6023", "merged_at": "2023-07-12T16:18:04Z", "patch_url": "https://github.com/huggingface/datasets/pull/6023.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/6023" }
Fix #6022
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/6023/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/6023/timeline
null
null
true
https://api.github.com/repos/huggingface/datasets/issues/6022
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6022/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6022/comments
https://api.github.com/repos/huggingface/datasets/issues/6022/events
https://github.com/huggingface/datasets/issues/6022
1,800,092,589
I_kwDODunzps5rSzut
6,022
Batch map raises TypeError: '>=' not supported between instances of 'NoneType' and 'int'
{ "avatar_url": "https://avatars.githubusercontent.com/u/138426806?v=4", "events_url": "https://api.github.com/users/codingl2k1/events{/privacy}", "followers_url": "https://api.github.com/users/codingl2k1/followers", "following_url": "https://api.github.com/users/codingl2k1/following{/other_user}", "gists_url": "https://api.github.com/users/codingl2k1/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/codingl2k1", "id": 138426806, "login": "codingl2k1", "node_id": "U_kgDOCEA5tg", "organizations_url": "https://api.github.com/users/codingl2k1/orgs", "received_events_url": "https://api.github.com/users/codingl2k1/received_events", "repos_url": "https://api.github.com/users/codingl2k1/repos", "site_admin": false, "starred_url": "https://api.github.com/users/codingl2k1/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/codingl2k1/subscriptions", "type": "User", "url": "https://api.github.com/users/codingl2k1" }
[]
closed
false
null
[]
null
1
"2023-07-12T03:20:17Z"
"2023-07-12T16:18:06Z"
"2023-07-12T16:18:05Z"
NONE
null
null
null
### Describe the bug When mapping some datasets with `batched=True`, datasets may raise an exeception: ```python Traceback (most recent call last): File "/Users/codingl2k1/Work/datasets/venv/lib/python3.11/site-packages/multiprocess/pool.py", line 125, in worker result = (True, func(*args, **kwds)) ^^^^^^^^^^^^^^^^^^^ File "/Users/codingl2k1/Work/datasets/src/datasets/utils/py_utils.py", line 1328, in _write_generator_to_queue for i, result in enumerate(func(**kwargs)): File "/Users/codingl2k1/Work/datasets/src/datasets/arrow_dataset.py", line 3483, in _map_single writer.write_batch(batch) File "/Users/codingl2k1/Work/datasets/src/datasets/arrow_writer.py", line 549, in write_batch array = cast_array_to_feature(col_values, col_type) if col_type is not None else col_values ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/codingl2k1/Work/datasets/src/datasets/table.py", line 1831, in wrapper return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/codingl2k1/Work/datasets/src/datasets/table.py", line 1831, in <listcomp> return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/codingl2k1/Work/datasets/src/datasets/table.py", line 2063, in cast_array_to_feature return feature.cast_storage(array) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/codingl2k1/Work/datasets/src/datasets/features/features.py", line 1098, in cast_storage if min_max["max"] >= self.num_classes: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: '>=' not supported between instances of 'NoneType' and 'int' The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/Users/codingl2k1/Work/datasets/t1.py", line 33, in <module> ds = ds.map(transforms, num_proc=14, batched=True, batch_size=5) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/codingl2k1/Work/datasets/src/datasets/dataset_dict.py", line 850, in map { File "/Users/codingl2k1/Work/datasets/src/datasets/dataset_dict.py", line 851, in <dictcomp> k: dataset.map( ^^^^^^^^^^^^ File "/Users/codingl2k1/Work/datasets/src/datasets/arrow_dataset.py", line 577, in wrapper out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/codingl2k1/Work/datasets/src/datasets/arrow_dataset.py", line 542, in wrapper out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/codingl2k1/Work/datasets/src/datasets/arrow_dataset.py", line 3179, in map for rank, done, content in iflatmap_unordered( File "/Users/codingl2k1/Work/datasets/src/datasets/utils/py_utils.py", line 1368, in iflatmap_unordered [async_result.get(timeout=0.05) for async_result in async_results] File "/Users/codingl2k1/Work/datasets/src/datasets/utils/py_utils.py", line 1368, in <listcomp> [async_result.get(timeout=0.05) for async_result in async_results] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/codingl2k1/Work/datasets/venv/lib/python3.11/site-packages/multiprocess/pool.py", line 774, in get raise self._value TypeError: '>=' not supported between instances of 'NoneType' and 'int' ``` ### Steps to reproduce the bug 1. Checkout the latest main of datasets. 2. Run the code: ```python from datasets import load_dataset def transforms(examples): # examples["pixel_values"] = [image.convert("RGB").resize((100, 100)) for image in examples["image"]] return examples ds = load_dataset("scene_parse_150") ds = ds.map(transforms, num_proc=14, batched=True, batch_size=5) print(ds) ``` ### Expected behavior map without exception. ### Environment info Datasets: https://github.com/huggingface/datasets/commit/b8067c0262073891180869f700ebef5ac3dc5cce Python: 3.11.4 System: Macos
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/6022/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/6022/timeline
null
completed
false
https://api.github.com/repos/huggingface/datasets/issues/6021
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6021/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6021/comments
https://api.github.com/repos/huggingface/datasets/issues/6021/events
https://github.com/huggingface/datasets/pull/6021
1,799,785,904
PR_kwDODunzps5VP11Q
6,021
[docs] Update return statement of index search
{ "avatar_url": "https://avatars.githubusercontent.com/u/59462357?v=4", "events_url": "https://api.github.com/users/stevhliu/events{/privacy}", "followers_url": "https://api.github.com/users/stevhliu/followers", "following_url": "https://api.github.com/users/stevhliu/following{/other_user}", "gists_url": "https://api.github.com/users/stevhliu/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/stevhliu", "id": 59462357, "login": "stevhliu", "node_id": "MDQ6VXNlcjU5NDYyMzU3", "organizations_url": "https://api.github.com/users/stevhliu/orgs", "received_events_url": "https://api.github.com/users/stevhliu/received_events", "repos_url": "https://api.github.com/users/stevhliu/repos", "site_admin": false, "starred_url": "https://api.github.com/users/stevhliu/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/stevhliu/subscriptions", "type": "User", "url": "https://api.github.com/users/stevhliu" }
[]
closed
false
null
[]
null
2
"2023-07-11T21:33:32Z"
"2023-07-12T17:13:02Z"
"2023-07-12T17:03:00Z"
MEMBER
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/6021.diff", "html_url": "https://github.com/huggingface/datasets/pull/6021", "merged_at": "2023-07-12T17:03:00Z", "patch_url": "https://github.com/huggingface/datasets/pull/6021.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/6021" }
Clarifies in the return statement of the docstring that the retrieval score is `IndexFlatL2` by default (see [PR](https://github.com/huggingface/transformers/issues/24739) and internal Slack [convo](https://huggingface.slack.com/archives/C01229B19EX/p1689105179711689)), and fixes the formatting because multiple return values are not supported.
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/6021/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/6021/timeline
null
null
true
https://api.github.com/repos/huggingface/datasets/issues/6020
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6020/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6020/comments
https://api.github.com/repos/huggingface/datasets/issues/6020/events
https://github.com/huggingface/datasets/issues/6020
1,799,720,536
I_kwDODunzps5rRY5Y
6,020
Inconsistent "The features can't be aligned" error when combining map, multiprocessing, and variable length outputs
{ "avatar_url": "https://avatars.githubusercontent.com/u/38166299?v=4", "events_url": "https://api.github.com/users/kheyer/events{/privacy}", "followers_url": "https://api.github.com/users/kheyer/followers", "following_url": "https://api.github.com/users/kheyer/following{/other_user}", "gists_url": "https://api.github.com/users/kheyer/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kheyer", "id": 38166299, "login": "kheyer", "node_id": "MDQ6VXNlcjM4MTY2Mjk5", "organizations_url": "https://api.github.com/users/kheyer/orgs", "received_events_url": "https://api.github.com/users/kheyer/received_events", "repos_url": "https://api.github.com/users/kheyer/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kheyer/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kheyer/subscriptions", "type": "User", "url": "https://api.github.com/users/kheyer" }
[]
open
false
null
[]
null
2
"2023-07-11T20:40:38Z"
"2023-10-25T14:14:56Z"
null
NONE
null
null
null
### Describe the bug I'm using a dataset with map and multiprocessing to run a function that returned a variable length list of outputs. This output list may be empty. Normally this is handled fine, but there is an edge case that crops up when using multiprocessing. In some cases, an empty list result ends up in a dataset shard consisting of a single item. This results in a `The features can't be aligned` error that is difficult to debug because it depends on the number of processes/shards used. I've reproduced a minimal example below. My current workaround is to fill empty results with a dummy value that I filter after, but this was a weird error that took a while to track down. ### Steps to reproduce the bug ```python import datasets dataset = datasets.Dataset.from_list([{'idx':i} for i in range(60)]) def test_func(row, idx): if idx==58: return {'output': []} else: return {'output' : [{'test':1}, {'test':2}]} # this works fine test1 = dataset.map(lambda row, idx: test_func(row, idx), with_indices=True, num_proc=4) # this fails test2 = dataset.map(lambda row, idx: test_func(row, idx), with_indices=True, num_proc=32) >ValueError: The features can't be aligned because the key output of features {'idx': Value(dtype='int64', id=None), 'output': Sequence(feature=Value(dtype='null', id=None), length=-1, id=None)} has unexpected type - Sequence(feature=Value(dtype='null', id=None), length=-1, id=None) (expected either [{'test': Value(dtype='int64', id=None)}] or Value("null"). ``` The error occurs during the check ```python _check_if_features_can_be_aligned([dset.features for dset in dsets]) ``` When the multiprocessing splitting lines up just right with the empty return value, one of the `dset` in `dsets` will have a single item with an empty list value, causing the error. ### Expected behavior Expected behavior is the result would be the same regardless of the `num_proc` value used. ### Environment info Datasets version 2.11.0 Python 3.9.16
{ "+1": 1, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 1, "url": "https://api.github.com/repos/huggingface/datasets/issues/6020/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/6020/timeline
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/6019
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6019/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6019/comments
https://api.github.com/repos/huggingface/datasets/issues/6019/events
https://github.com/huggingface/datasets/pull/6019
1,799,532,822
PR_kwDODunzps5VPAlD
6,019
Improve logging
{ "avatar_url": "https://avatars.githubusercontent.com/u/47462742?v=4", "events_url": "https://api.github.com/users/mariosasko/events{/privacy}", "followers_url": "https://api.github.com/users/mariosasko/followers", "following_url": "https://api.github.com/users/mariosasko/following{/other_user}", "gists_url": "https://api.github.com/users/mariosasko/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mariosasko", "id": 47462742, "login": "mariosasko", "node_id": "MDQ6VXNlcjQ3NDYyNzQy", "organizations_url": "https://api.github.com/users/mariosasko/orgs", "received_events_url": "https://api.github.com/users/mariosasko/received_events", "repos_url": "https://api.github.com/users/mariosasko/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mariosasko/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mariosasko/subscriptions", "type": "User", "url": "https://api.github.com/users/mariosasko" }
[]
closed
false
null
[]
null
13
"2023-07-11T18:30:23Z"
"2023-07-12T19:34:14Z"
"2023-07-12T17:19:28Z"
CONTRIBUTOR
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/6019.diff", "html_url": "https://github.com/huggingface/datasets/pull/6019", "merged_at": "2023-07-12T17:19:28Z", "patch_url": "https://github.com/huggingface/datasets/pull/6019.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/6019" }
Adds the StreamHandler (as `hfh` and `transformers` do) to the library's logger to log INFO messages and logs the messages about "loading a cached result" (and some other warnings) as INFO (Also removes the `leave=False` arg in the progress bars to be consistent with `hfh` and `transformers` - progress bars serve as an indicator that a result is not cached, so it makes more sense not to delete them) Fix #2832, fix https://github.com/huggingface/datasets/issues/1948, fix https://github.com/huggingface/datasets/issues/5444
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/6019/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/6019/timeline
null
null
true
https://api.github.com/repos/huggingface/datasets/issues/6018
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6018/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6018/comments
https://api.github.com/repos/huggingface/datasets/issues/6018/events
https://github.com/huggingface/datasets/pull/6018
1,799,411,999
PR_kwDODunzps5VOmKY
6,018
test1
{ "avatar_url": "https://avatars.githubusercontent.com/u/139256323?v=4", "events_url": "https://api.github.com/users/ognjenovicj/events{/privacy}", "followers_url": "https://api.github.com/users/ognjenovicj/followers", "following_url": "https://api.github.com/users/ognjenovicj/following{/other_user}", "gists_url": "https://api.github.com/users/ognjenovicj/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/ognjenovicj", "id": 139256323, "login": "ognjenovicj", "node_id": "U_kgDOCEziAw", "organizations_url": "https://api.github.com/users/ognjenovicj/orgs", "received_events_url": "https://api.github.com/users/ognjenovicj/received_events", "repos_url": "https://api.github.com/users/ognjenovicj/repos", "site_admin": false, "starred_url": "https://api.github.com/users/ognjenovicj/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ognjenovicj/subscriptions", "type": "User", "url": "https://api.github.com/users/ognjenovicj" }
[]
closed
false
null
[]
null
1
"2023-07-11T17:25:49Z"
"2023-07-20T10:11:41Z"
"2023-07-20T10:11:41Z"
NONE
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/6018.diff", "html_url": "https://github.com/huggingface/datasets/pull/6018", "merged_at": null, "patch_url": "https://github.com/huggingface/datasets/pull/6018.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/6018" }
null
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/6018/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/6018/timeline
null
null
true
https://api.github.com/repos/huggingface/datasets/issues/6017
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6017/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6017/comments
https://api.github.com/repos/huggingface/datasets/issues/6017/events
https://github.com/huggingface/datasets/issues/6017
1,799,309,132
I_kwDODunzps5rP0dM
6,017
Switch to huggingface_hub's HfFileSystem
{ "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "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}", "gravatar_id": "", "html_url": "https://github.com/lhoestq", "id": 42851186, "login": "lhoestq", "node_id": "MDQ6VXNlcjQyODUxMTg2", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "repos_url": "https://api.github.com/users/lhoestq/repos", "site_admin": false, "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "type": "User", "url": "https://api.github.com/users/lhoestq" }
[ { "color": "a2eeef", "default": true, "description": "New feature or request", "id": 1935892871, "name": "enhancement", "node_id": "MDU6TGFiZWwxOTM1ODkyODcx", "url": "https://api.github.com/repos/huggingface/datasets/labels/enhancement" } ]
closed
false
{ "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "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}", "gravatar_id": "", "html_url": "https://github.com/lhoestq", "id": 42851186, "login": "lhoestq", "node_id": "MDQ6VXNlcjQyODUxMTg2", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "repos_url": "https://api.github.com/users/lhoestq/repos", "site_admin": false, "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "type": "User", "url": "https://api.github.com/users/lhoestq" }
[ { "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "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}", "gravatar_id": "", "html_url": "https://github.com/lhoestq", "id": 42851186, "login": "lhoestq", "node_id": "MDQ6VXNlcjQyODUxMTg2", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "repos_url": "https://api.github.com/users/lhoestq/repos", "site_admin": false, "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "type": "User", "url": "https://api.github.com/users/lhoestq" } ]
null
0
"2023-07-11T16:24:40Z"
"2023-07-17T17:01:01Z"
"2023-07-17T17:01:01Z"
MEMBER
null
null
null
instead of the current datasets.filesystems.hffilesystem.HfFileSystem which can be slow in some cases related to https://github.com/huggingface/datasets/issues/5846 and https://github.com/huggingface/datasets/pull/5919
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/6017/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/6017/timeline
null
completed
false
https://api.github.com/repos/huggingface/datasets/issues/6016
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6016/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6016/comments
https://api.github.com/repos/huggingface/datasets/issues/6016/events
https://github.com/huggingface/datasets/pull/6016
1,798,968,033
PR_kwDODunzps5VNEvn
6,016
Dataset string representation enhancement
{ "avatar_url": "https://avatars.githubusercontent.com/u/63643948?v=4", "events_url": "https://api.github.com/users/Ganryuu/events{/privacy}", "followers_url": "https://api.github.com/users/Ganryuu/followers", "following_url": "https://api.github.com/users/Ganryuu/following{/other_user}", "gists_url": "https://api.github.com/users/Ganryuu/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Ganryuu", "id": 63643948, "login": "Ganryuu", "node_id": "MDQ6VXNlcjYzNjQzOTQ4", "organizations_url": "https://api.github.com/users/Ganryuu/orgs", "received_events_url": "https://api.github.com/users/Ganryuu/received_events", "repos_url": "https://api.github.com/users/Ganryuu/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Ganryuu/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Ganryuu/subscriptions", "type": "User", "url": "https://api.github.com/users/Ganryuu" }
[]
open
false
null
[]
null
2
"2023-07-11T13:38:25Z"
"2023-07-16T10:26:18Z"
null
NONE
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/6016.diff", "html_url": "https://github.com/huggingface/datasets/pull/6016", "merged_at": null, "patch_url": "https://github.com/huggingface/datasets/pull/6016.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/6016" }
my attempt at #6010 not sure if this is the right way to go about it, I will wait for your feedback
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/6016/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/6016/timeline
null
null
true
https://api.github.com/repos/huggingface/datasets/issues/6015
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6015/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6015/comments
https://api.github.com/repos/huggingface/datasets/issues/6015/events
https://github.com/huggingface/datasets/pull/6015
1,798,807,893
PR_kwDODunzps5VMhgB
6,015
Add metadata ui screenshot in docs
{ "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "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}", "gravatar_id": "", "html_url": "https://github.com/lhoestq", "id": 42851186, "login": "lhoestq", "node_id": "MDQ6VXNlcjQyODUxMTg2", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "repos_url": "https://api.github.com/users/lhoestq/repos", "site_admin": false, "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "type": "User", "url": "https://api.github.com/users/lhoestq" }
[]
closed
false
null
[]
null
3
"2023-07-11T12:16:29Z"
"2023-07-11T16:07:28Z"
"2023-07-11T15:56:46Z"
MEMBER
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/6015.diff", "html_url": "https://github.com/huggingface/datasets/pull/6015", "merged_at": "2023-07-11T15:56:46Z", "patch_url": "https://github.com/huggingface/datasets/pull/6015.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/6015" }
null
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/6015/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/6015/timeline
null
null
true
https://api.github.com/repos/huggingface/datasets/issues/6014
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6014/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6014/comments
https://api.github.com/repos/huggingface/datasets/issues/6014/events
https://github.com/huggingface/datasets/issues/6014
1,798,213,816
I_kwDODunzps5rLpC4
6,014
Request to Share/Update Dataset Viewer Code
{ "avatar_url": "https://avatars.githubusercontent.com/u/105081034?v=4", "events_url": "https://api.github.com/users/lilyorlilypad/events{/privacy}", "followers_url": "https://api.github.com/users/lilyorlilypad/followers", "following_url": "https://api.github.com/users/lilyorlilypad/following{/other_user}", "gists_url": "https://api.github.com/users/lilyorlilypad/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/lilyorlilypad", "id": 105081034, "login": "lilyorlilypad", "node_id": "U_kgDOBkNoyg", "organizations_url": "https://api.github.com/users/lilyorlilypad/orgs", "received_events_url": "https://api.github.com/users/lilyorlilypad/received_events", "repos_url": "https://api.github.com/users/lilyorlilypad/repos", "site_admin": false, "starred_url": "https://api.github.com/users/lilyorlilypad/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lilyorlilypad/subscriptions", "type": "User", "url": "https://api.github.com/users/lilyorlilypad" }
[ { "color": "cfd3d7", "default": true, "description": "This issue or pull request already exists", "id": 1935892865, "name": "duplicate", "node_id": "MDU6TGFiZWwxOTM1ODkyODY1", "url": "https://api.github.com/repos/huggingface/datasets/labels/duplicate" } ]
closed
false
null
[]
null
7
"2023-07-11T06:36:09Z"
"2023-09-25T12:01:27Z"
"2023-09-25T12:01:17Z"
NONE
null
null
null
Overview: The repository (huggingface/datasets-viewer) was recently archived and when I tried to run the code, there was the error message "AttributeError: module 'datasets.load' has no attribute 'prepare_module'". I could not resolve the issue myself due to lack of documentation of that attribute. Request: I kindly request the sharing of the code responsible for the dataset preview functionality or help with resolving the error. The dataset viewer on the Hugging Face website is incredibly useful since it is compatible with different types of inputs. It allows users to find datasets that meet their needs more efficiently. If needed, I am willing to contribute to the project by testing, documenting, and providing feedback on the dataset viewer code. Thank you for considering this request, and I look forward to your response.
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/6014/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/6014/timeline
null
completed
false
https://api.github.com/repos/huggingface/datasets/issues/6013
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6013/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6013/comments
https://api.github.com/repos/huggingface/datasets/issues/6013/events
https://github.com/huggingface/datasets/issues/6013
1,796,083,437
I_kwDODunzps5rDg7t
6,013
[FR] `map` should reuse unchanged columns from the previous dataset to avoid disk usage
{ "avatar_url": "https://avatars.githubusercontent.com/u/36224762?v=4", "events_url": "https://api.github.com/users/NightMachinery/events{/privacy}", "followers_url": "https://api.github.com/users/NightMachinery/followers", "following_url": "https://api.github.com/users/NightMachinery/following{/other_user}", "gists_url": "https://api.github.com/users/NightMachinery/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/NightMachinery", "id": 36224762, "login": "NightMachinery", "node_id": "MDQ6VXNlcjM2MjI0NzYy", "organizations_url": "https://api.github.com/users/NightMachinery/orgs", "received_events_url": "https://api.github.com/users/NightMachinery/received_events", "repos_url": "https://api.github.com/users/NightMachinery/repos", "site_admin": false, "starred_url": "https://api.github.com/users/NightMachinery/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/NightMachinery/subscriptions", "type": "User", "url": "https://api.github.com/users/NightMachinery" }
[ { "color": "a2eeef", "default": true, "description": "New feature or request", "id": 1935892871, "name": "enhancement", "node_id": "MDU6TGFiZWwxOTM1ODkyODcx", "url": "https://api.github.com/repos/huggingface/datasets/labels/enhancement" }, { "color": "BDE59C", "default": false, "description": "Issues a bit more difficult than \"Good First\" issues", "id": 3761482852, "name": "good second issue", "node_id": "LA_kwDODunzps7gM6xk", "url": "https://api.github.com/repos/huggingface/datasets/labels/good%20second%20issue" } ]
open
false
null
[]
null
1
"2023-07-10T06:42:20Z"
"2023-07-10T15:37:52Z"
null
CONTRIBUTOR
null
null
null
### Feature request Currently adding a new column with `map` will cause all the data in the dataset to be duplicated and stored/cached on the disk again. It should reuse unchanged columns. ### Motivation This allows having datasets with different columns but sharing some basic columns. Currently, these datasets would become too expensive to store and one would need some kind of on-the-fly join; which also doesn't seem implemented. ### Your contribution _
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/6013/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/6013/timeline
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/6012
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6012/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6012/comments
https://api.github.com/repos/huggingface/datasets/issues/6012/events
https://github.com/huggingface/datasets/issues/6012
1,795,575,432
I_kwDODunzps5rBk6I
6,012
[FR] Transform Chaining, Lazy Mapping
{ "avatar_url": "https://avatars.githubusercontent.com/u/36224762?v=4", "events_url": "https://api.github.com/users/NightMachinery/events{/privacy}", "followers_url": "https://api.github.com/users/NightMachinery/followers", "following_url": "https://api.github.com/users/NightMachinery/following{/other_user}", "gists_url": "https://api.github.com/users/NightMachinery/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/NightMachinery", "id": 36224762, "login": "NightMachinery", "node_id": "MDQ6VXNlcjM2MjI0NzYy", "organizations_url": "https://api.github.com/users/NightMachinery/orgs", "received_events_url": "https://api.github.com/users/NightMachinery/received_events", "repos_url": "https://api.github.com/users/NightMachinery/repos", "site_admin": false, "starred_url": "https://api.github.com/users/NightMachinery/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/NightMachinery/subscriptions", "type": "User", "url": "https://api.github.com/users/NightMachinery" }
[ { "color": "a2eeef", "default": true, "description": "New feature or request", "id": 1935892871, "name": "enhancement", "node_id": "MDU6TGFiZWwxOTM1ODkyODcx", "url": "https://api.github.com/repos/huggingface/datasets/labels/enhancement" } ]
open
false
null
[]
null
7
"2023-07-09T21:40:21Z"
"2023-11-23T10:08:57Z"
null
CONTRIBUTOR
null
null
null
### Feature request Currently using a `map` call processes and duplicates the whole dataset, which takes both time and disk space. The solution is to allow lazy mapping, which is essentially a saved chain of transforms that are applied on the fly whenever a slice of the dataset is requested. The API should look like `map`, as `set_transform` changes the current dataset while `map` returns another dataset. ### Motivation Lazy processing allows lower disk usage and faster experimentation. ### Your contribution _
{ "+1": 5, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 5, "url": "https://api.github.com/repos/huggingface/datasets/issues/6012/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/6012/timeline
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/6011
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6011/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6011/comments
https://api.github.com/repos/huggingface/datasets/issues/6011/events
https://github.com/huggingface/datasets/issues/6011
1,795,296,568
I_kwDODunzps5rAg04
6,011
Documentation: wiki_dpr Dataset has no metric_type for Faiss Index
{ "avatar_url": "https://avatars.githubusercontent.com/u/29335344?v=4", "events_url": "https://api.github.com/users/YichiRockyZhang/events{/privacy}", "followers_url": "https://api.github.com/users/YichiRockyZhang/followers", "following_url": "https://api.github.com/users/YichiRockyZhang/following{/other_user}", "gists_url": "https://api.github.com/users/YichiRockyZhang/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/YichiRockyZhang", "id": 29335344, "login": "YichiRockyZhang", "node_id": "MDQ6VXNlcjI5MzM1MzQ0", "organizations_url": "https://api.github.com/users/YichiRockyZhang/orgs", "received_events_url": "https://api.github.com/users/YichiRockyZhang/received_events", "repos_url": "https://api.github.com/users/YichiRockyZhang/repos", "site_admin": false, "starred_url": "https://api.github.com/users/YichiRockyZhang/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/YichiRockyZhang/subscriptions", "type": "User", "url": "https://api.github.com/users/YichiRockyZhang" }
[]
closed
false
null
[]
null
2
"2023-07-09T08:30:19Z"
"2023-07-11T03:02:36Z"
"2023-07-11T03:02:36Z"
NONE
null
null
null
### Describe the bug After loading `wiki_dpr` using: ```py ds = load_dataset(path='wiki_dpr', name='psgs_w100.multiset.compressed', split='train') print(ds.get_index("embeddings").metric_type) # prints nothing because the value is None ``` the index does not have a defined `metric_type`. This is an issue because I do not know how the `scores` are being computed for `get_nearest_examples()`. ### Steps to reproduce the bug System: Python 3.9.16, Transformers 4.30.2, WSL After loading `wiki_dpr` using: ```py ds = load_dataset(path='wiki_dpr', name='psgs_w100.multiset.compressed', split='train') print(ds.get_index("embeddings").metric_type) # prints nothing because the value is None ``` the index does not have a defined `metric_type`. This is an issue because I do not know how the `scores` are being computed for `get_nearest_examples()`. ```py from transformers import DPRQuestionEncoder, DPRContextEncoder, DPRQuestionEncoderTokenizer, DPRContextEncoderTokenizer tokenizer = DPRQuestionEncoderTokenizer.from_pretrained("facebook/dpr-question_encoder-multiset-base") encoder = DPRQuestionEncoder.from_pretrained("facebook/dpr-question_encoder-multiset-base") def encode_question(query, tokenizer=tokenizer, encoder=encoder): inputs = tokenizer(query, return_tensors='pt') question_embedding = encoder(**inputs)[0].detach().numpy() return question_embedding def get_knn(query, k=5, tokenizer=tokenizer, encoder=encoder, verbose=False): enc_question = encode_question(query, tokenizer, encoder) topk_results = ds.get_nearest_examples(index_name='embeddings', query=enc_question, k=k) a = torch.tensor(enc_question[0]).reshape(768) b = torch.tensor(topk_results.examples['embeddings'][0]) print(a.shape, b.shape) print(torch.dot(a, b)) print((a-b).pow(2).sum()) return topk_results ``` The [FAISS documentation](https://github.com/facebookresearch/faiss/wiki/MetricType-and-distances) suggests the metric is usually L2 distance (without the square root) or the inner product. I compute both for the sample query: ```py query = """ it catapulted into popular culture along with a line of action figures and other toys by Bandai.[2] By 2001, the media franchise had generated over $6 billion in toy sales. Despite initial criticism that its action violence targeted child audiences, the franchise has been commercially successful.""" get_knn(query,k=5) ``` Here, I get dot product of 80.6020 and L2 distance of 77.6616 and ```py NearestExamplesResults(scores=array([76.20431 , 75.312416, 74.945404, 74.866394, 74.68506 ], dtype=float32), examples={'id': ['3081096', '2004811', '8908258', '9594124', '286575'], 'text': ['actors, resulting in the "Power Rangers" franchise which has continued since then into sequel TV series (with "Power Rangers Beast Morphers" set to premiere in 2019), comic books, video games, and three feature films, with a further cinematic universe planned. Following from the success of "Power Rangers", Saban acquired the rights to more of Toei\'s library, creating "VR Troopers" and "Big Bad Beetleborgs" from several Metal Hero Series shows and "Masked Rider" from Kamen Rider Series footage. DIC Entertainment joined this boom by acquiring the rights to "Gridman the Hyper Agent" and turning it into "Superhuman Samurai Syber-Squad". In 2002,', ``` Doing `k=1` indicates the higher the outputted number, the better the match, so the metric should not be L2 distance. However, my manually computed inner product (80.6) has a discrepancy with the reported (76.2). Perhaps, this has to do with me using the `compressed` embeddings? ### Expected behavior ```py ds = load_dataset(path='wiki_dpr', name='psgs_w100.multiset.compressed', split='train') print(ds.get_index("embeddings").metric_type) # METRIC_INNER_PRODUCT ``` ### Environment info - `datasets` version: 2.12.0 - Platform: Linux-4.18.0-477.13.1.el8_8.x86_64-x86_64-with-glibc2.28 - Python version: 3.9.16 - Huggingface_hub version: 0.14.1 - PyArrow version: 12.0.0 - Pandas version: 2.0.1
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/6011/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/6011/timeline
null
completed
false
https://api.github.com/repos/huggingface/datasets/issues/6010
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6010/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6010/comments
https://api.github.com/repos/huggingface/datasets/issues/6010/events
https://github.com/huggingface/datasets/issues/6010
1,793,838,152
I_kwDODunzps5q68xI
6,010
Improve `Dataset`'s string representation
{ "avatar_url": "https://avatars.githubusercontent.com/u/47462742?v=4", "events_url": "https://api.github.com/users/mariosasko/events{/privacy}", "followers_url": "https://api.github.com/users/mariosasko/followers", "following_url": "https://api.github.com/users/mariosasko/following{/other_user}", "gists_url": "https://api.github.com/users/mariosasko/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mariosasko", "id": 47462742, "login": "mariosasko", "node_id": "MDQ6VXNlcjQ3NDYyNzQy", "organizations_url": "https://api.github.com/users/mariosasko/orgs", "received_events_url": "https://api.github.com/users/mariosasko/received_events", "repos_url": "https://api.github.com/users/mariosasko/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mariosasko/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mariosasko/subscriptions", "type": "User", "url": "https://api.github.com/users/mariosasko" }
[ { "color": "a2eeef", "default": true, "description": "New feature or request", "id": 1935892871, "name": "enhancement", "node_id": "MDU6TGFiZWwxOTM1ODkyODcx", "url": "https://api.github.com/repos/huggingface/datasets/labels/enhancement" } ]
open
false
null
[]
null
3
"2023-07-07T16:38:03Z"
"2023-09-01T03:45:07Z"
null
CONTRIBUTOR
null
null
null
Currently, `Dataset.__repr__` outputs a dataset's column names and the number of rows. We could improve it by printing its features and the first few rows. We should also implement `_repr_html_` to have a rich HTML representation in notebooks/Streamlit.
{ "+1": 1, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 1, "url": "https://api.github.com/repos/huggingface/datasets/issues/6010/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/6010/timeline
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/6009
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6009/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6009/comments
https://api.github.com/repos/huggingface/datasets/issues/6009/events
https://github.com/huggingface/datasets/pull/6009
1,792,059,808
PR_kwDODunzps5U1mus
6,009
Fix cast for dictionaries with no keys
{ "avatar_url": "https://avatars.githubusercontent.com/u/47462742?v=4", "events_url": "https://api.github.com/users/mariosasko/events{/privacy}", "followers_url": "https://api.github.com/users/mariosasko/followers", "following_url": "https://api.github.com/users/mariosasko/following{/other_user}", "gists_url": "https://api.github.com/users/mariosasko/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mariosasko", "id": 47462742, "login": "mariosasko", "node_id": "MDQ6VXNlcjQ3NDYyNzQy", "organizations_url": "https://api.github.com/users/mariosasko/orgs", "received_events_url": "https://api.github.com/users/mariosasko/received_events", "repos_url": "https://api.github.com/users/mariosasko/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mariosasko/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mariosasko/subscriptions", "type": "User", "url": "https://api.github.com/users/mariosasko" }
[]
closed
false
null
[]
null
3
"2023-07-06T18:48:14Z"
"2023-07-07T14:13:00Z"
"2023-07-07T14:01:13Z"
CONTRIBUTOR
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/6009.diff", "html_url": "https://github.com/huggingface/datasets/pull/6009", "merged_at": "2023-07-07T14:01:13Z", "patch_url": "https://github.com/huggingface/datasets/pull/6009.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/6009" }
Fix #5677
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/6009/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/6009/timeline
null
null
true
https://api.github.com/repos/huggingface/datasets/issues/6008
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6008/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6008/comments
https://api.github.com/repos/huggingface/datasets/issues/6008/events
https://github.com/huggingface/datasets/issues/6008
1,789,869,344
I_kwDODunzps5qrz0g
6,008
Dataset.from_generator consistently freezes at ~1000 rows
{ "avatar_url": "https://avatars.githubusercontent.com/u/27695722?v=4", "events_url": "https://api.github.com/users/andreemic/events{/privacy}", "followers_url": "https://api.github.com/users/andreemic/followers", "following_url": "https://api.github.com/users/andreemic/following{/other_user}", "gists_url": "https://api.github.com/users/andreemic/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/andreemic", "id": 27695722, "login": "andreemic", "node_id": "MDQ6VXNlcjI3Njk1NzIy", "organizations_url": "https://api.github.com/users/andreemic/orgs", "received_events_url": "https://api.github.com/users/andreemic/received_events", "repos_url": "https://api.github.com/users/andreemic/repos", "site_admin": false, "starred_url": "https://api.github.com/users/andreemic/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/andreemic/subscriptions", "type": "User", "url": "https://api.github.com/users/andreemic" }
[]
closed
false
null
[]
null
3
"2023-07-05T16:06:48Z"
"2023-07-10T13:46:39Z"
"2023-07-10T13:46:39Z"
NONE
null
null
null
### Describe the bug Whenever I try to create a dataset which contains images using `Dataset.from_generator`, it freezes around 996 rows. I suppose it has something to do with memory consumption, but there's more memory available. I Somehow it worked a few times but mostly this makes the datasets library much more cumbersome to work with because generators are the easiest way to turn an existing dataset into a Hugging Face dataset. I've let it run in the frozen state for way longer than it can possibly take to load the actual dataset. Let me know if you have ideas how to resolve it! ### Steps to reproduce the bug ```python from datasets import Dataset import numpy as np def gen(): for row in range(10000): yield {"i": np.random.rand(512, 512, 3)} Dataset.from_generator(gen) # -> 90% of the time gets stuck around 1000 rows ``` ### Expected behavior Should continue and go through all the examples yielded by the generator, or at least throw an error or somehow communicate what's going on. ### Environment info - `datasets` version: 2.8.0 - Platform: Linux-5.15.0-52-generic-x86_64-with-glibc2.29 - Python version: 3.8.10 - PyArrow version: 12.0.1 - Pandas version: 1.5.1
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/6008/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/6008/timeline
null
completed
false
https://api.github.com/repos/huggingface/datasets/issues/6007
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6007/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6007/comments
https://api.github.com/repos/huggingface/datasets/issues/6007/events
https://github.com/huggingface/datasets/issues/6007
1,789,782,693
I_kwDODunzps5qreql
6,007
Get an error "OverflowError: Python int too large to convert to C long" when loading a large dataset
{ "avatar_url": "https://avatars.githubusercontent.com/u/2529049?v=4", "events_url": "https://api.github.com/users/silverriver/events{/privacy}", "followers_url": "https://api.github.com/users/silverriver/followers", "following_url": "https://api.github.com/users/silverriver/following{/other_user}", "gists_url": "https://api.github.com/users/silverriver/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/silverriver", "id": 2529049, "login": "silverriver", "node_id": "MDQ6VXNlcjI1MjkwNDk=", "organizations_url": "https://api.github.com/users/silverriver/orgs", "received_events_url": "https://api.github.com/users/silverriver/received_events", "repos_url": "https://api.github.com/users/silverriver/repos", "site_admin": false, "starred_url": "https://api.github.com/users/silverriver/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/silverriver/subscriptions", "type": "User", "url": "https://api.github.com/users/silverriver" }
[ { "color": "c2e0c6", "default": false, "description": "Related to Apache Arrow", "id": 5705560427, "name": "arrow", "node_id": "LA_kwDODunzps8AAAABVBPxaw", "url": "https://api.github.com/repos/huggingface/datasets/labels/arrow" } ]
open
false
null
[]
null
8
"2023-07-05T15:16:50Z"
"2024-02-07T22:22:35Z"
null
CONTRIBUTOR
null
null
null
### Describe the bug When load a large dataset with the following code ```python from datasets import load_dataset dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train') ``` We encountered the error: "OverflowError: Python int too large to convert to C long" The error look something like: ``` OverflowError: Python int too large to convert to C long During handling of the above exception, another exception occurred: OverflowError Traceback (most recent call last) <ipython-input-7-0ed8700e662d> in <module> ----> 1 dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train', cache_dir='/sfs/MNBVC/.cache/') /sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/load.py in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, keep_in_memory, save_infos, revision, use_auth_token, task, streaming, **config_kwargs) 1749 ignore_verifications=ignore_verifications, 1750 try_from_hf_gcs=try_from_hf_gcs, -> 1751 use_auth_token=use_auth_token, 1752 ) 1753 /sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in download_and_prepare(self, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, **download_and_prepare_kwargs) 703 if not downloaded_from_gcs: 704 self._download_and_prepare( --> 705 dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs 706 ) 707 # Sync info /sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos) 1225 1226 def _download_and_prepare(self, dl_manager, verify_infos): -> 1227 super()._download_and_prepare(dl_manager, verify_infos, check_duplicate_keys=verify_infos) 1228 1229 def _get_examples_iterable_for_split(self, split_generator: SplitGenerator) -> ExamplesIterable: /sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs) 791 try: 792 # Prepare split will record examples associated to the split --> 793 self._prepare_split(split_generator, **prepare_split_kwargs) 794 except OSError as e: 795 raise OSError( /sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in _prepare_split(self, split_generator, check_duplicate_keys) 1219 writer.write(example, key) 1220 finally: -> 1221 num_examples, num_bytes = writer.finalize() 1222 1223 split_generator.split_info.num_examples = num_examples /sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in finalize(self, close_stream) 536 # Re-intializing to empty list for next batch 537 self.hkey_record = [] --> 538 self.write_examples_on_file() 539 if self.pa_writer is None: 540 if self.schema: /sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in write_examples_on_file(self) 407 # Since current_examples contains (example, key) tuples 408 batch_examples[col] = [row[0][col] for row in self.current_examples] --> 409 self.write_batch(batch_examples=batch_examples) 410 self.current_examples = [] 411 /sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in write_batch(self, batch_examples, writer_batch_size) 506 col_try_type = try_features[col] if try_features is not None and col in try_features else None 507 typed_sequence = OptimizedTypedSequence(batch_examples[col], type=col_type, try_type=col_try_type, col=col) --> 508 arrays.append(pa.array(typed_sequence)) 509 inferred_features[col] = typed_sequence.get_inferred_type() 510 schema = inferred_features.arrow_schema if self.pa_writer is None else self.schema /sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib.array() /sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib._handle_arrow_array_protocol() /sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in __arrow_array__(self, type) 180 else: 181 trying_cast_to_python_objects = True --> 182 out = pa.array(cast_to_python_objects(data, only_1d_for_numpy=True)) 183 # use smaller integer precisions if possible 184 if self.trying_int_optimization: /sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib.array() /sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib._sequence_to_array() /sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/error.pxi in pyarrow.lib.pyarrow_internal_check_status() OverflowError: Python int too large to convert to C long ``` However, that dataset can be loaded in a streaming manner: ```python from datasets import load_dataset dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train', streaming=True) for i in dataset: pass # it work well ``` Another issue is reported in our dataset hub: https://huggingface.co/datasets/liwu/MNBVC/discussions/2 ### Steps to reproduce the bug from datasets import load_dataset dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train') ### Expected behavior the dataset can be safely loaded ### Environment info - `datasets` version: 2.4.0 - Platform: Linux-3.10.0-1160.an7.x86_64-x86_64-with-centos-7.9 - Python version: 3.6.8 - PyArrow version: 6.0.1 - Pandas version: 1.1.5
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/6007/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/6007/timeline
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/6006
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6006/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6006/comments
https://api.github.com/repos/huggingface/datasets/issues/6006/events
https://github.com/huggingface/datasets/issues/6006
1,788,855,582
I_kwDODunzps5qn8Ue
6,006
NotADirectoryError when loading gigawords
{ "avatar_url": "https://avatars.githubusercontent.com/u/115634163?v=4", "events_url": "https://api.github.com/users/xipq/events{/privacy}", "followers_url": "https://api.github.com/users/xipq/followers", "following_url": "https://api.github.com/users/xipq/following{/other_user}", "gists_url": "https://api.github.com/users/xipq/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/xipq", "id": 115634163, "login": "xipq", "node_id": "U_kgDOBuRv8w", "organizations_url": "https://api.github.com/users/xipq/orgs", "received_events_url": "https://api.github.com/users/xipq/received_events", "repos_url": "https://api.github.com/users/xipq/repos", "site_admin": false, "starred_url": "https://api.github.com/users/xipq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/xipq/subscriptions", "type": "User", "url": "https://api.github.com/users/xipq" }
[]
closed
false
null
[]
null
1
"2023-07-05T06:23:41Z"
"2023-07-05T06:31:02Z"
"2023-07-05T06:31:01Z"
NONE
null
null
null
### Describe the bug got `NotADirectoryError` whtn loading gigawords dataset ### Steps to reproduce the bug When running ``` import datasets datasets.load_dataset('gigaword') ``` Got the following exception: ```bash Traceback (most recent call last): [0/1862] File "/home/x/.conda/envs/dataproc/lib/python3.8/site-packages/datasets/builder.py", line 1629, in _prepare_split_single for key, record in generator: File "/home/x/.cache/huggingface/modules/datasets_modules/datasets/gigaword/ea83a8b819190acac5f2dae011fad51dccf269a0604ec5dd24795b 64efb424b6/gigaword.py", line 115, in _generate_examples with open(src_path, encoding="utf-8") as f_d, open(tgt_path, encoding="utf-8") as f_s: File "/home/x/.conda/envs/dataproc/lib/python3.8/site-packages/datasets/streaming.py", line 71, in wrapper return function(*args, use_auth_token=use_auth_token, **kwargs) File "/home/x/.conda/envs/dataproc/lib/python3.8/site-packages/datasets/download/streaming_download_manager.py", line 493, in xope n return open(main_hop, mode, *args, **kwargs) NotADirectoryError: [Errno 20] Not a directory: '/home/x/.cache/huggingface/datasets/downloads/6da52431bb5124d90cf51a0187d2dbee9046e 89780c4be7599794a4f559048ec/org_data/train.src.txt' The above exception was the direct cause of the following exception: Traceback (most recent call last): File "gigaword.py", line 38, in <module> main() File "gigaword.py", line 35, in main train, dev, test = dataset.generate_k_shot_data(k=32, seed=seed, path="../data/") File "/home/x/MICL/preprocess/fewshot_gym_dataset.py", line 199, in generate_k_shot_data dataset = self.load_dataset() File "gigaword.py", line 29, in load_dataset return datasets.load_dataset('gigaword') File "/home/x/.conda/envs/dataproc/lib/python3.8/site-packages/datasets/load.py", line 1809, in load_dataset builder_instance.download_and_prepare( File "/home/x/.conda/envs/dataproc/lib/python3.8/site-packages/datasets/builder.py", line 909, in download_and_prepare self._download_and_prepare( File "/home/x/.conda/envs/dataproc/lib/python3.8/site-packages/datasets/builder.py", line 1670, in _download_and_prepare super()._download_and_prepare( File "/home/x/.conda/envs/dataproc/lib/python3.8/site-packages/datasets/builder.py", line 1004, in _download_and_prepare self._prepare_split(split_generator, **prepare_split_kwargs) File "/home/x/.conda/envs/dataproc/lib/python3.8/site-packages/datasets/builder.py", line 1508, in _prepare_split for job_id, done, content in self._prepare_split_single( File "/home/x/.conda/envs/dataproc/lib/python3.8/site-packages/datasets/builder.py", line 1665, in _prepare_split_single raise DatasetGenerationError("An error occurred while generating the dataset") from e datasets.builder.DatasetGenerationError: An error occurred while generating the dataset ``` ### Expected behavior Download and process the dataset successfully ### Environment info - `datasets` version: 2.13.1 - Platform: Linux-5.0.0-1032-azure-x86_64-with-glibc2.10 - Python version: 3.8.0 - Huggingface_hub version: 0.15.1 - PyArrow version: 12.0.1 - Pandas version: 2.0.3
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/6006/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/6006/timeline
null
completed
false
https://api.github.com/repos/huggingface/datasets/issues/6005
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6005/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6005/comments
https://api.github.com/repos/huggingface/datasets/issues/6005/events
https://github.com/huggingface/datasets/pull/6005
1,788,103,576
PR_kwDODunzps5UoJ91
6,005
Drop Python 3.7 support
{ "avatar_url": "https://avatars.githubusercontent.com/u/47462742?v=4", "events_url": "https://api.github.com/users/mariosasko/events{/privacy}", "followers_url": "https://api.github.com/users/mariosasko/followers", "following_url": "https://api.github.com/users/mariosasko/following{/other_user}", "gists_url": "https://api.github.com/users/mariosasko/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mariosasko", "id": 47462742, "login": "mariosasko", "node_id": "MDQ6VXNlcjQ3NDYyNzQy", "organizations_url": "https://api.github.com/users/mariosasko/orgs", "received_events_url": "https://api.github.com/users/mariosasko/received_events", "repos_url": "https://api.github.com/users/mariosasko/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mariosasko/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mariosasko/subscriptions", "type": "User", "url": "https://api.github.com/users/mariosasko" }
[]
closed
false
null
[]
null
7
"2023-07-04T15:02:37Z"
"2023-07-06T15:32:41Z"
"2023-07-06T15:22:43Z"
CONTRIBUTOR
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/6005.diff", "html_url": "https://github.com/huggingface/datasets/pull/6005", "merged_at": "2023-07-06T15:22:43Z", "patch_url": "https://github.com/huggingface/datasets/pull/6005.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/6005" }
`hfh` and `transformers` have dropped Python 3.7 support, so we should do the same :). (Based on the stats, it seems less than 10% of the users use `datasets` with Python 3.7)
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/6005/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/6005/timeline
null
null
true
https://api.github.com/repos/huggingface/datasets/issues/6004
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6004/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6004/comments
https://api.github.com/repos/huggingface/datasets/issues/6004/events
https://github.com/huggingface/datasets/pull/6004
1,786,636,368
PR_kwDODunzps5UjN2h
6,004
Misc improvements
{ "avatar_url": "https://avatars.githubusercontent.com/u/47462742?v=4", "events_url": "https://api.github.com/users/mariosasko/events{/privacy}", "followers_url": "https://api.github.com/users/mariosasko/followers", "following_url": "https://api.github.com/users/mariosasko/following{/other_user}", "gists_url": "https://api.github.com/users/mariosasko/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mariosasko", "id": 47462742, "login": "mariosasko", "node_id": "MDQ6VXNlcjQ3NDYyNzQy", "organizations_url": "https://api.github.com/users/mariosasko/orgs", "received_events_url": "https://api.github.com/users/mariosasko/received_events", "repos_url": "https://api.github.com/users/mariosasko/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mariosasko/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mariosasko/subscriptions", "type": "User", "url": "https://api.github.com/users/mariosasko" }
[]
closed
false
null
[]
null
4
"2023-07-03T18:29:14Z"
"2023-07-06T17:04:11Z"
"2023-07-06T16:55:25Z"
CONTRIBUTOR
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/6004.diff", "html_url": "https://github.com/huggingface/datasets/pull/6004", "merged_at": "2023-07-06T16:55:25Z", "patch_url": "https://github.com/huggingface/datasets/pull/6004.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/6004" }
Contains the following improvements: * fixes a "share dataset" link in README and modifies the "hosting" part in the disclaimer section * updates `Makefile` to also run the style checks on `utils` and `setup.py` * deletes a test for GH-hosted datasets (no longer supported) * deletes `convert_dataset.sh` (outdated) * aligns `utils/release.py` with `transformers` (the current version is outdated)
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/6004/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/6004/timeline
null
null
true
https://api.github.com/repos/huggingface/datasets/issues/6003
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6003/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6003/comments
https://api.github.com/repos/huggingface/datasets/issues/6003/events
https://github.com/huggingface/datasets/issues/6003
1,786,554,110
I_kwDODunzps5qfKb-
6,003
interleave_datasets & DataCollatorForLanguageModeling having a conflict ?
{ "avatar_url": "https://avatars.githubusercontent.com/u/1929830?v=4", "events_url": "https://api.github.com/users/PonteIneptique/events{/privacy}", "followers_url": "https://api.github.com/users/PonteIneptique/followers", "following_url": "https://api.github.com/users/PonteIneptique/following{/other_user}", "gists_url": "https://api.github.com/users/PonteIneptique/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/PonteIneptique", "id": 1929830, "login": "PonteIneptique", "node_id": "MDQ6VXNlcjE5Mjk4MzA=", "organizations_url": "https://api.github.com/users/PonteIneptique/orgs", "received_events_url": "https://api.github.com/users/PonteIneptique/received_events", "repos_url": "https://api.github.com/users/PonteIneptique/repos", "site_admin": false, "starred_url": "https://api.github.com/users/PonteIneptique/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/PonteIneptique/subscriptions", "type": "User", "url": "https://api.github.com/users/PonteIneptique" }
[]
open
false
null
[]
null
0
"2023-07-03T17:15:31Z"
"2023-07-03T17:15:31Z"
null
NONE
null
null
null
### Describe the bug Hi everyone :) I have two local & custom datasets (1 "sentence" per line) which I split along the 95/5 lines for pre-training a Bert model. I use a modified version of `run_mlm.py` in order to be able to make use of `interleave_dataset`: - `tokenize()` runs fine - `group_text()` runs fine Everytime, on step 19, I get ```pytb File "env/lib/python3.9/site-packages/transformers/data/data_collator.py", line 779, in torch_mask_tokens inputs[indices_random] = random_words[indices_random] RuntimeError: Index put requires the source and destination dtypes match, got Float for the destination and Long for the source. ``` I tried: - training without interleave on dataset 1, it runs - training without interleave on dataset 2, it runs - training without `.to_iterable_dataset()`, it hangs then crash - training without group_text() and padding to max_length seemed to fix the issue, but who knows if this was just because it was an issue that would come much later in terms of steps. I might have coded something wrong, but I don't get what ### Steps to reproduce the bug I have this function: ```py def build_dataset(path: str, percent: str): dataset = load_dataset( "text", data_files={"train": [path]}, split=f"train[{percent}]" ) dataset = dataset.map( lambda examples: tokenize(examples["text"]), batched=True, num_proc=num_proc, ) dataset = dataset.map( group_texts, batched=True, num_proc=num_proc, desc=f"Grouping texts in chunks of {tokenizer.max_seq_length}", remove_columns=["text"] ) print(len(dataset)) return dataset.to_iterable_dataset() ``` I hardcoded group_text: ```py def group_texts(examples): # Concatenate all texts. concatenated_examples = {k: list(chain(*examples[k])) for k in examples.keys()} total_length = len(concatenated_examples[list(examples.keys())[0]]) # We drop the small remainder, and if the total_length < max_seq_length we exclude this batch and return an empty dict. # We could add padding if the model supported it instead of this drop, you can customize this part to your needs. total_length = (total_length // 512) * 512 # Split by chunks of max_len. result = { k: [t[i: i + 512] for i in range(0, total_length, 512)] for k, t in concatenated_examples.items() } # result = {k: [el for el in elements if el] for k, elements in result.items()} return result ``` And then I build datasets using the following code: ```py train1 = build_dataset("d1.txt", ":95%") train2 = build_dataset("d2.txt", ":95%") dev1 = build_dataset("d1.txt", "95%:") dev2 = build_dataset("d2.txt", "95%:") ``` and finally I run ```py train_dataset = interleave_datasets( [train1, train2], probabilities=[0.8, 0.2], seed=42 ) eval_dataset = interleave_datasets( [dev1, dev2], probabilities=[0.8, 0.2], seed=42 ) ``` Then I run the training part which remains mostly untouched: > CUDA_VISIBLE_DEVICES=1 python custom_dataset.py --model_type bert --per_device_train_batch_size 32 --do_train --output_dir /var/mlm/training-bert/model --max_seq_length 512 --save_steps 10000 --save_total_limit 3 --auto_find_batch_size --logging_dir ./logs-bert --learning_rate 0.0001 --do_train --num_train_epochs 25 --warmup_steps 10000 --max_step 45000 --fp16 ### Expected behavior The model should then train normally, but fails every time at the same step (19). printing the variables at `inputs[indices_random] = random_words[indices_random]` shows a magnificient empty tensor (, 32) [if I remember well] ### Environment info transformers[torch] 4.30.2 Ubuntu A100 0 CUDA 12 Driver Version: 525.116.04
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/6003/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/6003/timeline
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/6002
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6002/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6002/comments
https://api.github.com/repos/huggingface/datasets/issues/6002/events
https://github.com/huggingface/datasets/pull/6002
1,786,053,060
PR_kwDODunzps5UhP-Z
6,002
Add KLUE-MRC metrics
{ "avatar_url": "https://avatars.githubusercontent.com/u/37537248?v=4", "events_url": "https://api.github.com/users/ingyuseong/events{/privacy}", "followers_url": "https://api.github.com/users/ingyuseong/followers", "following_url": "https://api.github.com/users/ingyuseong/following{/other_user}", "gists_url": "https://api.github.com/users/ingyuseong/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/ingyuseong", "id": 37537248, "login": "ingyuseong", "node_id": "MDQ6VXNlcjM3NTM3MjQ4", "organizations_url": "https://api.github.com/users/ingyuseong/orgs", "received_events_url": "https://api.github.com/users/ingyuseong/received_events", "repos_url": "https://api.github.com/users/ingyuseong/repos", "site_admin": false, "starred_url": "https://api.github.com/users/ingyuseong/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ingyuseong/subscriptions", "type": "User", "url": "https://api.github.com/users/ingyuseong" }
[]
closed
false
null
[]
null
1
"2023-07-03T12:11:10Z"
"2023-07-09T11:57:20Z"
"2023-07-09T11:57:20Z"
NONE
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/6002.diff", "html_url": "https://github.com/huggingface/datasets/pull/6002", "merged_at": null, "patch_url": "https://github.com/huggingface/datasets/pull/6002.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/6002" }
## Metrics for KLUE-MRC (Korean Language Understanding Evaluation β€” Machine Reading Comprehension) Adding metrics for [KLUE-MRC](https://huggingface.co/datasets/klue). KLUE-MRC is very similar to SQuAD 2.0 but has a slightly different format which is why I added metrics for KLUE-MRC. Specifically, in the case of [LM Eval Harness](https://github.com/EleutherAI/lm-evaluation-harness), it leverages the scoring script of SQuAD to evaluate SQuAD 2.0 and KorQuAD. But the script isn't suitable for KLUE-MRC because KLUE-MRC is a bit different from SQuAD 2.0. And this is why I added the scoring script for KLUE-MRC. - [x] All tests passed - [x] Added a metric card (referred the metric card of SQuAD 2.0) - [x] Compatibility test with [LM Eval Harness](https://github.com/EleutherAI/lm-evaluation-harness) passed ### References - [KLUE: Korean Language Understanding Evaluation](https://datasets-benchmarks-proceedings.neurips.cc/paper_files/paper/2021/file/98dce83da57b0395e163467c9dae521b-Paper-round2.pdf) - [KLUE on Hugging Face Datasets](https://huggingface.co/datasets/klue) - #2416
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/6002/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/6002/timeline
null
null
true
https://api.github.com/repos/huggingface/datasets/issues/6001
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6001/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6001/comments
https://api.github.com/repos/huggingface/datasets/issues/6001/events
https://github.com/huggingface/datasets/pull/6001
1,782,516,627
PR_kwDODunzps5UVMMh
6,001
Align `column_names` type check with type hint in `sort`
{ "avatar_url": "https://avatars.githubusercontent.com/u/47462742?v=4", "events_url": "https://api.github.com/users/mariosasko/events{/privacy}", "followers_url": "https://api.github.com/users/mariosasko/followers", "following_url": "https://api.github.com/users/mariosasko/following{/other_user}", "gists_url": "https://api.github.com/users/mariosasko/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mariosasko", "id": 47462742, "login": "mariosasko", "node_id": "MDQ6VXNlcjQ3NDYyNzQy", "organizations_url": "https://api.github.com/users/mariosasko/orgs", "received_events_url": "https://api.github.com/users/mariosasko/received_events", "repos_url": "https://api.github.com/users/mariosasko/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mariosasko/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mariosasko/subscriptions", "type": "User", "url": "https://api.github.com/users/mariosasko" }
[]
closed
false
null
[]
null
3
"2023-06-30T13:15:50Z"
"2023-06-30T14:18:32Z"
"2023-06-30T14:11:24Z"
CONTRIBUTOR
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/6001.diff", "html_url": "https://github.com/huggingface/datasets/pull/6001", "merged_at": "2023-06-30T14:11:24Z", "patch_url": "https://github.com/huggingface/datasets/pull/6001.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/6001" }
Fix #5998
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/6001/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/6001/timeline
null
null
true
https://api.github.com/repos/huggingface/datasets/issues/6000
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/6000/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/6000/comments
https://api.github.com/repos/huggingface/datasets/issues/6000/events
https://github.com/huggingface/datasets/pull/6000
1,782,456,878
PR_kwDODunzps5UU_FB
6,000
Pin `joblib` to avoid `joblibspark` test failures
{ "avatar_url": "https://avatars.githubusercontent.com/u/47462742?v=4", "events_url": "https://api.github.com/users/mariosasko/events{/privacy}", "followers_url": "https://api.github.com/users/mariosasko/followers", "following_url": "https://api.github.com/users/mariosasko/following{/other_user}", "gists_url": "https://api.github.com/users/mariosasko/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mariosasko", "id": 47462742, "login": "mariosasko", "node_id": "MDQ6VXNlcjQ3NDYyNzQy", "organizations_url": "https://api.github.com/users/mariosasko/orgs", "received_events_url": "https://api.github.com/users/mariosasko/received_events", "repos_url": "https://api.github.com/users/mariosasko/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mariosasko/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mariosasko/subscriptions", "type": "User", "url": "https://api.github.com/users/mariosasko" }
[]
closed
false
null
[]
null
4
"2023-06-30T12:36:54Z"
"2023-06-30T13:17:05Z"
"2023-06-30T13:08:27Z"
CONTRIBUTOR
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/6000.diff", "html_url": "https://github.com/huggingface/datasets/pull/6000", "merged_at": "2023-06-30T13:08:27Z", "patch_url": "https://github.com/huggingface/datasets/pull/6000.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/6000" }
`joblibspark` doesn't support the latest `joblib` release. See https://github.com/huggingface/datasets/actions/runs/5401870932/jobs/9812337078 for the errors
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/6000/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/6000/timeline
null
null
true
https://api.github.com/repos/huggingface/datasets/issues/5999
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5999/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5999/comments
https://api.github.com/repos/huggingface/datasets/issues/5999/events
https://github.com/huggingface/datasets/issues/5999
1,781,851,513
I_kwDODunzps5qNOV5
5,999
Getting a 409 error while loading xglue dataset
{ "avatar_url": "https://avatars.githubusercontent.com/u/45713796?v=4", "events_url": "https://api.github.com/users/Praful932/events{/privacy}", "followers_url": "https://api.github.com/users/Praful932/followers", "following_url": "https://api.github.com/users/Praful932/following{/other_user}", "gists_url": "https://api.github.com/users/Praful932/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Praful932", "id": 45713796, "login": "Praful932", "node_id": "MDQ6VXNlcjQ1NzEzNzk2", "organizations_url": "https://api.github.com/users/Praful932/orgs", "received_events_url": "https://api.github.com/users/Praful932/received_events", "repos_url": "https://api.github.com/users/Praful932/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Praful932/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Praful932/subscriptions", "type": "User", "url": "https://api.github.com/users/Praful932" }
[]
closed
false
{ "avatar_url": "https://avatars.githubusercontent.com/u/8515462?v=4", "events_url": "https://api.github.com/users/albertvillanova/events{/privacy}", "followers_url": "https://api.github.com/users/albertvillanova/followers", "following_url": "https://api.github.com/users/albertvillanova/following{/other_user}", "gists_url": "https://api.github.com/users/albertvillanova/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/albertvillanova", "id": 8515462, "login": "albertvillanova", "node_id": "MDQ6VXNlcjg1MTU0NjI=", "organizations_url": "https://api.github.com/users/albertvillanova/orgs", "received_events_url": "https://api.github.com/users/albertvillanova/received_events", "repos_url": "https://api.github.com/users/albertvillanova/repos", "site_admin": false, "starred_url": "https://api.github.com/users/albertvillanova/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/albertvillanova/subscriptions", "type": "User", "url": "https://api.github.com/users/albertvillanova" }
[ { "avatar_url": "https://avatars.githubusercontent.com/u/8515462?v=4", "events_url": "https://api.github.com/users/albertvillanova/events{/privacy}", "followers_url": "https://api.github.com/users/albertvillanova/followers", "following_url": "https://api.github.com/users/albertvillanova/following{/other_user}", "gists_url": "https://api.github.com/users/albertvillanova/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/albertvillanova", "id": 8515462, "login": "albertvillanova", "node_id": "MDQ6VXNlcjg1MTU0NjI=", "organizations_url": "https://api.github.com/users/albertvillanova/orgs", "received_events_url": "https://api.github.com/users/albertvillanova/received_events", "repos_url": "https://api.github.com/users/albertvillanova/repos", "site_admin": false, "starred_url": "https://api.github.com/users/albertvillanova/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/albertvillanova/subscriptions", "type": "User", "url": "https://api.github.com/users/albertvillanova" } ]
null
1
"2023-06-30T04:13:54Z"
"2023-06-30T05:57:23Z"
"2023-06-30T05:57:22Z"
NONE
null
null
null
### Describe the bug Unable to load xglue dataset ### Steps to reproduce the bug ```python import datasets dataset = datasets.load_dataset("xglue", "ntg") ``` > ConnectionError: Couldn't reach https://xglue.blob.core.windows.net/xglue/xglue_full_dataset.tar.gz (error 409) ### Expected behavior Expected the dataset to load ### Environment info - `datasets` version: 2.13.1 - Platform: Linux-5.15.107+-x86_64-with-glibc2.31 - Python version: 3.10.12 - Huggingface_hub version: 0.15.1 - PyArrow version: 9.0.0 - Pandas version: 1.5.3
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5999/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5999/timeline
null
completed
false
https://api.github.com/repos/huggingface/datasets/issues/5998
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5998/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5998/comments
https://api.github.com/repos/huggingface/datasets/issues/5998/events
https://github.com/huggingface/datasets/issues/5998
1,781,805,018
I_kwDODunzps5qNC_a
5,998
The current implementation has a potential bug in the sort method
{ "avatar_url": "https://avatars.githubusercontent.com/u/22192665?v=4", "events_url": "https://api.github.com/users/wangyuxinwhy/events{/privacy}", "followers_url": "https://api.github.com/users/wangyuxinwhy/followers", "following_url": "https://api.github.com/users/wangyuxinwhy/following{/other_user}", "gists_url": "https://api.github.com/users/wangyuxinwhy/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/wangyuxinwhy", "id": 22192665, "login": "wangyuxinwhy", "node_id": "MDQ6VXNlcjIyMTkyNjY1", "organizations_url": "https://api.github.com/users/wangyuxinwhy/orgs", "received_events_url": "https://api.github.com/users/wangyuxinwhy/received_events", "repos_url": "https://api.github.com/users/wangyuxinwhy/repos", "site_admin": false, "starred_url": "https://api.github.com/users/wangyuxinwhy/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/wangyuxinwhy/subscriptions", "type": "User", "url": "https://api.github.com/users/wangyuxinwhy" }
[]
closed
false
null
[]
null
1
"2023-06-30T03:16:57Z"
"2023-06-30T14:21:03Z"
"2023-06-30T14:11:25Z"
NONE
null
null
null
### Describe the bug In the sort method,here's a piece of code ```python # column_names: Union[str, Sequence_[str]] # Check proper format of and for duplicates in column_names if not isinstance(column_names, list): column_names = [column_names] ``` I get an error when I pass in a tuple based on the column_names type annotation, it will raise an errror.As in the example below, while the type annotation implies that a tuple can be passed. ```python from datasets import load_dataset dataset = load_dataset('glue', 'ax')['test'] dataset.sort(column_names=('premise', 'hypothesis')) # Raise ValueError: Column '('premise', 'hypothesis')' not found in the dataset. ``` Of course, after I modified the tuple into a list, everything worked fine Change the code to the following so there will be no problem ```python # Check proper format of and for duplicates in column_names if not isinstance(column_names, list): if isinstance(column_names, str): column_names = [column_names] else: column_names = list(column_names) ``` ### Steps to reproduce the bug ```python from datasets import load_dataset dataset = load_dataset('glue', 'ax')['test'] dataset.sort(column_names=('premise', 'hypothesis')) # Raise ValueError: Column '('premise', 'hypothesis')' not found in the dataset. ``` ### Expected behavior Passing tuple into column_names should be equivalent to passing list ### Environment info - `datasets` version: 2.13.0 - Platform: macOS-13.1-arm64-arm-64bit - Python version: 3.10.11 - Huggingface_hub version: 0.15.1 - PyArrow version: 12.0.1 - Pandas version: 2.0.2
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5998/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5998/timeline
null
completed
false
https://api.github.com/repos/huggingface/datasets/issues/5997
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5997/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5997/comments
https://api.github.com/repos/huggingface/datasets/issues/5997/events
https://github.com/huggingface/datasets/issues/5997
1,781,582,818
I_kwDODunzps5qMMvi
5,997
extend the map function so it can wrap around long text that does not fit in the context window
{ "avatar_url": "https://avatars.githubusercontent.com/u/127623723?v=4", "events_url": "https://api.github.com/users/siddhsql/events{/privacy}", "followers_url": "https://api.github.com/users/siddhsql/followers", "following_url": "https://api.github.com/users/siddhsql/following{/other_user}", "gists_url": "https://api.github.com/users/siddhsql/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/siddhsql", "id": 127623723, "login": "siddhsql", "node_id": "U_kgDOB5tiKw", "organizations_url": "https://api.github.com/users/siddhsql/orgs", "received_events_url": "https://api.github.com/users/siddhsql/received_events", "repos_url": "https://api.github.com/users/siddhsql/repos", "site_admin": false, "starred_url": "https://api.github.com/users/siddhsql/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/siddhsql/subscriptions", "type": "User", "url": "https://api.github.com/users/siddhsql" }
[ { "color": "a2eeef", "default": true, "description": "New feature or request", "id": 1935892871, "name": "enhancement", "node_id": "MDU6TGFiZWwxOTM1ODkyODcx", "url": "https://api.github.com/repos/huggingface/datasets/labels/enhancement" } ]
open
false
null
[]
null
2
"2023-06-29T22:15:21Z"
"2023-07-03T17:58:52Z"
null
NONE
null
null
null
### Feature request I understand `dataset` provides a [`map`](https://github.com/huggingface/datasets/blob/main/src/datasets/arrow_dataset.py#L2849) function. This function in turn takes in a callable that is used to tokenize the text on which a model is trained. Frequently this text will not fit within a models's context window. In this case it would be useful to wrap around the text into multiple rows with each row fitting the model's context window. I tried to do it using this code as example which in turn I have borrowed from [here](https://stackoverflow.com/a/76343993/147530): ``` data = data.map(lambda samples: tokenizer(samples["text"], max_length=tokenizer.model_max_length, truncation=True, stride=4, return_overflowing_tokens=True), batched=True) ``` but running the code gives me this error: ``` File "/llm/fine-tune.py", line 117, in <module> data = data.map(lambda samples: tokenizer(samples["text"], max_length=tokenizer.model_max_length, truncation=True, stride=4, return_overflowing_tokens=True), batched=True) File "/llm/.env/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 580, in wrapper out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) File "/llm/.env/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 545, in wrapper out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) File "/llm/.env/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 3087, in map for rank, done, content in Dataset._map_single(**dataset_kwargs): File "/llm/.env/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 3480, in _map_single writer.write_batch(batch) File "/llm/.env/lib/python3.9/site-packages/datasets/arrow_writer.py", line 556, in write_batch pa_table = pa.Table.from_arrays(arrays, schema=schema) File "pyarrow/table.pxi", line 3798, in pyarrow.lib.Table.from_arrays File "pyarrow/table.pxi", line 2962, in pyarrow.lib.Table.validate File "pyarrow/error.pxi", line 100, in pyarrow.lib.check_status pyarrow.lib.ArrowInvalid: Column 1 named input_ids expected length 394 but got length 447 ``` The lambda function I have provided is correctly chopping up long text so it wraps around (and because of this 394 samples become 447 after wrap around) but the dataset `map` function does not like it. ### Motivation please see above ### Your contribution I'm afraid I don't have much knowledge to help
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5997/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5997/timeline
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/5996
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5996/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5996/comments
https://api.github.com/repos/huggingface/datasets/issues/5996/events
https://github.com/huggingface/datasets/pull/5996
1,779,294,374
PR_kwDODunzps5UKP0i
5,996
Deprecate `use_auth_token` in favor of `token`
{ "avatar_url": "https://avatars.githubusercontent.com/u/47462742?v=4", "events_url": "https://api.github.com/users/mariosasko/events{/privacy}", "followers_url": "https://api.github.com/users/mariosasko/followers", "following_url": "https://api.github.com/users/mariosasko/following{/other_user}", "gists_url": "https://api.github.com/users/mariosasko/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mariosasko", "id": 47462742, "login": "mariosasko", "node_id": "MDQ6VXNlcjQ3NDYyNzQy", "organizations_url": "https://api.github.com/users/mariosasko/orgs", "received_events_url": "https://api.github.com/users/mariosasko/received_events", "repos_url": "https://api.github.com/users/mariosasko/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mariosasko/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mariosasko/subscriptions", "type": "User", "url": "https://api.github.com/users/mariosasko" }
[]
closed
false
null
[]
null
9
"2023-06-28T16:26:38Z"
"2023-07-05T15:22:20Z"
"2023-07-03T16:03:33Z"
CONTRIBUTOR
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/5996.diff", "html_url": "https://github.com/huggingface/datasets/pull/5996", "merged_at": "2023-07-03T16:03:33Z", "patch_url": "https://github.com/huggingface/datasets/pull/5996.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5996" }
... to be consistent with `transformers` and `huggingface_hub`.
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5996/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5996/timeline
null
null
true
https://api.github.com/repos/huggingface/datasets/issues/5995
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5995/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5995/comments
https://api.github.com/repos/huggingface/datasets/issues/5995/events
https://github.com/huggingface/datasets/pull/5995
1,777,088,925
PR_kwDODunzps5UCvYJ
5,995
Support returning dataframe in map transform
{ "avatar_url": "https://avatars.githubusercontent.com/u/47462742?v=4", "events_url": "https://api.github.com/users/mariosasko/events{/privacy}", "followers_url": "https://api.github.com/users/mariosasko/followers", "following_url": "https://api.github.com/users/mariosasko/following{/other_user}", "gists_url": "https://api.github.com/users/mariosasko/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mariosasko", "id": 47462742, "login": "mariosasko", "node_id": "MDQ6VXNlcjQ3NDYyNzQy", "organizations_url": "https://api.github.com/users/mariosasko/orgs", "received_events_url": "https://api.github.com/users/mariosasko/received_events", "repos_url": "https://api.github.com/users/mariosasko/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mariosasko/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mariosasko/subscriptions", "type": "User", "url": "https://api.github.com/users/mariosasko" }
[]
closed
false
null
[]
null
4
"2023-06-27T14:15:08Z"
"2023-06-28T13:56:02Z"
"2023-06-28T13:46:33Z"
CONTRIBUTOR
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/5995.diff", "html_url": "https://github.com/huggingface/datasets/pull/5995", "merged_at": "2023-06-28T13:46:33Z", "patch_url": "https://github.com/huggingface/datasets/pull/5995.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5995" }
Allow returning Pandas DataFrames in `map` transforms. (Plus, raise an error in the non-batched mode if a returned PyArrow table/Pandas DataFrame has more than one row)
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5995/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5995/timeline
null
null
true
https://api.github.com/repos/huggingface/datasets/issues/5994
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5994/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5994/comments
https://api.github.com/repos/huggingface/datasets/issues/5994/events
https://github.com/huggingface/datasets/pull/5994
1,776,829,004
PR_kwDODunzps5UB1cA
5,994
Fix select_columns columns order
{ "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "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}", "gravatar_id": "", "html_url": "https://github.com/lhoestq", "id": 42851186, "login": "lhoestq", "node_id": "MDQ6VXNlcjQyODUxMTg2", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "repos_url": "https://api.github.com/users/lhoestq/repos", "site_admin": false, "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "type": "User", "url": "https://api.github.com/users/lhoestq" }
[]
closed
false
null
[]
null
4
"2023-06-27T12:32:46Z"
"2023-06-27T15:40:47Z"
"2023-06-27T15:32:43Z"
MEMBER
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/5994.diff", "html_url": "https://github.com/huggingface/datasets/pull/5994", "merged_at": "2023-06-27T15:32:43Z", "patch_url": "https://github.com/huggingface/datasets/pull/5994.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5994" }
Fix the order of the columns in dataset.features when the order changes with `dataset.select_columns()`. I also fixed the same issue for `dataset.flatten()` Close https://github.com/huggingface/datasets/issues/5993
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5994/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5994/timeline
null
null
true
https://api.github.com/repos/huggingface/datasets/issues/5993
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5993/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5993/comments
https://api.github.com/repos/huggingface/datasets/issues/5993/events
https://github.com/huggingface/datasets/issues/5993
1,776,643,555
I_kwDODunzps5p5W3j
5,993
ValueError: Table schema does not match schema used to create file
{ "avatar_url": "https://avatars.githubusercontent.com/u/128361578?v=4", "events_url": "https://api.github.com/users/exs-avianello/events{/privacy}", "followers_url": "https://api.github.com/users/exs-avianello/followers", "following_url": "https://api.github.com/users/exs-avianello/following{/other_user}", "gists_url": "https://api.github.com/users/exs-avianello/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/exs-avianello", "id": 128361578, "login": "exs-avianello", "node_id": "U_kgDOB6akag", "organizations_url": "https://api.github.com/users/exs-avianello/orgs", "received_events_url": "https://api.github.com/users/exs-avianello/received_events", "repos_url": "https://api.github.com/users/exs-avianello/repos", "site_admin": false, "starred_url": "https://api.github.com/users/exs-avianello/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/exs-avianello/subscriptions", "type": "User", "url": "https://api.github.com/users/exs-avianello" }
[]
closed
false
{ "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "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}", "gravatar_id": "", "html_url": "https://github.com/lhoestq", "id": 42851186, "login": "lhoestq", "node_id": "MDQ6VXNlcjQyODUxMTg2", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "repos_url": "https://api.github.com/users/lhoestq/repos", "site_admin": false, "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "type": "User", "url": "https://api.github.com/users/lhoestq" }
[ { "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "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}", "gravatar_id": "", "html_url": "https://github.com/lhoestq", "id": 42851186, "login": "lhoestq", "node_id": "MDQ6VXNlcjQyODUxMTg2", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "repos_url": "https://api.github.com/users/lhoestq/repos", "site_admin": false, "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "type": "User", "url": "https://api.github.com/users/lhoestq" } ]
null
2
"2023-06-27T10:54:07Z"
"2023-06-27T15:36:42Z"
"2023-06-27T15:32:44Z"
NONE
null
null
null
### Describe the bug Saving a dataset as parquet fails with a `ValueError: Table schema does not match schema used to create file` if the dataset was obtained out of a `.select_columns()` call with columns selected out of order. ### Steps to reproduce the bug ```python import datasets dataset = datasets.Dataset.from_dict( { "x1": [1, 2, 3], "x2": [10, 11, 12], } ) ds = dataset.select_columns(["x2", "x1"]) ds.to_parquet("demo.parquet") ``` ```shell >>> ValueError: Table schema does not match schema used to create file: table: x2: int64 x1: int64 -- schema metadata -- huggingface: '{"info": {"features": {"x2": {"dtype": "int64", "_type": "V' + 53 vs. file: x1: int64 x2: int64 -- schema metadata -- huggingface: '{"info": {"features": {"x1": {"dtype": "int64", "_type": "V' + 53 ``` --- I think this is because after the `.select_columns()` call with out of order columns, the output dataset features' schema ends up being out of sync with the schema of the arrow table backing it. ```python ds.features.arrow_schema >>> x1: int64 x2: int64 -- schema metadata -- huggingface: '{"info": {"features": {"x1": {"dtype": "int64", "_type": "V' + 53 ds.data.schema >>> x2: int64 x1: int64 -- schema metadata -- huggingface: '{"info": {"features": {"x2": {"dtype": "int64", "_type": "V' + 53 ``` So when we call `.to_parquet()`, the call behind the scenes to `datasets.io.parquet.ParquetDatasetWriter(...).write()` which initialises the backend `pyarrow.parquet.ParquetWriter` with `schema = self.dataset.features.arrow_schema` triggers `pyarrow` on write when [it checks](https://github.com/apache/arrow/blob/11b140a734a516e436adaddaeb35d23f30dcce44/python/pyarrow/parquet/core.py#L1086-L1090) that the `ParquetWriter` schema matches the schema of the table being written πŸ™Œ https://github.com/huggingface/datasets/blob/6ed837325cb539a5deb99129e5ad181d0269e050/src/datasets/io/parquet.py#L139-L141 ### Expected behavior The dataset gets successfully saved as parquet. *In the same way as it does if saving it as csv: ```python import datasets dataset = datasets.Dataset.from_dict( { "x1": [1, 2, 3], "x2": [10, 11, 12], } ) ds = dataset.select_columns(["x2", "x1"]) ds.to_csv("demo.csv") ``` ### Environment info `python==3.11` `datasets==2.13.1`
{ "+1": 1, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 1, "url": "https://api.github.com/repos/huggingface/datasets/issues/5993/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5993/timeline
null
completed
false
https://api.github.com/repos/huggingface/datasets/issues/5992
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5992/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5992/comments
https://api.github.com/repos/huggingface/datasets/issues/5992/events
https://github.com/huggingface/datasets/pull/5992
1,776,460,964
PR_kwDODunzps5UAk3C
5,992
speedup
{ "avatar_url": "https://avatars.githubusercontent.com/u/45557362?v=4", "events_url": "https://api.github.com/users/qgallouedec/events{/privacy}", "followers_url": "https://api.github.com/users/qgallouedec/followers", "following_url": "https://api.github.com/users/qgallouedec/following{/other_user}", "gists_url": "https://api.github.com/users/qgallouedec/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/qgallouedec", "id": 45557362, "login": "qgallouedec", "node_id": "MDQ6VXNlcjQ1NTU3MzYy", "organizations_url": "https://api.github.com/users/qgallouedec/orgs", "received_events_url": "https://api.github.com/users/qgallouedec/received_events", "repos_url": "https://api.github.com/users/qgallouedec/repos", "site_admin": false, "starred_url": "https://api.github.com/users/qgallouedec/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/qgallouedec/subscriptions", "type": "User", "url": "https://api.github.com/users/qgallouedec" }
[]
closed
false
null
[]
null
1
"2023-06-27T09:17:58Z"
"2023-06-27T09:23:07Z"
"2023-06-27T09:18:04Z"
CONTRIBUTOR
null
1
{ "diff_url": "https://github.com/huggingface/datasets/pull/5992.diff", "html_url": "https://github.com/huggingface/datasets/pull/5992", "merged_at": null, "patch_url": "https://github.com/huggingface/datasets/pull/5992.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5992" }
null
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5992/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5992/timeline
null
null
true
https://api.github.com/repos/huggingface/datasets/issues/5991
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5991/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5991/comments
https://api.github.com/repos/huggingface/datasets/issues/5991/events
https://github.com/huggingface/datasets/issues/5991
1,774,456,518
I_kwDODunzps5pxA7G
5,991
`map` with any joblib backend
{ "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "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}", "gravatar_id": "", "html_url": "https://github.com/lhoestq", "id": 42851186, "login": "lhoestq", "node_id": "MDQ6VXNlcjQyODUxMTg2", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "repos_url": "https://api.github.com/users/lhoestq/repos", "site_admin": false, "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "type": "User", "url": "https://api.github.com/users/lhoestq" }
[ { "color": "a2eeef", "default": true, "description": "New feature or request", "id": 1935892871, "name": "enhancement", "node_id": "MDU6TGFiZWwxOTM1ODkyODcx", "url": "https://api.github.com/repos/huggingface/datasets/labels/enhancement" } ]
open
false
null
[]
null
0
"2023-06-26T10:33:42Z"
"2023-06-26T10:33:42Z"
null
MEMBER
null
null
null
We recently enabled the (experimental) parallel backend switch for data download and extraction but not for `map` yet. Right now we're using our `iflatmap_unordered` implementation for multiprocessing that uses a shared Queue to gather progress updates from the subprocesses and show a progress bar in the main process. If a Queue implementation that would work on any joblib backend by leveraging the filesystem that is shared among workers, we can have `iflatmap_unordered` for joblib and therefore a `map` with any joblib backend with a progress bar ! Note that the Queue doesn't need to be that optimized though since we can choose a small frequency for progress updates (like 1 update per second).
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5991/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5991/timeline
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/5989
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5989/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5989/comments
https://api.github.com/repos/huggingface/datasets/issues/5989/events
https://github.com/huggingface/datasets/issues/5989
1,774,134,091
I_kwDODunzps5pvyNL
5,989
Set a rule on the config and split names
{ "avatar_url": "https://avatars.githubusercontent.com/u/1676121?v=4", "events_url": "https://api.github.com/users/severo/events{/privacy}", "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}", "gravatar_id": "", "html_url": "https://github.com/severo", "id": 1676121, "login": "severo", "node_id": "MDQ6VXNlcjE2NzYxMjE=", "organizations_url": "https://api.github.com/users/severo/orgs", "received_events_url": "https://api.github.com/users/severo/received_events", "repos_url": "https://api.github.com/users/severo/repos", "site_admin": false, "starred_url": "https://api.github.com/users/severo/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/severo/subscriptions", "type": "User", "url": "https://api.github.com/users/severo" }
[]
open
false
null
[]
null
3
"2023-06-26T07:34:14Z"
"2023-07-19T14:22:54Z"
null
CONTRIBUTOR
null
null
null
> should we actually allow characters like spaces? maybe it's better to add validation for whitespace symbols and directly in datasets and raise https://github.com/huggingface/datasets-server/issues/853
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5989/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5989/timeline
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/5988
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5988/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5988/comments
https://api.github.com/repos/huggingface/datasets/issues/5988/events
https://github.com/huggingface/datasets/issues/5988
1,773,257,828
I_kwDODunzps5pscRk
5,988
ConnectionError: Couldn't reach dataset_infos.json
{ "avatar_url": "https://avatars.githubusercontent.com/u/20674868?v=4", "events_url": "https://api.github.com/users/yulingao/events{/privacy}", "followers_url": "https://api.github.com/users/yulingao/followers", "following_url": "https://api.github.com/users/yulingao/following{/other_user}", "gists_url": "https://api.github.com/users/yulingao/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/yulingao", "id": 20674868, "login": "yulingao", "node_id": "MDQ6VXNlcjIwNjc0ODY4", "organizations_url": "https://api.github.com/users/yulingao/orgs", "received_events_url": "https://api.github.com/users/yulingao/received_events", "repos_url": "https://api.github.com/users/yulingao/repos", "site_admin": false, "starred_url": "https://api.github.com/users/yulingao/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/yulingao/subscriptions", "type": "User", "url": "https://api.github.com/users/yulingao" }
[]
closed
false
null
[]
null
1
"2023-06-25T12:39:31Z"
"2023-07-07T13:20:57Z"
"2023-07-07T13:20:57Z"
NONE
null
null
null
### Describe the bug I'm trying to load codeparrot/codeparrot-clean-train, but get the following error: ConnectionError: Couldn't reach https://huggingface.co/datasets/codeparrot/codeparrot-clean-train/resolve/main/dataset_infos.json (ConnectionError(ProtocolError('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer')))) ### Steps to reproduce the bug train_data = load_dataset('codeparrot/codeparrot-clean-train', split='train') ### Expected behavior download the dataset ### Environment info centos7
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5988/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5988/timeline
null
completed
false
https://api.github.com/repos/huggingface/datasets/issues/5987
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5987/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5987/comments
https://api.github.com/repos/huggingface/datasets/issues/5987/events
https://github.com/huggingface/datasets/issues/5987
1,773,047,909
I_kwDODunzps5prpBl
5,987
Why max_shard_size is not supported in load_dataset and passed to download_and_prepare
{ "avatar_url": "https://avatars.githubusercontent.com/u/11533479?v=4", "events_url": "https://api.github.com/users/npuichigo/events{/privacy}", "followers_url": "https://api.github.com/users/npuichigo/followers", "following_url": "https://api.github.com/users/npuichigo/following{/other_user}", "gists_url": "https://api.github.com/users/npuichigo/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/npuichigo", "id": 11533479, "login": "npuichigo", "node_id": "MDQ6VXNlcjExNTMzNDc5", "organizations_url": "https://api.github.com/users/npuichigo/orgs", "received_events_url": "https://api.github.com/users/npuichigo/received_events", "repos_url": "https://api.github.com/users/npuichigo/repos", "site_admin": false, "starred_url": "https://api.github.com/users/npuichigo/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/npuichigo/subscriptions", "type": "User", "url": "https://api.github.com/users/npuichigo" }
[]
closed
false
null
[]
null
5
"2023-06-25T04:19:13Z"
"2023-06-29T16:06:08Z"
"2023-06-29T16:06:08Z"
CONTRIBUTOR
null
null
null
### Describe the bug https://github.com/huggingface/datasets/blob/a8a797cc92e860c8d0df71e0aa826f4d2690713e/src/datasets/load.py#L1809 What I can to is break the `load_dataset` and use `load_datset_builder` + `download_and_prepare` instead. ### Steps to reproduce the bug https://github.com/huggingface/datasets/blob/a8a797cc92e860c8d0df71e0aa826f4d2690713e/src/datasets/load.py#L1809 ### Expected behavior Users can define the max shard size. ### Environment info datasets==2.13.1
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5987/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5987/timeline
null
completed
false
https://api.github.com/repos/huggingface/datasets/issues/5986
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5986/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5986/comments
https://api.github.com/repos/huggingface/datasets/issues/5986/events
https://github.com/huggingface/datasets/pull/5986
1,772,233,111
PR_kwDODunzps5TygOZ
5,986
Make IterableDataset.from_spark more efficient
{ "avatar_url": "https://avatars.githubusercontent.com/u/134338709?v=4", "events_url": "https://api.github.com/users/mathewjacob1002/events{/privacy}", "followers_url": "https://api.github.com/users/mathewjacob1002/followers", "following_url": "https://api.github.com/users/mathewjacob1002/following{/other_user}", "gists_url": "https://api.github.com/users/mathewjacob1002/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mathewjacob1002", "id": 134338709, "login": "mathewjacob1002", "node_id": "U_kgDOCAHYlQ", "organizations_url": "https://api.github.com/users/mathewjacob1002/orgs", "received_events_url": "https://api.github.com/users/mathewjacob1002/received_events", "repos_url": "https://api.github.com/users/mathewjacob1002/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mathewjacob1002/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mathewjacob1002/subscriptions", "type": "User", "url": "https://api.github.com/users/mathewjacob1002" }
[]
closed
false
null
[]
null
6
"2023-06-23T22:18:20Z"
"2023-07-07T10:05:58Z"
"2023-07-07T09:56:09Z"
CONTRIBUTOR
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/5986.diff", "html_url": "https://github.com/huggingface/datasets/pull/5986", "merged_at": "2023-07-07T09:56:09Z", "patch_url": "https://github.com/huggingface/datasets/pull/5986.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5986" }
Moved the code from using collect() to using toLocalIterator, which allows for prefetching partitions that will be selected next, thus allowing for better performance when iterating.
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5986/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5986/timeline
null
null
true
https://api.github.com/repos/huggingface/datasets/issues/5985
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5985/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5985/comments
https://api.github.com/repos/huggingface/datasets/issues/5985/events
https://github.com/huggingface/datasets/issues/5985
1,771,588,158
I_kwDODunzps5pmEo-
5,985
Cannot reuse tokenizer object for dataset map
{ "avatar_url": "https://avatars.githubusercontent.com/u/12724810?v=4", "events_url": "https://api.github.com/users/vikigenius/events{/privacy}", "followers_url": "https://api.github.com/users/vikigenius/followers", "following_url": "https://api.github.com/users/vikigenius/following{/other_user}", "gists_url": "https://api.github.com/users/vikigenius/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/vikigenius", "id": 12724810, "login": "vikigenius", "node_id": "MDQ6VXNlcjEyNzI0ODEw", "organizations_url": "https://api.github.com/users/vikigenius/orgs", "received_events_url": "https://api.github.com/users/vikigenius/received_events", "repos_url": "https://api.github.com/users/vikigenius/repos", "site_admin": false, "starred_url": "https://api.github.com/users/vikigenius/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/vikigenius/subscriptions", "type": "User", "url": "https://api.github.com/users/vikigenius" }
[ { "color": "cfd3d7", "default": true, "description": "This issue or pull request already exists", "id": 1935892865, "name": "duplicate", "node_id": "MDU6TGFiZWwxOTM1ODkyODY1", "url": "https://api.github.com/repos/huggingface/datasets/labels/duplicate" } ]
closed
false
null
[]
null
2
"2023-06-23T14:45:31Z"
"2023-07-21T14:09:14Z"
"2023-07-21T14:09:14Z"
NONE
null
null
null
### Describe the bug Related to https://github.com/huggingface/transformers/issues/24441. Not sure if this is a tokenizer issue or caching issue, so filing in both. Passing the tokenizer to the dataset map function causes the tokenizer to be fingerprinted weirdly. After calling the tokenizer with arguments like padding and truncation the tokenizer object changes interanally, even though the hash remains the same. But dumps is able to detect that internal change which causes the tokenizer object's fingerprint to change. ### Steps to reproduce the bug ```python from transformers import AutoTokenizer from datasets.utils.py_utils import dumps # Huggingface datasets t = AutoTokenizer.from_pretrained('bert-base-uncased') t.save_pretrained("tok1") th1 = hash(dumps(t)) text = "This is an example text" ttext = t(text, max_length=512, padding="max_length", truncation=True) t.save_pretrained("tok2") th2 = hash(dumps(t)) assert th1 == th2 # Assertion Error ``` But if you use just the hash of the object without dumps, the hashes don't change ```python from transformers import AutoTokenizer from datasets.utils.py_utils import dumps # Huggingface datasets t = AutoTokenizer.from_pretrained('bert-base-uncased') th1 = hash(t) # Just hash no dumps text = "This is an example text" ttext = t(text, max_length=512, padding="max_length", truncation=True) th2 = hash(t) # Just hash no dumps assert th1 == th2 # This is OK ``` This causes situations such as the following 1. Create a text file like this `yes "This is an example text" | head -n 10000 > lines.txt` ```python from transformers import AutoTokenizer import datasets class TokenizeMapper(object): """Mapper for tokenizer. This is needed because the caching mechanism of HuggingFace does not work on lambdas. Each time a new lambda will be created by a new process which will lead to a different hash. This way we can have a universal mapper object in init and reuse it with the same hash for each process. """ def __init__(self, tokenizer): """Initialize the tokenizer.""" self.tokenizer = tokenizer def __call__(self, examples, **kwargs): """Run the mapper.""" texts = examples["text"] tt = self.tokenizer(texts, max_length=256, padding="max_length", truncation=True) batch_outputs = { "input_ids": tt.input_ids, "attention_mask": tt.attention_mask, } return batch_outputs t = AutoTokenizer.from_pretrained('bert-base-uncased') mapper = TokenizeMapper(t) ds = datasets.load_dataset("text", data_files="lines.txt") mds1 = ds.map( mapper, batched=False, remove_columns=["text"], ).with_format("torch") mds2 = ds.map( mapper, batched=False, remove_columns=["text"], ).with_format("torch") ``` The second call to map should reuse the cached processed dataset from mds1, but it instead it redoes the tokenization because of the behavior of dumps. ### Expected behavior We should be able to initialize a tokenizer. And reusing it should let us reuse the same map computation for the same dataset. The second call to map should reuse the cached processed dataset from mds1, but it instead it redoes the tokenization because of the behavior of dumps. ### Environment info - `datasets` version: 2.13.0 - Platform: Linux-6.1.31_1-x86_64-with-glibc2.36 - Python version: 3.9.16 - Huggingface_hub version: 0.15.1 - PyArrow version: 12.0.1 - Pandas version: 2.0.2
{ "+1": 1, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 1, "url": "https://api.github.com/repos/huggingface/datasets/issues/5985/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5985/timeline
null
completed
false
https://api.github.com/repos/huggingface/datasets/issues/5984
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5984/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5984/comments
https://api.github.com/repos/huggingface/datasets/issues/5984/events
https://github.com/huggingface/datasets/issues/5984
1,771,571,458
I_kwDODunzps5pmAkC
5,984
AutoSharding IterableDataset's when num_workers > 1
{ "avatar_url": "https://avatars.githubusercontent.com/u/25594384?v=4", "events_url": "https://api.github.com/users/mathephysicist/events{/privacy}", "followers_url": "https://api.github.com/users/mathephysicist/followers", "following_url": "https://api.github.com/users/mathephysicist/following{/other_user}", "gists_url": "https://api.github.com/users/mathephysicist/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mathephysicist", "id": 25594384, "login": "mathephysicist", "node_id": "MDQ6VXNlcjI1NTk0Mzg0", "organizations_url": "https://api.github.com/users/mathephysicist/orgs", "received_events_url": "https://api.github.com/users/mathephysicist/received_events", "repos_url": "https://api.github.com/users/mathephysicist/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mathephysicist/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mathephysicist/subscriptions", "type": "User", "url": "https://api.github.com/users/mathephysicist" }
[ { "color": "a2eeef", "default": true, "description": "New feature or request", "id": 1935892871, "name": "enhancement", "node_id": "MDU6TGFiZWwxOTM1ODkyODcx", "url": "https://api.github.com/repos/huggingface/datasets/labels/enhancement" } ]
open
false
null
[]
null
7
"2023-06-23T14:34:20Z"
"2023-12-08T09:04:04Z"
null
NONE
null
null
null
### Feature request Minimal Example ``` import torch from datasets import IterableDataset d = IterableDataset.from_file(<file_name>) dl = torch.utils.data.dataloader.DataLoader(d,num_workers=3) for sample in dl: print(sample) ``` Warning: Too many dataloader workers: 2 (max is dataset.n_shards=1). Stopping 1 dataloader workers. To parallelize data loading, we give each process some shards (or data sources) to process. Therefore it's unnecessary to have a number of workers greater than dataset.n_shards=1. To enable more parallelism, please split the dataset in more files than 1. Expected Behavior: Dataset is sharded each cpu uses subset (contiguously - so you can do checkpoint loading/saving) ### Motivation I have a lot of unused cpu's and would like to be able to shard iterable datasets with pytorch's dataloader when num_workers > 1. This is for a very large single file. I am aware that we can use the `split_dataset_by_node` to ensure that each node (for distributed) gets different shards, but we should extend it so that this also continues for multiple workers. ### Your contribution If someone points me to what needs to change, I can create a PR.
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5984/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5984/timeline
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/5983
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5983/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5983/comments
https://api.github.com/repos/huggingface/datasets/issues/5983/events
https://github.com/huggingface/datasets/pull/5983
1,770,578,804
PR_kwDODunzps5TtDdy
5,983
replaced PathLike as a variable for save_to_disk for dataset_path wit…
{ "avatar_url": "https://avatars.githubusercontent.com/u/35114142?v=4", "events_url": "https://api.github.com/users/benjaminbrown038/events{/privacy}", "followers_url": "https://api.github.com/users/benjaminbrown038/followers", "following_url": "https://api.github.com/users/benjaminbrown038/following{/other_user}", "gists_url": "https://api.github.com/users/benjaminbrown038/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/benjaminbrown038", "id": 35114142, "login": "benjaminbrown038", "node_id": "MDQ6VXNlcjM1MTE0MTQy", "organizations_url": "https://api.github.com/users/benjaminbrown038/orgs", "received_events_url": "https://api.github.com/users/benjaminbrown038/received_events", "repos_url": "https://api.github.com/users/benjaminbrown038/repos", "site_admin": false, "starred_url": "https://api.github.com/users/benjaminbrown038/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/benjaminbrown038/subscriptions", "type": "User", "url": "https://api.github.com/users/benjaminbrown038" }
[]
closed
false
null
[]
null
0
"2023-06-23T00:57:05Z"
"2023-09-11T04:17:17Z"
"2023-09-11T04:17:17Z"
NONE
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/5983.diff", "html_url": "https://github.com/huggingface/datasets/pull/5983", "merged_at": null, "patch_url": "https://github.com/huggingface/datasets/pull/5983.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5983" }
…h str like that of load_from_disk
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5983/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5983/timeline
null
null
true
https://api.github.com/repos/huggingface/datasets/issues/5982
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5982/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5982/comments
https://api.github.com/repos/huggingface/datasets/issues/5982/events
https://github.com/huggingface/datasets/issues/5982
1,770,333,296
I_kwDODunzps5phSRw
5,982
404 on Datasets Documentation Page
{ "avatar_url": "https://avatars.githubusercontent.com/u/118509387?v=4", "events_url": "https://api.github.com/users/kmulka-bloomberg/events{/privacy}", "followers_url": "https://api.github.com/users/kmulka-bloomberg/followers", "following_url": "https://api.github.com/users/kmulka-bloomberg/following{/other_user}", "gists_url": "https://api.github.com/users/kmulka-bloomberg/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/kmulka-bloomberg", "id": 118509387, "login": "kmulka-bloomberg", "node_id": "U_kgDOBxBPSw", "organizations_url": "https://api.github.com/users/kmulka-bloomberg/orgs", "received_events_url": "https://api.github.com/users/kmulka-bloomberg/received_events", "repos_url": "https://api.github.com/users/kmulka-bloomberg/repos", "site_admin": false, "starred_url": "https://api.github.com/users/kmulka-bloomberg/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/kmulka-bloomberg/subscriptions", "type": "User", "url": "https://api.github.com/users/kmulka-bloomberg" }
[]
closed
false
null
[]
null
2
"2023-06-22T20:14:57Z"
"2023-06-26T15:45:03Z"
"2023-06-26T15:45:03Z"
NONE
null
null
null
### Describe the bug Getting a 404 from the Hugging Face Datasets docs page: https://huggingface.co/docs/datasets/index ### Steps to reproduce the bug 1. Go to URL https://huggingface.co/docs/datasets/index 2. Notice 404 not found ### Expected behavior URL should either show docs or redirect to new location ### Environment info hugginface.co
{ "+1": 1, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 1, "url": "https://api.github.com/repos/huggingface/datasets/issues/5982/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5982/timeline
null
completed
false
https://api.github.com/repos/huggingface/datasets/issues/5981
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5981/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5981/comments
https://api.github.com/repos/huggingface/datasets/issues/5981/events
https://github.com/huggingface/datasets/issues/5981
1,770,310,087
I_kwDODunzps5phMnH
5,981
Only two cores are getting used in sagemaker with pytorch 3.10 kernel
{ "avatar_url": "https://avatars.githubusercontent.com/u/107141022?v=4", "events_url": "https://api.github.com/users/mmr-crexi/events{/privacy}", "followers_url": "https://api.github.com/users/mmr-crexi/followers", "following_url": "https://api.github.com/users/mmr-crexi/following{/other_user}", "gists_url": "https://api.github.com/users/mmr-crexi/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mmr-crexi", "id": 107141022, "login": "mmr-crexi", "node_id": "U_kgDOBmLXng", "organizations_url": "https://api.github.com/users/mmr-crexi/orgs", "received_events_url": "https://api.github.com/users/mmr-crexi/received_events", "repos_url": "https://api.github.com/users/mmr-crexi/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mmr-crexi/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mmr-crexi/subscriptions", "type": "User", "url": "https://api.github.com/users/mmr-crexi" }
[]
closed
false
null
[]
null
4
"2023-06-22T19:57:31Z"
"2023-10-30T06:17:40Z"
"2023-07-24T11:54:52Z"
NONE
null
null
null
### Describe the bug When using the newer pytorch 3.10 kernel, only 2 cores are being used by huggingface filter and map functions. The Pytorch 3.9 kernel would use as many cores as specified in the num_proc field. We have solved this in our own code by placing the following snippet in the code that is called inside subprocesses: ```os.sched_setaffinity(0, {i for i in range(1000)})``` The problem, as near as we can tell, us that once upon a time, cpu affinity was set using a bitmask ("0xfffff" and the like), and affinity recently changed to a list of processors rather than to using the mask. As such, only processors 1 and 17 are shown to be working in htop. ![Selection_072](https://github.com/huggingface/datasets/assets/107141022/04c5a824-5321-4531-afca-7bc84dff36b4) When running functions via `map`, the above resetting of affinity works to spread across the cores. When using `filter`, however, only two cores are active. ### Steps to reproduce the bug Repro steps: 1. Create an aws sagemaker instance 2. use the pytorch 3_10 kernel 3. Load a dataset 4. run a filter operation 5. watch as only 2 cores are used when num_proc > 2 6. run a map operation 7. watch as only 2 cores are used when num_proc > 2 8. run a map operation with processor affinity reset inside the function called via map 9. Watch as all cores run ### Expected behavior All specified cores are used via the num_proc argument. ### Environment info AWS sagemaker with the following init script run in the terminal after instance creation: conda init bash bash conda activate pytorch_p310 pip install Wand PyPDF pytesseract datasets seqeval pdfplumber transformers pymupdf sentencepiece timm donut-python accelerate optimum xgboost python -m pip install 'git+https://github.com/facebookresearch/detectron2.git' sudo yum -y install htop sudo yum -y update sudo yum -y install wget libstdc++ autoconf automake libtool autoconf-archive pkg-config gcc gcc-c++ make libjpeg-devel libpng-devel libtiff-devel zlib-devel
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5981/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5981/timeline
null
completed
false
https://api.github.com/repos/huggingface/datasets/issues/5980
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5980/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5980/comments
https://api.github.com/repos/huggingface/datasets/issues/5980/events
https://github.com/huggingface/datasets/issues/5980
1,770,255,973
I_kwDODunzps5pg_Zl
5,980
Viewing dataset card returns β€œ502 Bad Gateway”
{ "avatar_url": "https://avatars.githubusercontent.com/u/4241811?v=4", "events_url": "https://api.github.com/users/tbenthompson/events{/privacy}", "followers_url": "https://api.github.com/users/tbenthompson/followers", "following_url": "https://api.github.com/users/tbenthompson/following{/other_user}", "gists_url": "https://api.github.com/users/tbenthompson/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/tbenthompson", "id": 4241811, "login": "tbenthompson", "node_id": "MDQ6VXNlcjQyNDE4MTE=", "organizations_url": "https://api.github.com/users/tbenthompson/orgs", "received_events_url": "https://api.github.com/users/tbenthompson/received_events", "repos_url": "https://api.github.com/users/tbenthompson/repos", "site_admin": false, "starred_url": "https://api.github.com/users/tbenthompson/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/tbenthompson/subscriptions", "type": "User", "url": "https://api.github.com/users/tbenthompson" }
[]
closed
false
null
[]
null
3
"2023-06-22T19:14:48Z"
"2023-06-27T08:38:19Z"
"2023-06-26T14:42:45Z"
NONE
null
null
null
The url is: https://huggingface.co/datasets/Confirm-Labs/pile_ngrams_trigrams I am able to successfully view the β€œFiles and versions” tab: [Confirm-Labs/pile_ngrams_trigrams at main](https://huggingface.co/datasets/Confirm-Labs/pile_ngrams_trigrams/tree/main) Any help would be appreciated! Thanks! I hope this is the right place to report an issue like this.
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5980/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5980/timeline
null
completed
false
https://api.github.com/repos/huggingface/datasets/issues/5979
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5979/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5979/comments
https://api.github.com/repos/huggingface/datasets/issues/5979/events
https://github.com/huggingface/datasets/pull/5979
1,770,198,250
PR_kwDODunzps5TrxS_
5,979
set dev version
{ "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "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}", "gravatar_id": "", "html_url": "https://github.com/lhoestq", "id": 42851186, "login": "lhoestq", "node_id": "MDQ6VXNlcjQyODUxMTg2", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "repos_url": "https://api.github.com/users/lhoestq/repos", "site_admin": false, "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "type": "User", "url": "https://api.github.com/users/lhoestq" }
[]
closed
false
null
[]
null
3
"2023-06-22T18:32:14Z"
"2023-06-22T18:42:22Z"
"2023-06-22T18:32:22Z"
MEMBER
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/5979.diff", "html_url": "https://github.com/huggingface/datasets/pull/5979", "merged_at": "2023-06-22T18:32:22Z", "patch_url": "https://github.com/huggingface/datasets/pull/5979.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5979" }
null
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5979/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5979/timeline
null
null
true
https://api.github.com/repos/huggingface/datasets/issues/5978
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5978/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5978/comments
https://api.github.com/repos/huggingface/datasets/issues/5978/events
https://github.com/huggingface/datasets/pull/5978
1,770,187,053
PR_kwDODunzps5Tru2_
5,978
Release: 2.13.1
{ "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "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}", "gravatar_id": "", "html_url": "https://github.com/lhoestq", "id": 42851186, "login": "lhoestq", "node_id": "MDQ6VXNlcjQyODUxMTg2", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "repos_url": "https://api.github.com/users/lhoestq/repos", "site_admin": false, "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "type": "User", "url": "https://api.github.com/users/lhoestq" }
[]
closed
false
null
[]
null
4
"2023-06-22T18:23:11Z"
"2023-06-22T18:40:24Z"
"2023-06-22T18:30:16Z"
MEMBER
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/5978.diff", "html_url": "https://github.com/huggingface/datasets/pull/5978", "merged_at": "2023-06-22T18:30:16Z", "patch_url": "https://github.com/huggingface/datasets/pull/5978.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5978" }
null
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5978/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5978/timeline
null
null
true
https://api.github.com/repos/huggingface/datasets/issues/5976
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5976/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5976/comments
https://api.github.com/repos/huggingface/datasets/issues/5976/events
https://github.com/huggingface/datasets/pull/5976
1,768,503,913
PR_kwDODunzps5TmAFp
5,976
Avoid stuck map operation when subprocesses crashes
{ "avatar_url": "https://avatars.githubusercontent.com/u/1213561?v=4", "events_url": "https://api.github.com/users/pappacena/events{/privacy}", "followers_url": "https://api.github.com/users/pappacena/followers", "following_url": "https://api.github.com/users/pappacena/following{/other_user}", "gists_url": "https://api.github.com/users/pappacena/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/pappacena", "id": 1213561, "login": "pappacena", "node_id": "MDQ6VXNlcjEyMTM1NjE=", "organizations_url": "https://api.github.com/users/pappacena/orgs", "received_events_url": "https://api.github.com/users/pappacena/received_events", "repos_url": "https://api.github.com/users/pappacena/repos", "site_admin": false, "starred_url": "https://api.github.com/users/pappacena/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/pappacena/subscriptions", "type": "User", "url": "https://api.github.com/users/pappacena" }
[]
closed
false
null
[]
null
11
"2023-06-21T21:18:31Z"
"2023-07-10T09:58:39Z"
"2023-07-10T09:50:07Z"
CONTRIBUTOR
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/5976.diff", "html_url": "https://github.com/huggingface/datasets/pull/5976", "merged_at": "2023-07-10T09:50:07Z", "patch_url": "https://github.com/huggingface/datasets/pull/5976.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5976" }
I've been using Dataset.map() with `num_proc=os.cpu_count()` to leverage multicore processing for my datasets, but from time to time I get stuck processes waiting forever. Apparently, when one of the subprocesses is abruptly killed (OOM killer, segfault, SIGKILL, etc), the main process keeps waiting for the async task sent to that child process to finish. It seems to be easy to reproduce the issue with the following script: ``` import os from datasets import Dataset, Features, Value def do_stuck(item): os.kill(os.getpid(), 9) data = { "col1": list(range(5)), "col2": list(range(5)), } ds = Dataset.from_dict( data, features=Features({ "col1": Value("int64"), "col2": Value("int64"), }), ) print(ds.map(do_stuck, num_proc=4)) ``` This is an old behavior in Python, which apparently was fixed a few years ago in `concurrent.futures.ProcessPoolExecutor` ([ref](https://bugs.python.org/issue9205)), but not in `multiprocessing.pool.Pool` / `multiprocess.pool.Pool`, which is used by `Dataset.map` ([ref](https://bugs.python.org/issue22393)). This PR is an idea to try to detect when a child process gets killed, and raises a `RuntimeError` warning the dataset.map() caller. EDIT: Related proposal for future improvement: https://github.com/huggingface/datasets/discussions/5977
{ "+1": 2, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 2, "url": "https://api.github.com/repos/huggingface/datasets/issues/5976/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5976/timeline
null
null
true
https://api.github.com/repos/huggingface/datasets/issues/5975
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5975/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5975/comments
https://api.github.com/repos/huggingface/datasets/issues/5975/events
https://github.com/huggingface/datasets/issues/5975
1,768,271,343
I_kwDODunzps5pZa3v
5,975
Streaming Dataset behind Proxy - FileNotFoundError
{ "avatar_url": "https://avatars.githubusercontent.com/u/135350576?v=4", "events_url": "https://api.github.com/users/Veluchs/events{/privacy}", "followers_url": "https://api.github.com/users/Veluchs/followers", "following_url": "https://api.github.com/users/Veluchs/following{/other_user}", "gists_url": "https://api.github.com/users/Veluchs/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Veluchs", "id": 135350576, "login": "Veluchs", "node_id": "U_kgDOCBFJMA", "organizations_url": "https://api.github.com/users/Veluchs/orgs", "received_events_url": "https://api.github.com/users/Veluchs/received_events", "repos_url": "https://api.github.com/users/Veluchs/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Veluchs/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Veluchs/subscriptions", "type": "User", "url": "https://api.github.com/users/Veluchs" }
[]
closed
false
null
[]
null
9
"2023-06-21T19:10:02Z"
"2023-06-30T05:55:39Z"
"2023-06-30T05:55:38Z"
NONE
null
null
null
### Describe the bug When trying to stream a dataset i get the following error after a few minutes of waiting. ``` FileNotFoundError: https://huggingface.co/datasets/facebook/voxpopuli/resolve/main/data/n_files.json If the repo is private or gated, make sure to log in with `huggingface-cli login`. ``` I have already set the proxy environment variables. Downloading a Dataset without streaming works as expected. Still i suspect that this is connected to being behind a proxy. Is there a way to set the proxy for streaming datasets? Possibly a keyword argument that gets passed to ffspec? ### Steps to reproduce the bug This is the code i use. ``` import os os.environ['http_proxy'] = "http://example.com:xxxx" os.environ['https_proxy'] = "http://example.com:xxxx" from datasets import load_dataset ds = load_dataset("facebook/voxpopuli", name="de", streaming=True) ``` ### Expected behavior I would expect the streaming functionality to use the set proxy settings. ### Environment info - `datasets` version: 2.13.0 - Platform: Linux-5.15.0-73-generic-x86_64-with-glibc2.35 - Python version: 3.10.11 - Huggingface_hub version: 0.15.1 - PyArrow version: 11.0.0 - Pandas version: 2.0.2
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5975/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5975/timeline
null
completed
false
https://api.github.com/repos/huggingface/datasets/issues/5974
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5974/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5974/comments
https://api.github.com/repos/huggingface/datasets/issues/5974/events
https://github.com/huggingface/datasets/pull/5974
1,767,981,231
PR_kwDODunzps5TkXCb
5,974
Deprecate `errors` param in favor of `encoding_errors` in text builder
{ "avatar_url": "https://avatars.githubusercontent.com/u/47462742?v=4", "events_url": "https://api.github.com/users/mariosasko/events{/privacy}", "followers_url": "https://api.github.com/users/mariosasko/followers", "following_url": "https://api.github.com/users/mariosasko/following{/other_user}", "gists_url": "https://api.github.com/users/mariosasko/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mariosasko", "id": 47462742, "login": "mariosasko", "node_id": "MDQ6VXNlcjQ3NDYyNzQy", "organizations_url": "https://api.github.com/users/mariosasko/orgs", "received_events_url": "https://api.github.com/users/mariosasko/received_events", "repos_url": "https://api.github.com/users/mariosasko/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mariosasko/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mariosasko/subscriptions", "type": "User", "url": "https://api.github.com/users/mariosasko" }
[]
closed
false
null
[]
null
3
"2023-06-21T16:31:38Z"
"2023-06-26T10:34:43Z"
"2023-06-26T10:27:40Z"
CONTRIBUTOR
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/5974.diff", "html_url": "https://github.com/huggingface/datasets/pull/5974", "merged_at": "2023-06-26T10:27:40Z", "patch_url": "https://github.com/huggingface/datasets/pull/5974.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5974" }
For consistency with the JSON builder and Pandas
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5974/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5974/timeline
null
null
true
https://api.github.com/repos/huggingface/datasets/issues/5972
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5972/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5972/comments
https://api.github.com/repos/huggingface/datasets/issues/5972/events
https://github.com/huggingface/datasets/pull/5972
1,767,897,485
PR_kwDODunzps5TkE7K
5,972
Filter unsupported extensions
{ "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "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}", "gravatar_id": "", "html_url": "https://github.com/lhoestq", "id": 42851186, "login": "lhoestq", "node_id": "MDQ6VXNlcjQyODUxMTg2", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "repos_url": "https://api.github.com/users/lhoestq/repos", "site_admin": false, "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "type": "User", "url": "https://api.github.com/users/lhoestq" }
[]
closed
false
null
[]
null
5
"2023-06-21T15:43:01Z"
"2023-06-22T14:23:29Z"
"2023-06-22T14:16:26Z"
MEMBER
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/5972.diff", "html_url": "https://github.com/huggingface/datasets/pull/5972", "merged_at": "2023-06-22T14:16:26Z", "patch_url": "https://github.com/huggingface/datasets/pull/5972.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5972" }
I used a regex to filter the data files based on their extension for packaged builders. I tried and a regex is 10x faster that using `in` to check if the extension is in the list of supported extensions. Supersedes https://github.com/huggingface/datasets/pull/5850 Close https://github.com/huggingface/datasets/issues/5849 I also did a small change to favor the parquet module in case of a draw in the extension counter.
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5972/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5972/timeline
null
null
true
https://api.github.com/repos/huggingface/datasets/issues/5971
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5971/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5971/comments
https://api.github.com/repos/huggingface/datasets/issues/5971/events
https://github.com/huggingface/datasets/issues/5971
1,767,053,635
I_kwDODunzps5pUxlD
5,971
Docs: make "repository structure" easier to find
{ "avatar_url": "https://avatars.githubusercontent.com/u/1676121?v=4", "events_url": "https://api.github.com/users/severo/events{/privacy}", "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}", "gravatar_id": "", "html_url": "https://github.com/severo", "id": 1676121, "login": "severo", "node_id": "MDQ6VXNlcjE2NzYxMjE=", "organizations_url": "https://api.github.com/users/severo/orgs", "received_events_url": "https://api.github.com/users/severo/received_events", "repos_url": "https://api.github.com/users/severo/repos", "site_admin": false, "starred_url": "https://api.github.com/users/severo/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/severo/subscriptions", "type": "User", "url": "https://api.github.com/users/severo" }
[ { "color": "0075ca", "default": true, "description": "Improvements or additions to documentation", "id": 1935892861, "name": "documentation", "node_id": "MDU6TGFiZWwxOTM1ODkyODYx", "url": "https://api.github.com/repos/huggingface/datasets/labels/documentation" } ]
open
false
{ "avatar_url": "https://avatars.githubusercontent.com/u/35114142?v=4", "events_url": "https://api.github.com/users/benjaminbrown038/events{/privacy}", "followers_url": "https://api.github.com/users/benjaminbrown038/followers", "following_url": "https://api.github.com/users/benjaminbrown038/following{/other_user}", "gists_url": "https://api.github.com/users/benjaminbrown038/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/benjaminbrown038", "id": 35114142, "login": "benjaminbrown038", "node_id": "MDQ6VXNlcjM1MTE0MTQy", "organizations_url": "https://api.github.com/users/benjaminbrown038/orgs", "received_events_url": "https://api.github.com/users/benjaminbrown038/received_events", "repos_url": "https://api.github.com/users/benjaminbrown038/repos", "site_admin": false, "starred_url": "https://api.github.com/users/benjaminbrown038/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/benjaminbrown038/subscriptions", "type": "User", "url": "https://api.github.com/users/benjaminbrown038" }
[ { "avatar_url": "https://avatars.githubusercontent.com/u/35114142?v=4", "events_url": "https://api.github.com/users/benjaminbrown038/events{/privacy}", "followers_url": "https://api.github.com/users/benjaminbrown038/followers", "following_url": "https://api.github.com/users/benjaminbrown038/following{/other_user}", "gists_url": "https://api.github.com/users/benjaminbrown038/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/benjaminbrown038", "id": 35114142, "login": "benjaminbrown038", "node_id": "MDQ6VXNlcjM1MTE0MTQy", "organizations_url": "https://api.github.com/users/benjaminbrown038/orgs", "received_events_url": "https://api.github.com/users/benjaminbrown038/received_events", "repos_url": "https://api.github.com/users/benjaminbrown038/repos", "site_admin": false, "starred_url": "https://api.github.com/users/benjaminbrown038/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/benjaminbrown038/subscriptions", "type": "User", "url": "https://api.github.com/users/benjaminbrown038" } ]
null
5
"2023-06-21T08:26:44Z"
"2023-07-05T06:51:38Z"
null
CONTRIBUTOR
null
null
null
The page https://huggingface.co/docs/datasets/repository_structure explains how to create a simple repository structure without a dataset script. It's the simplest way to create a dataset and should be easier to find, particularly on the docs' first pages.
{ "+1": 1, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 1, "url": "https://api.github.com/repos/huggingface/datasets/issues/5971/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5971/timeline
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/5970
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5970/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5970/comments
https://api.github.com/repos/huggingface/datasets/issues/5970/events
https://github.com/huggingface/datasets/issues/5970
1,766,010,356
I_kwDODunzps5pQy30
5,970
description disappearing from Info when Uploading a Dataset Created with `from_dict`
{ "avatar_url": "https://avatars.githubusercontent.com/u/20377292?v=4", "events_url": "https://api.github.com/users/balisujohn/events{/privacy}", "followers_url": "https://api.github.com/users/balisujohn/followers", "following_url": "https://api.github.com/users/balisujohn/following{/other_user}", "gists_url": "https://api.github.com/users/balisujohn/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/balisujohn", "id": 20377292, "login": "balisujohn", "node_id": "MDQ6VXNlcjIwMzc3Mjky", "organizations_url": "https://api.github.com/users/balisujohn/orgs", "received_events_url": "https://api.github.com/users/balisujohn/received_events", "repos_url": "https://api.github.com/users/balisujohn/repos", "site_admin": false, "starred_url": "https://api.github.com/users/balisujohn/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/balisujohn/subscriptions", "type": "User", "url": "https://api.github.com/users/balisujohn" }
[]
open
false
null
[]
null
2
"2023-06-20T19:18:26Z"
"2023-06-22T14:23:56Z"
null
NONE
null
null
null
### Describe the bug When uploading a dataset created locally using `from_dict` with a specified `description` field. It appears before upload, but is missing after upload and re-download. ### Steps to reproduce the bug I think the most relevant pattern in the code might be the following lines: ``` description_json_str = json.dumps( { "dataset_id": dataset.spec.dataset_id, "env_name": dataset.spec.env_spec.id, "action_space": serialize_space(dataset.spec.action_space), "observation_space": serialize_space(dataset.spec.observation_space), } ) hugging_face_dataset = Dataset.from_dict( episodes_dict, info=DatasetInfo(description=description_json_str) ) ``` Which comes from this function https://github.com/balisujohn/minarai/blob/8e023727f0a8488c4451651d9f7a79b981412c40/minari/integrations/hugging_face.py#L39 To replicate, clone this branch of my Minari fork https://github.com/balisujohn/minarai/tree/dev-huggingface then run ``` python3.8 -m venv env source env/bin/activate python3 -m pip install -e . python3 -m pip install pytest ``` The change the hugging face repo path in the test called `test_hugging_face_push_and_pull_dataset` in `tests/integrations/test_hugging_face.py` to one you have permissions to write to. Then run: ``` pytest tests/integrations/test_hugging_face.py::test_hugging_face_push_and_pull_dataset ``` ### Expected behavior DATASET INFO BEFORE UPLOADING DatasetInfo(description='{"dataset_id": "dummy-combo-test-v0", "env_name": "DummyComboEnv-v0", "action_space": "{\\"type\\": \\"Tuple\\", \\"subspaces\\": [{\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [2.0], \\"high\\": [3.0]}, {\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [4.0], \\"high\\": [5.0]}]}", "observation_space": "{\\"type\\": \\"Tuple\\", \\"subspaces\\": [{\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [2.0], \\"high\\": [3.0]}, {\\"type\\": \\"Tuple\\", \\"subspaces\\": [{\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [2.0], \\"high\\": [3.0]}, {\\"type\\": \\"Dict\\", \\"subspaces\\": {\\"component_1\\": {\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [-1.0], \\"high\\": [1.0]}, \\"component_2\\": {\\"type\\": \\"Dict\\", \\"subspaces\\": {\\"subcomponent_1\\": {\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [2.0], \\"high\\": [3.0]}, \\"subcomponent_2\\": {\\"type\\": \\"Tuple\\", \\"subspaces\\": [{\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [4.0], \\"high\\": [5.0]}, {\\"type\\": \\"Discrete\\", \\"dtype\\": \\"int64\\", \\"start\\": 0, \\"n\\": 10}]}}}}}]}]}"}', citation='', homepage='', license='', features={'observations': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': {'component_1': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), 'component_2': {'subcomponent_1': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), 'subcomponent_2': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': Value(dtype='int64', id=None)}}}}}, 'actions': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None)}, 'rewards': Value(dtype='int64', id=None), 'truncations': Value(dtype='bool', id=None), 'terminations': Value(dtype='bool', id=None), 'episode_ids': Value(dtype='int64', id=None)}, post_processed=None, supervised_keys=None, task_templates=None, builder_name=None, config_name=None, version=None, splits=None, download_checksums=None, download_size=None, post_processing_size=None, dataset_size=None, size_in_bytes=None) ... DATASET INFO AFTER UPLOADING AND DOWNLOADING DatasetInfo(description='', citation='', homepage='', license='', features={'observations': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': {'component_1': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), 'component_2': {'subcomponent_1': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), 'subcomponent_2': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': Value(dtype='int64', id=None)}}}}}, 'actions': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None)}, 'rewards': Value(dtype='int64', id=None), 'truncations': Value(dtype='bool', id=None), 'terminations': Value(dtype='bool', id=None), 'episode_ids': Value(dtype='int64', id=None)}, post_processed=None, supervised_keys=None, task_templates=None, builder_name=None, config_name=None, version=None, splits={'train': SplitInfo(name='train', num_bytes=4846, num_examples=60, shard_lengths=None, dataset_name='parquet')}, download_checksums={'https://huggingface.co/datasets/balisujohn/minari_test/resolve/8217b614ff9ba5edc1a30c7df430e92a46f65363/data/train-00000-of-00001-7c5900b93b35745e.parquet': {'num_bytes': 9052, 'checksum': None}}, download_size=9052, post_processing_size=None, dataset_size=4846, size_in_bytes=13898) ... ### Environment info - `datasets` version: 2.13.0 - Platform: Linux-5.15.0-75-generic-x86_64-with-glibc2.29 - Python version: 3.8.10 - Huggingface_hub version: 0.15.1 - PyArrow version: 12.0.1 - Pandas version: 2.0.2
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5970/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5970/timeline
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/5969
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5969/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5969/comments
https://api.github.com/repos/huggingface/datasets/issues/5969/events
https://github.com/huggingface/datasets/pull/5969
1,765,529,905
PR_kwDODunzps5Tcgq4
5,969
Add `encoding` and `errors` params to JSON loader
{ "avatar_url": "https://avatars.githubusercontent.com/u/47462742?v=4", "events_url": "https://api.github.com/users/mariosasko/events{/privacy}", "followers_url": "https://api.github.com/users/mariosasko/followers", "following_url": "https://api.github.com/users/mariosasko/following{/other_user}", "gists_url": "https://api.github.com/users/mariosasko/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mariosasko", "id": 47462742, "login": "mariosasko", "node_id": "MDQ6VXNlcjQ3NDYyNzQy", "organizations_url": "https://api.github.com/users/mariosasko/orgs", "received_events_url": "https://api.github.com/users/mariosasko/received_events", "repos_url": "https://api.github.com/users/mariosasko/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mariosasko/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mariosasko/subscriptions", "type": "User", "url": "https://api.github.com/users/mariosasko" }
[]
closed
false
null
[]
null
4
"2023-06-20T14:28:35Z"
"2023-06-21T13:39:50Z"
"2023-06-21T13:32:22Z"
CONTRIBUTOR
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/5969.diff", "html_url": "https://github.com/huggingface/datasets/pull/5969", "merged_at": "2023-06-21T13:32:22Z", "patch_url": "https://github.com/huggingface/datasets/pull/5969.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5969" }
"Requested" in https://discuss.huggingface.co/t/utf-16-for-datasets/43828/3. `pd.read_json` also has these parameters, so it makes sense to be consistent.
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5969/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5969/timeline
null
null
true
https://api.github.com/repos/huggingface/datasets/issues/5968
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5968/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5968/comments
https://api.github.com/repos/huggingface/datasets/issues/5968/events
https://github.com/huggingface/datasets/issues/5968
1,765,252,561
I_kwDODunzps5pN53R
5,968
Common Voice datasets still need `use_auth_token=True`
{ "avatar_url": "https://avatars.githubusercontent.com/u/23423619?v=4", "events_url": "https://api.github.com/users/patrickvonplaten/events{/privacy}", "followers_url": "https://api.github.com/users/patrickvonplaten/followers", "following_url": "https://api.github.com/users/patrickvonplaten/following{/other_user}", "gists_url": "https://api.github.com/users/patrickvonplaten/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/patrickvonplaten", "id": 23423619, "login": "patrickvonplaten", "node_id": "MDQ6VXNlcjIzNDIzNjE5", "organizations_url": "https://api.github.com/users/patrickvonplaten/orgs", "received_events_url": "https://api.github.com/users/patrickvonplaten/received_events", "repos_url": "https://api.github.com/users/patrickvonplaten/repos", "site_admin": false, "starred_url": "https://api.github.com/users/patrickvonplaten/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/patrickvonplaten/subscriptions", "type": "User", "url": "https://api.github.com/users/patrickvonplaten" }
[]
closed
false
null
[]
null
4
"2023-06-20T11:58:37Z"
"2023-07-29T16:08:59Z"
"2023-07-29T16:08:58Z"
MEMBER
null
null
null
### Describe the bug We don't need to pass `use_auth_token=True` anymore to download gated datasets or models, so the following should work if correctly logged in. ```py from datasets import load_dataset load_dataset("mozilla-foundation/common_voice_6_1", "tr", split="train+validation") ``` However it throws an error - probably because something weird is hardcoded into the dataset loading script. ### Steps to reproduce the bug 1.) ``` huggingface-cli login ``` 2.) Make sure that you have accepted the license here: https://huggingface.co/datasets/mozilla-foundation/common_voice_6_1 3.) Run: ```py from datasets import load_dataset load_dataset("mozilla-foundation/common_voice_6_1", "tr", split="train+validation") ``` 4.) You'll get: ``` File ~/hf/lib/python3.10/site-packages/datasets/builder.py:963, in DatasetBuilder._download_and_prepare(self, dl_manager, verification_mode, **prepare_split_kwargs) 961 split_dict = SplitDict(dataset_name=self.name) 962 split_generators_kwargs = self._make_split_generators_kwargs(prepare_split_kwargs) --> 963 split_generators = self._split_generators(dl_manager, **split_generators_kwargs) 965 # Checksums verification 966 if verification_mode == VerificationMode.ALL_CHECKS and dl_manager.record_checksums: File ~/.cache/huggingface/modules/datasets_modules/datasets/mozilla-foundation--common_voice_6_1/f4d7854c466f5bd4908988dbd39044ec4fc634d89e0515ab0c51715c0127ffe3/common_voice_6_1.py:150, in CommonVoice._split_generators(self, dl_manager) 148 hf_auth_token = dl_manager.download_config.use_auth_token 149 if hf_auth_token is None: --> 150 raise ConnectionError( 151 "Please set use_auth_token=True or use_auth_token='<TOKEN>' to download this dataset" 152 ) 154 bundle_url_template = STATS["bundleURLTemplate"] 155 bundle_version = bundle_url_template.split("/")[0] ConnectionError: Please set use_auth_token=True or use_auth_token='<TOKEN>' to download this dataset ``` ### Expected behavior One should not have to pass `use_auth_token=True`. Also see discussion here: https://github.com/huggingface/blog/pull/1243#discussion_r1235131150 ### Environment info ``` - `datasets` version: 2.13.0 - Platform: Linux-6.2.0-76060200-generic-x86_64-with-glibc2.35 - Python version: 3.10.6 - Huggingface_hub version: 0.16.0.dev0 - PyArrow version: 11.0.0 - Pandas version: 1.5.3 ```
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5968/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5968/timeline
null
completed
false
https://api.github.com/repos/huggingface/datasets/issues/5967
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5967/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5967/comments
https://api.github.com/repos/huggingface/datasets/issues/5967/events
https://github.com/huggingface/datasets/issues/5967
1,763,926,520
I_kwDODunzps5pI2H4
5,967
Config name / split name lost after map with multiproc
{ "avatar_url": "https://avatars.githubusercontent.com/u/93869735?v=4", "events_url": "https://api.github.com/users/sanchit-gandhi/events{/privacy}", "followers_url": "https://api.github.com/users/sanchit-gandhi/followers", "following_url": "https://api.github.com/users/sanchit-gandhi/following{/other_user}", "gists_url": "https://api.github.com/users/sanchit-gandhi/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/sanchit-gandhi", "id": 93869735, "login": "sanchit-gandhi", "node_id": "U_kgDOBZhWpw", "organizations_url": "https://api.github.com/users/sanchit-gandhi/orgs", "received_events_url": "https://api.github.com/users/sanchit-gandhi/received_events", "repos_url": "https://api.github.com/users/sanchit-gandhi/repos", "site_admin": false, "starred_url": "https://api.github.com/users/sanchit-gandhi/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/sanchit-gandhi/subscriptions", "type": "User", "url": "https://api.github.com/users/sanchit-gandhi" }
[]
open
false
null
[]
null
2
"2023-06-19T17:27:36Z"
"2023-06-28T08:55:25Z"
null
CONTRIBUTOR
null
null
null
### Describe the bug Performing a `.map` method on a dataset loses it's config name / split name only if run with multiproc ### Steps to reproduce the bug ```python from datasets import Audio, load_dataset from transformers import AutoFeatureExtractor import numpy as np # load dummy dataset libri = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean") # make train / test splits libri = libri["validation"].train_test_split(seed=42, shuffle=True, test_size=0.1) # example feature extractor model_id = "ntu-spml/distilhubert" feature_extractor = AutoFeatureExtractor.from_pretrained(model_id, do_normalize=True, return_attention_mask=True) sampling_rate = feature_extractor.sampling_rate libri = libri.cast_column("audio", Audio(sampling_rate=sampling_rate)) max_duration = 30.0 def preprocess_function(examples): audio_arrays = [x["array"] for x in examples["audio"]] inputs = feature_extractor( audio_arrays, sampling_rate=feature_extractor.sampling_rate, max_length=int(feature_extractor.sampling_rate * max_duration), truncation=True, return_attention_mask=True, ) return inputs # single proc map libri_encoded = libri.map( preprocess_function, remove_columns=["audio", "file"], batched=True, num_proc=1 ) print(10 * "=" ,"Single processing", 10 * "=") print("Config name before: ", libri["train"].config_name, " Split name before: ", libri["train"].split) print("Config name after: ", libri_encoded["train"].config_name, " Split name after: ", libri_encoded["train"].split) # multi proc map libri_encoded = libri.map( preprocess_function, remove_columns=["audio", "file"], batched=True, num_proc=2 ) print(10 * "=" ,"Multi processing", 10 * "=") print("Config name before: ", libri["train"].config_name, " Split name before: ", libri["train"].split) print("Config name after: ", libri_encoded["train"].config_name, " Split name after: ", libri_encoded["train"].split) ``` **Print Output:** ``` ========== Single processing ========== Config name before: clean Split name before: validation Config name after: clean Split name after: validation ========== Multi processing ========== Config name before: clean Split name before: validation Config name after: None Split name after: None ``` => we can see that the config/split names are lost in the multiprocessing setting ### Expected behavior Should retain both config / split names in the multiproc setting ### Environment info - `datasets` version: 2.13.1.dev0 - Platform: Linux-5.15.0-67-generic-x86_64-with-glibc2.35 - Python version: 3.10.6 - Huggingface_hub version: 0.15.1 - PyArrow version: 12.0.0 - Pandas version: 2.0.2
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5967/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5967/timeline
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/5966
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5966/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5966/comments
https://api.github.com/repos/huggingface/datasets/issues/5966/events
https://github.com/huggingface/datasets/pull/5966
1,763,885,914
PR_kwDODunzps5TXBLP
5,966
Fix JSON generation in benchmarks CI
{ "avatar_url": "https://avatars.githubusercontent.com/u/47462742?v=4", "events_url": "https://api.github.com/users/mariosasko/events{/privacy}", "followers_url": "https://api.github.com/users/mariosasko/followers", "following_url": "https://api.github.com/users/mariosasko/following{/other_user}", "gists_url": "https://api.github.com/users/mariosasko/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mariosasko", "id": 47462742, "login": "mariosasko", "node_id": "MDQ6VXNlcjQ3NDYyNzQy", "organizations_url": "https://api.github.com/users/mariosasko/orgs", "received_events_url": "https://api.github.com/users/mariosasko/received_events", "repos_url": "https://api.github.com/users/mariosasko/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mariosasko/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mariosasko/subscriptions", "type": "User", "url": "https://api.github.com/users/mariosasko" }
[]
closed
false
null
[]
null
3
"2023-06-19T16:56:06Z"
"2023-06-19T17:29:11Z"
"2023-06-19T17:22:10Z"
CONTRIBUTOR
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/5966.diff", "html_url": "https://github.com/huggingface/datasets/pull/5966", "merged_at": "2023-06-19T17:22:10Z", "patch_url": "https://github.com/huggingface/datasets/pull/5966.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5966" }
Related to changes made in https://github.com/iterative/dvc/pull/9475
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5966/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5966/timeline
null
null
true
https://api.github.com/repos/huggingface/datasets/issues/5965
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5965/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5965/comments
https://api.github.com/repos/huggingface/datasets/issues/5965/events
https://github.com/huggingface/datasets/issues/5965
1,763,648,540
I_kwDODunzps5pHyQc
5,965
"Couldn't cast array of type" in complex datasets
{ "avatar_url": "https://avatars.githubusercontent.com/u/1712066?v=4", "events_url": "https://api.github.com/users/piercefreeman/events{/privacy}", "followers_url": "https://api.github.com/users/piercefreeman/followers", "following_url": "https://api.github.com/users/piercefreeman/following{/other_user}", "gists_url": "https://api.github.com/users/piercefreeman/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/piercefreeman", "id": 1712066, "login": "piercefreeman", "node_id": "MDQ6VXNlcjE3MTIwNjY=", "organizations_url": "https://api.github.com/users/piercefreeman/orgs", "received_events_url": "https://api.github.com/users/piercefreeman/received_events", "repos_url": "https://api.github.com/users/piercefreeman/repos", "site_admin": false, "starred_url": "https://api.github.com/users/piercefreeman/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/piercefreeman/subscriptions", "type": "User", "url": "https://api.github.com/users/piercefreeman" }
[]
closed
false
{ "avatar_url": "https://avatars.githubusercontent.com/u/47462742?v=4", "events_url": "https://api.github.com/users/mariosasko/events{/privacy}", "followers_url": "https://api.github.com/users/mariosasko/followers", "following_url": "https://api.github.com/users/mariosasko/following{/other_user}", "gists_url": "https://api.github.com/users/mariosasko/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mariosasko", "id": 47462742, "login": "mariosasko", "node_id": "MDQ6VXNlcjQ3NDYyNzQy", "organizations_url": "https://api.github.com/users/mariosasko/orgs", "received_events_url": "https://api.github.com/users/mariosasko/received_events", "repos_url": "https://api.github.com/users/mariosasko/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mariosasko/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mariosasko/subscriptions", "type": "User", "url": "https://api.github.com/users/mariosasko" }
[ { "avatar_url": "https://avatars.githubusercontent.com/u/47462742?v=4", "events_url": "https://api.github.com/users/mariosasko/events{/privacy}", "followers_url": "https://api.github.com/users/mariosasko/followers", "following_url": "https://api.github.com/users/mariosasko/following{/other_user}", "gists_url": "https://api.github.com/users/mariosasko/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mariosasko", "id": 47462742, "login": "mariosasko", "node_id": "MDQ6VXNlcjQ3NDYyNzQy", "organizations_url": "https://api.github.com/users/mariosasko/orgs", "received_events_url": "https://api.github.com/users/mariosasko/received_events", "repos_url": "https://api.github.com/users/mariosasko/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mariosasko/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mariosasko/subscriptions", "type": "User", "url": "https://api.github.com/users/mariosasko" } ]
null
4
"2023-06-19T14:16:14Z"
"2023-07-26T15:13:53Z"
"2023-07-26T15:13:53Z"
NONE
null
null
null
### Describe the bug When doing a map of a dataset with complex types, sometimes `datasets` is unable to interpret the valid schema of a returned datasets.map() function. This often comes from conflicting types, like when both empty lists and filled lists are competing for the same field value. This is prone to happen in batch mapping, when the mapper returns a sequence of null/empty values and other batches are non-null. A workaround is to manually cast the new batch to a pyarrow table (like implemented in this [workaround](https://github.com/piercefreeman/lassen/pull/3)) but it feels like this ideally should be solved at the core library level. Note that the reproduction case only throws this error if the first datapoint has the empty list. If it is processed later, datasets already detects its representation as list-type and therefore allows the empty list to be provided. ### Steps to reproduce the bug A trivial reproduction case: ```python from typing import Iterator, Any import pandas as pd from datasets import Dataset def batch_to_examples(batch: dict[str, list[Any]]) -> Iterator[dict[str, Any]]: for i in range(next(iter(lengths))): yield {feature: values[i] for feature, values in batch.items()} def examples_to_batch(examples) -> dict[str, list[Any]]: batch = {} for example in examples: for feature, value in example.items(): if feature not in batch: batch[feature] = [] batch[feature].append(value) return batch def batch_process(examples, explicit_schema: bool): new_examples = [] for example in batch_to_examples(examples): new_examples.append(dict(texts=example["raw_text"].split())) return examples_to_batch(new_examples) df = pd.DataFrame( [ {"raw_text": ""}, {"raw_text": "This is a test"}, {"raw_text": "This is another test"}, ] ) dataset = Dataset.from_pandas(df) # datasets won't be able to typehint a dataset that starts with an empty example. with pytest.raises(TypeError, match="Couldn't cast array of type"): dataset = dataset.map( batch_process, batched=True, batch_size=1, num_proc=1, remove_columns=dataset.column_names, ) ``` This results in crashes like: ```bash File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 1819, in wrapper return func(array, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 2109, in cast_array_to_feature return array_cast(array, feature(), allow_number_to_str=allow_number_to_str) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 1819, in wrapper return func(array, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 1998, in array_cast raise TypeError(f"Couldn't cast array of type {array.type} to {pa_type}") TypeError: Couldn't cast array of type string to null ``` ### Expected behavior The code should successfully map and create a new dataset without error. ### Environment info Mac OSX, Linux
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5965/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5965/timeline
null
completed
false
https://api.github.com/repos/huggingface/datasets/issues/5964
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5964/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5964/comments
https://api.github.com/repos/huggingface/datasets/issues/5964/events
https://github.com/huggingface/datasets/pull/5964
1,763,513,574
PR_kwDODunzps5TVweZ
5,964
Always return list in `list_datasets`
{ "avatar_url": "https://avatars.githubusercontent.com/u/47462742?v=4", "events_url": "https://api.github.com/users/mariosasko/events{/privacy}", "followers_url": "https://api.github.com/users/mariosasko/followers", "following_url": "https://api.github.com/users/mariosasko/following{/other_user}", "gists_url": "https://api.github.com/users/mariosasko/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mariosasko", "id": 47462742, "login": "mariosasko", "node_id": "MDQ6VXNlcjQ3NDYyNzQy", "organizations_url": "https://api.github.com/users/mariosasko/orgs", "received_events_url": "https://api.github.com/users/mariosasko/received_events", "repos_url": "https://api.github.com/users/mariosasko/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mariosasko/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mariosasko/subscriptions", "type": "User", "url": "https://api.github.com/users/mariosasko" }
[]
closed
false
null
[]
null
2
"2023-06-19T13:07:08Z"
"2023-06-19T17:29:37Z"
"2023-06-19T17:22:41Z"
CONTRIBUTOR
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/5964.diff", "html_url": "https://github.com/huggingface/datasets/pull/5964", "merged_at": "2023-06-19T17:22:41Z", "patch_url": "https://github.com/huggingface/datasets/pull/5964.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5964" }
Fix #5925 Plus, deprecate `list_datasets`/`inspect_dataset` in favor of `huggingface_hub.list_datasets`/"git clone workflow" (downloads data files)
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5964/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5964/timeline
null
null
true
https://api.github.com/repos/huggingface/datasets/issues/5963
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5963/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5963/comments
https://api.github.com/repos/huggingface/datasets/issues/5963/events
https://github.com/huggingface/datasets/issues/5963
1,762,774,457
I_kwDODunzps5pEc25
5,963
Got an error _pickle.PicklingError use Dataset.from_spark.
{ "avatar_url": "https://avatars.githubusercontent.com/u/112800614?v=4", "events_url": "https://api.github.com/users/yanzia12138/events{/privacy}", "followers_url": "https://api.github.com/users/yanzia12138/followers", "following_url": "https://api.github.com/users/yanzia12138/following{/other_user}", "gists_url": "https://api.github.com/users/yanzia12138/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/yanzia12138", "id": 112800614, "login": "yanzia12138", "node_id": "U_kgDOBrkzZg", "organizations_url": "https://api.github.com/users/yanzia12138/orgs", "received_events_url": "https://api.github.com/users/yanzia12138/received_events", "repos_url": "https://api.github.com/users/yanzia12138/repos", "site_admin": false, "starred_url": "https://api.github.com/users/yanzia12138/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/yanzia12138/subscriptions", "type": "User", "url": "https://api.github.com/users/yanzia12138" }
[]
closed
false
null
[]
null
5
"2023-06-19T05:30:35Z"
"2023-07-24T11:55:46Z"
"2023-07-24T11:55:46Z"
NONE
null
null
null
python 3.9.2 Got an error _pickle.PicklingError use Dataset.from_spark. Did the dataset import load data from spark dataframe using multi-node Spark cluster df = spark.read.parquet(args.input_data).repartition(50) ds = Dataset.from_spark(df, keep_in_memory=True, cache_dir="/pnc-data/data/nuplan/t5_spark/cache_data") ds.save_to_disk(args.output_data) Error : _pickle.PicklingError: Could not serialize object: RuntimeError: It appears that you are attempting to reference SparkContext from a broadcast variable, action, or transforma tion. SparkContext can only be used on the driver, not in code that it run on workers. For more information, see SPARK-5063. 23/06/16 21:17:20 WARN ExecutorPodsWatchSnapshotSource: Kubernetes client has been closed (this is expected if the application is shutting down.) _Originally posted by @yanzia12138 in https://github.com/huggingface/datasets/issues/5701#issuecomment-1594674306_ W Traceback (most recent call last): File "/home/work/main.py", line 100, in <module> run(args) File "/home/work/main.py", line 80, in run ds = Dataset.from_spark(df1, keep_in_memory=True, File "/home/work/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 1281, in from_spark return SparkDatasetReader( File "/home/work/.local/lib/python3.9/site-packages/datasets/io/spark.py", line 53, in read self.builder.download_and_prepare( File "/home/work/.local/lib/python3.9/site-packages/datasets/builder.py", line 909, in download_and_prepare self._download_and_prepare( File "/home/work/.local/lib/python3.9/site-packages/datasets/builder.py", line 1004, in _download_and_prepare self._prepare_split(split_generator, **prepare_split_kwargs) File "/home/work/.local/lib/python3.9/site-packages/datasets/packaged_modules/spark/spark.py", line 254, in _prepare_split self._validate_cache_dir() File "/home/work/.local/lib/python3.9/site-packages/datasets/packaged_modules/spark/spark.py", line 122, in _validate_cache_dir self._spark.sparkContext.parallelize(range(1), 1).mapPartitions(create_cache_and_write_probe).collect() File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 950, in collect sock_info = self.ctx._jvm.PythonRDD.collectAndServe(self._jrdd.rdd()) File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 2951, in _jrdd wrapped_func = _wrap_function(self.ctx, self.func, self._prev_jrdd_deserializer, File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 2830, in _wrap_function pickled_command, broadcast_vars, env, includes = _prepare_for_python_RDD(sc, command) File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 2816, in _prepare_for_python_RDD pickled_command = ser.dumps(command) File "/home/work/.local/lib/python3.9/site-packages/pyspark/serializers.py", line 447, in dumps raise pickle.PicklingError(msg) _pickle.PicklingError: Could not serialize object: RuntimeError: It appears that you are attempting to reference SparkContext from a broadcast variable, action, or transformation. S parkContext can only be used on the driver, not in code that it run on workers. For more information, see SPARK-5063. 23/06/19 13:51:21 WARN ExecutorPodsWatchSnapshotSource: Kubernetes client has been closed (this is expected if the application is shutting down.)
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5963/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5963/timeline
null
completed
false
https://api.github.com/repos/huggingface/datasets/issues/5962
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5962/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5962/comments
https://api.github.com/repos/huggingface/datasets/issues/5962/events
https://github.com/huggingface/datasets/issues/5962
1,761,589,882
I_kwDODunzps5o_7p6
5,962
Issue with train_test_split maintaining the same underlying PyArrow Table
{ "avatar_url": "https://avatars.githubusercontent.com/u/70730520?v=4", "events_url": "https://api.github.com/users/Oziel14/events{/privacy}", "followers_url": "https://api.github.com/users/Oziel14/followers", "following_url": "https://api.github.com/users/Oziel14/following{/other_user}", "gists_url": "https://api.github.com/users/Oziel14/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Oziel14", "id": 70730520, "login": "Oziel14", "node_id": "MDQ6VXNlcjcwNzMwNTIw", "organizations_url": "https://api.github.com/users/Oziel14/orgs", "received_events_url": "https://api.github.com/users/Oziel14/received_events", "repos_url": "https://api.github.com/users/Oziel14/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Oziel14/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Oziel14/subscriptions", "type": "User", "url": "https://api.github.com/users/Oziel14" }
[]
open
false
null
[]
null
0
"2023-06-17T02:19:58Z"
"2023-06-17T02:19:58Z"
null
NONE
null
null
null
### Describe the bug I've been using the train_test_split method in the datasets module to split my HuggingFace Dataset into separate training, validation, and testing subsets. However, I've noticed an issue where the split datasets appear to maintain the same underlying PyArrow Table. ### Steps to reproduce the bug 1. Load any dataset ```dataset = load_dataset("lhoestq/demo1")``` 2. Try the next code: ```python from datasets import Dataset, DatasetDict train_size = 0.6 split_train = dataset["train"].train_test_split( train_size=train_size, ) separate_dataset_dict = DatasetDict({ "train": split_train["train"], "test": split_train["test"], }) ``` 3. The next code ```print(separate_dataset_dict)``` when printing the dataset it gives the indication that they have 3 and 2 rows respectively. 4. But the next code: ```python print(len(separate_dataset_dict["train"].data['id'])) print(len(separate_dataset_dict["test"].data['id'])) ``` Indicates that both tables still have 5 rows. ### Expected behavior However, I've noticed that train_test_split["train"].data, test_val_split["train"].data, and test_val_split["test"].data are identical, suggesting that they all point to the same underlying PyArrow Table. This means that the split datasets are not independent, as I expected. I believe this is a bug in the train_test_split implementation, as I would expect this function to return datasets with separate underlying PyArrow Tables. Could you please help me understand if this is expected behavior, or if there's a workaround to create truly independent split datasets? I would appreciate any assistance with this issue. Thank you. ### Environment info I tried in Colab: - `datasets` version: 2.13.0 - Platform: Windows-10-10.0.22621-SP0 - Python version: 3.10.11 - Huggingface_hub version: 0.14.1 - PyArrow version: 12.0.0 - Pandas version: 2.0.1 and my PC: - `datasets` version: 2.13.0 - Platform: Linux-5.15.107+-x86_64-with-glibc2.31 - Python version: 3.10.12 - Huggingface_hub version: 0.15.1 - PyArrow version: 9.0.0 - Pandas version: 1.5.3
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5962/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5962/timeline
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/5961
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5961/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5961/comments
https://api.github.com/repos/huggingface/datasets/issues/5961/events
https://github.com/huggingface/datasets/issues/5961
1,758,525,111
I_kwDODunzps5o0Pa3
5,961
IterableDataset: split by node and map may preprocess samples that will be skipped anyway
{ "avatar_url": "https://avatars.githubusercontent.com/u/27708347?v=4", "events_url": "https://api.github.com/users/johnchienbronci/events{/privacy}", "followers_url": "https://api.github.com/users/johnchienbronci/followers", "following_url": "https://api.github.com/users/johnchienbronci/following{/other_user}", "gists_url": "https://api.github.com/users/johnchienbronci/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/johnchienbronci", "id": 27708347, "login": "johnchienbronci", "node_id": "MDQ6VXNlcjI3NzA4MzQ3", "organizations_url": "https://api.github.com/users/johnchienbronci/orgs", "received_events_url": "https://api.github.com/users/johnchienbronci/received_events", "repos_url": "https://api.github.com/users/johnchienbronci/repos", "site_admin": false, "starred_url": "https://api.github.com/users/johnchienbronci/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/johnchienbronci/subscriptions", "type": "User", "url": "https://api.github.com/users/johnchienbronci" }
[]
open
false
null
[]
null
9
"2023-06-15T10:29:10Z"
"2023-09-01T10:35:11Z"
null
NONE
null
null
null
There are two ways an iterable dataset can be split by node: 1. if the number of shards is a factor of number of GPUs: in that case the shards are evenly distributed per GPU 2. otherwise, each GPU iterate on the data and at the end keeps 1 sample out of n(GPUs) - skipping the others. In case 2. it's therefore possible to have the same examples passed to `prepare_dataset` for each GPU. This doesn't sound optimized though, because it runs the preprocessing on samples that won't be used in the end. Could you open a new issue so that we can discuss about this and find a solution ? _Originally posted by @lhoestq in https://github.com/huggingface/datasets/issues/5360#issuecomment-1592729051_
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5961/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5961/timeline
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/5959
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5959/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5959/comments
https://api.github.com/repos/huggingface/datasets/issues/5959/events
https://github.com/huggingface/datasets/issues/5959
1,757,397,507
I_kwDODunzps5ov8ID
5,959
read metric glue.py from local file
{ "avatar_url": "https://avatars.githubusercontent.com/u/31148397?v=4", "events_url": "https://api.github.com/users/JiazhaoLi/events{/privacy}", "followers_url": "https://api.github.com/users/JiazhaoLi/followers", "following_url": "https://api.github.com/users/JiazhaoLi/following{/other_user}", "gists_url": "https://api.github.com/users/JiazhaoLi/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/JiazhaoLi", "id": 31148397, "login": "JiazhaoLi", "node_id": "MDQ6VXNlcjMxMTQ4Mzk3", "organizations_url": "https://api.github.com/users/JiazhaoLi/orgs", "received_events_url": "https://api.github.com/users/JiazhaoLi/received_events", "repos_url": "https://api.github.com/users/JiazhaoLi/repos", "site_admin": false, "starred_url": "https://api.github.com/users/JiazhaoLi/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/JiazhaoLi/subscriptions", "type": "User", "url": "https://api.github.com/users/JiazhaoLi" }
[]
closed
false
null
[]
null
1
"2023-06-14T17:59:35Z"
"2023-06-14T18:04:16Z"
"2023-06-14T18:04:16Z"
NONE
null
null
null
### Describe the bug Currently, The server is off-line. I am using the glue metric from the local file downloaded from the hub. I download / cached datasets using `load_dataset('glue','sst2', cache_dir='/xxx')` to cache them and then in the off-line mode, I use `load_dataset('xxx/glue.py','sst2', cache_dir='/xxx')`. I can successfully reuse cached datasets. My problem is about the load_metric. When I run `load_dataset('xxx/glue_metric.py','sst2',cache_dir='/xxx')` , it returns ` File "xx/lib64/python3.9/site-packages/datasets/utils/deprecation_utils.py", line 46, in wrapper return deprecated_function(*args, **kwargs) File "xx//lib64/python3.9/site-packages/datasets/load.py", line 1392, in load_metric metric = metric_cls( TypeError: 'NoneType' object is not callable` Thanks in advance for help! ### Steps to reproduce the bug N/A ### Expected behavior N/A ### Environment info `datasets == 2.12.0`
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5959/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5959/timeline
null
completed
false
https://api.github.com/repos/huggingface/datasets/issues/5958
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5958/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5958/comments
https://api.github.com/repos/huggingface/datasets/issues/5958/events
https://github.com/huggingface/datasets/pull/5958
1,757,265,971
PR_kwDODunzps5TA3__
5,958
set dev version
{ "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "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}", "gravatar_id": "", "html_url": "https://github.com/lhoestq", "id": 42851186, "login": "lhoestq", "node_id": "MDQ6VXNlcjQyODUxMTg2", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "repos_url": "https://api.github.com/users/lhoestq/repos", "site_admin": false, "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "type": "User", "url": "https://api.github.com/users/lhoestq" }
[]
closed
false
null
[]
null
3
"2023-06-14T16:26:34Z"
"2023-06-14T16:34:55Z"
"2023-06-14T16:26:51Z"
MEMBER
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/5958.diff", "html_url": "https://github.com/huggingface/datasets/pull/5958", "merged_at": "2023-06-14T16:26:51Z", "patch_url": "https://github.com/huggingface/datasets/pull/5958.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5958" }
null
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5958/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5958/timeline
null
null
true
https://api.github.com/repos/huggingface/datasets/issues/5957
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5957/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5957/comments
https://api.github.com/repos/huggingface/datasets/issues/5957/events
https://github.com/huggingface/datasets/pull/5957
1,757,252,466
PR_kwDODunzps5TA1EB
5,957
Release: 2.13.0
{ "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "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}", "gravatar_id": "", "html_url": "https://github.com/lhoestq", "id": 42851186, "login": "lhoestq", "node_id": "MDQ6VXNlcjQyODUxMTg2", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "repos_url": "https://api.github.com/users/lhoestq/repos", "site_admin": false, "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "type": "User", "url": "https://api.github.com/users/lhoestq" }
[]
closed
false
null
[]
null
4
"2023-06-14T16:17:26Z"
"2023-06-14T16:33:39Z"
"2023-06-14T16:24:39Z"
MEMBER
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/5957.diff", "html_url": "https://github.com/huggingface/datasets/pull/5957", "merged_at": "2023-06-14T16:24:39Z", "patch_url": "https://github.com/huggingface/datasets/pull/5957.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5957" }
null
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5957/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5957/timeline
null
null
true
https://api.github.com/repos/huggingface/datasets/issues/5956
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5956/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5956/comments
https://api.github.com/repos/huggingface/datasets/issues/5956/events
https://github.com/huggingface/datasets/pull/5956
1,756,959,367
PR_kwDODunzps5S_1o2
5,956
Fix ArrowExamplesIterable.shard_data_sources
{ "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "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}", "gravatar_id": "", "html_url": "https://github.com/lhoestq", "id": 42851186, "login": "lhoestq", "node_id": "MDQ6VXNlcjQyODUxMTg2", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "repos_url": "https://api.github.com/users/lhoestq/repos", "site_admin": false, "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "type": "User", "url": "https://api.github.com/users/lhoestq" }
[]
closed
false
null
[]
null
4
"2023-06-14T13:50:38Z"
"2023-06-14T14:43:12Z"
"2023-06-14T14:33:45Z"
MEMBER
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/5956.diff", "html_url": "https://github.com/huggingface/datasets/pull/5956", "merged_at": "2023-06-14T14:33:45Z", "patch_url": "https://github.com/huggingface/datasets/pull/5956.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5956" }
ArrowExamplesIterable.shard_data_sources was outdated I also fixed a warning message by not using format_type= in with_format()
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5956/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5956/timeline
null
null
true
https://api.github.com/repos/huggingface/datasets/issues/5955
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5955/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5955/comments
https://api.github.com/repos/huggingface/datasets/issues/5955/events
https://github.com/huggingface/datasets/issues/5955
1,756,827,133
I_kwDODunzps5otw39
5,955
Strange bug in loading local JSON files, using load_dataset
{ "avatar_url": "https://avatars.githubusercontent.com/u/73934131?v=4", "events_url": "https://api.github.com/users/Night-Quiet/events{/privacy}", "followers_url": "https://api.github.com/users/Night-Quiet/followers", "following_url": "https://api.github.com/users/Night-Quiet/following{/other_user}", "gists_url": "https://api.github.com/users/Night-Quiet/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Night-Quiet", "id": 73934131, "login": "Night-Quiet", "node_id": "MDQ6VXNlcjczOTM0MTMx", "organizations_url": "https://api.github.com/users/Night-Quiet/orgs", "received_events_url": "https://api.github.com/users/Night-Quiet/received_events", "repos_url": "https://api.github.com/users/Night-Quiet/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Night-Quiet/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Night-Quiet/subscriptions", "type": "User", "url": "https://api.github.com/users/Night-Quiet" }
[]
closed
false
null
[]
null
4
"2023-06-14T12:46:00Z"
"2023-06-21T14:42:15Z"
"2023-06-21T14:42:15Z"
NONE
null
null
null
### Describe the bug I am using 'load_dataset 'loads a JSON file, but I found a strange bug: an error will be reported when the length of the JSON file exceeds 160000 (uncertain exact number). I have checked the data through the following code and there are no issues. So I cannot determine the true reason for this error. The data is a list containing a dictionary. As follows: [ {'input': 'someting...', 'target': 'someting...', 'type': 'someting...', 'history': ['someting...', ...]}, ... ] ### Steps to reproduce the bug ``` import json from datasets import load_dataset path = "target.json" temp_path = "temp.json" with open(path, "r") as f: data = json.load(f) print(f"\n-------the JSON file length is: {len(data)}-------\n") with open(temp_path, "w") as f: json.dump(data[:160000], f) dataset = load_dataset("json", data_files=temp_path) print("\n-------This works when the JSON file length is 160000-------\n") with open(temp_path, "w") as f: json.dump(data[160000:], f) dataset = load_dataset("json", data_files=temp_path) print("\n-------This works and eliminates data issues-------\n") with open(temp_path, "w") as f: json.dump(data[:170000], f) dataset = load_dataset("json", data_files=temp_path) ``` ### Expected behavior ``` -------the JSON file length is: 173049------- Downloading and preparing dataset json/default to /root/.cache/huggingface/datasets/json/default-acf3c7f418c5f4b4/0.0.0/e347ab1c932092252e717ff3f949105a4dd28b27e842dd53157d2f72e276c2e4... Downloading data files: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 1/1 [00:00<00:00, 3328.81it/s] Extracting data files: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 1/1 [00:00<00:00, 639.47it/s] Dataset json downloaded and prepared to /root/.cache/huggingface/datasets/json/default-acf3c7f418c5f4b4/0.0.0/e347ab1c932092252e717ff3f949105a4dd28b27e842dd53157d2f72e276c2e4. Subsequent calls will reuse this data. 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 1/1 [00:00<00:00, 265.85it/s] -------This works when the JSON file length is 160000------- Downloading and preparing dataset json/default to /root/.cache/huggingface/datasets/json/default-a42f04b263ceea6a/0.0.0/e347ab1c932092252e717ff3f949105a4dd28b27e842dd53157d2f72e276c2e4... Downloading data files: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 1/1 [00:00<00:00, 2038.05it/s] Extracting data files: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 1/1 [00:00<00:00, 794.83it/s] Dataset json downloaded and prepared to /root/.cache/huggingface/datasets/json/default-a42f04b263ceea6a/0.0.0/e347ab1c932092252e717ff3f949105a4dd28b27e842dd53157d2f72e276c2e4. Subsequent calls will reuse this data. 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 1/1 [00:00<00:00, 681.00it/s] -------This works and eliminates data issues------- Downloading and preparing dataset json/default to /root/.cache/huggingface/datasets/json/default-63f391c89599c7b0/0.0.0/e347ab1c932092252e717ff3f949105a4dd28b27e842dd53157d2f72e276c2e4... Downloading data files: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 1/1 [00:00<00:00, 3682.44it/s] Extracting data files: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 1/1 [00:00<00:00, 788.70it/s] Generating train split: 0 examples [00:00, ? examples/s]Failed to read file '/home/lakala/hjc/code/pycode/glm/temp.json' with error <class 'pyarrow.lib.ArrowInvalid'>: cannot mix list and non-list, non-null values Traceback (most recent call last): File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/builder.py", line 1858, in _prepare_split_single for _, table in generator: File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/packaged_modules/json/json.py", line 146, in _generate_tables raise ValueError(f"Not able to read records in the JSON file at {file}.") from None ValueError: Not able to read records in the JSON file at /home/lakala/hjc/code/pycode/glm/temp.json. The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/home/lakala/hjc/code/pycode/glm/test.py", line 22, in <module> dataset = load_dataset("json", data_files=temp_path) File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/load.py", line 1797, in load_dataset builder_instance.download_and_prepare( File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/builder.py", line 890, in download_and_prepare self._download_and_prepare( File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/builder.py", line 985, in _download_and_prepare self._prepare_split(split_generator, **prepare_split_kwargs) File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/builder.py", line 1746, in _prepare_split for job_id, done, content in self._prepare_split_single( File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/builder.py", line 1891, in _prepare_split_single raise DatasetGenerationError("An error occurred while generating the dataset") from e datasets.builder.DatasetGenerationError: An error occurred while generating the dataset ``` ### Environment info ``` Ubuntu==22.04 python==3.8 pytorch-transformers==1.2.0 transformers== 4.27.1 datasets==2.12.0 numpy==1.24.3 pandas==1.5.3 ```
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5955/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5955/timeline
null
completed
false
https://api.github.com/repos/huggingface/datasets/issues/5954
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5954/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5954/comments
https://api.github.com/repos/huggingface/datasets/issues/5954/events
https://github.com/huggingface/datasets/pull/5954
1,756,572,994
PR_kwDODunzps5S-hSP
5,954
Better filenotfound for gated
{ "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "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}", "gravatar_id": "", "html_url": "https://github.com/lhoestq", "id": 42851186, "login": "lhoestq", "node_id": "MDQ6VXNlcjQyODUxMTg2", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "repos_url": "https://api.github.com/users/lhoestq/repos", "site_admin": false, "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "type": "User", "url": "https://api.github.com/users/lhoestq" }
[]
closed
false
null
[]
null
3
"2023-06-14T10:33:10Z"
"2023-06-14T12:33:27Z"
"2023-06-14T12:26:31Z"
MEMBER
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/5954.diff", "html_url": "https://github.com/huggingface/datasets/pull/5954", "merged_at": "2023-06-14T12:26:31Z", "patch_url": "https://github.com/huggingface/datasets/pull/5954.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5954" }
close https://github.com/huggingface/datasets/issues/5953 <img width="1292" alt="image" src="https://github.com/huggingface/datasets/assets/42851186/270fe5bc-1739-4878-b7bc-ab6d35336d4d">
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5954/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5954/timeline
null
null
true
https://api.github.com/repos/huggingface/datasets/issues/5953
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5953/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5953/comments
https://api.github.com/repos/huggingface/datasets/issues/5953/events
https://github.com/huggingface/datasets/issues/5953
1,756,520,523
I_kwDODunzps5osmBL
5,953
Bad error message when trying to download gated dataset
{ "avatar_url": "https://avatars.githubusercontent.com/u/23423619?v=4", "events_url": "https://api.github.com/users/patrickvonplaten/events{/privacy}", "followers_url": "https://api.github.com/users/patrickvonplaten/followers", "following_url": "https://api.github.com/users/patrickvonplaten/following{/other_user}", "gists_url": "https://api.github.com/users/patrickvonplaten/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/patrickvonplaten", "id": 23423619, "login": "patrickvonplaten", "node_id": "MDQ6VXNlcjIzNDIzNjE5", "organizations_url": "https://api.github.com/users/patrickvonplaten/orgs", "received_events_url": "https://api.github.com/users/patrickvonplaten/received_events", "repos_url": "https://api.github.com/users/patrickvonplaten/repos", "site_admin": false, "starred_url": "https://api.github.com/users/patrickvonplaten/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/patrickvonplaten/subscriptions", "type": "User", "url": "https://api.github.com/users/patrickvonplaten" }
[]
closed
false
null
[]
null
8
"2023-06-14T10:03:39Z"
"2023-06-14T16:36:51Z"
"2023-06-14T12:26:32Z"
MEMBER
null
null
null
### Describe the bug When I attempt to download a model from the Hub that is gated without being logged in, I get a nice error message. E.g.: E.g. ```sh Repository Not Found for url: https://huggingface.co/api/models/DeepFloyd/IF-I-XL-v1.0. Please make sure you specified the correct `repo_id` and `repo_type`. If you are trying to access a private or gated repo, make sure you are authenticated. Invalid username or password.. Will try to load from local cache. ``` If I do the same for a gated dataset on the Hub, I'm not gated a nice error message IMO: ```sh File ~/hf/lib/python3.10/site-packages/fsspec/implementations/http.py:430, in HTTPFileSystem._info(self, url, **kwargs) 427 except Exception as exc: 428 if policy == "get": 429 # If get failed, then raise a FileNotFoundError --> 430 raise FileNotFoundError(url) from exc 431 logger.debug(str(exc)) 433 return {"name": url, "size": None, **info, "type": "file"} FileNotFoundError: https://huggingface.co/datasets/mozilla-foundation/common_voice_13_0/resolve/main/n_shards.json ``` ### Steps to reproduce the bug ``` huggingface-cli logout ``` and then: ```py from datasets import load_dataset, Audio # English stream_data = load_dataset("mozilla-foundation/common_voice_13_0", "en", split="test", streaming=True) stream_data = stream_data.cast_column("audio", Audio(sampling_rate=16000)) en_sample = next(iter(stream_data))["audio"]["array"] # Swahili stream_data = load_dataset("mozilla-foundation/common_voice_13_0", "sw", split="test", streaming=True) stream_data = stream_data.cast_column("audio", Audio(sampling_rate=16000)) sw_sample = next(iter(stream_data))["audio"]["array"] ``` ### Expected behavior Better error message ### Environment info Copy-and-paste the text below in your GitHub issue. - `datasets` version: 2.12.0 - Platform: Linux-6.2.0-76060200-generic-x86_64-with-glibc2.35 - Python version: 3.10.6 - Huggingface_hub version: 0.16.0.dev0 - PyArrow version: 11.0.0 - Pandas version: 1.5.3
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5953/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5953/timeline
null
completed
false
https://api.github.com/repos/huggingface/datasets/issues/5952
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5952/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5952/comments
https://api.github.com/repos/huggingface/datasets/issues/5952/events
https://github.com/huggingface/datasets/pull/5952
1,756,481,591
PR_kwDODunzps5S-OIh
5,952
Add Arrow builder docs
{ "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "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}", "gravatar_id": "", "html_url": "https://github.com/lhoestq", "id": 42851186, "login": "lhoestq", "node_id": "MDQ6VXNlcjQyODUxMTg2", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "repos_url": "https://api.github.com/users/lhoestq/repos", "site_admin": false, "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "type": "User", "url": "https://api.github.com/users/lhoestq" }
[]
closed
false
null
[]
null
3
"2023-06-14T09:42:46Z"
"2023-06-14T14:42:31Z"
"2023-06-14T14:34:39Z"
MEMBER
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/5952.diff", "html_url": "https://github.com/huggingface/datasets/pull/5952", "merged_at": "2023-06-14T14:34:39Z", "patch_url": "https://github.com/huggingface/datasets/pull/5952.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5952" }
following https://github.com/huggingface/datasets/pull/5944
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5952/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5952/timeline
null
null
true
https://api.github.com/repos/huggingface/datasets/issues/5951
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5951/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5951/comments
https://api.github.com/repos/huggingface/datasets/issues/5951/events
https://github.com/huggingface/datasets/issues/5951
1,756,363,546
I_kwDODunzps5or_sa
5,951
What is the Right way to use discofuse dataset??
{ "avatar_url": "https://avatars.githubusercontent.com/u/125154243?v=4", "events_url": "https://api.github.com/users/akesh1235/events{/privacy}", "followers_url": "https://api.github.com/users/akesh1235/followers", "following_url": "https://api.github.com/users/akesh1235/following{/other_user}", "gists_url": "https://api.github.com/users/akesh1235/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/akesh1235", "id": 125154243, "login": "akesh1235", "node_id": "U_kgDOB3Wzww", "organizations_url": "https://api.github.com/users/akesh1235/orgs", "received_events_url": "https://api.github.com/users/akesh1235/received_events", "repos_url": "https://api.github.com/users/akesh1235/repos", "site_admin": false, "starred_url": "https://api.github.com/users/akesh1235/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/akesh1235/subscriptions", "type": "User", "url": "https://api.github.com/users/akesh1235" }
[]
closed
false
null
[]
null
2
"2023-06-14T08:38:39Z"
"2023-06-14T13:25:06Z"
"2023-06-14T12:10:16Z"
NONE
null
null
null
[Click here for Dataset link](https://huggingface.co/datasets/discofuse/viewer/discofuse-wikipedia/train?row=6) **Below is the following way, as per my understanding , Is it correct :question: :question:** The **columns/features from `DiscoFuse dataset`** that will be the **input to the `encoder` and `decoder`** are: [Click here for Dataset link](https://huggingface.co/datasets/discofuse/viewer/discofuse-wikipedia/train?row=6) 1. **coherent_first_sentence** 2. **coherent_second_sentence** 3. **incoherent_first_sentence** 4. **incoherent_second_sentence** [Click here for Dataset link](https://huggingface.co/datasets/discofuse/viewer/discofuse-wikipedia/train?row=6) The **`encoder` will take these four columns as input and encode them into a sequence of hidden states. The `decoder` will then take these hidden states as input and decode them into a new sentence that fuses the two original sentences together.** The **discourse type, connective_string, has_coref_type_pronoun, and has_coref_type_nominal columns will not be used as input to the encoder or decoder.** These columns are used to provide additional information about the dataset, but they are not necessary for the task of sentence fusion. Please correct me if I am wrong; otherwise, if this understanding is right, how shall I implement this task practically?
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5951/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5951/timeline
null
completed
false
https://api.github.com/repos/huggingface/datasets/issues/5950
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5950/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5950/comments
https://api.github.com/repos/huggingface/datasets/issues/5950/events
https://github.com/huggingface/datasets/issues/5950
1,755,197,946
I_kwDODunzps5onjH6
5,950
Support for data with instance-wise dictionary as features
{ "avatar_url": "https://avatars.githubusercontent.com/u/33274336?v=4", "events_url": "https://api.github.com/users/richardwth/events{/privacy}", "followers_url": "https://api.github.com/users/richardwth/followers", "following_url": "https://api.github.com/users/richardwth/following{/other_user}", "gists_url": "https://api.github.com/users/richardwth/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/richardwth", "id": 33274336, "login": "richardwth", "node_id": "MDQ6VXNlcjMzMjc0MzM2", "organizations_url": "https://api.github.com/users/richardwth/orgs", "received_events_url": "https://api.github.com/users/richardwth/received_events", "repos_url": "https://api.github.com/users/richardwth/repos", "site_admin": false, "starred_url": "https://api.github.com/users/richardwth/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/richardwth/subscriptions", "type": "User", "url": "https://api.github.com/users/richardwth" }
[ { "color": "a2eeef", "default": true, "description": "New feature or request", "id": 1935892871, "name": "enhancement", "node_id": "MDU6TGFiZWwxOTM1ODkyODcx", "url": "https://api.github.com/repos/huggingface/datasets/labels/enhancement" } ]
open
false
null
[]
null
1
"2023-06-13T15:49:00Z"
"2023-06-14T12:13:38Z"
null
NONE
null
null
null
### Feature request I notice that when loading data instances with feature type of python dictionary, the dictionary keys would be broadcast so that every instance has the same set of keys. Please see an example in the Motivation section. It is possible to avoid this behavior, i.e., load dictionary features as it is and do not broadcast the keys among instances? Please note that these dictionaries would have to be processed dynamically at each training iteration into strings (and tokenized). ### Motivation I am trying to load a dataset from a json file. Each instance of the dataset has a feature that is a dictionary but its keys depend on the instance. Every two instances may have different keys. For example, imagine a dataset that contains a set of math expressions from a bunch of mutually redundant expressions: ``` { "index": 0, "feature": { "2 * x + y >= 3": ["2 * x + y >= 3", "4 * x + 2 * y >= 6"], ... } }, ... { "index": 9999, "feature": { "x >= 6": ["x >= 6", "x >= 0", "x >= -1"], ... } }, ... ``` When directly loading the dataset using `data = load_dataset("json", data_files=file_paths, split='train')`, each instance would have all the keys from other instances and None as values. That is, instance of index 0 becomes: ``` { "index": 0, "feature": { "2 * x + y >= 3": ["2 * x + y >= 3", "4 * x + 2 * y >= 6"], ... "x >= 6": None, # keys from other instances ... } }, ``` This is not desirable. Moreover, issue would be raised if I attempt to combine two such datasets using `data = concatenate_datasets(multi_datasets)`, perhaps because their dictionary features contain different keys. A solution I can think of is to store the dictionary features as a long string, and evaluate it later. Please kindly suggest any other solution using existing methods of datasets. ### Your contribution N/A
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5950/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5950/timeline
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/5949
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5949/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5949/comments
https://api.github.com/repos/huggingface/datasets/issues/5949/events
https://github.com/huggingface/datasets/pull/5949
1,754,843,717
PR_kwDODunzps5S4oPC
5,949
Replace metadata utils with `huggingface_hub`'s RepoCard API
{ "avatar_url": "https://avatars.githubusercontent.com/u/47462742?v=4", "events_url": "https://api.github.com/users/mariosasko/events{/privacy}", "followers_url": "https://api.github.com/users/mariosasko/followers", "following_url": "https://api.github.com/users/mariosasko/following{/other_user}", "gists_url": "https://api.github.com/users/mariosasko/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mariosasko", "id": 47462742, "login": "mariosasko", "node_id": "MDQ6VXNlcjQ3NDYyNzQy", "organizations_url": "https://api.github.com/users/mariosasko/orgs", "received_events_url": "https://api.github.com/users/mariosasko/received_events", "repos_url": "https://api.github.com/users/mariosasko/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mariosasko/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mariosasko/subscriptions", "type": "User", "url": "https://api.github.com/users/mariosasko" }
[]
closed
false
null
[]
null
8
"2023-06-13T13:03:19Z"
"2023-06-27T16:47:51Z"
"2023-06-27T16:38:32Z"
CONTRIBUTOR
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/5949.diff", "html_url": "https://github.com/huggingface/datasets/pull/5949", "merged_at": "2023-06-27T16:38:32Z", "patch_url": "https://github.com/huggingface/datasets/pull/5949.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5949" }
Use `huggingface_hub`'s RepoCard API instead of `DatasetMetadata` for modifying the card's YAML, and deprecate `datasets.utils.metadata` and `datasets.utils.readme`. After removing these modules, we can also delete `datasets.utils.resources` since the moon landing repo now stores its own version of these resources for the metadata UI. PS: this change requires bumping `huggingface_hub` to 0.13.0 (Transformers requires 0.14.0, so should be ok)
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5949/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5949/timeline
null
null
true
https://api.github.com/repos/huggingface/datasets/issues/5948
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5948/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5948/comments
https://api.github.com/repos/huggingface/datasets/issues/5948/events
https://github.com/huggingface/datasets/pull/5948
1,754,794,611
PR_kwDODunzps5S4dUt
5,948
Fix sequence of array support for most dtype
{ "avatar_url": "https://avatars.githubusercontent.com/u/45557362?v=4", "events_url": "https://api.github.com/users/qgallouedec/events{/privacy}", "followers_url": "https://api.github.com/users/qgallouedec/followers", "following_url": "https://api.github.com/users/qgallouedec/following{/other_user}", "gists_url": "https://api.github.com/users/qgallouedec/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/qgallouedec", "id": 45557362, "login": "qgallouedec", "node_id": "MDQ6VXNlcjQ1NTU3MzYy", "organizations_url": "https://api.github.com/users/qgallouedec/orgs", "received_events_url": "https://api.github.com/users/qgallouedec/received_events", "repos_url": "https://api.github.com/users/qgallouedec/repos", "site_admin": false, "starred_url": "https://api.github.com/users/qgallouedec/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/qgallouedec/subscriptions", "type": "User", "url": "https://api.github.com/users/qgallouedec" }
[]
closed
false
null
[]
null
2
"2023-06-13T12:38:59Z"
"2023-06-14T15:11:55Z"
"2023-06-14T15:03:33Z"
CONTRIBUTOR
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/5948.diff", "html_url": "https://github.com/huggingface/datasets/pull/5948", "merged_at": "2023-06-14T15:03:33Z", "patch_url": "https://github.com/huggingface/datasets/pull/5948.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5948" }
Fixes #5936 Also, a related fix to #5927
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5948/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5948/timeline
null
null
true
https://api.github.com/repos/huggingface/datasets/issues/5947
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5947/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5947/comments
https://api.github.com/repos/huggingface/datasets/issues/5947/events
https://github.com/huggingface/datasets/issues/5947
1,754,359,316
I_kwDODunzps5okWYU
5,947
Return the audio filename when decoding fails due to corrupt files
{ "avatar_url": "https://avatars.githubusercontent.com/u/8949105?v=4", "events_url": "https://api.github.com/users/wetdog/events{/privacy}", "followers_url": "https://api.github.com/users/wetdog/followers", "following_url": "https://api.github.com/users/wetdog/following{/other_user}", "gists_url": "https://api.github.com/users/wetdog/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/wetdog", "id": 8949105, "login": "wetdog", "node_id": "MDQ6VXNlcjg5NDkxMDU=", "organizations_url": "https://api.github.com/users/wetdog/orgs", "received_events_url": "https://api.github.com/users/wetdog/received_events", "repos_url": "https://api.github.com/users/wetdog/repos", "site_admin": false, "starred_url": "https://api.github.com/users/wetdog/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/wetdog/subscriptions", "type": "User", "url": "https://api.github.com/users/wetdog" }
[ { "color": "a2eeef", "default": true, "description": "New feature or request", "id": 1935892871, "name": "enhancement", "node_id": "MDU6TGFiZWwxOTM1ODkyODcx", "url": "https://api.github.com/repos/huggingface/datasets/labels/enhancement" } ]
open
false
null
[]
null
2
"2023-06-13T08:44:09Z"
"2023-06-14T12:45:01Z"
null
NONE
null
null
null
### Feature request Return the audio filename when the audio decoding fails. Although currently there are some checks for mp3 and opus formats with the library version there are still cases when the audio decoding could fail, eg. Corrupt file. ### Motivation When you try to load an object file dataset and the decoding fails you can't know which file is corrupt ``` raise LibsndfileError(err, prefix="Error opening {0!r}: ".format(self.name)) soundfile.LibsndfileError: Error opening <_io.BytesIO object at 0x7f5ab7e38290>: Format not recognised. ``` ### Your contribution Make a PR to Add exceptions for LIbsndfileError to return the audio filename or path when soundfile decoding fails.
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5947/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5947/timeline
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/5946
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5946/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5946/comments
https://api.github.com/repos/huggingface/datasets/issues/5946/events
https://github.com/huggingface/datasets/issues/5946
1,754,234,469
I_kwDODunzps5oj35l
5,946
IndexError Not Solving -> IndexError: Invalid key: ?? is out of bounds for size 0 or ??
{ "avatar_url": "https://avatars.githubusercontent.com/u/70565543?v=4", "events_url": "https://api.github.com/users/syngokhan/events{/privacy}", "followers_url": "https://api.github.com/users/syngokhan/followers", "following_url": "https://api.github.com/users/syngokhan/following{/other_user}", "gists_url": "https://api.github.com/users/syngokhan/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/syngokhan", "id": 70565543, "login": "syngokhan", "node_id": "MDQ6VXNlcjcwNTY1NTQz", "organizations_url": "https://api.github.com/users/syngokhan/orgs", "received_events_url": "https://api.github.com/users/syngokhan/received_events", "repos_url": "https://api.github.com/users/syngokhan/repos", "site_admin": false, "starred_url": "https://api.github.com/users/syngokhan/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/syngokhan/subscriptions", "type": "User", "url": "https://api.github.com/users/syngokhan" }
[]
open
false
null
[]
null
6
"2023-06-13T07:34:15Z"
"2023-07-14T12:04:48Z"
null
NONE
null
null
null
### Describe the bug in <cell line: 1>:1 β”‚ β”‚ β”‚ β”‚ /usr/local/lib/python3.10/dist-packages/transformers/trainer.py:1537 in train β”‚ β”‚ β”‚ β”‚ 1534 β”‚ β”‚ inner_training_loop = find_executable_batch_size( β”‚ β”‚ 1535 β”‚ β”‚ β”‚ self._inner_training_loop, self._train_batch_size, args.auto_find_batch_size β”‚ β”‚ 1536 β”‚ β”‚ ) β”‚ β”‚ ❱ 1537 β”‚ β”‚ return inner_training_loop( β”‚ β”‚ 1538 β”‚ β”‚ β”‚ args=args, β”‚ β”‚ 1539 β”‚ β”‚ β”‚ resume_from_checkpoint=resume_from_checkpoint, β”‚ β”‚ 1540 β”‚ β”‚ β”‚ trial=trial, β”‚ β”‚ β”‚ β”‚ /usr/local/lib/python3.10/dist-packages/transformers/trainer.py:1789 in _inner_training_loop β”‚ β”‚ β”‚ β”‚ 1786 β”‚ β”‚ β”‚ β”‚ rng_to_sync = True β”‚ β”‚ 1787 β”‚ β”‚ β”‚ β”‚ β”‚ 1788 β”‚ β”‚ β”‚ step = -1 β”‚ β”‚ ❱ 1789 β”‚ β”‚ β”‚ for step, inputs in enumerate(epoch_iterator): β”‚ β”‚ 1790 β”‚ β”‚ β”‚ β”‚ total_batched_samples += 1 β”‚ β”‚ 1791 β”‚ β”‚ β”‚ β”‚ if rng_to_sync: β”‚ β”‚ 1792 β”‚ β”‚ β”‚ β”‚ β”‚ self._load_rng_state(resume_from_checkpoint) β”‚ β”‚ β”‚ β”‚ /usr/local/lib/python3.10/dist-packages/accelerate/data_loader.py:377 in __iter__ β”‚ β”‚ β”‚ β”‚ 374 β”‚ β”‚ dataloader_iter = super().__iter__() β”‚ β”‚ 375 β”‚ β”‚ # We iterate one batch ahead to check when we are at the end β”‚ β”‚ 376 β”‚ β”‚ try: β”‚ β”‚ ❱ 377 β”‚ β”‚ β”‚ current_batch = next(dataloader_iter) β”‚ β”‚ 378 β”‚ β”‚ except StopIteration: β”‚ β”‚ 379 β”‚ β”‚ β”‚ yield β”‚ β”‚ 380 β”‚ β”‚ β”‚ β”‚ /usr/local/lib/python3.10/dist-packages/torch/utils/data/dataloader.py:633 in __next__ β”‚ β”‚ β”‚ β”‚ 630 β”‚ β”‚ β”‚ if self._sampler_iter is None: β”‚ β”‚ 631 β”‚ β”‚ β”‚ β”‚ # TODO(https://github.com/pytorch/pytorch/issues/76750) β”‚ β”‚ 632 β”‚ β”‚ β”‚ β”‚ self._reset() # type: ignore[call-arg] β”‚ β”‚ ❱ 633 β”‚ β”‚ β”‚ data = self._next_data() β”‚ β”‚ 634 β”‚ β”‚ β”‚ self._num_yielded += 1 β”‚ β”‚ 635 β”‚ β”‚ β”‚ if self._dataset_kind == _DatasetKind.Iterable and \ β”‚ β”‚ 636 β”‚ β”‚ β”‚ β”‚ β”‚ self._IterableDataset_len_called is not None and \ β”‚ β”‚ β”‚ β”‚ /usr/local/lib/python3.10/dist-packages/torch/utils/data/dataloader.py:677 in _next_data β”‚ β”‚ β”‚ β”‚ 674 β”‚ β”‚ β”‚ 675 β”‚ def _next_data(self): β”‚ β”‚ 676 β”‚ β”‚ index = self._next_index() # may raise StopIteration β”‚ β”‚ ❱ 677 β”‚ β”‚ data = self._dataset_fetcher.fetch(index) # may raise StopIteration β”‚ β”‚ 678 β”‚ β”‚ if self._pin_memory: β”‚ β”‚ 679 β”‚ β”‚ β”‚ data = _utils.pin_memory.pin_memory(data, self._pin_memory_device) β”‚ β”‚ 680 β”‚ β”‚ return data β”‚ β”‚ β”‚ β”‚ /usr/local/lib/python3.10/dist-packages/torch/utils/data/_utils/fetch.py:49 in fetch β”‚ β”‚ β”‚ β”‚ 46 β”‚ def fetch(self, possibly_batched_index): β”‚ β”‚ 47 β”‚ β”‚ if self.auto_collation: β”‚ β”‚ 48 β”‚ β”‚ β”‚ if hasattr(self.dataset, "__getitems__") and self.dataset.__getitems__: β”‚ β”‚ ❱ 49 β”‚ β”‚ β”‚ β”‚ data = self.dataset.__getitems__(possibly_batched_index) β”‚ β”‚ 50 β”‚ β”‚ β”‚ else: β”‚ β”‚ 51 β”‚ β”‚ β”‚ β”‚ data = [self.dataset[idx] for idx in possibly_batched_index] β”‚ β”‚ 52 β”‚ β”‚ else: β”‚ β”‚ β”‚ β”‚ /usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py:2782 in __getitems__ β”‚ β”‚ β”‚ β”‚ 2779 β”‚ β”‚ β”‚ 2780 β”‚ def __getitems__(self, keys: List) -> List: β”‚ β”‚ 2781 β”‚ β”‚ """Can be used to get a batch using a list of integers indices.""" β”‚ β”‚ ❱ 2782 β”‚ β”‚ batch = self.__getitem__(keys) β”‚ β”‚ 2783 β”‚ β”‚ n_examples = len(batch[next(iter(batch))]) β”‚ β”‚ 2784 β”‚ β”‚ return [{col: array[i] for col, array in batch.items()} for i in range(n_example β”‚ β”‚ 2785 β”‚ β”‚ β”‚ β”‚ /usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py:2778 in __getitem__ β”‚ β”‚ β”‚ β”‚ 2775 β”‚ β”‚ β”‚ 2776 β”‚ def __getitem__(self, key): # noqa: F811 β”‚ β”‚ 2777 β”‚ β”‚ """Can be used to index columns (by string names) or rows (by integer index or i β”‚ β”‚ ❱ 2778 β”‚ β”‚ return self._getitem(key) β”‚ β”‚ 2779 β”‚ β”‚ β”‚ 2780 β”‚ def __getitems__(self, keys: List) -> List: β”‚ β”‚ 2781 β”‚ β”‚ """Can be used to get a batch using a list of integers indices.""" β”‚ β”‚ β”‚ β”‚ /usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py:2762 in _getitem β”‚ β”‚ β”‚ β”‚ 2759 β”‚ β”‚ format_kwargs = kwargs["format_kwargs"] if "format_kwargs" in kwargs else self._ β”‚ β”‚ 2760 β”‚ β”‚ format_kwargs = format_kwargs if format_kwargs is not None else {} β”‚ β”‚ 2761 β”‚ β”‚ formatter = get_formatter(format_type, features=self._info.features, **format_kw β”‚ β”‚ ❱ 2762 β”‚ β”‚ pa_subtable = query_table(self._data, key, indices=self._indices if self._indice β”‚ β”‚ 2763 β”‚ β”‚ formatted_output = format_table( β”‚ β”‚ 2764 β”‚ β”‚ β”‚ pa_subtable, key, formatter=formatter, format_columns=format_columns, output β”‚ β”‚ 2765 β”‚ β”‚ ) β”‚ β”‚ β”‚ β”‚ /usr/local/lib/python3.10/dist-packages/datasets/formatting/formatting.py:578 in query_table β”‚ β”‚ β”‚ β”‚ 575 β”‚ β”‚ _check_valid_column_key(key, table.column_names) β”‚ β”‚ 576 β”‚ else: β”‚ β”‚ 577 β”‚ β”‚ size = indices.num_rows if indices is not None else table.num_rows β”‚ β”‚ ❱ 578 β”‚ β”‚ _check_valid_index_key(key, size) β”‚ β”‚ 579 β”‚ # Query the main table β”‚ β”‚ 580 β”‚ if indices is None: β”‚ β”‚ 581 β”‚ β”‚ pa_subtable = _query_table(table, key) β”‚ β”‚ β”‚ β”‚ /usr/local/lib/python3.10/dist-packages/datasets/formatting/formatting.py:531 in β”‚ β”‚ _check_valid_index_key β”‚ β”‚ β”‚ β”‚ 528 β”‚ β”‚ β”‚ _check_valid_index_key(min(key), size=size) β”‚ β”‚ 529 β”‚ elif isinstance(key, Iterable): β”‚ β”‚ 530 β”‚ β”‚ if len(key) > 0: β”‚ β”‚ ❱ 531 β”‚ β”‚ β”‚ _check_valid_index_key(int(max(key)), size=size) β”‚ β”‚ 532 β”‚ β”‚ β”‚ _check_valid_index_key(int(min(key)), size=size) β”‚ β”‚ 533 β”‚ else: β”‚ β”‚ 534 β”‚ β”‚ _raise_bad_key_type(key) β”‚ β”‚ β”‚ β”‚ /usr/local/lib/python3.10/dist-packages/datasets/formatting/formatting.py:521 in β”‚ β”‚ _check_valid_index_key β”‚ β”‚ β”‚ β”‚ 518 def _check_valid_index_key(key: Union[int, slice, range, Iterable], size: int) -> None: β”‚ β”‚ 519 β”‚ if isinstance(key, int): β”‚ β”‚ 520 β”‚ β”‚ if (key < 0 and key + size < 0) or (key >= size): β”‚ β”‚ ❱ 521 β”‚ β”‚ β”‚ raise IndexError(f"Invalid key: {key} is out of bounds for size {size}") β”‚ β”‚ 522 β”‚ β”‚ return β”‚ β”‚ 523 β”‚ elif isinstance(key, slice): β”‚ β”‚ 524 β”‚ β”‚ pass ### Steps to reproduce the bug `` import json import os from pprint import pprint import bitsandbytes as bnb import pandas as pd import torch import torch.nn as nn import transformers from datasets import Dataset,load_dataset from peft import ( LoraConfig, PeftConfig, PeftModel, get_peft_model, prepare_model_for_kbit_training ) from transformers import ( AutoConfig, AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig, ) os.environ["CUDA_VISIBLE_DEVICES"] = "0" def print_trainable_parameters(model): """ Prints the number of trainable parameters in the model. """ trainable_params = 0 all_param = 0 for _, param in model.named_parameters(): all_param += param.numel() if param.requires_grad: trainable_params += param.numel() print( f"trainable params: {trainable_params} || all params: {all_param} || trainable%: {100 * trainable_params / all_param}" ) MODEL_NAME = "tiiuae/falcon-7b" bnb_config = BitsAndBytesConfig( load_in_4bit = True, bnb_4bit_use_double_quant=True, bnb_4bit_quant_type="nf4", bnb_4bit_compute_dtype=torch.bfloat16, ) model = AutoModelForCausalLM.from_pretrained( MODEL_NAME, device_map = "auto", trust_remote_code = True, quantization_config = bnb_config ) tokenizer = AutoTokenizer.from_pretrained(MODEL_NAME) tokenizer.pad_token = tokenizer.eos_token model.gradient_checkpointing_enable() model = prepare_model_for_kbit_training(model) config = LoraConfig( r = 16, lora_alpha = 32, target_modules = ["query_key_value"], lora_dropout = 0.05, bias = "none", task_type = "CASUAL_LM" ) model = get_peft_model(model,config) print_trainable_parameters(model) def generate_prompt(data_point): return f""" <human>: {data_point["question"]} <assistant>: {data_point["answer"]} """.strip() def generate_and_tokenize_prompt(data_point): full_prompt = generate_prompt(data_point) tokenized_full_prompt = tokenizer(full_prompt, padding = True, truncation = True,return_tensors = None) return dict({ "input_ids" : tokenized_full_prompt["input_ids"], "attention_mask" : tokenized_full_prompt["attention_mask"] }) data = data["train"].shuffle().map(generate_and_tokenize_prompt, batched = False) OUTPUT_DIR = "experiments" trainings_args = transformers.TrainingArguments( per_device_train_batch_size = 1, gradient_accumulation_steps = 4, num_train_epochs = 1, learning_rate = 2e-4, fp16 = True, save_total_limit = 3, logging_steps = 1, output_dir = OUTPUT_DIR, max_steps = 80, optim = "paged_adamw_8bit", lr_scheduler_type = "cosine", warmup_ratio = 0.05, #remove_unused_columns=True ) trainer = transformers.Trainer( model = model, train_dataset = data, args = trainings_args, data_collator = transformers.DataCollatorForLanguageModeling(tokenizer, mlm=False), ) model.config.use_cache = False trainer.train() IndexError: Invalid key: 32 is out of bounds for size 0 DataSet Format is like : [{"question": "How can I create an account?", "answer": "To create an account, click on the 'Sign Up' button on the top right corner of our website and follow the instructions to complete the registration process."}, .... ] ### Expected behavior - ### Environment info !pip install -q pip !pip install -q bitsandbytes==0.39.0 !pip install -q torch==2.0.1 !pip install -q git+https://github.com/huggingface/transformers.git !pip install -q git+https://github.com/huggingface/peft.git !pip install -q git+https://github.com/huggingface/accelerate.git !pip install -q datasets !pip install -q loralib==0.1.1 !pip install -q einops==0.6.1 import json import os from pprint import pprint import bitsandbytes as bnb import pandas as pd import torch import torch.nn as nn import transformers from datasets import Dataset,load_dataset from peft import ( LoraConfig, PeftConfig, PeftModel, get_peft_model, prepare_model_for_kbit_training ) from transformers import ( AutoConfig, AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig, ) os.environ["CUDA_VISIBLE_DEVICES"] = "0"
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5946/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5946/timeline
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/5945
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5945/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5945/comments
https://api.github.com/repos/huggingface/datasets/issues/5945/events
https://github.com/huggingface/datasets/issues/5945
1,754,084,577
I_kwDODunzps5ojTTh
5,945
Failing to upload dataset to the hub
{ "avatar_url": "https://avatars.githubusercontent.com/u/77382661?v=4", "events_url": "https://api.github.com/users/Ar770/events{/privacy}", "followers_url": "https://api.github.com/users/Ar770/followers", "following_url": "https://api.github.com/users/Ar770/following{/other_user}", "gists_url": "https://api.github.com/users/Ar770/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Ar770", "id": 77382661, "login": "Ar770", "node_id": "MDQ6VXNlcjc3MzgyNjYx", "organizations_url": "https://api.github.com/users/Ar770/orgs", "received_events_url": "https://api.github.com/users/Ar770/received_events", "repos_url": "https://api.github.com/users/Ar770/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Ar770/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Ar770/subscriptions", "type": "User", "url": "https://api.github.com/users/Ar770" }
[]
closed
false
null
[]
null
3
"2023-06-13T05:46:46Z"
"2023-07-24T11:56:40Z"
"2023-07-24T11:56:40Z"
NONE
null
null
null
### Describe the bug Trying to upload a dataset of hundreds of thousands of audio samples (the total volume is not very large, 60 gb) to the hub with push_to_hub, it doesn't work. From time to time one piece of the data (parquet) gets pushed and then I get RemoteDisconnected even though my internet is stable. Please help. I'm trying to upload the dataset for almost a week. Thanks ### Steps to reproduce the bug not relevant ### Expected behavior Be able to upload thedataset ### Environment info python: 3.9
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5945/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5945/timeline
null
completed
false
https://api.github.com/repos/huggingface/datasets/issues/5944
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5944/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5944/comments
https://api.github.com/repos/huggingface/datasets/issues/5944/events
https://github.com/huggingface/datasets/pull/5944
1,752,882,200
PR_kwDODunzps5Sx7O4
5,944
Arrow dataset builder to be able to load and stream Arrow datasets
{ "avatar_url": "https://avatars.githubusercontent.com/u/10278877?v=4", "events_url": "https://api.github.com/users/mariusz-jachimowicz-83/events{/privacy}", "followers_url": "https://api.github.com/users/mariusz-jachimowicz-83/followers", "following_url": "https://api.github.com/users/mariusz-jachimowicz-83/following{/other_user}", "gists_url": "https://api.github.com/users/mariusz-jachimowicz-83/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mariusz-jachimowicz-83", "id": 10278877, "login": "mariusz-jachimowicz-83", "node_id": "MDQ6VXNlcjEwMjc4ODc3", "organizations_url": "https://api.github.com/users/mariusz-jachimowicz-83/orgs", "received_events_url": "https://api.github.com/users/mariusz-jachimowicz-83/received_events", "repos_url": "https://api.github.com/users/mariusz-jachimowicz-83/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mariusz-jachimowicz-83/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mariusz-jachimowicz-83/subscriptions", "type": "User", "url": "https://api.github.com/users/mariusz-jachimowicz-83" }
[]
closed
false
null
[]
null
4
"2023-06-12T14:21:49Z"
"2023-06-13T17:36:02Z"
"2023-06-13T17:29:01Z"
CONTRIBUTOR
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/5944.diff", "html_url": "https://github.com/huggingface/datasets/pull/5944", "merged_at": "2023-06-13T17:29:01Z", "patch_url": "https://github.com/huggingface/datasets/pull/5944.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5944" }
This adds a Arrow dataset builder to be able to load and stream from already preprocessed Arrow files. It's related to https://github.com/huggingface/datasets/issues/3035
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5944/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5944/timeline
null
null
true
https://api.github.com/repos/huggingface/datasets/issues/5942
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5942/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5942/comments
https://api.github.com/repos/huggingface/datasets/issues/5942/events
https://github.com/huggingface/datasets/pull/5942
1,752,021,681
PR_kwDODunzps5Su-V4
5,942
Pass datasets-cli additional args as kwargs to DatasetBuilder in `run_beam.py`
{ "avatar_url": "https://avatars.githubusercontent.com/u/84066822?v=4", "events_url": "https://api.github.com/users/graelo/events{/privacy}", "followers_url": "https://api.github.com/users/graelo/followers", "following_url": "https://api.github.com/users/graelo/following{/other_user}", "gists_url": "https://api.github.com/users/graelo/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/graelo", "id": 84066822, "login": "graelo", "node_id": "MDQ6VXNlcjg0MDY2ODIy", "organizations_url": "https://api.github.com/users/graelo/orgs", "received_events_url": "https://api.github.com/users/graelo/received_events", "repos_url": "https://api.github.com/users/graelo/repos", "site_admin": false, "starred_url": "https://api.github.com/users/graelo/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/graelo/subscriptions", "type": "User", "url": "https://api.github.com/users/graelo" }
[]
open
false
null
[]
null
0
"2023-06-12T06:50:50Z"
"2023-06-30T09:15:00Z"
null
NONE
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/5942.diff", "html_url": "https://github.com/huggingface/datasets/pull/5942", "merged_at": null, "patch_url": "https://github.com/huggingface/datasets/pull/5942.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5942" }
Hi, Following this <https://discuss.huggingface.co/t/how-to-preprocess-a-wikipedia-dataset-using-dataflowrunner/41991/3>, here is a simple PR to pass any additional args to datasets-cli as kwargs in the DatasetBuilder in `run_beam.py`. I also took the liberty to add missing setup steps to the `beam.mdx` docs in order to help everyone. @lhoestq
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5942/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5942/timeline
null
null
true
https://api.github.com/repos/huggingface/datasets/issues/5941
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5941/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5941/comments
https://api.github.com/repos/huggingface/datasets/issues/5941/events
https://github.com/huggingface/datasets/issues/5941
1,751,838,897
I_kwDODunzps5oavCx
5,941
Load Data Sets Too Slow In Train Seq2seq Model
{ "avatar_url": "https://avatars.githubusercontent.com/u/19569322?v=4", "events_url": "https://api.github.com/users/xyx361100238/events{/privacy}", "followers_url": "https://api.github.com/users/xyx361100238/followers", "following_url": "https://api.github.com/users/xyx361100238/following{/other_user}", "gists_url": "https://api.github.com/users/xyx361100238/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/xyx361100238", "id": 19569322, "login": "xyx361100238", "node_id": "MDQ6VXNlcjE5NTY5MzIy", "organizations_url": "https://api.github.com/users/xyx361100238/orgs", "received_events_url": "https://api.github.com/users/xyx361100238/received_events", "repos_url": "https://api.github.com/users/xyx361100238/repos", "site_admin": false, "starred_url": "https://api.github.com/users/xyx361100238/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/xyx361100238/subscriptions", "type": "User", "url": "https://api.github.com/users/xyx361100238" }
[]
closed
false
null
[]
null
10
"2023-06-12T03:58:43Z"
"2023-08-15T02:52:22Z"
"2023-08-15T02:52:22Z"
NONE
null
null
null
### Describe the bug step 'Generating train split' in load_dataset is too slow: ![image](https://github.com/huggingface/datasets/assets/19569322/d9b08eee-95fe-4741-a346-b70416c948f8) ### Steps to reproduce the bug Data: own data,16K16B Mono wav Oficial Script:[ run_speech_recognition_seq2seq.py](https://github.com/huggingface/transformers/blob/main/examples/pytorch/speech-recognition/run_speech_recognition_seq2seq.py) Add Code: if data_args.data_path is not None: print(data_args.data_path) raw_datasets = load_dataset("audiofolder", data_dir=data_args.data_path, cache_dir=model_args.cache_dir) raw_datasets = raw_datasets.cast_column("audio", Audio(sampling_rate=16000)) raw_datasets = raw_datasets["train"].train_test_split(test_size=0.005, shuffle=True) (change cache_dir to other path ,ex:/DATA/cacheοΌ‰ ### Expected behavior load data fast,at least 1000+ `Generating train split: 387875 examples [32:24:45, 1154.83 examples/s]` ### Environment info - `transformers` version: 4.28.0.dev0 - Platform: Linux-5.4.0-149-generic-x86_64-with-debian-bullseye-sid - Python version: 3.7.16 - Huggingface_hub version: 0.13.2 - PyTorch version (GPU?): 1.13.1+cu116 (True) - Tensorflow version (GPU?): not installed (NA) - Flax version (CPU?/GPU?/TPU?): not installed (NA) - Jax version: not installed - JaxLib version: not installed - Using GPU in script?: <fill in> - Using distributed or parallel set-up in script?: <fill in>
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5941/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5941/timeline
null
completed
false
https://api.github.com/repos/huggingface/datasets/issues/5990
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5990/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5990/comments
https://api.github.com/repos/huggingface/datasets/issues/5990/events
https://github.com/huggingface/datasets/issues/5990
1,774,389,854
I_kwDODunzps5pwwpe
5,990
Pushing a large dataset on the hub consistently hangs
{ "avatar_url": "https://avatars.githubusercontent.com/u/10792502?v=4", "events_url": "https://api.github.com/users/AntreasAntoniou/events{/privacy}", "followers_url": "https://api.github.com/users/AntreasAntoniou/followers", "following_url": "https://api.github.com/users/AntreasAntoniou/following{/other_user}", "gists_url": "https://api.github.com/users/AntreasAntoniou/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/AntreasAntoniou", "id": 10792502, "login": "AntreasAntoniou", "node_id": "MDQ6VXNlcjEwNzkyNTAy", "organizations_url": "https://api.github.com/users/AntreasAntoniou/orgs", "received_events_url": "https://api.github.com/users/AntreasAntoniou/received_events", "repos_url": "https://api.github.com/users/AntreasAntoniou/repos", "site_admin": false, "starred_url": "https://api.github.com/users/AntreasAntoniou/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/AntreasAntoniou/subscriptions", "type": "User", "url": "https://api.github.com/users/AntreasAntoniou" }
[ { "color": "d73a4a", "default": true, "description": "Something isn't working", "id": 1935892857, "name": "bug", "node_id": "MDU6TGFiZWwxOTM1ODkyODU3", "url": "https://api.github.com/repos/huggingface/datasets/labels/bug" } ]
open
false
null
[]
null
45
"2023-06-10T14:46:47Z"
"2024-01-31T00:51:56Z"
null
NONE
null
null
null
### Describe the bug Once I have locally built a large dataset that I want to push to hub, I use the recommended approach of .push_to_hub to get the dataset on the hub, and after pushing a few shards, it consistently hangs. This has happened over 40 times over the past week, and despite my best efforts to try and catch this happening and kill a process and restart, it seems to be extremely time wasting -- so I came to you to report this and to seek help. I already tried installing hf_transfer, but it doesn't support Byte file uploads so I uninstalled it. ### Reproduction ```python import multiprocessing as mp import pathlib from math import ceil import datasets import numpy as np from tqdm.auto import tqdm from tali.data.data import select_subtitles_between_timestamps from tali.utils import load_json tali_dataset_dir = "/data/" if __name__ == "__main__": full_dataset = datasets.load_dataset( "Antreas/TALI", num_proc=mp.cpu_count(), cache_dir=tali_dataset_dir ) def data_generator(set_name, percentage: float = 1.0): dataset = full_dataset[set_name] for item in tqdm(dataset): video_list = item["youtube_content_video"] video_list = np.random.choice( video_list, int(ceil(len(video_list) * percentage)) ) if len(video_list) == 0: continue captions = item["youtube_subtitle_text"] captions = select_subtitles_between_timestamps( subtitle_dict=load_json( captions.replace( "/data/", tali_dataset_dir, ) ), starting_timestamp=0, ending_timestamp=100000000, ) for video_path in video_list: temp_path = video_path.replace("/data/", tali_dataset_dir) video_path_actual: pathlib.Path = pathlib.Path(temp_path) if video_path_actual.exists(): item["youtube_content_video"] = open(video_path_actual, "rb").read() item["youtube_subtitle_text"] = captions yield item train_generator = lambda: data_generator("train", percentage=0.1) val_generator = lambda: data_generator("val") test_generator = lambda: data_generator("test") train_data = datasets.Dataset.from_generator( train_generator, num_proc=mp.cpu_count(), writer_batch_size=5000, cache_dir=tali_dataset_dir, ) val_data = datasets.Dataset.from_generator( val_generator, writer_batch_size=5000, num_proc=mp.cpu_count(), cache_dir=tali_dataset_dir, ) test_data = datasets.Dataset.from_generator( test_generator, writer_batch_size=5000, num_proc=mp.cpu_count(), cache_dir=tali_dataset_dir, ) dataset = datasets.DatasetDict( { "train": train_data, "val": val_data, "test": test_data, } ) succesful_competion = False while not succesful_competion: try: dataset.push_to_hub(repo_id="Antreas/TALI-small", max_shard_size="5GB") succesful_competion = True except Exception as e: print(e) ``` ### Logs ```shell Pushing dataset shards to the dataset hub: 33%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–Ž | 7/21 [24:33<49:06, 210.45s/it] Error while uploading 'data/val-00007-of-00021-6b216a984af1a4c8.parquet' to the Hub. Pushing split train to the Hub. Resuming upload of the dataset shards. Pushing dataset shards to the dataset hub: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 46/46 [42:10<00:00, 55.01s/it] Pushing split val to the Hub. Resuming upload of the dataset shards. Creating parquet from Arrow format: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 3/3 [00:01<00:00, 1.55ba/s] Upload 1 LFS files: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 1/1 [00:23<00:00, 23.51s/it] Creating parquet from Arrow format: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 3/3 [00:02<00:00, 1.39ba/s] Upload 1 LFS files: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 1/1 [00:30<00:00, 30.19s/it] Creating parquet from Arrow format: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 3/3 [00:02<00:00, 1.28ba/s] Upload 1 LFS files: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 1/1 [00:24<00:00, 24.08s/it] Creating parquet from Arrow format: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 3/3 [00:02<00:00, 1.42ba/s] Upload 1 LFS files: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 1/1 [00:23<00:00, 23.97s/it] Creating parquet from Arrow format: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 3/3 [00:02<00:00, 1.49ba/s] Creating parquet from Arrow format: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 3/3 [00:02<00:00, 1.54ba/s^ Upload 1 LFS files: 0%| | 0/1 [04:42<?, ?it/s] Pushing dataset shards to the dataset hub: 52%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ– | 11/21 [17:23<15:48, 94.82s/it] That's where it got stuck ``` ### System info ```shell - huggingface_hub version: 0.15.1 - Platform: Linux-5.4.0-147-generic-x86_64-with-glibc2.35 - Python version: 3.10.11 - Running in iPython ?: No - Running in notebook ?: No - Running in Google Colab ?: No - Token path ?: /root/.cache/huggingface/token - Has saved token ?: True - Who am I ?: Antreas - Configured git credential helpers: store - FastAI: N/A - Tensorflow: N/A - Torch: 2.1.0.dev20230606+cu121 - Jinja2: 3.1.2 - Graphviz: N/A - Pydot: N/A - Pillow: 9.5.0 - hf_transfer: N/A - gradio: N/A - numpy: 1.24.3 - ENDPOINT: https://huggingface.co - HUGGINGFACE_HUB_CACHE: /root/.cache/huggingface/hub - HUGGINGFACE_ASSETS_CACHE: /root/.cache/huggingface/assets - HF_TOKEN_PATH: /root/.cache/huggingface/token - HF_HUB_OFFLINE: False - HF_HUB_DISABLE_TELEMETRY: False - HF_HUB_DISABLE_PROGRESS_BARS: None - HF_HUB_DISABLE_SYMLINKS_WARNING: False - HF_HUB_DISABLE_EXPERIMENTAL_WARNING: False - HF_HUB_DISABLE_IMPLICIT_TOKEN: False - HF_HUB_ENABLE_HF_TRANSFER: False ```
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5990/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5990/timeline
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/5939
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5939/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5939/comments
https://api.github.com/repos/huggingface/datasets/issues/5939/events
https://github.com/huggingface/datasets/issues/5939
1,749,955,883
I_kwDODunzps5oTjUr
5,939
.
{ "avatar_url": "https://avatars.githubusercontent.com/u/103381497?v=4", "events_url": "https://api.github.com/users/flckv/events{/privacy}", "followers_url": "https://api.github.com/users/flckv/followers", "following_url": "https://api.github.com/users/flckv/following{/other_user}", "gists_url": "https://api.github.com/users/flckv/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/flckv", "id": 103381497, "login": "flckv", "node_id": "U_kgDOBil5-Q", "organizations_url": "https://api.github.com/users/flckv/orgs", "received_events_url": "https://api.github.com/users/flckv/received_events", "repos_url": "https://api.github.com/users/flckv/repos", "site_admin": false, "starred_url": "https://api.github.com/users/flckv/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/flckv/subscriptions", "type": "User", "url": "https://api.github.com/users/flckv" }
[]
closed
false
null
[]
null
0
"2023-06-09T14:01:34Z"
"2023-06-12T12:19:34Z"
"2023-06-12T12:19:19Z"
NONE
null
null
null
null
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5939/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5939/timeline
null
completed
false
https://api.github.com/repos/huggingface/datasets/issues/5938
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5938/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5938/comments
https://api.github.com/repos/huggingface/datasets/issues/5938/events
https://github.com/huggingface/datasets/pull/5938
1,749,462,851
PR_kwDODunzps5SmbkI
5,938
Make get_from_cache use custom temp filename that is locked
{ "avatar_url": "https://avatars.githubusercontent.com/u/8515462?v=4", "events_url": "https://api.github.com/users/albertvillanova/events{/privacy}", "followers_url": "https://api.github.com/users/albertvillanova/followers", "following_url": "https://api.github.com/users/albertvillanova/following{/other_user}", "gists_url": "https://api.github.com/users/albertvillanova/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/albertvillanova", "id": 8515462, "login": "albertvillanova", "node_id": "MDQ6VXNlcjg1MTU0NjI=", "organizations_url": "https://api.github.com/users/albertvillanova/orgs", "received_events_url": "https://api.github.com/users/albertvillanova/received_events", "repos_url": "https://api.github.com/users/albertvillanova/repos", "site_admin": false, "starred_url": "https://api.github.com/users/albertvillanova/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/albertvillanova/subscriptions", "type": "User", "url": "https://api.github.com/users/albertvillanova" }
[]
closed
false
null
[]
null
2
"2023-06-09T09:01:13Z"
"2023-06-14T13:35:38Z"
"2023-06-14T13:27:24Z"
MEMBER
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/5938.diff", "html_url": "https://github.com/huggingface/datasets/pull/5938", "merged_at": "2023-06-14T13:27:24Z", "patch_url": "https://github.com/huggingface/datasets/pull/5938.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5938" }
This PR ensures that the temporary filename created is the same as the one that is locked, while writing to the cache. This PR stops using `tempfile` to generate the temporary filename. Additionally, the behavior now is aligned for both `resume_download` `True` and `False`. Refactor temp_file_manager so that it uses the filename that is locked: - Use: `cache_path + ".incomplete"`, when the locked one is `cache_path + ".lock"` Before it was using `tempfile` inside `cache_dir`, which was not locked: although very improbable name collision (8 random characters), this was not impossible when huge number of multiple processes. Maybe related to "Stale file handle" issues caused by `tempfile`: - [ ] https://huggingface.co/datasets/tapaco/discussions/4 - [ ] https://huggingface.co/datasets/xcsr/discussions/1 - [ ] https://huggingface.co/datasets/covost2/discussions/3 ``` Error code: ConfigNamesError Exception: OSError Message: [Errno 116] Stale file handle Traceback: Traceback (most recent call last): File "/src/services/worker/src/worker/job_runners/dataset/config_names.py", line 61, in compute_config_names_response for config in sorted(get_dataset_config_names(path=dataset, use_auth_token=use_auth_token)) File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/inspect.py", line 323, in get_dataset_config_names dataset_module = dataset_module_factory( File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py", line 1219, in dataset_module_factory raise e1 from None File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py", line 1188, in dataset_module_factory return HubDatasetModuleFactoryWithScript( File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py", line 907, in get_module dataset_readme_path = self.download_dataset_readme_file() File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py", line 896, in download_dataset_readme_file return cached_path( File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/utils/file_utils.py", line 183, in cached_path output_path = get_from_cache( File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/utils/file_utils.py", line 611, in get_from_cache http_get( File "/usr/local/lib/python3.9/tempfile.py", line 496, in __exit__ result = self.file.__exit__(exc, value, tb) OSError: [Errno 116] Stale file handle ``` - the stale file handle error can be raised when `tempfile` tries to close (when exiting its context manager) a filename that has been already closed by other process - note that `tempfile` filenames are randomly generated but not locked in our code CC: @severo
{ "+1": 1, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 1, "url": "https://api.github.com/repos/huggingface/datasets/issues/5938/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5938/timeline
null
null
true
https://api.github.com/repos/huggingface/datasets/issues/5937
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5937/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5937/comments
https://api.github.com/repos/huggingface/datasets/issues/5937/events
https://github.com/huggingface/datasets/pull/5937
1,749,388,597
PR_kwDODunzps5SmLIs
5,937
Avoid parallel redownload in cache
{ "avatar_url": "https://avatars.githubusercontent.com/u/8515462?v=4", "events_url": "https://api.github.com/users/albertvillanova/events{/privacy}", "followers_url": "https://api.github.com/users/albertvillanova/followers", "following_url": "https://api.github.com/users/albertvillanova/following{/other_user}", "gists_url": "https://api.github.com/users/albertvillanova/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/albertvillanova", "id": 8515462, "login": "albertvillanova", "node_id": "MDQ6VXNlcjg1MTU0NjI=", "organizations_url": "https://api.github.com/users/albertvillanova/orgs", "received_events_url": "https://api.github.com/users/albertvillanova/received_events", "repos_url": "https://api.github.com/users/albertvillanova/repos", "site_admin": false, "starred_url": "https://api.github.com/users/albertvillanova/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/albertvillanova/subscriptions", "type": "User", "url": "https://api.github.com/users/albertvillanova" }
[]
closed
false
null
[]
null
2
"2023-06-09T08:18:36Z"
"2023-06-14T12:30:59Z"
"2023-06-14T12:23:57Z"
MEMBER
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/5937.diff", "html_url": "https://github.com/huggingface/datasets/pull/5937", "merged_at": "2023-06-14T12:23:57Z", "patch_url": "https://github.com/huggingface/datasets/pull/5937.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5937" }
Avoid parallel redownload in cache by retrying inside the lock if path exists.
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5937/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5937/timeline
null
null
true
https://api.github.com/repos/huggingface/datasets/issues/5936
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5936/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5936/comments
https://api.github.com/repos/huggingface/datasets/issues/5936/events
https://github.com/huggingface/datasets/issues/5936
1,748,424,388
I_kwDODunzps5oNtbE
5,936
Sequence of array not supported for most dtype
{ "avatar_url": "https://avatars.githubusercontent.com/u/45557362?v=4", "events_url": "https://api.github.com/users/qgallouedec/events{/privacy}", "followers_url": "https://api.github.com/users/qgallouedec/followers", "following_url": "https://api.github.com/users/qgallouedec/following{/other_user}", "gists_url": "https://api.github.com/users/qgallouedec/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/qgallouedec", "id": 45557362, "login": "qgallouedec", "node_id": "MDQ6VXNlcjQ1NTU3MzYy", "organizations_url": "https://api.github.com/users/qgallouedec/orgs", "received_events_url": "https://api.github.com/users/qgallouedec/received_events", "repos_url": "https://api.github.com/users/qgallouedec/repos", "site_admin": false, "starred_url": "https://api.github.com/users/qgallouedec/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/qgallouedec/subscriptions", "type": "User", "url": "https://api.github.com/users/qgallouedec" }
[]
closed
false
null
[]
null
4
"2023-06-08T18:18:07Z"
"2023-06-14T15:03:34Z"
"2023-06-14T15:03:34Z"
CONTRIBUTOR
null
null
null
### Describe the bug Create a dataset composed of sequence of array fails for most dtypes (see code below). ### Steps to reproduce the bug ```python from datasets import Sequence, Array2D, Features, Dataset import numpy as np for dtype in [ "bool", # ok "int8", # failed "int16", # failed "int32", # failed "int64", # ok "uint8", # failed "uint16", # failed "uint32", # failed "uint64", # failed "float16", # failed "float32", # failed "float64", # ok ]: features = Features({"foo": Sequence(Array2D(dtype=dtype, shape=(2, 2)))}) sequence = [ [[1.0, 2.0], [3.0, 4.0]], [[5.0, 6.0], [7.0, 8.0]], ] array = np.array(sequence, dtype=dtype) try: dataset = Dataset.from_dict({"foo": [array]}, features=features) except Exception as e: print(f"Failed for dtype={dtype}") ``` Traceback for `dtype="int8"`: ``` Traceback (most recent call last): File "/home/qgallouedec/datasets/a.py", line 29, in <module> raise e File "/home/qgallouedec/datasets/a.py", line 26, in <module> dataset = Dataset.from_dict({"foo": [array]}, features=features) File "/home/qgallouedec/env/lib/python3.10/site-packages/datasets/arrow_dataset.py", line 899, in from_dict pa_table = InMemoryTable.from_pydict(mapping=mapping) File "/home/qgallouedec/env/lib/python3.10/site-packages/datasets/table.py", line 799, in from_pydict return cls(pa.Table.from_pydict(*args, **kwargs)) File "pyarrow/table.pxi", line 3725, in pyarrow.lib.Table.from_pydict File "pyarrow/table.pxi", line 5254, in pyarrow.lib._from_pydict File "pyarrow/array.pxi", line 350, in pyarrow.lib.asarray File "pyarrow/array.pxi", line 236, in pyarrow.lib.array File "pyarrow/array.pxi", line 110, in pyarrow.lib._handle_arrow_array_protocol File "/home/qgallouedec/env/lib/python3.10/site-packages/datasets/arrow_writer.py", line 204, in __arrow_array__ out = cast_array_to_feature(out, type, allow_number_to_str=not self.trying_type) File "/home/qgallouedec/env/lib/python3.10/site-packages/datasets/table.py", line 1833, in wrapper return func(array, *args, **kwargs) File "/home/qgallouedec/env/lib/python3.10/site-packages/datasets/table.py", line 2091, in cast_array_to_feature casted_values = _c(array.values, feature.feature) File "/home/qgallouedec/env/lib/python3.10/site-packages/datasets/table.py", line 1833, in wrapper return func(array, *args, **kwargs) File "/home/qgallouedec/env/lib/python3.10/site-packages/datasets/table.py", line 2139, in cast_array_to_feature return array_cast(array, feature(), allow_number_to_str=allow_number_to_str) File "/home/qgallouedec/env/lib/python3.10/site-packages/datasets/table.py", line 1833, in wrapper return func(array, *args, **kwargs) File "/home/qgallouedec/env/lib/python3.10/site-packages/datasets/table.py", line 1967, in array_cast return pa_type.wrap_array(array) File "pyarrow/types.pxi", line 879, in pyarrow.lib.BaseExtensionType.wrap_array TypeError: Incompatible storage type for extension<arrow.py_extension_type<Array2DExtensionType>>: expected list<item: list<item: int8>>, got list<item: list<item: int64>> ``` ### Expected behavior Not to fail. ### Environment info - Python 3.10.6 - datasets: master branch - Numpy: 1.23.4
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5936/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5936/timeline
null
completed
false
https://api.github.com/repos/huggingface/datasets/issues/5935
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5935/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5935/comments
https://api.github.com/repos/huggingface/datasets/issues/5935/events
https://github.com/huggingface/datasets/pull/5935
1,748,090,220
PR_kwDODunzps5Sh9Mg
5,935
Better row group size in push_to_hub
{ "avatar_url": "https://avatars.githubusercontent.com/u/42851186?v=4", "events_url": "https://api.github.com/users/lhoestq/events{/privacy}", "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}", "gravatar_id": "", "html_url": "https://github.com/lhoestq", "id": 42851186, "login": "lhoestq", "node_id": "MDQ6VXNlcjQyODUxMTg2", "organizations_url": "https://api.github.com/users/lhoestq/orgs", "received_events_url": "https://api.github.com/users/lhoestq/received_events", "repos_url": "https://api.github.com/users/lhoestq/repos", "site_admin": false, "starred_url": "https://api.github.com/users/lhoestq/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/lhoestq/subscriptions", "type": "User", "url": "https://api.github.com/users/lhoestq" }
[]
closed
false
null
[]
null
10
"2023-06-08T15:01:15Z"
"2023-06-09T17:47:37Z"
"2023-06-09T17:40:09Z"
MEMBER
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/5935.diff", "html_url": "https://github.com/huggingface/datasets/pull/5935", "merged_at": "2023-06-09T17:40:09Z", "patch_url": "https://github.com/huggingface/datasets/pull/5935.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5935" }
This is a very simple change that improves `to_parquet` to use a more reasonable row group size for image and audio datasets. This is especially useful for `push_to_hub` and will provide a better experience with the dataset viewer on HF
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5935/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5935/timeline
null
null
true
https://api.github.com/repos/huggingface/datasets/issues/5934
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5934/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5934/comments
https://api.github.com/repos/huggingface/datasets/issues/5934/events
https://github.com/huggingface/datasets/pull/5934
1,747,904,840
PR_kwDODunzps5ShUxQ
5,934
Modify levels of some logging messages
{ "avatar_url": "https://avatars.githubusercontent.com/u/21087104?v=4", "events_url": "https://api.github.com/users/Laurent2916/events{/privacy}", "followers_url": "https://api.github.com/users/Laurent2916/followers", "following_url": "https://api.github.com/users/Laurent2916/following{/other_user}", "gists_url": "https://api.github.com/users/Laurent2916/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Laurent2916", "id": 21087104, "login": "Laurent2916", "node_id": "MDQ6VXNlcjIxMDg3MTA0", "organizations_url": "https://api.github.com/users/Laurent2916/orgs", "received_events_url": "https://api.github.com/users/Laurent2916/received_events", "repos_url": "https://api.github.com/users/Laurent2916/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Laurent2916/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Laurent2916/subscriptions", "type": "User", "url": "https://api.github.com/users/Laurent2916" }
[]
closed
false
null
[]
null
2
"2023-06-08T13:31:44Z"
"2023-07-12T18:21:03Z"
"2023-07-12T18:21:02Z"
CONTRIBUTOR
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/5934.diff", "html_url": "https://github.com/huggingface/datasets/pull/5934", "merged_at": null, "patch_url": "https://github.com/huggingface/datasets/pull/5934.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5934" }
Some warning messages didn't quite sound like warnings so I modified their logging levels to info.
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5934/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5934/timeline
null
null
true
https://api.github.com/repos/huggingface/datasets/issues/5933
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5933/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5933/comments
https://api.github.com/repos/huggingface/datasets/issues/5933/events
https://github.com/huggingface/datasets/pull/5933
1,747,382,500
PR_kwDODunzps5Sfi5J
5,933
Fix `to_numpy` when None values in the sequence
{ "avatar_url": "https://avatars.githubusercontent.com/u/45557362?v=4", "events_url": "https://api.github.com/users/qgallouedec/events{/privacy}", "followers_url": "https://api.github.com/users/qgallouedec/followers", "following_url": "https://api.github.com/users/qgallouedec/following{/other_user}", "gists_url": "https://api.github.com/users/qgallouedec/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/qgallouedec", "id": 45557362, "login": "qgallouedec", "node_id": "MDQ6VXNlcjQ1NTU3MzYy", "organizations_url": "https://api.github.com/users/qgallouedec/orgs", "received_events_url": "https://api.github.com/users/qgallouedec/received_events", "repos_url": "https://api.github.com/users/qgallouedec/repos", "site_admin": false, "starred_url": "https://api.github.com/users/qgallouedec/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/qgallouedec/subscriptions", "type": "User", "url": "https://api.github.com/users/qgallouedec" }
[]
closed
false
null
[]
null
4
"2023-06-08T08:38:56Z"
"2023-06-09T13:49:41Z"
"2023-06-09T13:23:48Z"
CONTRIBUTOR
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/5933.diff", "html_url": "https://github.com/huggingface/datasets/pull/5933", "merged_at": "2023-06-09T13:23:48Z", "patch_url": "https://github.com/huggingface/datasets/pull/5933.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5933" }
Closes #5927 I've realized that the error was overlooked during testing due to the presence of only one None value in the sequence. Unfortunately, it was the only case where the function works as expected. When the sequence contained more than one None value, the function failed. Consequently, I've updated the tests to include sequences with multiple None values.
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5933/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5933/timeline
null
null
true
https://api.github.com/repos/huggingface/datasets/issues/5932
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5932/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5932/comments
https://api.github.com/repos/huggingface/datasets/issues/5932/events
https://github.com/huggingface/datasets/pull/5932
1,746,249,161
PR_kwDODunzps5Sbrzo
5,932
[doc build] Use secrets
{ "avatar_url": "https://avatars.githubusercontent.com/u/11827707?v=4", "events_url": "https://api.github.com/users/mishig25/events{/privacy}", "followers_url": "https://api.github.com/users/mishig25/followers", "following_url": "https://api.github.com/users/mishig25/following{/other_user}", "gists_url": "https://api.github.com/users/mishig25/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mishig25", "id": 11827707, "login": "mishig25", "node_id": "MDQ6VXNlcjExODI3NzA3", "organizations_url": "https://api.github.com/users/mishig25/orgs", "received_events_url": "https://api.github.com/users/mishig25/received_events", "repos_url": "https://api.github.com/users/mishig25/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mishig25/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mishig25/subscriptions", "type": "User", "url": "https://api.github.com/users/mishig25" }
[]
closed
false
null
[]
null
4
"2023-06-07T16:09:39Z"
"2023-06-09T10:16:58Z"
"2023-06-09T09:53:16Z"
CONTRIBUTOR
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/5932.diff", "html_url": "https://github.com/huggingface/datasets/pull/5932", "merged_at": "2023-06-09T09:53:16Z", "patch_url": "https://github.com/huggingface/datasets/pull/5932.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5932" }
Companion pr to https://github.com/huggingface/doc-builder/pull/379
{ "+1": 1, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 1, "url": "https://api.github.com/repos/huggingface/datasets/issues/5932/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5932/timeline
null
null
true
https://api.github.com/repos/huggingface/datasets/issues/5931
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5931/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5931/comments
https://api.github.com/repos/huggingface/datasets/issues/5931/events
https://github.com/huggingface/datasets/issues/5931
1,745,408,784
I_kwDODunzps5oCNMQ
5,931
`datasets.map` not reusing cached copy by default
{ "avatar_url": "https://avatars.githubusercontent.com/u/19718818?v=4", "events_url": "https://api.github.com/users/bhavitvyamalik/events{/privacy}", "followers_url": "https://api.github.com/users/bhavitvyamalik/followers", "following_url": "https://api.github.com/users/bhavitvyamalik/following{/other_user}", "gists_url": "https://api.github.com/users/bhavitvyamalik/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/bhavitvyamalik", "id": 19718818, "login": "bhavitvyamalik", "node_id": "MDQ6VXNlcjE5NzE4ODE4", "organizations_url": "https://api.github.com/users/bhavitvyamalik/orgs", "received_events_url": "https://api.github.com/users/bhavitvyamalik/received_events", "repos_url": "https://api.github.com/users/bhavitvyamalik/repos", "site_admin": false, "starred_url": "https://api.github.com/users/bhavitvyamalik/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/bhavitvyamalik/subscriptions", "type": "User", "url": "https://api.github.com/users/bhavitvyamalik" }
[]
closed
false
null
[]
null
1
"2023-06-07T09:03:33Z"
"2023-06-21T16:15:40Z"
"2023-06-21T16:15:40Z"
CONTRIBUTOR
null
null
null
### Describe the bug When I load the dataset from local directory, it's cached copy is picked up after first time. However, for `map` operation, the operation is applied again and cached copy is not picked up. Is there any way to pick cached copy instead of processing it again? The only solution I could think of was to use `save_to_disk` after my last transform and then use that in my DataLoader pipeline. Are there any other solutions for the same? One more thing, my dataset is occupying 6GB storage memory after I use `map`, is there any way I can reduce that memory usage? ### Steps to reproduce the bug ``` # make sure that dataset decodes audio with correct sampling rate dataset_sampling_rate = next(iter(self.raw_datasets.values())).features["audio"].sampling_rate if dataset_sampling_rate != self.feature_extractor.sampling_rate: self.raw_datasets = self.raw_datasets.cast_column( "audio", datasets.features.Audio(sampling_rate=self.feature_extractor.sampling_rate) ) vectorized_datasets = self.raw_datasets.map( self.prepare_dataset, remove_columns=next(iter(self.raw_datasets.values())).column_names, num_proc=self.num_workers, desc="preprocess datasets", ) # filter data that is longer than max_input_length self.vectorized_datasets = vectorized_datasets.filter( self.is_audio_in_length_range, num_proc=self.num_workers, input_columns=["input_length"], ) def prepare_dataset(self, batch): # load audio sample = batch["audio"] inputs = self.feature_extractor(sample["array"], sampling_rate=sample["sampling_rate"]) batch["input_values"] = inputs.input_values[0] batch["input_length"] = len(batch["input_values"]) batch["labels"] = self.tokenizer(batch["target_text"]).input_ids return batch ``` ### Expected behavior `map` to use cached copy and if possible an alternative technique to reduce memory usage after using `map` ### Environment info - `datasets` version: 2.12.0 - Platform: Linux-3.10.0-1160.71.1.el7.x86_64-x86_64-with-glibc2.17 - Python version: 3.8.16 - Huggingface_hub version: 0.15.1 - PyArrow version: 12.0.0 - Pandas version: 2.0.2
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5931/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5931/timeline
null
completed
false
https://api.github.com/repos/huggingface/datasets/issues/5930
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5930/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5930/comments
https://api.github.com/repos/huggingface/datasets/issues/5930/events
https://github.com/huggingface/datasets/issues/5930
1,745,184,395
I_kwDODunzps5oBWaL
5,930
loading private custom dataset script - authentication error
{ "avatar_url": "https://avatars.githubusercontent.com/u/103381497?v=4", "events_url": "https://api.github.com/users/flckv/events{/privacy}", "followers_url": "https://api.github.com/users/flckv/followers", "following_url": "https://api.github.com/users/flckv/following{/other_user}", "gists_url": "https://api.github.com/users/flckv/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/flckv", "id": 103381497, "login": "flckv", "node_id": "U_kgDOBil5-Q", "organizations_url": "https://api.github.com/users/flckv/orgs", "received_events_url": "https://api.github.com/users/flckv/received_events", "repos_url": "https://api.github.com/users/flckv/repos", "site_admin": false, "starred_url": "https://api.github.com/users/flckv/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/flckv/subscriptions", "type": "User", "url": "https://api.github.com/users/flckv" }
[]
closed
false
null
[]
null
1
"2023-06-07T06:58:23Z"
"2023-06-15T14:49:21Z"
"2023-06-15T14:49:20Z"
NONE
null
null
null
### Describe the bug Train model with my custom dataset stored in HuggingFace and loaded with the loading script requires authentication but I am not sure how ? I am logged in in the terminal, in the browser. I receive this error: /python3.8/site-packages/datasets/utils/file_utils.py", line 566, in get_from_cache raise ConnectionError(f"Couldn't reach {url} ({repr(head_error)})") ConnectionError: Couldn't reach https://huggingface.co/datasets/fkov/s/blob/main/data/s/train/labels `(ConnectionError('Unauthorized for URL `https://huggingface.co/datasets/fkov/s/blob/main/data/s/train/labels. Please use the parameter `**`use_auth_token=True`**` after logging in with `**`huggingface-cli login`**`')) when I added: `use_auth_token=True` and logged in via terminal then I received error: or the same error in different format: raise ConnectionError(f"`Couldn't reach {url} (error {response.status_code}`)") ConnectionError: Couldn't reach https://huggingface.co/datasets/fkov/s/blob/main/data/s/train/labels (`error 401`) ### Steps to reproduce the bug 1. cloned transformers library locally: https://huggingface.co/docs/transformers/v4.15.0/examples : > git clone https://github.com/huggingface/transformers > cd transformers > pip install . > cd /transformers/examples/pytorch/audio-classification > pip install -r requirements.txt 2. created **loading script** > https://huggingface.co/docs/datasets/dataset_script added next to dataset: 3. uploaded **private custom dataset** with loading script to HuggingFace > https://huggingface.co/docs/datasets/dataset_script 4. added dataset loading script to **local directory** in the above cloned transformers library: > cd /transformers/examples/pytorch/audio-classification 5. logged in to HuggingFace on local terminal with : > **huggingface-cli login** 6. run the model with the custom dataset stored on HuggingFace with code: https://github.com/huggingface/transformers/blob/main/examples/pytorch/audio-classification/README.md cd /transformers/examples/pytorch/audio-classification > python run_audio_classification.py \ > --model_name_or_path facebook/wav2vec2-base \ > --output_dir l/users/flck/outputs/wav2vec2-base-s \ > --overwrite_output_dir \ > --dataset_name s \ > --dataset_config_name s \ > --remove_unused_columns False \ > --do_train \ > --do_eval \ > --fp16 \ > --learning_rate 3e-5 \ > --max_length_seconds 1 \ > --attention_mask False \ > --warmup_ratio 0.1 \ > --num_train_epochs 5 \ > --per_device_train_batch_size 32 \ > --gradient_accumulation_steps 4 \ > --per_device_eval_batch_size 32 \ > --dataloader_num_workers 4 \ > --logging_strategy steps \ > --logging_steps 10 \ > --evaluation_strategy epoch \ > --save_strategy epoch \ > --load_best_model_at_end True \ > --metric_for_best_model accuracy \ > --save_total_limit 3 \ > --seed 0 \ > --push_to_hub \ > **--use_auth_token=True** ### Expected behavior Be able to train a model the https://github.com/huggingface/transformers/blob/main/examples/pytorch/audio-classification/ run_audio_classification.py with private custom dataset stored on HuggingFace. ### Environment info - datasets version: 2.12.0 - `transformers` version: 4.30.0.dev0 - Platform: Linux-5.4.204-ql-generic-12.0-19-x86_64-with-glibc2.17 - Python version: 3.8.12 - Huggingface_hub version: 0.15.1 - Safetensors version: 0.3.1 - PyTorch version (GPU?): 2.0.1+cu117 (True) Versions of relevant libraries: [pip3] numpy==1.24.3 [pip3] torch==2.0.1 [pip3] torchaudio==2.0.2 [conda] numpy 1.24.3 pypi_0 pypi [conda] torch 2.0.1 pypi_0 pypi [conda] torchaudio 2.0.2 pypi_0 pypi
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5930/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5930/timeline
null
completed
false
https://api.github.com/repos/huggingface/datasets/issues/5929
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5929/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5929/comments
https://api.github.com/repos/huggingface/datasets/issues/5929/events
https://github.com/huggingface/datasets/issues/5929
1,744,478,456
I_kwDODunzps5n-qD4
5,929
Importing PyTorch reduces multiprocessing performance for map
{ "avatar_url": "https://avatars.githubusercontent.com/u/12814709?v=4", "events_url": "https://api.github.com/users/Maxscha/events{/privacy}", "followers_url": "https://api.github.com/users/Maxscha/followers", "following_url": "https://api.github.com/users/Maxscha/following{/other_user}", "gists_url": "https://api.github.com/users/Maxscha/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/Maxscha", "id": 12814709, "login": "Maxscha", "node_id": "MDQ6VXNlcjEyODE0NzA5", "organizations_url": "https://api.github.com/users/Maxscha/orgs", "received_events_url": "https://api.github.com/users/Maxscha/received_events", "repos_url": "https://api.github.com/users/Maxscha/repos", "site_admin": false, "starred_url": "https://api.github.com/users/Maxscha/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/Maxscha/subscriptions", "type": "User", "url": "https://api.github.com/users/Maxscha" }
[]
closed
false
null
[]
null
2
"2023-06-06T19:42:25Z"
"2023-06-16T13:09:12Z"
"2023-06-16T13:09:12Z"
NONE
null
null
null
### Describe the bug I noticed that the performance of my dataset preprocessing with `map(...,num_proc=32)` decreases when PyTorch is imported. ### Steps to reproduce the bug I created two example scripts to reproduce this behavior: ``` import datasets datasets.disable_caching() from datasets import Dataset import time PROC=32 if __name__ == "__main__": dataset = [True] * 10000000 dataset = Dataset.from_dict({'train': dataset}) start = time.time() dataset.map(lambda x: x, num_proc=PROC) end = time.time() print(end - start) ``` Takes around 4 seconds on my machine. While the same code, but with an `import torch`: ``` import datasets datasets.disable_caching() from datasets import Dataset import time import torch PROC=32 if __name__ == "__main__": dataset = [True] * 10000000 dataset = Dataset.from_dict({'train': dataset}) start = time.time() dataset.map(lambda x: x, num_proc=PROC) end = time.time() print(end - start) ``` takes around 22 seconds. ### Expected behavior I would expect that the import of torch to not have such a significant effect on the performance of map using multiprocessing. ### Environment info - `datasets` version: 2.12.0 - Platform: Linux-5.15.0-56-generic-x86_64-with-glibc2.35 - Python version: 3.11.3 - Huggingface_hub version: 0.15.1 - PyArrow version: 12.0.0 - Pandas version: 2.0.2 - torch: 2.0.1
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5929/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5929/timeline
null
completed
false
https://api.github.com/repos/huggingface/datasets/issues/5928
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5928/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5928/comments
https://api.github.com/repos/huggingface/datasets/issues/5928/events
https://github.com/huggingface/datasets/pull/5928
1,744,098,371
PR_kwDODunzps5SUXPC
5,928
Fix link to quickstart docs in README.md
{ "avatar_url": "https://avatars.githubusercontent.com/u/47462742?v=4", "events_url": "https://api.github.com/users/mariosasko/events{/privacy}", "followers_url": "https://api.github.com/users/mariosasko/followers", "following_url": "https://api.github.com/users/mariosasko/following{/other_user}", "gists_url": "https://api.github.com/users/mariosasko/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mariosasko", "id": 47462742, "login": "mariosasko", "node_id": "MDQ6VXNlcjQ3NDYyNzQy", "organizations_url": "https://api.github.com/users/mariosasko/orgs", "received_events_url": "https://api.github.com/users/mariosasko/received_events", "repos_url": "https://api.github.com/users/mariosasko/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mariosasko/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mariosasko/subscriptions", "type": "User", "url": "https://api.github.com/users/mariosasko" }
[]
closed
false
null
[]
null
3
"2023-06-06T15:23:01Z"
"2023-06-06T15:52:34Z"
"2023-06-06T15:43:53Z"
CONTRIBUTOR
null
0
{ "diff_url": "https://github.com/huggingface/datasets/pull/5928.diff", "html_url": "https://github.com/huggingface/datasets/pull/5928", "merged_at": "2023-06-06T15:43:53Z", "patch_url": "https://github.com/huggingface/datasets/pull/5928.patch", "url": "https://api.github.com/repos/huggingface/datasets/pulls/5928" }
null
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5928/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5928/timeline
null
null
true
https://api.github.com/repos/huggingface/datasets/issues/5927
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5927/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5927/comments
https://api.github.com/repos/huggingface/datasets/issues/5927/events
https://github.com/huggingface/datasets/issues/5927
1,744,009,032
I_kwDODunzps5n83dI
5,927
`IndexError` when indexing `Sequence` of `Array2D` with `None` values
{ "avatar_url": "https://avatars.githubusercontent.com/u/45557362?v=4", "events_url": "https://api.github.com/users/qgallouedec/events{/privacy}", "followers_url": "https://api.github.com/users/qgallouedec/followers", "following_url": "https://api.github.com/users/qgallouedec/following{/other_user}", "gists_url": "https://api.github.com/users/qgallouedec/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/qgallouedec", "id": 45557362, "login": "qgallouedec", "node_id": "MDQ6VXNlcjQ1NTU3MzYy", "organizations_url": "https://api.github.com/users/qgallouedec/orgs", "received_events_url": "https://api.github.com/users/qgallouedec/received_events", "repos_url": "https://api.github.com/users/qgallouedec/repos", "site_admin": false, "starred_url": "https://api.github.com/users/qgallouedec/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/qgallouedec/subscriptions", "type": "User", "url": "https://api.github.com/users/qgallouedec" }
[]
closed
false
null
[]
null
2
"2023-06-06T14:36:22Z"
"2023-06-13T12:39:39Z"
"2023-06-09T13:23:50Z"
CONTRIBUTOR
null
null
null
### Describe the bug Having `None` values in a `Sequence` of `ArrayND` fails. ### Steps to reproduce the bug ```python from datasets import Array2D, Dataset, Features, Sequence data = [ [ [[0]], None, None, ] ] feature = Sequence(Array2D((1, 1), dtype="int64")) dataset = Dataset.from_dict({"a": data}, features=Features({"a": feature})) dataset[0] # error raised only when indexing ``` ``` Traceback (most recent call last): File "/Users/quentingallouedec/gia/c.py", line 13, in <module> dataset[0] # error raised only when indexing File "/Users/quentingallouedec/gia/env/lib/python3.10/site-packages/datasets/arrow_dataset.py", line 2658, in __getitem__ return self._getitem(key) File "/Users/quentingallouedec/gia/env/lib/python3.10/site-packages/datasets/arrow_dataset.py", line 2643, in _getitem formatted_output = format_table( File "/Users/quentingallouedec/gia/env/lib/python3.10/site-packages/datasets/formatting/formatting.py", line 634, in format_table return formatter(pa_table, query_type=query_type) File "/Users/quentingallouedec/gia/env/lib/python3.10/site-packages/datasets/formatting/formatting.py", line 406, in __call__ return self.format_row(pa_table) File "/Users/quentingallouedec/gia/env/lib/python3.10/site-packages/datasets/formatting/formatting.py", line 441, in format_row row = self.python_arrow_extractor().extract_row(pa_table) File "/Users/quentingallouedec/gia/env/lib/python3.10/site-packages/datasets/formatting/formatting.py", line 144, in extract_row return _unnest(pa_table.to_pydict()) File "pyarrow/table.pxi", line 4146, in pyarrow.lib.Table.to_pydict File "pyarrow/table.pxi", line 1312, in pyarrow.lib.ChunkedArray.to_pylist File "pyarrow/array.pxi", line 1521, in pyarrow.lib.Array.to_pylist File "pyarrow/scalar.pxi", line 675, in pyarrow.lib.ListScalar.as_py File "/Users/quentingallouedec/gia/env/lib/python3.10/site-packages/datasets/features/features.py", line 760, in to_pylist return self.to_numpy(zero_copy_only=zero_copy_only).tolist() File "/Users/quentingallouedec/gia/env/lib/python3.10/site-packages/datasets/features/features.py", line 725, in to_numpy numpy_arr = np.insert(numpy_arr.astype(np.float64), null_indices, np.nan, axis=0) File "<__array_function__ internals>", line 200, in insert File "/Users/quentingallouedec/gia/env/lib/python3.10/site-packages/numpy/lib/function_base.py", line 5426, in insert old_mask[indices] = False IndexError: index 3 is out of bounds for axis 0 with size 3 ``` AFAIK, the problem only occurs when you use a `Sequence` of `ArrayND`. I strongly suspect that the problem comes from this line, or `np.insert` is misused: https://github.com/huggingface/datasets/blob/02ee418831aba68d0be93227bce8b3f42ef8980f/src/datasets/features/features.py#L729 To put t simply, you want something that do that: ```python import numpy as np numpy_arr = np.zeros((1, 1, 1)) null_indices = np.array([1, 2]) np.insert(numpy_arr, null_indices, np.nan, axis=0) # raise an error, instead of outputting # array([[[ 0.]], # [[nan]], # [[nan]]]) ``` ### Expected behavior The previous code should not raise an error. ### Environment info - Python 3.10.11 - datasets 2.10.0 - pyarrow 12.0.0
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5927/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5927/timeline
null
completed
false
https://api.github.com/repos/huggingface/datasets/issues/5926
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5926/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5926/comments
https://api.github.com/repos/huggingface/datasets/issues/5926/events
https://github.com/huggingface/datasets/issues/5926
1,743,922,028
I_kwDODunzps5n8iNs
5,926
Uncaught exception when generating the splits from a dataset that miss data
{ "avatar_url": "https://avatars.githubusercontent.com/u/1676121?v=4", "events_url": "https://api.github.com/users/severo/events{/privacy}", "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}", "gravatar_id": "", "html_url": "https://github.com/severo", "id": 1676121, "login": "severo", "node_id": "MDQ6VXNlcjE2NzYxMjE=", "organizations_url": "https://api.github.com/users/severo/orgs", "received_events_url": "https://api.github.com/users/severo/received_events", "repos_url": "https://api.github.com/users/severo/repos", "site_admin": false, "starred_url": "https://api.github.com/users/severo/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/severo/subscriptions", "type": "User", "url": "https://api.github.com/users/severo" }
[]
open
false
{ "avatar_url": "https://avatars.githubusercontent.com/u/8515462?v=4", "events_url": "https://api.github.com/users/albertvillanova/events{/privacy}", "followers_url": "https://api.github.com/users/albertvillanova/followers", "following_url": "https://api.github.com/users/albertvillanova/following{/other_user}", "gists_url": "https://api.github.com/users/albertvillanova/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/albertvillanova", "id": 8515462, "login": "albertvillanova", "node_id": "MDQ6VXNlcjg1MTU0NjI=", "organizations_url": "https://api.github.com/users/albertvillanova/orgs", "received_events_url": "https://api.github.com/users/albertvillanova/received_events", "repos_url": "https://api.github.com/users/albertvillanova/repos", "site_admin": false, "starred_url": "https://api.github.com/users/albertvillanova/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/albertvillanova/subscriptions", "type": "User", "url": "https://api.github.com/users/albertvillanova" }
[ { "avatar_url": "https://avatars.githubusercontent.com/u/8515462?v=4", "events_url": "https://api.github.com/users/albertvillanova/events{/privacy}", "followers_url": "https://api.github.com/users/albertvillanova/followers", "following_url": "https://api.github.com/users/albertvillanova/following{/other_user}", "gists_url": "https://api.github.com/users/albertvillanova/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/albertvillanova", "id": 8515462, "login": "albertvillanova", "node_id": "MDQ6VXNlcjg1MTU0NjI=", "organizations_url": "https://api.github.com/users/albertvillanova/orgs", "received_events_url": "https://api.github.com/users/albertvillanova/received_events", "repos_url": "https://api.github.com/users/albertvillanova/repos", "site_admin": false, "starred_url": "https://api.github.com/users/albertvillanova/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/albertvillanova/subscriptions", "type": "User", "url": "https://api.github.com/users/albertvillanova" } ]
null
1
"2023-06-06T13:51:01Z"
"2023-06-07T07:53:16Z"
null
CONTRIBUTOR
null
null
null
### Describe the bug Dataset https://huggingface.co/datasets/blog_authorship_corpus has an issue with its hosting platform, since https://drive.google.com/u/0/uc?id=1cGy4RNDV87ZHEXbiozABr9gsSrZpPaPz&export=download returns 404 error. But when trying to generate the split names, we get an exception which is now correctly caught. Seen originally in https://github.com/huggingface/datasets-server/blob/adbdcd6710ffed4e2eb2e4cd905b5e0dff530a15/services/worker/src/worker/job_runners/config/parquet_and_info.py#L435 ### Steps to reproduce the bug ```python >>> from datasets import StreamingDownloadManager, load_dataset_builder >>> builder = load_dataset_builder(path="blog_authorship_corpus") Downloading builder script: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 5.60k/5.60k [00:00<00:00, 23.1MB/s] Downloading metadata: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 2.81k/2.81k [00:00<00:00, 14.7MB/s] Downloading readme: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 7.30k/7.30k [00:00<00:00, 30.8MB/s] >>> dl_manager = StreamingDownloadManager(base_path=builder.base_path) >>> builder._split_generators(dl_manager) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/slesage/.cache/huggingface/modules/datasets_modules/datasets/blog_authorship_corpus/6f5d78241afd8313111956f877a57db7a0e9fc6718255dc85df0928197feb683/blog_authorship_corpus.py", line 79, in _split_generators data = dl_manager.download_and_extract(_DATA_URL) File "/home/slesage/hf/datasets-server/services/worker/.venv/lib/python3.9/site-packages/datasets/download/streaming_download_manager.py", line 1087, in download_and_extract return self.extract(self.download(url_or_urls)) File "/home/slesage/hf/datasets-server/services/worker/.venv/lib/python3.9/site-packages/datasets/download/streaming_download_manager.py", line 1039, in extract urlpaths = map_nested(self._extract, url_or_urls, map_tuple=True) File "/home/slesage/hf/datasets-server/services/worker/.venv/lib/python3.9/site-packages/datasets/utils/py_utils.py", line 435, in map_nested return function(data_struct) File "/home/slesage/hf/datasets-server/services/worker/.venv/lib/python3.9/site-packages/datasets/download/streaming_download_manager.py", line 1044, in _extract protocol = _get_extraction_protocol(urlpath, use_auth_token=self.download_config.use_auth_token) File "/home/slesage/hf/datasets-server/services/worker/.venv/lib/python3.9/site-packages/datasets/download/streaming_download_manager.py", line 433, in _get_extraction_protocol with fsspec.open(urlpath, **kwargs) as f: File "/home/slesage/hf/datasets-server/services/worker/.venv/lib/python3.9/site-packages/fsspec/core.py", line 439, in open return open_files( File "/home/slesage/hf/datasets-server/services/worker/.venv/lib/python3.9/site-packages/fsspec/core.py", line 194, in __getitem__ out = super().__getitem__(item) IndexError: list index out of range ``` ### Expected behavior We should have an Exception raised by the datasets library. ### Environment info - `datasets` version: 2.12.0 - Platform: Linux-5.19.0-1026-aws-x86_64-with-glibc2.35 - Python version: 3.9.15 - Huggingface_hub version: 0.15.1 - PyArrow version: 11.0.0 - Pandas version: 2.0.2
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5926/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5926/timeline
null
null
false
https://api.github.com/repos/huggingface/datasets/issues/5925
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/5925/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/5925/comments
https://api.github.com/repos/huggingface/datasets/issues/5925/events
https://github.com/huggingface/datasets/issues/5925
1,741,941,436
I_kwDODunzps5n0-q8
5,925
Breaking API change in datasets.list_datasets caused by change in HfApi.list_datasets
{ "avatar_url": "https://avatars.githubusercontent.com/u/78868366?v=4", "events_url": "https://api.github.com/users/mtkinit/events{/privacy}", "followers_url": "https://api.github.com/users/mtkinit/followers", "following_url": "https://api.github.com/users/mtkinit/following{/other_user}", "gists_url": "https://api.github.com/users/mtkinit/gists{/gist_id}", "gravatar_id": "", "html_url": "https://github.com/mtkinit", "id": 78868366, "login": "mtkinit", "node_id": "MDQ6VXNlcjc4ODY4MzY2", "organizations_url": "https://api.github.com/users/mtkinit/orgs", "received_events_url": "https://api.github.com/users/mtkinit/received_events", "repos_url": "https://api.github.com/users/mtkinit/repos", "site_admin": false, "starred_url": "https://api.github.com/users/mtkinit/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/mtkinit/subscriptions", "type": "User", "url": "https://api.github.com/users/mtkinit" }
[]
closed
false
null
[]
null
0
"2023-06-05T14:46:04Z"
"2023-06-19T17:22:43Z"
"2023-06-19T17:22:43Z"
NONE
null
null
null
### Describe the bug Hi all, after an update of the `datasets` library, we observer crashes in our code. We relied on `datasets.list_datasets` returning a `list`. Now, after the API of the HfApi.list_datasets was changed and it returns a `list` instead of an `Iterable`, the `datasets.list_datasets` now sometimes returns a `list` and somesimes an `Iterable`. It would be helpful to indicate that by the return type of the `datasets.list_datasets` function. Thanks, Martin ### Steps to reproduce the bug Here, the code crashed after we updated the `datasets` library: ```python # list_datasets no longer returns a list, which leads to an error when one tries to slice it for datasets.list_datasets(with_details=True)[:limit]: ... ``` ### Expected behavior It would be helpful to indicate that by the return type of the `datasets.list_datasets` function. ### Environment info Ubuntu 22.04 datasets 2.12.0
{ "+1": 0, "-1": 0, "confused": 0, "eyes": 0, "heart": 0, "hooray": 0, "laugh": 0, "rocket": 0, "total_count": 0, "url": "https://api.github.com/repos/huggingface/datasets/issues/5925/reactions" }
https://api.github.com/repos/huggingface/datasets/issues/5925/timeline
null
completed
false