url
stringlengths
61
61
repository_url
stringclasses
1 value
labels_url
stringlengths
75
75
comments_url
stringlengths
70
70
events_url
stringlengths
68
68
html_url
stringlengths
51
51
id
int64
1.13B
3.52B
node_id
stringlengths
18
18
number
int64
3.7k
7.82k
title
stringlengths
1
290
labels
listlengths
0
4
state
stringclasses
2 values
locked
bool
1 class
assignee
null
assignees
listlengths
0
3
milestone
null
comments
int64
0
49
created_at
int64
1.64k
1.76k
updated_at
int64
1.64k
1.76k
closed_at
int64
1.64k
1.76k
author_association
stringclasses
4 values
type
null
active_lock_reason
null
body
stringlengths
1
58.6k
closed_by
null
timeline_url
stringlengths
70
70
performed_via_github_app
null
state_reason
stringclasses
4 values
user.login
stringlengths
3
26
user.id
int64
3.5k
219M
user.node_id
stringlengths
12
20
user.avatar_url
stringlengths
48
53
user.gravatar_id
stringclasses
1 value
user.url
stringlengths
32
55
user.html_url
stringlengths
22
45
user.followers_url
stringlengths
42
65
user.following_url
stringlengths
55
78
user.gists_url
stringlengths
48
71
user.starred_url
stringlengths
55
78
user.subscriptions_url
stringlengths
46
69
user.organizations_url
stringlengths
37
60
user.repos_url
stringlengths
38
61
user.events_url
stringlengths
49
72
user.received_events_url
stringlengths
48
71
user.type
stringclasses
1 value
user.user_view_type
stringclasses
1 value
user.site_admin
bool
1 class
sub_issues_summary.total
float64
0
0
sub_issues_summary.completed
float64
0
0
sub_issues_summary.percent_completed
float64
0
0
issue_dependencies_summary.blocked_by
float64
0
0
issue_dependencies_summary.total_blocked_by
float64
0
0
issue_dependencies_summary.blocking
float64
0
0
issue_dependencies_summary.total_blocking
float64
0
0
reactions.url
stringlengths
71
71
reactions.total_count
int64
0
61
reactions.+1
int64
0
39
reactions.-1
int64
0
0
reactions.laugh
int64
0
0
reactions.hooray
int64
0
2
reactions.confused
int64
0
3
reactions.heart
int64
0
22
reactions.rocket
int64
0
6
reactions.eyes
int64
0
5
draft
null
pull_request.url
null
pull_request.html_url
null
pull_request.diff_url
null
pull_request.patch_url
null
pull_request.merged_at
null
closed_by.login
stringclasses
346 values
closed_by.id
float64
45.3k
183M
closed_by.node_id
stringclasses
346 values
closed_by.avatar_url
stringclasses
346 values
closed_by.gravatar_id
stringclasses
1 value
closed_by.url
stringclasses
346 values
closed_by.html_url
stringclasses
346 values
closed_by.followers_url
stringclasses
346 values
closed_by.following_url
stringclasses
346 values
closed_by.gists_url
stringclasses
346 values
closed_by.starred_url
stringclasses
346 values
closed_by.subscriptions_url
stringclasses
346 values
closed_by.organizations_url
stringclasses
346 values
closed_by.repos_url
stringclasses
346 values
closed_by.events_url
stringclasses
346 values
closed_by.received_events_url
stringclasses
346 values
closed_by.type
stringclasses
1 value
closed_by.user_view_type
stringclasses
1 value
closed_by.site_admin
bool
1 class
assignee.login
stringclasses
52 values
assignee.id
float64
192k
135M
assignee.node_id
stringclasses
52 values
assignee.avatar_url
stringclasses
52 values
assignee.gravatar_id
stringclasses
1 value
assignee.url
stringclasses
52 values
assignee.html_url
stringclasses
52 values
assignee.followers_url
stringclasses
52 values
assignee.following_url
stringclasses
52 values
assignee.gists_url
stringclasses
52 values
assignee.starred_url
stringclasses
52 values
assignee.subscriptions_url
stringclasses
52 values
assignee.organizations_url
stringclasses
52 values
assignee.repos_url
stringclasses
52 values
assignee.events_url
stringclasses
52 values
assignee.received_events_url
stringclasses
52 values
assignee.type
stringclasses
1 value
assignee.user_view_type
stringclasses
1 value
assignee.site_admin
bool
1 class
milestone.url
stringclasses
1 value
milestone.html_url
stringclasses
1 value
milestone.labels_url
stringclasses
1 value
milestone.id
float64
9.04M
9.04M
milestone.node_id
stringclasses
1 value
milestone.number
float64
10
10
milestone.title
stringclasses
1 value
milestone.description
stringclasses
1 value
milestone.creator.login
stringclasses
1 value
milestone.creator.id
float64
47.5M
47.5M
milestone.creator.node_id
stringclasses
1 value
milestone.creator.avatar_url
stringclasses
1 value
milestone.creator.gravatar_id
stringclasses
1 value
milestone.creator.url
stringclasses
1 value
milestone.creator.html_url
stringclasses
1 value
milestone.creator.followers_url
stringclasses
1 value
milestone.creator.following_url
stringclasses
1 value
milestone.creator.gists_url
stringclasses
1 value
milestone.creator.starred_url
stringclasses
1 value
milestone.creator.subscriptions_url
stringclasses
1 value
milestone.creator.organizations_url
stringclasses
1 value
milestone.creator.repos_url
stringclasses
1 value
milestone.creator.events_url
stringclasses
1 value
milestone.creator.received_events_url
stringclasses
1 value
milestone.creator.type
stringclasses
1 value
milestone.creator.user_view_type
stringclasses
1 value
milestone.creator.site_admin
bool
1 class
milestone.open_issues
float64
3
3
milestone.closed_issues
float64
5
5
milestone.state
stringclasses
1 value
milestone.created_at
int64
1.68k
1.68k
milestone.updated_at
int64
1.72k
1.72k
milestone.due_on
null
milestone.closed_at
null
is_pull_request
bool
1 class
comments_text
listlengths
0
30
https://api.github.com/repos/huggingface/datasets/issues/7818
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7818/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7818/comments
https://api.github.com/repos/huggingface/datasets/issues/7818/events
https://github.com/huggingface/datasets/issues/7818
3,515,887,618
I_kwDODunzps7RkDAC
7,818
train_test_split and stratify breaks with Numpy 2.0
[]
open
false
null
[]
null
0
1,760
1,760
null
NONE
null
null
### Describe the bug As stated in the title, since Numpy changed in version >2.0 with copy, the stratify parameters break. e.g. `all_dataset.train_test_split(test_size=0.2,stratify_by_column="label")` returns a Numpy error. It works if you downgrade Numpy to a version lower than 2.0. ### Steps to reproduce the bug 1. Numpy > 2.0 2. `all_dataset.train_test_split(test_size=0.2,stratify_by_column="label")` ### Expected behavior It returns a stratified split as per the results of Numpy < 2.0 ### Environment info - `datasets` version: 2.14.4 - Platform: Linux-6.8.0-85-generic-x86_64-with-glibc2.35 - Python version: 3.13.7 - Huggingface_hub version: 0.34.4 - PyArrow version: 19.0.0 - Pandas version: 2.3.2
null
https://api.github.com/repos/huggingface/datasets/issues/7818/timeline
null
null
davebulaval
24,845,694
MDQ6VXNlcjI0ODQ1Njk0
https://avatars.githubusercontent.com/u/24845694?v=4
https://api.github.com/users/davebulaval
https://github.com/davebulaval
https://api.github.com/users/davebulaval/followers
https://api.github.com/users/davebulaval/following{/other_user}
https://api.github.com/users/davebulaval/gists{/gist_id}
https://api.github.com/users/davebulaval/starred{/owner}{/repo}
https://api.github.com/users/davebulaval/subscriptions
https://api.github.com/users/davebulaval/orgs
https://api.github.com/users/davebulaval/repos
https://api.github.com/users/davebulaval/events{/privacy}
https://api.github.com/users/davebulaval/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7818/reactions
0
0
0
0
0
0
0
0
0
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[]
https://api.github.com/repos/huggingface/datasets/issues/7816
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7816/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7816/comments
https://api.github.com/repos/huggingface/datasets/issues/7816/events
https://github.com/huggingface/datasets/issues/7816
3,512,210,206
I_kwDODunzps7RWBMe
7,816
disable_progress_bar() not working as expected
[]
closed
false
null
[]
null
2
1,760
1,760
1,760
NONE
null
null
### Describe the bug Hi, I'm trying to load a dataset on Kaggle TPU image. There is some known compat issue with progress bar on Kaggle, so I'm trying to disable the progress bar globally. This does not work as you can see in [here](https://www.kaggle.com/code/windmaple/hf-datasets-issue). In contract, disabling progress bar for snapshot_download() works as expected as in [here](https://www.kaggle.com/code/windmaple/snapshot-download-error). ### Steps to reproduce the bug See this [notebook](https://www.kaggle.com/code/windmaple/hf-datasets-issue). There is sth. wrong with `shell_paraent`. ### Expected behavior The downloader should disable progress bar and move forward w/ no error. ### Environment info The latest version as I did: !pip install -U datasets ipywidgets ipykernel
null
https://api.github.com/repos/huggingface/datasets/issues/7816/timeline
null
completed
windmaple
5,577,741
MDQ6VXNlcjU1Nzc3NDE=
https://avatars.githubusercontent.com/u/5577741?v=4
https://api.github.com/users/windmaple
https://github.com/windmaple
https://api.github.com/users/windmaple/followers
https://api.github.com/users/windmaple/following{/other_user}
https://api.github.com/users/windmaple/gists{/gist_id}
https://api.github.com/users/windmaple/starred{/owner}{/repo}
https://api.github.com/users/windmaple/subscriptions
https://api.github.com/users/windmaple/orgs
https://api.github.com/users/windmaple/repos
https://api.github.com/users/windmaple/events{/privacy}
https://api.github.com/users/windmaple/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7816/reactions
1
1
0
0
0
0
0
0
0
null
null
null
null
null
null
windmaple
5,577,741
MDQ6VXNlcjU1Nzc3NDE=
https://avatars.githubusercontent.com/u/5577741?v=4
https://api.github.com/users/windmaple
https://github.com/windmaple
https://api.github.com/users/windmaple/followers
https://api.github.com/users/windmaple/following{/other_user}
https://api.github.com/users/windmaple/gists{/gist_id}
https://api.github.com/users/windmaple/starred{/owner}{/repo}
https://api.github.com/users/windmaple/subscriptions
https://api.github.com/users/windmaple/orgs
https://api.github.com/users/windmaple/repos
https://api.github.com/users/windmaple/events{/privacy}
https://api.github.com/users/windmaple/received_events
User
public
false
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[ "@xianbaoqian ", "Closing this one since it's a Xet issue." ]
https://api.github.com/repos/huggingface/datasets/issues/7813
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7813/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7813/comments
https://api.github.com/repos/huggingface/datasets/issues/7813/events
https://github.com/huggingface/datasets/issues/7813
3,503,446,288
I_kwDODunzps7Q0lkQ
7,813
Caching does not work when using python3.14
[]
open
false
null
[]
null
2
1,760
1,760
null
NONE
null
null
### Describe the bug Traceback (most recent call last): File "/workspace/ctn.py", line 8, in <module> ds = load_dataset(f"naver-clova-ix/synthdog-{lang}") # или "synthdog-zh" для китайского File "/workspace/.venv/lib/python3.14/site-packages/datasets/load.py", line 1397, in load_dataset builder_instance = load_dataset_builder( path=path, ...<10 lines>... **config_kwargs, ) File "/workspace/.venv/lib/python3.14/site-packages/datasets/load.py", line 1185, in load_dataset_builder builder_instance._use_legacy_cache_dir_if_possible(dataset_module) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^ File "/workspace/.venv/lib/python3.14/site-packages/datasets/builder.py", line 612, in _use_legacy_cache_dir_if_possible self._check_legacy_cache2(dataset_module) or self._check_legacy_cache() or None ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^ File "/workspace/.venv/lib/python3.14/site-packages/datasets/builder.py", line 485, in _check_legacy_cache2 config_id = self.config.name + "-" + Hasher.hash({"data_files": self.config.data_files}) ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/workspace/.venv/lib/python3.14/site-packages/datasets/fingerprint.py", line 188, in hash return cls.hash_bytes(dumps(value)) ~~~~~^^^^^^^ File "/workspace/.venv/lib/python3.14/site-packages/datasets/utils/_dill.py", line 120, in dumps dump(obj, file) ~~~~^^^^^^^^^^^ File "/workspace/.venv/lib/python3.14/site-packages/datasets/utils/_dill.py", line 114, in dump Pickler(file, recurse=True).dump(obj) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^ File "/workspace/.venv/lib/python3.14/site-packages/dill/_dill.py", line 428, in dump StockPickler.dump(self, obj) ~~~~~~~~~~~~~~~~~^^^^^^^^^^^ File "/usr/lib/python3.14/pickle.py", line 498, in dump self.save(obj) ~~~~~~~~~^^^^^ File "/workspace/.venv/lib/python3.14/site-packages/datasets/utils/_dill.py", line 70, in save dill.Pickler.save(self, obj, save_persistent_id=save_persistent_id) ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/workspace/.venv/lib/python3.14/site-packages/dill/_dill.py", line 422, in save StockPickler.save(self, obj, save_persistent_id) ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/pickle.py", line 572, in save f(self, obj) # Call unbound method with explicit self ~^^^^^^^^^^^ File "/workspace/.venv/lib/python3.14/site-packages/dill/_dill.py", line 1262, in save_module_dict StockPickler.save_dict(pickler, obj) ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ File "/usr/lib/python3.14/pickle.py", line 1064, in save_dict self._batch_setitems(obj.items(), obj) ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^ TypeError: Pickler._batch_setitems() takes 2 positional arguments but 3 were given ### Steps to reproduce the bug ds_train = ds["train"].map(lambda x: {**x, "lang": lang}) ### Expected behavior Fixed bugs ### Environment info - `datasets` version: 4.2.0 - Platform: Linux-6.8.0-85-generic-x86_64-with-glibc2.39 - Python version: 3.14.0 - `huggingface_hub` version: 0.35.3 - PyArrow version: 21.0.0 - Pandas version: 2.3.3 - `fsspec` version: 2025.9.0
null
https://api.github.com/repos/huggingface/datasets/issues/7813/timeline
null
null
intexcor
142,020,129
U_kgDOCHcOIQ
https://avatars.githubusercontent.com/u/142020129?v=4
https://api.github.com/users/intexcor
https://github.com/intexcor
https://api.github.com/users/intexcor/followers
https://api.github.com/users/intexcor/following{/other_user}
https://api.github.com/users/intexcor/gists{/gist_id}
https://api.github.com/users/intexcor/starred{/owner}{/repo}
https://api.github.com/users/intexcor/subscriptions
https://api.github.com/users/intexcor/orgs
https://api.github.com/users/intexcor/repos
https://api.github.com/users/intexcor/events{/privacy}
https://api.github.com/users/intexcor/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7813/reactions
0
0
0
0
0
0
0
0
0
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[ "https://github.com/uqfoundation/dill/issues/725", "@intexcor does #7817 fix your problem?" ]
https://api.github.com/repos/huggingface/datasets/issues/7811
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7811/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7811/comments
https://api.github.com/repos/huggingface/datasets/issues/7811/events
https://github.com/huggingface/datasets/issues/7811
3,500,741,658
I_kwDODunzps7QqRQa
7,811
SIGSEGV when Python exits due to near null deref
[]
open
false
null
[]
null
4
1,760
1,760
null
NONE
null
null
### Describe the bug When I run the following python script using datasets I get a segfault. ```python from datasets import load_dataset from tqdm import tqdm progress_bar = tqdm(total=(1000), unit='cols', desc='cols ') progress_bar.update(1) ``` ``` % lldb -- python3 crashmin.py (lldb) target create "python3" Current executable set to '/Users/ian/bug/venv/bin/python3' (arm64). (lldb) settings set -- target.run-args "crashmin.py" (lldb) r Process 8095 launched: '/Users/ian/bug/venv/bin/python3' (arm64) Process 8095 stopped * thread #2, stop reason = exec frame #0: 0x0000000100014b30 dyld`_dyld_start dyld`_dyld_start: -> 0x100014b30 <+0>: mov x0, sp 0x100014b34 <+4>: and sp, x0, #0xfffffffffffffff0 0x100014b38 <+8>: mov x29, #0x0 ; =0 Target 0: (Python) stopped. (lldb) c Process 8095 resuming cols : 0% 0/1000 [00:00<?, ?cols/s]Process 8095 stopped * thread #2, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x10) frame #0: 0x0000000101783454 _datetime.cpython-313-darwin.so`delta_new + 188 _datetime.cpython-313-darwin.so`delta_new: -> 0x101783454 <+188>: ldr x3, [x20, #0x10] 0x101783458 <+192>: adrp x0, 10 0x10178345c <+196>: add x0, x0, #0x6fc ; "seconds" Target 0: (Python) stopped. (lldb) bt * thread #2, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x10) * frame #0: 0x0000000101783454 _datetime.cpython-313-darwin.so`delta_new + 188 frame #1: 0x0000000100704b60 Python`type_call + 96 frame #2: 0x000000010067ba34 Python`_PyObject_MakeTpCall + 120 frame #3: 0x00000001007aae3c Python`_PyEval_EvalFrameDefault + 30236 frame #4: 0x000000010067c900 Python`PyObject_CallOneArg + 112 frame #5: 0x000000010070f0a0 Python`slot_tp_finalize + 116 frame #6: 0x000000010070c3b4 Python`subtype_dealloc + 788 frame #7: 0x00000001006c378c Python`insertdict + 756 frame #8: 0x00000001006db2b0 Python`_PyModule_ClearDict + 660 frame #9: 0x000000010080a9a8 Python`finalize_modules + 1772 frame #10: 0x0000000100809a44 Python`_Py_Finalize + 264 frame #11: 0x0000000100837630 Python`Py_RunMain + 252 frame #12: 0x0000000100837ef8 Python`pymain_main + 304 frame #13: 0x0000000100837f98 Python`Py_BytesMain + 40 frame #14: 0x000000019cfcc274 dyld`start + 2840 (lldb) register read x20 x20 = 0x0000000000000000 (lldb) ``` ### Steps to reproduce the bug Run the script above, and observe the segfault. ### Expected behavior No segfault ### Environment info ``` % pip freeze datasets | grep -i datasets datasets==4.2.0 (venv) 0 ~/bug 14:58:06 % pip freeze tqdm | grep -i tqdm tqdm==4.67.1 (venv) 0 ~/bug 14:58:16 % python --version Python 3.13.7 ```
null
https://api.github.com/repos/huggingface/datasets/issues/7811/timeline
null
null
iankronquist
5,192,353
MDQ6VXNlcjUxOTIzNTM=
https://avatars.githubusercontent.com/u/5192353?v=4
https://api.github.com/users/iankronquist
https://github.com/iankronquist
https://api.github.com/users/iankronquist/followers
https://api.github.com/users/iankronquist/following{/other_user}
https://api.github.com/users/iankronquist/gists{/gist_id}
https://api.github.com/users/iankronquist/starred{/owner}{/repo}
https://api.github.com/users/iankronquist/subscriptions
https://api.github.com/users/iankronquist/orgs
https://api.github.com/users/iankronquist/repos
https://api.github.com/users/iankronquist/events{/privacy}
https://api.github.com/users/iankronquist/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7811/reactions
0
0
0
0
0
0
0
0
0
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[ "The issue seems to come from `dill` which is a `datasets` dependency, e.g. this segfaults:\n\n```python\nimport dill\nfrom tqdm import tqdm\nprogress_bar = tqdm(total=(1000), unit='cols', desc='cols ')\nprogress_bar.update(1)\n```\n\n`tqdm` seems to segfault when `dill` is imported. I only found this about segfault but it's maybe not related https://github.com/tqdm/tqdm/issues/1678 ?", "After more investigation it seems to be because of it imports `__main__`. This segfaults:\n\n```python\nimport __main__\nfrom tqdm import tqdm\nprogress_bar = tqdm(total=(1000), unit='cols', desc='cols ')\nprogress_bar.update(1)\n```\n\nI opened an issue at https://github.com/tqdm/tqdm/issues/1687", "Here is a workaround. You can run your code as long as the progress bar is closed before exiting.\n\n```python\nfrom datasets import load_dataset\nfrom tqdm import tqdm\n\nprogress_bar = tqdm(total=(1000), unit='cols', desc='cols ')\nprogress_bar.update(1)\nprogress_bar.close() # avoids the segfault\n```", "https://github.com/tqdm/tqdm/issues/1687#issuecomment-3392457094" ]
https://api.github.com/repos/huggingface/datasets/issues/7804
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7804/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7804/comments
https://api.github.com/repos/huggingface/datasets/issues/7804/events
https://github.com/huggingface/datasets/issues/7804
3,498,534,596
I_kwDODunzps7Qh2bE
7,804
Support scientific data formats
[]
open
false
null
[]
null
1
1,760
1,760
null
MEMBER
null
null
List of formats and libraries we can use to load the data in `datasets`: - [ ] DICOMs: pydicom - [ ] NIfTIs: nibabel - [ ] WFDB: wfdb cc @zaRizk7 for viz Feel free to comment / suggest other formats and libs you'd like to see or to share your interest in one of the mentioned format
null
https://api.github.com/repos/huggingface/datasets/issues/7804/timeline
null
null
lhoestq
42,851,186
MDQ6VXNlcjQyODUxMTg2
https://avatars.githubusercontent.com/u/42851186?v=4
https://api.github.com/users/lhoestq
https://github.com/lhoestq
https://api.github.com/users/lhoestq/followers
https://api.github.com/users/lhoestq/following{/other_user}
https://api.github.com/users/lhoestq/gists{/gist_id}
https://api.github.com/users/lhoestq/starred{/owner}{/repo}
https://api.github.com/users/lhoestq/subscriptions
https://api.github.com/users/lhoestq/orgs
https://api.github.com/users/lhoestq/repos
https://api.github.com/users/lhoestq/events{/privacy}
https://api.github.com/users/lhoestq/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7804/reactions
6
1
0
0
2
0
3
0
0
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[ "Please add the support for `Zarr`! That's what we use in the Bioimaging community. It is crucial, because raw upload of a *single* bio image can take _terrabytes in memory_!\n\nThe python library would be `bioio` or `zarr`:\n- [ ] Zarr: `bioio` or `zarr`\n\nSee a [Zarr example](https://ome.github.io/ome-ngff-validator/?source=https://uk1s3.embassy.ebi.ac.uk/bia-integrator-data/S-BIAD845/796b9fb8-f4ec-4c4b-bfc3-5cb00ccf19fe/796b9fb8-f4ec-4c4b-bfc3-5cb00ccf19fe.zarr)\n\ncc @joshmoore" ]
https://api.github.com/repos/huggingface/datasets/issues/7802
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7802/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7802/comments
https://api.github.com/repos/huggingface/datasets/issues/7802/events
https://github.com/huggingface/datasets/issues/7802
3,497,454,119
I_kwDODunzps7Qduon
7,802
[Docs] Missing documentation for `Dataset.from_dict`
[]
open
false
null
[]
null
1
1,759
1,760
null
NONE
null
null
Documentation link: https://huggingface.co/docs/datasets/en/package_reference/main_classes Link to method (docstring present): https://github.com/huggingface/datasets/blob/6f2502c5a026caa89839713f6f7c8b958e5e83eb/src/datasets/arrow_dataset.py#L1029 The docstring is present for the function, but seems missing from the official documentation for the `Dataset` class on HuggingFace. The method in question: ```python @classmethod def from_dict( cls, mapping: dict, features: Optional[Features] = None, info: Optional[DatasetInfo] = None, split: Optional[NamedSplit] = None, ) -> "Dataset": """ Convert `dict` to a `pyarrow.Table` to create a [`Dataset`]. Important: a dataset created with from_dict() lives in memory and therefore doesn't have an associated cache directory. This may change in the future, but in the meantime if you want to reduce memory usage you should write it back on disk and reload using e.g. save_to_disk / load_from_disk. Args: mapping (`Mapping`): Mapping of strings to Arrays or Python lists. features ([`Features`], *optional*): Dataset features. info (`DatasetInfo`, *optional*): Dataset information, like description, citation, etc. split (`NamedSplit`, *optional*): Name of the dataset split. Returns: [`Dataset`] """ ```
null
https://api.github.com/repos/huggingface/datasets/issues/7802/timeline
null
null
aaronshenhao
69,421,545
MDQ6VXNlcjY5NDIxNTQ1
https://avatars.githubusercontent.com/u/69421545?v=4
https://api.github.com/users/aaronshenhao
https://github.com/aaronshenhao
https://api.github.com/users/aaronshenhao/followers
https://api.github.com/users/aaronshenhao/following{/other_user}
https://api.github.com/users/aaronshenhao/gists{/gist_id}
https://api.github.com/users/aaronshenhao/starred{/owner}{/repo}
https://api.github.com/users/aaronshenhao/subscriptions
https://api.github.com/users/aaronshenhao/orgs
https://api.github.com/users/aaronshenhao/repos
https://api.github.com/users/aaronshenhao/events{/privacy}
https://api.github.com/users/aaronshenhao/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7802/reactions
0
0
0
0
0
0
0
0
0
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[ "I'd like to work on this documentation issue." ]
https://api.github.com/repos/huggingface/datasets/issues/7798
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7798/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7798/comments
https://api.github.com/repos/huggingface/datasets/issues/7798/events
https://github.com/huggingface/datasets/issues/7798
3,484,470,782
I_kwDODunzps7PsM3-
7,798
Audio dataset is not decoding on 4.1.1
[]
open
false
null
[]
null
3
1,759
1,759
null
NONE
null
null
### Describe the bug The audio column remain as non-decoded objects even when accessing them. ```python dataset = load_dataset("MrDragonFox/Elise", split = "train") dataset[0] # see that it doesn't show 'array' etc... ``` Works fine with `datasets==3.6.0` Followed the docs in - https://huggingface.co/docs/datasets/en/audio_load ### Steps to reproduce the bug ```python dataset = load_dataset("MrDragonFox/Elise", split = "train") dataset[0] # see that it doesn't show 'array' etc... ``` ### Expected behavior It should decode when accessing the elemenet ### Environment info 4.1.1 ubuntu 22.04 Related - https://github.com/huggingface/datasets/issues/7707
null
https://api.github.com/repos/huggingface/datasets/issues/7798/timeline
null
null
thewh1teagle
61,390,950
MDQ6VXNlcjYxMzkwOTUw
https://avatars.githubusercontent.com/u/61390950?v=4
https://api.github.com/users/thewh1teagle
https://github.com/thewh1teagle
https://api.github.com/users/thewh1teagle/followers
https://api.github.com/users/thewh1teagle/following{/other_user}
https://api.github.com/users/thewh1teagle/gists{/gist_id}
https://api.github.com/users/thewh1teagle/starred{/owner}{/repo}
https://api.github.com/users/thewh1teagle/subscriptions
https://api.github.com/users/thewh1teagle/orgs
https://api.github.com/users/thewh1teagle/repos
https://api.github.com/users/thewh1teagle/events{/privacy}
https://api.github.com/users/thewh1teagle/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7798/reactions
0
0
0
0
0
0
0
0
0
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[ "Previously (datasets<=3.6.0), audio columns were decoded automatically when accessing a row. Now, for performance reasons, audio decoding is lazy by default: you just see the file path unless you explicitly cast the column to Audio.\n\nHere’s the fix (following the current [datasets audio docs](https://huggingface.co/docs/datasets/en/audio_load)\n):\n\n```\nfrom datasets import load_dataset, Audio\n\ndataset = load_dataset(\"MrDragonFox/Elise\", split=\"train\")\n\n# Explicitly decode the audio column\ndataset = dataset.cast_column(\"audio\", Audio(sampling_rate=16_000))\n\nprint(dataset[0][\"audio\"])\n# {'path': '...', 'array': array([...], dtype=float32), 'sampling_rate': 16000}\n```", "@haitam03-yo's comment is right that the data is not decoded by default anymore indeed, but here is how it works in practice now:\n\nFrom `datasets` v4, audio data are read as [AudioDecoder](https://meta-pytorch.org/torchcodec/0.4/generated/torchcodec.decoders.AudioDecoder.html) objects from torchcodec. This doesn't decode the data by default, but you can call `audio.get_all_samples()` to decode the audio.\n\nSee the documentation on how to process audio data here: https://huggingface.co/docs/datasets/audio_process", "To resolve this, you need to explicitly cast the audio column to the Audio feature. This will decode the audio data and make it accessible as an array. Here is the corrected code snippet\n\n\nfrom datasets import load_dataset, Audio\n\n# Load your dataset\ndataset = load_dataset(\"MrDragonFox/Elise\", split=\"train\")\n\n# Explicitly cast the 'audio' column to the Audio feature\ndataset = dataset.cast_column(\"audio\", Audio(sampling_rate=16_000))\n\n# Now you can access the decoded audio array\nprint(dataset[0][\"audio\"])\n\nBy adding the cast_column step, you are telling the datasets library to decode the audio data with the specified sampling rate, and you will then be able to access the audio array as you were used to in previous versions." ]
https://api.github.com/repos/huggingface/datasets/issues/7793
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7793/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7793/comments
https://api.github.com/repos/huggingface/datasets/issues/7793/events
https://github.com/huggingface/datasets/issues/7793
3,459,496,971
I_kwDODunzps7OM7wL
7,793
Cannot load dataset, fails with nested data conversions not implemented for chunked array outputs
[]
open
false
null
[]
null
1
1,758
1,759
null
NONE
null
null
### Describe the bug Hi! When I load this dataset, it fails with a pyarrow error. I'm using datasets 4.1.1, though I also see this with datasets 4.1.2 To reproduce: ``` import datasets ds = datasets.load_dataset(path="metr-evals/malt-public", name="irrelevant_detail") ``` Error: ``` Traceback (most recent call last): File "/Users/neev/scratch/.venv/lib/python3.13/site-packages/datasets/builder.py", line 1815, in _prepare_split_single for _, table in generator: ^^^^^^^^^ File "/Users/neev/scratch/.venv/lib/python3.13/site-packages/datasets/packaged_modules/parquet/parquet.py", line 93, in _generate_tables for batch_idx, record_batch in enumerate( ~~~~~~~~~^ parquet_fragment.to_batches( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<5 lines>... ) ^ ): ^ File "pyarrow/_dataset.pyx", line 3904, in _iterator File "pyarrow/_dataset.pyx", line 3494, in pyarrow._dataset.TaggedRecordBatchIterator.__next__ File "pyarrow/error.pxi", line 155, in pyarrow.lib.pyarrow_internal_check_status File "pyarrow/error.pxi", line 92, in pyarrow.lib.check_status pyarrow.lib.ArrowNotImplementedError: Nested data conversions not implemented for chunked array outputs The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/Users/neev/scratch/test_hf.py", line 3, in <module> ds = datasets.load_dataset(path="metr-evals/malt-public", name="irrelevant_detail") File "/Users/neev/scratch/.venv/lib/python3.13/site-packages/datasets/load.py", line 1412, in load_dataset builder_instance.download_and_prepare( ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ download_config=download_config, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<3 lines>... storage_options=storage_options, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) ^ File "/Users/neev/scratch/.venv/lib/python3.13/site-packages/datasets/builder.py", line 894, in download_and_prepare self._download_and_prepare( ~~~~~~~~~~~~~~~~~~~~~~~~~~^ dl_manager=dl_manager, ^^^^^^^^^^^^^^^^^^^^^^ ...<2 lines>... **download_and_prepare_kwargs, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) ^ File "/Users/neev/scratch/.venv/lib/python3.13/site-packages/datasets/builder.py", line 970, in _download_and_prepare self._prepare_split(split_generator, **prepare_split_kwargs) ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/neev/scratch/.venv/lib/python3.13/site-packages/datasets/builder.py", line 1702, in _prepare_split for job_id, done, content in self._prepare_split_single( ~~~~~~~~~~~~~~~~~~~~~~~~~~^ gen_kwargs=gen_kwargs, job_id=job_id, **_prepare_split_args ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ): ^ File "/Users/neev/scratch/.venv/lib/python3.13/site-packages/datasets/builder.py", line 1858, in _prepare_split_single raise DatasetGenerationError("An error occurred while generating the dataset") from e datasets.exceptions.DatasetGenerationError: An error occurred while generating the dataset ``` ### Steps to reproduce the bug To reproduce: ``` import datasets ds = datasets.load_dataset(path="metr-evals/malt-public", name="irrelevant_detail") ``` ### Expected behavior The dataset loads ### Environment info Datasets: 4.1.1 Python: 3.13 Platform: Macos
null
https://api.github.com/repos/huggingface/datasets/issues/7793/timeline
null
null
neevparikh
41,182,432
MDQ6VXNlcjQxMTgyNDMy
https://avatars.githubusercontent.com/u/41182432?v=4
https://api.github.com/users/neevparikh
https://github.com/neevparikh
https://api.github.com/users/neevparikh/followers
https://api.github.com/users/neevparikh/following{/other_user}
https://api.github.com/users/neevparikh/gists{/gist_id}
https://api.github.com/users/neevparikh/starred{/owner}{/repo}
https://api.github.com/users/neevparikh/subscriptions
https://api.github.com/users/neevparikh/orgs
https://api.github.com/users/neevparikh/repos
https://api.github.com/users/neevparikh/events{/privacy}
https://api.github.com/users/neevparikh/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7793/reactions
0
0
0
0
0
0
0
0
0
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[ "Hey @neevparikh,\nThanks for reporting this! I can reproduce the issue and have identified the root cause.\nProblem: The metr-evals/malt-public dataset contains deeply nested conversation data that exceeds PyArrow's 16MB chunk limit. When PyArrow tries to read it in chunks, it hits a fundamental limitation: \"Nested data conversions not implemented for chunked array outputs\".\nRoot Cause: Your dataset has large nested arrays (conversation trees with 4k-87k elements) that get automatically chunked by PyArrow, but the nested data conversion logic can't handle repetition levels across chunk boundaries\n I'm preparing a PR that adds a fallback mechanism to the parquet reader. When this specific error occurs, it will:\n\nDetect the nested data issue\nCombine chunks selectively for problematic columns\nContinue processing normally\n\nThis maintains backward compatibility while fixing the issue for nested datasets like yours.\nWorkaround (if you need immediate access): Try loading with smaller batch sizes:\npythonds = datasets.load_dataset(\"metr-evals/malt-public\", name=\"irrelevant_detail\", \n download_config=datasets.DownloadConfig(\n parquet_batch_size=1000\n ))" ]
https://api.github.com/repos/huggingface/datasets/issues/7792
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7792/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7792/comments
https://api.github.com/repos/huggingface/datasets/issues/7792/events
https://github.com/huggingface/datasets/issues/7792
3,456,802,210
I_kwDODunzps7OCp2i
7,792
Concatenate IterableDataset instances and distribute underlying shards in a RoundRobin manner
[ { "id": 1935892871, "node_id": "MDU6TGFiZWwxOTM1ODkyODcx", "url": "https://api.github.com/repos/huggingface/datasets/labels/enhancement", "name": "enhancement", "color": "a2eeef", "default": true, "description": "New feature or request" } ]
open
false
null
[]
null
16
1,758
1,759
null
NONE
null
null
### Feature request I would like to be able to concatenate multiple `IterableDataset` with possibly different features. I would like to then be able to stream the results in parallel (both using DDP and multiple workers in the pytorch DataLoader). I want the merge of datasets to be well balanced between the different processes. ### Motivation I want to train a model on a combination of datasets, which I can convert to a single representation. This applies to converting different datasets items to the same Python class, as using a tokenizer on multiple modalities. Assuming that my original datasets are not necessarily well balanced as they may have different size and thus different number of shards, I would like the merged dataset to be distributed evenly over the multiple processes. I don't mind if it's not perfectly balanced, and as result, some workers of the torch DataLoader do nothing, as long as the DDP is properly handled causing no deadlock. ### What I've tried I've tried the two functions already provided in datasets, namely `interleave_datasets` and `concatenate_datasets`. - Interleave seems to be the best approach of what I'm trying to do. However, it doesn't suit my purpose because as I understand it, it stops as soon as one of the dataset source is exhausted, or repeat the smallest source items until the largest is exhausted. I would like something in-between, similarly to what [roundrobin does](https://more-itertools.readthedocs.io/en/stable/api.html#more_itertools.roundrobin). - Concatenate does not mix the data enough and one dataset may be overrepresented in some early batches. Let's consider we have 3 datasets composed of different number of shards as follow [[s0_0, s0_1], [s1_0], [s2_0, s2_1, s2_3]], where s denotes the underlying shard, the first index the dataset and the second the shard number. If we request 3 shards in the `shard_data_source` we should obtain the following: index 0 gets s0_0 s2_0 index 1 gets s0_1 s2_1 index 2 gets s1_0 s2_3 I started implementing the following, but I'm afraid my sharding logic is incorrect. ```python from copy import deepcopy from itertools import chain, islice import datasets import numpy as np from datasets import IterableDataset from datasets.iterable_dataset import _BaseExamplesIterable from more_itertools import roundrobin class MixMultiSourcesExampleIterable(_BaseExamplesIterable): def __init__(self, ex_iterables: list[_BaseExamplesIterable]): super().__init__() self.ex_iterables = ex_iterables def _init_state_dict(self) -> dict: self._state_dict = { "ex_iterables": [ex_iterable._init_state_dict() for ex_iterable in self.ex_iterables], "type": self.__class__.__name__, } return self._state_dict @property def num_shards(self) -> int: return sum(ex_iterable.num_shards for ex_iterable in self.ex_iterables) def __iter__(self): yield from roundrobin(*self.ex_iterables) def shuffle_data_sources(self, generator: np.random.Generator) -> "MixMultiSourcesExampleIterable": """Shuffle the list of examples iterable, as well as each underlying examples iterable.""" rng = deepcopy(generator) ex_iterables = list(self.ex_iterables) rng.shuffle(ex_iterables) ex_iterables = [ex_iterable.shuffle_data_sources(generator) for ex_iterable in ex_iterables] return MixMultiSourcesExampleIterable(ex_iterables) def shard_data_sources(self, num_shards: int, index: int, contiguous=True) -> "MixMultiSourceExampleIterable": """Shard the underlying iterables in a roundrobin manner. Let's consider we have our iterables as [[s0_0, s0_1], [s1_0], [s2_0, s2_1, s2_3]], and we request 3 shards. index 0 gets s0_0 s2_0 index 1 gets s0_1 s2_1 index 2 gets s1_0 s2_3 """ return MixMultiSourcesExampleIterable( list( islice( # flatten all underlying iterables chain.from_iterable([ex_iterable.shard_data_sources(1, 0) for ex_iterable in self.ex_iterables]), # offset the starting point by the index index, # take over the full list, so exhaust the iterators None, # step by the number of shards requested num_shards, ) ) ) def mix_dataset(iterable_datasets: list[datasets.IterableDataset]) -> IterableDataset: ex_iterable = MixMultiSourcesExampleIterable([ds._ex_iterable for ds in iterable_datasets]) return IterableDataset( ex_iterable, distributed=iterable_datasets[0]._distributed, formatting=iterable_datasets[0]._formatting ) ``` ### Questions - Am I missing something? Is there a way to use `interleave_datasets` or `concatenate_datasets` to fit my purpose? - Would it be the right approach to spread the maximum number of underlying shards across my different processes? ### Your contribution As much as I can.
null
https://api.github.com/repos/huggingface/datasets/issues/7792/timeline
null
null
LTMeyer
13,559,010
MDQ6VXNlcjEzNTU5MDEw
https://avatars.githubusercontent.com/u/13559010?v=4
https://api.github.com/users/LTMeyer
https://github.com/LTMeyer
https://api.github.com/users/LTMeyer/followers
https://api.github.com/users/LTMeyer/following{/other_user}
https://api.github.com/users/LTMeyer/gists{/gist_id}
https://api.github.com/users/LTMeyer/starred{/owner}{/repo}
https://api.github.com/users/LTMeyer/subscriptions
https://api.github.com/users/LTMeyer/orgs
https://api.github.com/users/LTMeyer/repos
https://api.github.com/users/LTMeyer/events{/privacy}
https://api.github.com/users/LTMeyer/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7792/reactions
0
0
0
0
0
0
0
0
0
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[ "# With `datasets.Dataset`\n\nHere is an small script that shows the distribution differences of samples between `interleave_datasets`, `concatenate_datasets` and `concatenate_datasets` + shuffling.\n\n```python\nimport datasets as hf_datasets\n\ndef gen(dataset: int, n_samples: int):\n for i in range(n_samples):\n yield {\"dataset\": dataset, \"sample\": i}\n\nds_1 = hf_datasets.Dataset.from_generator(gen, gen_kwargs={\"dataset\": 0, \"n_samples\": 2})\nds_2 = hf_datasets.Dataset.from_generator(gen, gen_kwargs={\"dataset\": 1, \"n_samples\": 1})\nds_3 = hf_datasets.Dataset.from_generator(gen, gen_kwargs={\"dataset\": 2, \"n_samples\": 3})\n\nn_workers = 3\nprint(f\"Simulate run with {n_workers} workers\")\n\nprint(\"Interleave datasets\")\nfor w in range(n_workers):\n ds_interleave = hf_datasets.interleave_datasets([ds_1, ds_2, ds_3]).shard(n_workers, w)\n for i, sample in enumerate(ds_interleave):\n print(f\"Worker {w} process sample {i} {sample}\")\n\nprint(\"Concatenate datasets\")\nfor w in range(n_workers):\n ds_concatenate = hf_datasets.concatenate_datasets([ds_1, ds_2, ds_3]).shard(n_workers, w)\n for i, sample in enumerate(ds_concatenate):\n print(f\"Worker {w} process sample {i} {sample}\")\n\nprint(\"Concated and shuffled datasets\")\nfor w in range(n_workers):\n ds_concatenate = hf_datasets.concatenate_datasets([ds_1, ds_2, ds_3]).shuffle().shard(n_workers, w)\n for i, sample in enumerate(ds_concatenate):\n print(f\"Worker {w} process sample {i} {sample}\")\n```\n\n> Interleave datasets\nWorker 0 process sample 0 {'dataset': 0, 'sample': 0}\nWorker 1 process sample 0 {'dataset': 1, 'sample': 0}\nWorker 2 process sample 0 {'dataset': 2, 'sample': 0}\n\n> Concatenate datasets\nWorker 0 process sample 0 {'dataset': 0, 'sample': 0}\nWorker 0 process sample 1 {'dataset': 0, 'sample': 1}\nWorker 1 process sample 0 {'dataset': 1, 'sample': 0}\nWorker 1 process sample 1 {'dataset': 2, 'sample': 0}\nWorker 2 process sample 0 {'dataset': 2, 'sample': 1}\nWorker 2 process sample 1 {'dataset': 2, 'sample': 2}\n\n> Concated and shuffled datasets\nWorker 0 process sample 0 {'dataset': 2, 'sample': 2}\nWorker 0 process sample 1 {'dataset': 2, 'sample': 0}\nWorker 1 process sample 0 {'dataset': 0, 'sample': 1}\nWorker 1 process sample 1 {'dataset': 2, 'sample': 1}\nWorker 2 process sample 0 {'dataset': 2, 'sample': 2}\nWorker 2 process sample 1 {'dataset': 0, 'sample': 0}\n\nWithout shuffling, round robin would yield:\n> Worker 0 process sample 0 {'dataset': 0, 'sample': 0}\nWorker 0 process sample 1 {'dataset': 2, 'sample': 0}\nWorker 1 process sample 0 {'dataset': 0, 'sample': 1}\nWorker 1 process sample 1 {'dataset': 2, 'sample': 1}\nWorker 2 process sample 0 {'dataset': 1, 'sample': 0}\nWorker 2 process sample 1 {'dataset': 2, 'sample': 2}", "# With `datasets.IterableDataset`\n\nThe above works for `Dataset`, but with a sharded `IterableDataset` some data get discarded. See the following results obtained with the script below.\n\n> Simulate run with 3 workers\n\n> Interleave datasets\nWorker 0 process sample 0 {'dataset': 0, 'sample': 0}\nWorker 1 fails with list index out of range.\nWorker 2 fails with list index out of range.\nWith dataloader\nToo many dataloader workers: 3 (max is dataset.num_shards=1). Stopping 2 dataloader workers.\n{'dataset': tensor([0]), 'sample': tensor([0])}\n\n> Concatenate datasets\nWorker 0 process sample 0 {'dataset': 0, 'sample': 0}\nWorker 0 process sample 1 {'dataset': 1, 'sample': 0}\nWorker 0 process sample 2 {'dataset': 2, 'sample': 0}\nWorker 1 fails with list index out of range\nWorker 2 fails with list index out of range\nWith dataloader\nToo many dataloader workers: 3 (max is dataset.num_shards=1). Stopping 2 dataloader workers.\n{'dataset': tensor([0]), 'sample': tensor([0])}\n{'dataset': tensor([1]), 'sample': tensor([0])}\n{'dataset': tensor([2]), 'sample': tensor([0])}\n\n> Concated and shuffled datasets\nWorker 0 process sample 0 {'dataset': 0, 'sample': 0}\nWorker 0 process sample 1 {'dataset': 1, 'sample': 0}\nWorker 0 process sample 2 {'dataset': 2, 'sample': 0}\nWorker 1 fails with list index out of range\nWorker 2 fails with list index out of range\nWith dataloader\nToo many dataloader workers: 3 (max is dataset.num_shards=1). Stopping 2 dataloader workers.\n{'dataset': tensor([0]), 'sample': tensor([0])}\n{'dataset': tensor([1]), 'sample': tensor([0])}\n{'dataset': tensor([2]), 'sample': tensor([0])}\n\n<details>\n\n<summary>Experiment script</summary>\n\n```python\nds_1 = hf_datasets.Dataset.from_generator(gen, gen_kwargs={\"dataset\": 0, \"n_samples\": 2}).to_iterable_dataset(\n num_shards=2\n)\nds_2 = hf_datasets.Dataset.from_generator(gen, gen_kwargs={\"dataset\": 1, \"n_samples\": 1}).to_iterable_dataset(\n num_shards=1\n)\nds_3 = hf_datasets.Dataset.from_generator(gen, gen_kwargs={\"dataset\": 2, \"n_samples\": 3}).to_iterable_dataset(\n num_shards=3\n)\n\nn_workers = 3\nprint(f\"Simulate run with {n_workers} workers\")\n\nprint(\"\\nInterleave datasets\")\nds_interleave = hf_datasets.interleave_datasets([ds_1, ds_2, ds_3])\nfor w in range(n_workers):\n try:\n for i, sample in enumerate(ds_interleave.shard(n_workers, w)):\n print(f\"Worker {w} process sample {i} {sample}\")\n except IndexError as e:\n print(f\"Worker {w} fails with {e}.\")\n\nprint(\"With dataloader\")\nfor sample in torch.utils.data.DataLoader(ds_interleave, num_workers=n_workers):\n print(f\"{sample}\")\n\nprint(\"\\nConcatenate datasets\")\nds_concatenate = hf_datasets.concatenate_datasets([ds_1, ds_2, ds_3])\nfor w in range(n_workers):\n try:\n for i, sample in enumerate(ds_concatenate.shard(n_workers, w)):\n print(f\"Worker {w} process sample {i} {sample}\")\n except IndexError as e:\n print(f\"Worker {w} fails with {e}\")\n\nprint(\"With dataloader\")\nfor sample in torch.utils.data.DataLoader(ds_concatenate, num_workers=n_workers):\n print(f\"{sample}\")\n\nprint(\"\\nConcated and shuffled datasets\")\nds_concatenate = hf_datasets.concatenate_datasets([ds_1, ds_2, ds_3]).shuffle()\nfor w in range(n_workers):\n try:\n for i, sample in enumerate(ds_concatenate.shard(n_workers, w)):\n print(f\"Worker {w} process sample {i} {sample}\")\n except IndexError as e:\n print(f\"Worker {w} fails with {e}\")\n\nprint(\"With dataloader\")\nfor sample in torch.utils.data.DataLoader(ds_concatenate, num_workers=n_workers):\n print(f\"{sample}\")\n```\n\n</details>\n\n# Round Robin with fixed logic\n\n> I started implementing the following, but I'm afraid my sharding logic is incorrect.\n\nHere is a solution for mixing the data in a round robin fashion that allows to distribute the data to all workers. In the previous example above only 1 worker over 3 was actually retrieving data, which resulted in discarding some data.\n\n```python\ndef shard_data_sources(self, num_shards: int, index: int, contiguous=True) -> \"MixMultiSourceExampleIterable\":\n \"\"\"Shard the underlying iterables in a roundrobin manner.\n\n Let's consider we have our iterables as [[s0_0, s0_1], [s1_0], [s2_0, s2_1, s2_3]],\n and we request 3 shards.\n index 0 gets s0_0 s2_0\n index 1 gets s0_1 s2_1\n index 2 gets s1_0 s2_3\n \"\"\"\n return MixMultiSourcesExampleIterable(\n list(\n islice(\n # flatten all underlying iterables (fixed logic)\n [\n ex_iterable.shard_data_sources(ex_iterable.num_shards, index)\n for ex_iterable in self.ex_iterables\n for index in range(ex_iterable.num_shards)\n ],\n # offset the starting point by the index\n index,\n # take over the full list, so exhaust the iterators\n None,\n # step by the number of shards requested\n num_shards,\n )\n )\n )\n```\n\nEditing the example above with the following we obtain the expected result:\n```python\nprint(\"\\nMix datasets\")\nds_mix = mix_dataset([ds_1, ds_2, ds_3])\nfor w in range(n_workers):\n try:\n for i, sample in enumerate(ds_mix.shard(n_workers, w)):\n print(f\"Worker {w} process sample {i} {sample}\")\n except IndexError as e:\n print(f\"Worker {w} fails with {e}\")\n\nprint(\"With dataloader\")\nfor sample in torch.utils.data.DataLoader(ds_mix, num_workers=n_workers):\n print(f\"{sample}\")\n```\n> Mix datasets\nMix datasets\nWorker 0 process sample 0 {'dataset': 0, 'sample': 0}\nWorker 0 process sample 1 {'dataset': 2, 'sample': 0}\nWorker 1 process sample 0 {'dataset': 0, 'sample': 1}\nWorker 1 process sample 1 {'dataset': 2, 'sample': 1}\nWorker 2 process sample 0 {'dataset': 1, 'sample': 0}\nWorker 2 process sample 1 {'dataset': 2, 'sample': 2}\nWith dataloader\n{'dataset': tensor([0]), 'sample': tensor([0])}\n{'dataset': tensor([0]), 'sample': tensor([1])}\n{'dataset': tensor([1]), 'sample': tensor([0])}\n{'dataset': tensor([2]), 'sample': tensor([0])}\n{'dataset': tensor([2]), 'sample': tensor([1])}\n{'dataset': tensor([2]), 'sample': tensor([2])}\n\n# Questions \n\n- The example is quite small, showing that some data get discarded, but on large datasets is this significant?\n- How does the suggested solution interplays with shuffling?\n\n\n\n\n", "# Larger Experiment\n\n> The example is quite small, showing that some data get discarded, but on large datasets is this significant?\n\nContinuing the experiment above, but with 3 larger and unbalanced datasets, with respectively 1000, 150, and 300 samples, and a dataloader with 4 workers:\n \n> Interleave datasets\nWith dataloader\nToo many dataloader workers: 4 (max is dataset.num_shards=1). Stopping 3 dataloader workers.\nYield 300 samples\n\n> Concatenate datasets\nWith dataloader\nToo many dataloader workers: 4 (max is dataset.num_shards=1). Stopping 3 dataloader workers.\nYield 705 samples\n\n> Concated and shuffled datasets\nWith dataloader\nToo many dataloader workers: 4 (max is dataset.num_shards=1). Stopping 3 dataloader workers.\nYield 705 samples\n\n> Mix datasets\nWith dataloader\nYield 1405 samples\n\nThe dataset mixing proposed above is the only one that yields all the samples while using all the dataloaders.\nAdditional checks should include training metrics (does it improve training quality to mix the data like this), and behavior check in a DDP settings, we don't want to face any deadlock due to some GPU having more batches than other. But this later point should be already handled by the iterator of the `IterableDataset`.\n\n# Follow up?\n\n@lhoestq would there be any interest in making a PR of it? Otherwise I can close the issue as I found a solution to my problem. ", "I believe this PR could solve your issue? :)\n\nhttps://github.com/huggingface/datasets/pull/7786", "> I believe this PR could solve your issue? :)\n\nThank you @lhoestq for the reply.\nI have just tested it with the script above. It gives:\n\n> Interleave datasets without replacement\nWith dataloader\nToo many dataloader workers: 4 (max is dataset.num_shards=1). Stopping 3 dataloader workers.\nYield 705 samples\n\nIf we compare with the original `interleave_dataset` method it produces 405 samples more. However, it only uses 1 worker on the 4 available. Moreover it doesn't yield all the samples as the mixing strategy with RoundRobin above does (1405 samples vs 705).", "@LTMeyer With the following script and using the code from #7786 I get all 1450 samples\n\n```\nimport datasets as hf_datasets\n\n\ndef gen(dataset: int, n_samples: int):\n for i in range(n_samples):\n yield {\"dataset\": dataset, \"sample\": i}\n\n\nds_1 = hf_datasets.Dataset.from_generator(gen, gen_kwargs={\"dataset\": 0, \"n_samples\": 1000}).to_iterable_dataset()\nds_2 = hf_datasets.Dataset.from_generator(gen, gen_kwargs={\"dataset\": 1, \"n_samples\": 150}).to_iterable_dataset()\nds_3 = hf_datasets.Dataset.from_generator(gen, gen_kwargs={\"dataset\": 2, \"n_samples\": 300}).to_iterable_dataset()\n\nprint(\"Interleave datasets\")\nds_interleave = hf_datasets.interleave_datasets(\n [ds_1, ds_2, ds_3],\n probabilities=[1 / 3, 1 / 3, 1 / 3],\n stopping_strategy=\"all_exhausted_without_replacement\",\n)\nfor i, sample in enumerate(ds_interleave):\n print(f\"process sample {i} {sample}\")\n```\nI'm not sure on the workers side how many will be spawned and so on. ", "> [@LTMeyer](https://github.com/LTMeyer) With the following script and using the code from [#7786](https://github.com/huggingface/datasets/pull/7786) I get all 1450 samples\n\nThis depends on the number of shards and the number of processes being used.\nIn the example below there is only one shard per dataset (the default of `to_iterable_dataset` method). Then, the for loop is running in the main process. It thus consumes all the shards, hence the 1450 samples.\n\n> \n> ```\n> import datasets as hf_datasets\n> \n> \n> def gen(dataset: int, n_samples: int):\n> for i in range(n_samples):\n> yield {\"dataset\": dataset, \"sample\": i}\n> \n> \n> ds_1 = hf_datasets.Dataset.from_generator(gen, gen_kwargs={\"dataset\": 0, \"n_samples\": 1000}).to_iterable_dataset()\n> ds_2 = hf_datasets.Dataset.from_generator(gen, gen_kwargs={\"dataset\": 1, \"n_samples\": 150}).to_iterable_dataset()\n> ds_3 = hf_datasets.Dataset.from_generator(gen, gen_kwargs={\"dataset\": 2, \"n_samples\": 300}).to_iterable_dataset()\n> \n> print(\"Interleave datasets\")\n> ds_interleave = hf_datasets.interleave_datasets(\n> [ds_1, ds_2, ds_3],\n> probabilities=[1 / 3, 1 / 3, 1 / 3],\n> stopping_strategy=\"all_exhausted_without_replacement\",\n> )\n> for i, sample in enumerate(ds_interleave):\n> print(f\"process sample {i} {sample}\")\n> ```\n> \n\n\n> I'm not sure on the workers side how many will be spawned and so on.\n\nWhile using the data to train a model, I would like to use the `torch.utils.data.DataLoader` to feed batches of data to my model. To make the data loading fast, it is common to use `num_workers>0` in the dataloader. This will consume data in parallel. In practice, it copies the dataset instance and read in parallel different chunks of data. These chunks correspond to the underlying shards of the iterable dataset.\n\nIf we have 1 shard per dataset, as it is the case in the example above, the dataloading will indeed get all the 1450 samples, but it will run only in one process even if multiple are available. This is inefficient because it doesn't utilize all available resources. See the script and results below.\n\n```python\nfor num_workers in [0, 1, 2, 3, 4]:\n print(f\"Dataloader with {num_workers} workers.\")\n dataloader = DataLoader(ds_interleave, num_workers=num_workers, batch_size=1)\n for i, sample in enumerate(dataloader, start=1):\n pass\n print(f\"{i} processed samples\")\n```\n\n```\nDataloader with 0 workers.\n1450 processed samples\nDataloader with 1 workers.\n1450 processed samples\nDataloader with 2 workers.\nToo many dataloader workers: 2 (max is dataset.num_shards=1). Stopping 1 dataloader workers.\n1450 processed samples\nDataloader with 3 workers.\nToo many dataloader workers: 3 (max is dataset.num_shards=1). Stopping 2 dataloader workers.\n1450 processed samples\nDataloader with 4 workers.\nToo many dataloader workers: 4 (max is dataset.num_shards=1). Stopping 3 dataloader workers.\n1450 processed samples\n```\n\nNow if we shard our data differently, like 2, 1, and 3 for each dataset respectively as the [previous example](https://github.com/huggingface/datasets/issues/7792#issuecomment-3345970293), and use a dataloader with different number of workers (same script as above), we obtain:\n\n```\nDataloader with 0 workers.\n1450 processed samples\nDataloader with 1 workers.\n1450 processed samples\nDataloader with 2 workers.\nToo many dataloader workers: 2 (max is dataset.num_shards=1). Stopping 1 dataloader workers.\n850 processed samples\nDataloader with 3 workers.\nToo many dataloader workers: 3 (max is dataset.num_shards=1). Stopping 2 dataloader workers.\n750 processed samples\nDataloader with 4 workers.\nToo many dataloader workers: 4 (max is dataset.num_shards=1). Stopping 3 dataloader workers.\n750 processed samples\n```", "I added a small fix to your PR @radulescupetru to try to make @LTMeyer 's example work :)\n\nCan you confirm it works for you now @LTMeyer ?\n\nNote that maximum parallelism requires each subset to have num_shards >= num_workers, otherwise there aren't enough shards to distribute to every worker for interleaving. In your example one of the subsets has only 1 shard, so only 1 worker can take care of interleaving.", "> Can you confirm it works for you now [@LTMeyer](https://github.com/LTMeyer) ?\n\nResult with https://github.com/huggingface/datasets/pull/7786/commits/a547d81469128bea4acc3bcc2a4a6a95968936ee:\n```\nDataloader with 0 workers.\n1450 processed samples\nDataloader with 1 workers.\n1450 processed samples\nDataloader with 2 workers.\nToo many dataloader workers: 2 (max is dataset.num_shards=1). Stopping 1 dataloader workers.\n1450 processed samples\nDataloader with 3 workers.\nToo many dataloader workers: 3 (max is dataset.num_shards=1). Stopping 2 dataloader workers.\n1450 processed samples\nDataloader with 4 workers.\nToo many dataloader workers: 4 (max is dataset.num_shards=1). Stopping 3 dataloader workers.\n1450 processed samples\n```\n\n I have checked with the script above and I confirm that all samples are now correctly returned, thank you @lhoestq .\n\n> Note that maximum parallelism requires each subset to have num_shards >= num_workers, otherwise there aren't enough shards to distribute to every worker for interleaving. In your example one of the subsets has only 1 shard, so only 1 worker can take care of interleaving.\n\nThis point I'm not sure I understand. That is maybe where @radulescupetru's intent and mine differ. Why should we limit the number of workers to the minimum number of shards? My initial goal was to distribute shards among workers to maximize data loading speed, and to mix the data so batches are representative of the whole dataset and diverse enough (hence the round-robin). \n\nIn the example above, we have 6 shards in total, can we not distribute these shards among workers? That what the `MixMultiSourcesExampleIterable` in https://github.com/huggingface/datasets/issues/7792#issuecomment-3345970293 above does.\n- If 2 workers, 3 shards for each. \n- If 3 workers, 2 shards for each.\n- If 4 workers, the 2 first ones get 2 shards while the two last ones get only 1.\n- Above 6 workers, the 6 first ones get 1 shard each, and the remaining workers get none.\n\n\n", "@LTMeyer I think it's just a design choice that datasets library took. From my interaction with it, it seems that even when concatenating or interleaving, individual components are still treated individually (for example, num_shards is not summed).\n\nI guess in a real scenario you wouldn't end up with 1 shard only, but it's true that you need to be a bit careful with the setup. For workers it's a bit more automated in the sense that if you have more it will stop the extra ones, but when distributing a dataset over multiple gpus it's even more tricky as if the number of shards is not a factor of world size iterating is slower.", "> [@LTMeyer](https://github.com/LTMeyer) I think it's just a design choice that datasets library took. From my interaction with it, it seems that even when concatenating or interleaving, individual components are still treated individually (for example, num_shards is not summed).\n\nIndeed. I am curious to know if there is any explanation for this choice that I am missing.\n\n> I guess in a real scenario you wouldn't end up with 1 shard only, but it's true that you need to be a bit careful with the setup. \n\nIn my case I would like to mix many small datasets which are individually based on only few shards. So it's actually close to the case with 1 shard only.\n\n> For workers it's a bit more automated in the sense that if you have more it will stop the extra ones, but when distributing a dataset over multiple gpus it's even more tricky as if the number of shards is not a factor of world size iterating is slower.\n\nMy understanding is that, in a multi-gpu settings, we want each GPU to receive the same number of batches to avoid deadlock in any synchronization process. \nMulti-GPU related sharding of the `IterableDataset` is managed there https://github.com/huggingface/datasets/blob/4.1.1/src/datasets/iterable_dataset.py#L2371-L2392,\nwhile the sharding for dataloaders with multiple workers is handled there https://github.com/huggingface/datasets/blob/4.1.1/src/datasets/iterable_dataset.py#L2292-L2314.\n\nHere is a script to check the behavior in case of multi-gpus, using `split_dataset_by_node`. In the example I consider just 2 GPUs.\n\n```python\nworld_size = 2\nfor num_workers in [0, 1, 2, 3, 4]:\n for rank in range(world_size):\n print(f\"Rank {rank}\")\n ds_interleave_rank = split_dataset_by_node(ds_interleave, rank, world_size)\n print(f\"Dataloader with {num_workers} workers.\")\n dataloader = DataLoader(ds_interleave_rank, num_workers=num_workers, batch_size=1)\n for i in enumerate(dataloader, start=1):\n pass\n print(f\"{i} processed samples\")\n print(\"\\n\")\n```\n\nThe results using https://github.com/huggingface/datasets/pull/7786/commits/455bfaaa6d574aa9d9c9592baee390017512cc5f:\n```\nRank 0\nDataloader with 0 workers.\n725 processed samples\nRank 1\nDataloader with 0 workers.\n725 processed samples\n\n\nRank 0\nDataloader with 1 workers.\n725 processed samples\nRank 1\nDataloader with 1 workers.\n725 processed samples\n\n\nRank 0\nDataloader with 2 workers.\nToo many dataloader workers: 2 (max is dataset.num_shards=1). Stopping 1 dataloader workers.\n725 processed samples\nRank 1\nDataloader with 2 workers.\n725 processed samples\n\n\nRank 0\nDataloader with 3 workers.\nToo many dataloader workers: 3 (max is dataset.num_shards=1). Stopping 2 dataloader workers.\n725 processed samples\nRank 1\nDataloader with 3 workers.\n725 processed samples\n\n\nRank 0\nDataloader with 4 workers.\nToo many dataloader workers: 4 (max is dataset.num_shards=1). Stopping 3 dataloader workers.\n725 processed samples\nRank 1\nDataloader with 4 workers.\n725 processed samples\n```\n\nIf now I use the mixing described above the results are:\n```\nRank 0\nDataloader with 0 workers.\n750 processed samples\nRank 1\nDataloader with 0 workers.\n700 processed samples\n\n\nRank 0\nDataloader with 1 workers.\n750 processed samples\nRank 1\nDataloader with 1 workers.\n700 processed samples\n\n\nRank 0\nDataloader with 2 workers.\n750 processed samples\nRank 1\nDataloader with 2 workers.\n700 processed samples\n\n\nRank 0\nDataloader with 3 workers.\n750 processed samples\nRank 1\nDataloader with 3 workers.\n700 processed samples\n\n\nRank 0\nDataloader with 4 workers.\n750 processed samples\nRank 1\nDataloader with 4 workers.\n700 processed samples\n```\n\nDifferent GPUs received different number of batches which is problematic. The interleave method, on the other hand, feeds each GPU with the same number of batches. Nonetheless, it doesn't leverage all available workers.\nI'll check if I can fix the distribution of shards across GPU in the last configuration.", "When concatenating or interleaving, the resulting `num_shards` is the *minimum `num_shards` of the input datasets*. This allows each new shard to always contain data from every input dataset. This ensures in every shard the right sampling when interleaving and the right data order when concatenating.\n\nSumming the dataset shards isn't ideal since each shard would contain data from only one of the dataset and would not contain any interleaved/concatenated data.", "Thank you @lhoestq, it makes perfect sense. The part I am missing is that if I concatenate many datasets with small number of shards it will result in a global dataset with not so many shards, thus limiting the use of available workers. Data loading will be consequently inefficient. I was looking for a solution to leverage all parallelism available to maximize data loading speed.\n\nMy original use case was:\nI want to use a dataset stored on the HF hub. It is composed of many subfolders. Each of this subfolder contain only a few shards. I would like to use the dataset but only on a subset of folders, while keeping information about the origin of each sample (i.e. from which subfolder they come from).\nThe first part would possible with the `data_files` argument of `load_dataset` method. However, I would not have the origin information about the sample, as it is not provided in the original dataset. I was thus thinking about considering each subfolder as an independent HF iterable dataset and concatenate them. This method does not work because it drastically reduces the dataloading efficiency due to the low number of shards.\n\n> Summing the dataset shards isn't ideal `since` each shard would contain data from only one of the dataset and would not contain any interleaved/concatenated data.\n\nThis is not necessarily a problem for my use case. It will be the case for the original dataset anyway.", "Also, I notice in the example above that if we modify the number of shards, we get different number of samples per GPU and workers even with the implementation of @radulescupetru. This will cause a deadlock in the DDP. So I guess HF expects all shards to contain the same number of samples. Is that a correct assumption @lhoestq?\n\nSetting the number of shards for the datasets above to 2, 2 and 3. Using the `interleave_datasets` I get the following:\n```\nRank 0\nAssigning 1 shard (or data source) of the dataset to each node.\nDataloader with 0 workers.\nAssigning 1 shard (or data source) of the dataset to each node.\n775 processed samples\nRank 1\nDataloader with 0 workers.\n675 processed samples\n\n\nRank 0\nAssigning 1 shard (or data source) of the dataset to each node.\nDataloader with 1 workers.\nAssigning 1 shard (or data source) of the dataset to each node.\n775 processed samples\nRank 1\nDataloader with 1 workers.\n675 processed samples\n\n\nRank 0\nAssigning 1 shard (or data source) of the dataset to each node.\nDataloader with 2 workers.\nToo many dataloader workers: 2 (max is dataset.num_shards=1). Stopping 1 dataloader workers.\nWARNING:datasets.iterable_dataset:Too many dataloader workers: 2 (max is dataset.num_shards=1). Stopping 1 dataloader workers.\nAssigning 1 shard (or data source) of the dataset to each node.\n775 processed samples\nRank 1\nDataloader with 2 workers.\n675 processed samples\n\n\nRank 0\nAssigning 1 shard (or data source) of the dataset to each node.\nDataloader with 3 workers.\nToo many dataloader workers: 3 (max is dataset.num_shards=1). Stopping 2 dataloader workers.\nWARNING:datasets.iterable_dataset:Too many dataloader workers: 3 (max is dataset.num_shards=1). Stopping 2 dataloader workers.\nAssigning 1 shard (or data source) of the dataset to each node.\n775 processed samples\nRank 1\nDataloader with 3 workers.\n675 processed samples\n\n\nRank 0\nAssigning 1 shard (or data source) of the dataset to each node.\nDataloader with 4 workers.\nToo many dataloader workers: 4 (max is dataset.num_shards=1). Stopping 3 dataloader workers.\nWARNING:datasets.iterable_dataset:Too many dataloader workers: 4 (max is dataset.num_shards=1). Stopping 3 dataloader workers.\nAssigning 1 shard (or data source) of the dataset to each node.\n775 processed samples\nRank 1\nDataloader with 4 workers.\n675 processed samples\n```", "I see @LTMeyer, that makes sense. Do you think we should sum the shards by default for concatenating then ? I feel like your use case is more important than ensuring each worker has data of every subdataset in order.\n\n(I wouldn't touch the interleaving logic though)\n\n> Also, I notice in the example above that if we modify the number of shards, we get different number of samples per GPU and workers even with the implementation of @radulescupetru. This will cause a deadlock in the DDP. So I guess HF expects all shards to contain the same number of samples. Is that a correct assumption @lhoestq?\n\nShards rarely have the same number of samples, so the DDP algorithm itself should be able to stop on its own or have a strategy to circumvent this. For example it can loop until all the nodes have exhausted their data:\n\n```python\ndef loop():\n while True:\n yield from dataloader\n yield \"end\"\n\nfor x in loop():\n if x == \"end\":\n exhausted[rank] = True\n continue\n # stop once the data from all the ranks are exhausted\n dist.all_reduce(exhausted)\n if torch.all(exhausted):\n break\n # do your forward pass + loss here\n # model.forward(...)\n```\n\nI made a full example here: https://github.com/huggingface/datasets/issues/6623#issuecomment-2379458138", "To summarize, and highlight the distinction with https://github.com/huggingface/datasets/pull/7786, there are actually two feature requests:\n1. Similarly to `interleave_datasets`, we want to interleave the longest dataset without repetition. This is handled by https://github.com/huggingface/datasets/pull/7786, and is consistant with the rest of the HF features (i.e. `concatenate_datasets` and `interleave_datasets`);\n2. We want to be able to _fuse_ datasets and distribute their shards across workers to maximize data loading speed.\n\n > I feel like your use case is more important than ensuring each worker has data of every subdataset in order.\n\nIndeed my use case, pointed as 2. above is first about maximizing data loading speed and second about mixing the data. The order of priority seems to be the opposite in 1.\n\n> Do you think we should sum the shards by default for concatenating then?\n\nI think the library should at least provide a method for this. Users can then decide what matters the most for their use case (data order or dataloading speed). What do you think?\n\n> Shards rarely have the same number of samples, so the DDP algorithm itself should be able to stop on its own or have a strategy to circumvent this.\n\nIf imbalanced data stream in a DDP context is not the responsibility of the datasets library, it is, for me, a reason more to provides a fuse or mix dataset method that sum the shards.\n\n> I made a full example here: https://github.com/huggingface/datasets/issues/6623#issuecomment-2379458138 \n\nThank you for the example. Pytorch now provides also utilities to handle this problematic case, see [Join context manager in DDP](https://docs.pytorch.org/tutorials/advanced/generic_join.html#:%7E:text=The%20context%20manager%20allows%20the,shadowed%20are%20specified%20by%20hooks)" ]
https://api.github.com/repos/huggingface/datasets/issues/7788
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7788/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7788/comments
https://api.github.com/repos/huggingface/datasets/issues/7788/events
https://github.com/huggingface/datasets/issues/7788
3,450,913,796
I_kwDODunzps7NsMQE
7,788
`Dataset.to_sql` doesn't utilize `num_proc`
[]
open
false
null
[]
null
0
1,758
1,758
null
NONE
null
null
The underlying `SqlDatasetWriter` has `num_proc` as an available argument [here](https://github.com/huggingface/datasets/blob/5dc1a179783dff868b0547c8486268cfaea1ea1f/src/datasets/io/sql.py#L63) , but `Dataset.to_sql()` does not accept it, therefore it is always using one process for the SQL conversion.
null
https://api.github.com/repos/huggingface/datasets/issues/7788/timeline
null
null
tcsmaster
30,357,072
MDQ6VXNlcjMwMzU3MDcy
https://avatars.githubusercontent.com/u/30357072?v=4
https://api.github.com/users/tcsmaster
https://github.com/tcsmaster
https://api.github.com/users/tcsmaster/followers
https://api.github.com/users/tcsmaster/following{/other_user}
https://api.github.com/users/tcsmaster/gists{/gist_id}
https://api.github.com/users/tcsmaster/starred{/owner}{/repo}
https://api.github.com/users/tcsmaster/subscriptions
https://api.github.com/users/tcsmaster/orgs
https://api.github.com/users/tcsmaster/repos
https://api.github.com/users/tcsmaster/events{/privacy}
https://api.github.com/users/tcsmaster/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7788/reactions
0
0
0
0
0
0
0
0
0
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[]
https://api.github.com/repos/huggingface/datasets/issues/7780
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7780/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7780/comments
https://api.github.com/repos/huggingface/datasets/issues/7780/events
https://github.com/huggingface/datasets/issues/7780
3,429,267,259
I_kwDODunzps7MZnc7
7,780
BIGPATENT dataset inaccessible (deprecated script loader)
[]
closed
false
null
[]
null
2
1,758
1,758
1,758
NONE
null
null
dataset: https://huggingface.co/datasets/NortheasternUniversity/big_patent When I try to load it with the datasets library, it fails with: RuntimeError: Dataset scripts are no longer supported, but found big_patent.py Could you please publish a Parquet/Arrow export of BIGPATENT on the Hugging Face so that it can be accessed with datasets>=4.x.
null
https://api.github.com/repos/huggingface/datasets/issues/7780/timeline
null
completed
ishmaifan
137,755,081
U_kgDOCDX5yQ
https://avatars.githubusercontent.com/u/137755081?v=4
https://api.github.com/users/ishmaifan
https://github.com/ishmaifan
https://api.github.com/users/ishmaifan/followers
https://api.github.com/users/ishmaifan/following{/other_user}
https://api.github.com/users/ishmaifan/gists{/gist_id}
https://api.github.com/users/ishmaifan/starred{/owner}{/repo}
https://api.github.com/users/ishmaifan/subscriptions
https://api.github.com/users/ishmaifan/orgs
https://api.github.com/users/ishmaifan/repos
https://api.github.com/users/ishmaifan/events{/privacy}
https://api.github.com/users/ishmaifan/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7780/reactions
0
0
0
0
0
0
0
0
0
null
null
null
null
null
null
lhoestq
42,851,186
MDQ6VXNlcjQyODUxMTg2
https://avatars.githubusercontent.com/u/42851186?v=4
https://api.github.com/users/lhoestq
https://github.com/lhoestq
https://api.github.com/users/lhoestq/followers
https://api.github.com/users/lhoestq/following{/other_user}
https://api.github.com/users/lhoestq/gists{/gist_id}
https://api.github.com/users/lhoestq/starred{/owner}{/repo}
https://api.github.com/users/lhoestq/subscriptions
https://api.github.com/users/lhoestq/orgs
https://api.github.com/users/lhoestq/repos
https://api.github.com/users/lhoestq/events{/privacy}
https://api.github.com/users/lhoestq/received_events
User
public
false
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[ "Hi ! I opened https://huggingface.co/datasets/NortheasternUniversity/big_patent/discussions/7 to update the dataset, hopefully it's merged soon !", "The dataset now works with `datasets` v4 ! closing this issue" ]
https://api.github.com/repos/huggingface/datasets/issues/7777
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7777/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7777/comments
https://api.github.com/repos/huggingface/datasets/issues/7777/events
https://github.com/huggingface/datasets/issues/7777
3,424,462,082
I_kwDODunzps7MHSUC
7,777
push_to_hub not overwriting but stuck in a loop when there are existing commits
[]
closed
false
null
[]
null
4
1,758
1,758
1,758
NONE
null
null
### Describe the bug `get_deletions_and_dataset_card` stuck at error a commit has happened error since push to hub for http error 412 for tag 4.1.0. The error does not exists in 4.0.0. ### Steps to reproduce the bug Create code to use push_to_hub, ran twice each time with different content for datasets.Dataset. The code will stuck in time.sleep loop for `get_deletions_and_dataset_card`. If error is explicitly printed, the error is HTTP 412. ### Expected behavior New datasets overwrite existing one on repo. ### Environment info datasets 4.1.0
null
https://api.github.com/repos/huggingface/datasets/issues/7777/timeline
null
completed
Darejkal
55,143,337
MDQ6VXNlcjU1MTQzMzM3
https://avatars.githubusercontent.com/u/55143337?v=4
https://api.github.com/users/Darejkal
https://github.com/Darejkal
https://api.github.com/users/Darejkal/followers
https://api.github.com/users/Darejkal/following{/other_user}
https://api.github.com/users/Darejkal/gists{/gist_id}
https://api.github.com/users/Darejkal/starred{/owner}{/repo}
https://api.github.com/users/Darejkal/subscriptions
https://api.github.com/users/Darejkal/orgs
https://api.github.com/users/Darejkal/repos
https://api.github.com/users/Darejkal/events{/privacy}
https://api.github.com/users/Darejkal/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7777/reactions
0
0
0
0
0
0
0
0
0
null
null
null
null
null
null
Darejkal
55,143,337
MDQ6VXNlcjU1MTQzMzM3
https://avatars.githubusercontent.com/u/55143337?v=4
https://api.github.com/users/Darejkal
https://github.com/Darejkal
https://api.github.com/users/Darejkal/followers
https://api.github.com/users/Darejkal/following{/other_user}
https://api.github.com/users/Darejkal/gists{/gist_id}
https://api.github.com/users/Darejkal/starred{/owner}{/repo}
https://api.github.com/users/Darejkal/subscriptions
https://api.github.com/users/Darejkal/orgs
https://api.github.com/users/Darejkal/repos
https://api.github.com/users/Darejkal/events{/privacy}
https://api.github.com/users/Darejkal/received_events
User
public
false
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[ "HTTP 412 means a commit happened in the meantime, so `get_deletions_and_dataset_card` has to retry to get the latest version of the dataset card and what files to delete based on the latest version of the dataset repository\n\nAre you running other operations in the dataset repo for your push_to_hub ?", "There was only a map() followed by a push_to_hub(). The repo had one prior commit also by using push_to_hub(). The error disappeared when I downgraded datasets to 4.0.0.", "It is reproducible if you use finegrained token with Read+Write (Open pull request) access to only that repo.", "Ah it was due to the use of requests_cache with POST methods, closing this. " ]
https://api.github.com/repos/huggingface/datasets/issues/7772
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7772/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7772/comments
https://api.github.com/repos/huggingface/datasets/issues/7772/events
https://github.com/huggingface/datasets/issues/7772
3,417,353,751
I_kwDODunzps7LsK4X
7,772
Error processing scalar columns using tensorflow.
[]
open
false
null
[]
null
2
1,757
1,758
null
NONE
null
null
`datasets==4.0.0` ``` columns_to_return = ['input_ids','attention_mask', 'start_positions', 'end_positions'] train_ds.set_format(type='tf', columns=columns_to_return) ``` `train_ds`: ``` train_ds type: <class 'datasets.arrow_dataset.Dataset'>, shape: (1000, 9) columns: ['question', 'sentences', 'answer', 'str_idx', 'end_idx', 'input_ids', 'attention_mask', 'start_positions', 'end_positions'] features:{'question': Value('string'), 'sentences': Value('string'), 'answer': Value('string'), 'str_idx': Value('int64'), 'end_idx': Value('int64'), 'input_ids': List(Value('int32')), 'attention_mask': List(Value('int8')), 'start_positions': Value('int64'), 'end_positions': Value('int64')} ``` `train_ds_tensor = train_ds['start_positions'].to_tensor(shape=(-1,1))` hits the following error: ``` AttributeError: 'Column' object has no attribute 'to_tensor' ``` `tf.reshape(train_ds['start_positions'], shape=[-1,1])` hits the following error: ``` TypeError: Scalar tensor has no `len()` ```
null
https://api.github.com/repos/huggingface/datasets/issues/7772/timeline
null
null
khteh
3,871,483
MDQ6VXNlcjM4NzE0ODM=
https://avatars.githubusercontent.com/u/3871483?v=4
https://api.github.com/users/khteh
https://github.com/khteh
https://api.github.com/users/khteh/followers
https://api.github.com/users/khteh/following{/other_user}
https://api.github.com/users/khteh/gists{/gist_id}
https://api.github.com/users/khteh/starred{/owner}{/repo}
https://api.github.com/users/khteh/subscriptions
https://api.github.com/users/khteh/orgs
https://api.github.com/users/khteh/repos
https://api.github.com/users/khteh/events{/privacy}
https://api.github.com/users/khteh/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7772/reactions
0
0
0
0
0
0
0
0
0
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[ "Using tf.convert_to_tensor works fine:\n\n```\nimport tensorflow as tf\n\nstart_pos = tf.convert_to_tensor(train_ds['start_positions'], dtype=tf.int64)\nstart_pos = tf.reshape(start_pos, [-1, 1])\n```\n\n\nAlternatively, using the built-in to_tf_dataset also avoids the issue:\n\n```\ntrain_tf = train_ds.to_tf_dataset(\n columns=['input_ids','attention_mask'],\n label_cols=['start_positions','end_positions'],\n shuffle=True,\n batch_size=32\n)\n```", "```\n start_pos = tf.convert_to_tensor(self._train_ds['start_positions'], dtype=tf.int64)\n File \"/home/khteh/.local/share/virtualenvs/pAIthon-GaqEDHQT/lib/python3.13/site-packages/tensorflow/python/util/traceback_utils.py\", line 153, in error_handler\n raise e.with_traceback(filtered_tb) from None\n File \"/home/khteh/.local/share/virtualenvs/pAIthon-GaqEDHQT/lib/python3.13/site-packages/tensorflow/python/framework/constant_op.py\", line 108, in convert_to_eager_tensor\n return ops.EagerTensor(value, ctx.device_name, dtype)\n ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nValueError: TypeError: Scalar tensor has no `len()`\nTraceback (most recent call last):\n\n File \"/home/khteh/.local/share/virtualenvs/pAIthon-GaqEDHQT/lib/python3.13/site-packages/tensorflow/python/framework/ops.py\", line 361, in __len__\n raise TypeError(\"Scalar tensor has no `len()`\")\n\nTypeError: Scalar tensor has no `len()`\n```\n\n`to_tf_dataset` works perfectly." ]
https://api.github.com/repos/huggingface/datasets/issues/7767
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7767/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7767/comments
https://api.github.com/repos/huggingface/datasets/issues/7767/events
https://github.com/huggingface/datasets/issues/7767
3,411,654,444
I_kwDODunzps7LWbcs
7,767
Custom `dl_manager` in `load_dataset`
[ { "id": 1935892871, "node_id": "MDU6TGFiZWwxOTM1ODkyODcx", "url": "https://api.github.com/repos/huggingface/datasets/labels/enhancement", "name": "enhancement", "color": "a2eeef", "default": true, "description": "New feature or request" } ]
open
false
null
[]
null
0
1,757
1,757
null
NONE
null
null
### Feature request https://github.com/huggingface/datasets/blob/4.0.0/src/datasets/load.py#L1411-L1418 ``` def load_dataset( ... dl_manager: Optional[DownloadManager] = None, # add this new argument **config_kwargs, ) -> Union[DatasetDict, Dataset, IterableDatasetDict, IterableDataset]: ... # Create a dataset builder builder_instance = load_dataset_builder( path=path, name=name, data_dir=data_dir, data_files=data_files, cache_dir=cache_dir, features=features, download_config=download_config, download_mode=download_mode, revision=revision, token=token, storage_options=storage_options, **config_kwargs, ) # Return iterable dataset in case of streaming if streaming: return builder_instance.as_streaming_dataset(split=split) # Note: This is the revised part if dl_manager is None: if download_config is None: download_config = DownloadConfig( cache_dir=builder_instance._cache_downloaded_dir, force_download=download_mode == DownloadMode.FORCE_REDOWNLOAD, force_extract=download_mode == DownloadMode.FORCE_REDOWNLOAD, use_etag=False, num_proc=num_proc, token=builder_instance.token, storage_options=builder_instance.storage_options, ) # We don't use etag for data files to speed up the process dl_manager = DownloadManager( dataset_name=builder_instance.dataset_name, download_config=download_config, data_dir=builder_instance.config.data_dir, record_checksums=( builder_instance._record_infos or verification_mode == VerificationMode.ALL_CHECKS ), ) # Download and prepare data builder_instance.download_and_prepare( download_config=download_config, download_mode=download_mode, verification_mode=verification_mode, dl_manager=dl_manager, # pass the new argument num_proc=num_proc, storage_options=storage_options, ) ... ``` ### Motivation In my case, I'm hoping to deal with the cache files downloading manually (not using hash filenames and save to another location, or using potential existing local files). ### Your contribution It's already implemented above. If maintainers think this should be considered, I'll open a PR.
null
https://api.github.com/repos/huggingface/datasets/issues/7767/timeline
null
null
ain-soph
13,214,530
MDQ6VXNlcjEzMjE0NTMw
https://avatars.githubusercontent.com/u/13214530?v=4
https://api.github.com/users/ain-soph
https://github.com/ain-soph
https://api.github.com/users/ain-soph/followers
https://api.github.com/users/ain-soph/following{/other_user}
https://api.github.com/users/ain-soph/gists{/gist_id}
https://api.github.com/users/ain-soph/starred{/owner}{/repo}
https://api.github.com/users/ain-soph/subscriptions
https://api.github.com/users/ain-soph/orgs
https://api.github.com/users/ain-soph/repos
https://api.github.com/users/ain-soph/events{/privacy}
https://api.github.com/users/ain-soph/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7767/reactions
0
0
0
0
0
0
0
0
0
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[]
https://api.github.com/repos/huggingface/datasets/issues/7766
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7766/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7766/comments
https://api.github.com/repos/huggingface/datasets/issues/7766/events
https://github.com/huggingface/datasets/issues/7766
3,411,611,165
I_kwDODunzps7LWQ4d
7,766
cast columns to Image/Audio/Video with `storage_options`
[ { "id": 1935892871, "node_id": "MDU6TGFiZWwxOTM1ODkyODcx", "url": "https://api.github.com/repos/huggingface/datasets/labels/enhancement", "name": "enhancement", "color": "a2eeef", "default": true, "description": "New feature or request" } ]
open
false
null
[]
null
5
1,757
1,758
null
NONE
null
null
### Feature request Allow `storage_options` to be passed in 1. `cast` related operations (e.g., `cast_columns, cast`) 2. `info` related reading (e.g., `from_dict, from_pandas, from_polars`) together with `info.features` ```python3 import datasets image_path = "s3://bucket/sample.png" dataset = datasets.Dataset.from_dict({"image_path": [image_path]}) # dataset = dataset.cast_column("image_path", datasets.Image()) # now works without `storage_options` # expected behavior dataset = dataset.cast_column("image_path", datasets.Image(), storage_options={"anon": True}) ``` ### Motivation I'm using my own registered fsspec filesystem (s3 with customized local cache support). I need to pass cache folder paths `cache_dirs: list[str]` to the filesystem when I read the remote images (cast from file_paths). ### Your contribution Could help with a PR at weekends
null
https://api.github.com/repos/huggingface/datasets/issues/7766/timeline
null
null
ain-soph
13,214,530
MDQ6VXNlcjEzMjE0NTMw
https://avatars.githubusercontent.com/u/13214530?v=4
https://api.github.com/users/ain-soph
https://github.com/ain-soph
https://api.github.com/users/ain-soph/followers
https://api.github.com/users/ain-soph/following{/other_user}
https://api.github.com/users/ain-soph/gists{/gist_id}
https://api.github.com/users/ain-soph/starred{/owner}{/repo}
https://api.github.com/users/ain-soph/subscriptions
https://api.github.com/users/ain-soph/orgs
https://api.github.com/users/ain-soph/repos
https://api.github.com/users/ain-soph/events{/privacy}
https://api.github.com/users/ain-soph/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7766/reactions
0
0
0
0
0
0
0
0
0
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[ "A", "1", "1", "Ok", "> ### Feature request\n> Allow `storage_options` to be passed in\n> \n> 1. `cast` related operations (e.g., `cast_columns, cast`)\n> 2. `info` related reading (e.g., `from_dict, from_pandas, from_polars`) together with `info.features`\n> \n> import datasets\n> \n> image_path = \"s3://bucket/sample.png\"\n> dataset = datasets.Dataset.from_dict({\"image_path\": [image_path]})\n> \n> # dataset = dataset.cast_column(\"image_path\", datasets.Image()) # now works without `storage_options`\n> \n> # expected behavior\n> dataset = dataset.cast_column(\"image_path\", datasets.Image(), storage_options={\"anon\": True})\n> ### Motivation\n> I'm using my own registered fsspec filesystem (s3 with customized local cache support). I need to pass cache folder paths `cache_dirs: list[str]` to the filesystem when I read the remote images (cast from file_paths).\n> \n> ### Your contribution\n> Could help with a PR at weekends\n\n\n\n>" ]
https://api.github.com/repos/huggingface/datasets/issues/7765
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7765/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7765/comments
https://api.github.com/repos/huggingface/datasets/issues/7765/events
https://github.com/huggingface/datasets/issues/7765
3,411,556,378
I_kwDODunzps7LWDga
7,765
polars dataset cannot cast column to Image/Audio/Video
[]
closed
false
null
[]
null
2
1,757
1,760
1,760
NONE
null
null
### Describe the bug `from_polars` dataset cannot cast column to Image/Audio/Video, while it works on `from_pandas` and `from_dict` ### Steps to reproduce the bug ```python3 import datasets import pandas as pd import polars as pl image_path = "./sample.png" # polars df = pl.DataFrame({"image_path": [image_path]}) dataset = datasets.Dataset.from_polars(df) dataset = dataset.cast_column("image_path", datasets.Image()) # # raises Error pyarrow.lib.ArrowNotImplementedError: Unsupported cast from large_string to struct using function cast_struct # pandas df = pd.DataFrame({"image_path": [image_path]}) dataset = datasets.Dataset.from_pandas(df) dataset = dataset.cast_column("image_path", datasets.Image()) # # pass {'image_path': <PIL.PngImagePlugin.PngImageFile image mode=RGB size=338x277 at 0x7FBA719D4050>} # dict dataset = datasets.Dataset.from_dict({"image_path": [image_path]}) dataset = dataset.cast_column("image_path", datasets.Image()) # # pass {'image_path': <PIL.PngImagePlugin.PngImageFile image mode=RGB size=338x277 at 0x7FBA719D4050>} ``` ### Expected behavior `from_polars` case shouldn't raise error and have the same outputs as `from_pandas` and `from_dict` ### Environment info ``` # Name Version Build Channel datasets 4.0.0 pypi_0 pypi pandas 2.3.1 pypi_0 pypi polars 1.32.3 pypi_0 pypi ```
null
https://api.github.com/repos/huggingface/datasets/issues/7765/timeline
null
completed
ain-soph
13,214,530
MDQ6VXNlcjEzMjE0NTMw
https://avatars.githubusercontent.com/u/13214530?v=4
https://api.github.com/users/ain-soph
https://github.com/ain-soph
https://api.github.com/users/ain-soph/followers
https://api.github.com/users/ain-soph/following{/other_user}
https://api.github.com/users/ain-soph/gists{/gist_id}
https://api.github.com/users/ain-soph/starred{/owner}{/repo}
https://api.github.com/users/ain-soph/subscriptions
https://api.github.com/users/ain-soph/orgs
https://api.github.com/users/ain-soph/repos
https://api.github.com/users/ain-soph/events{/privacy}
https://api.github.com/users/ain-soph/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7765/reactions
1
1
0
0
0
0
0
0
0
null
null
null
null
null
null
lhoestq
42,851,186
MDQ6VXNlcjQyODUxMTg2
https://avatars.githubusercontent.com/u/42851186?v=4
https://api.github.com/users/lhoestq
https://github.com/lhoestq
https://api.github.com/users/lhoestq/followers
https://api.github.com/users/lhoestq/following{/other_user}
https://api.github.com/users/lhoestq/gists{/gist_id}
https://api.github.com/users/lhoestq/starred{/owner}{/repo}
https://api.github.com/users/lhoestq/subscriptions
https://api.github.com/users/lhoestq/orgs
https://api.github.com/users/lhoestq/repos
https://api.github.com/users/lhoestq/events{/privacy}
https://api.github.com/users/lhoestq/received_events
User
public
false
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[ "I fixed this with a combination of `to_dict` and `from_dict`:\n\n```py\ndatasets.Dataset.from_dict(df.to_dict(as_series=False))\n```", "@samuelstevens Yeah, I'm using similar workaround as well. But it would be ideal if we can avoid the copy." ]
https://api.github.com/repos/huggingface/datasets/issues/7760
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7760/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7760/comments
https://api.github.com/repos/huggingface/datasets/issues/7760/events
https://github.com/huggingface/datasets/issues/7760
3,401,799,485
I_kwDODunzps7Kw1c9
7,760
Hugging Face Hub Dataset Upload CAS Error
[]
open
false
null
[]
null
4
1,757
1,758
null
NONE
null
null
### Describe the bug Experiencing persistent 401 Unauthorized errors when attempting to upload datasets to Hugging Face Hub using the `datasets` library. The error occurs specifically with the CAS (Content Addressable Storage) service during the upload process. Tried using HF_HUB_DISABLE_XET=1. It seems to work for smaller files. Exact error message : ``` Processing Files (0 / 0) : | | 0.00B / 0.00B 2025-09-10T09:44:35.657565Z ERROR Fatal Error: "cas::upload_xorb" api call failed (request id 01b[...]XXX): HTTP status client error (401 Unauthorized) for url (https://cas-server.xethub.hf.co/xorb/default/7f3abdc[...]XXX) at /home/runner/work/xet-core/xet-core/cas_client/src/retry_wrapper.rs:113 Processing Files (0 / 0) : 0%| | 0.00B / 184kB, 0.00B/s New Data Upload : 0%| | 0.00B / 184kB, 0.00B/s ❌ Failed to push some_dataset: Data processing error: CAS service error : Reqwest Error: HTTP status client error (401 Unauthorized), domain: https://cas-server.xethub.hf.co/xorb/default/7f3abdc[...]XXX ``` Workaround Attempts 1. **Disabled XET**: Set `HF_HUB_DISABLE_XET=1` environment variable 2. **Updated hf-xet**: Use `hf-xet==1.1.9` rather than latest 3. **Verified Authentication**: Confirmed HF token is valid and has write permissions 4. **Tested with Smaller Datasets**: - 100 samples: ✅ **SUCCESS** (uploaded successfully) - 10,000 samples: ❌ **FAILS** (401 Unauthorized) ### Steps to reproduce the bug ```python from datasets import Dataset, DatasetDict # Create dataset (example with 10,000 samples) dataset = Dataset.from_dict({ "question": questions, "answer": answers, # ... other fields }) # Split into train/test dataset_dict = dataset.train_test_split(test_size=0.1) # Upload to Hub dataset_dict.push_to_hub("Org/some-dataset") ``` ### Expected behavior ## Expected Behavior - Dataset should upload successfully to Hugging Face Hub - Progress bars should complete without authentication errors - Dataset should be accessible at the specified repository URL ## Actual Behavior - Upload fails consistently with 401 Unauthorized error - Error occurs specifically during CAS service interaction - No progress is made on the upload (0% completion) - Dataset is created on Hugging Face Hub with no data folder ### Environment info - **Platform**: SageMaker (AWS) - **Python Version**: 3.12 - **Libraries**: - `datasets` library (latest version) - `hf-xet==1.1.9` (attempted fix) - **Authentication**: Hugging Face token configured - **Dataset Size**: ~10,000 samples, works for smaller sizes (e.g. 100)
null
https://api.github.com/repos/huggingface/datasets/issues/7760/timeline
null
null
n-bkoe
142,820,182
U_kgDOCINDVg
https://avatars.githubusercontent.com/u/142820182?v=4
https://api.github.com/users/n-bkoe
https://github.com/n-bkoe
https://api.github.com/users/n-bkoe/followers
https://api.github.com/users/n-bkoe/following{/other_user}
https://api.github.com/users/n-bkoe/gists{/gist_id}
https://api.github.com/users/n-bkoe/starred{/owner}{/repo}
https://api.github.com/users/n-bkoe/subscriptions
https://api.github.com/users/n-bkoe/orgs
https://api.github.com/users/n-bkoe/repos
https://api.github.com/users/n-bkoe/events{/privacy}
https://api.github.com/users/n-bkoe/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7760/reactions
0
0
0
0
0
0
0
0
0
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[ "cc @jsulz maybe ?", "Curious! I took a look at this and was unable to see why this would be occurring on our side. Tagging in @jgodlew and @bpronan since they might have insights. \n\n@n-bkoe just a few questions if you wouldn't mind: \n1. What kind of data are you uploading and what is the difference in file size (in bytes) between 100 and 10,000 samples?\n2. Could you provide a specific repository where you encountered this so we could look at to attempt to trace this in our systems?\n3. I cannot currently reproduce this, but I'm just trying locally; have you tried to attempt this outside of SageMaker? I'm wondering if there is something unique about that environment causing this. \n4. How/where did you set `HF_HUB_DISABLE_XET`?", "Hi, and thank you for your quick answer 🙏 \n\n1. Its fairly simple string data, four cols, all string, some long. The script works for data up to 8000 samples long, which is two parquet files totalling 260 kb. It breaks at 10k. \n2. Unfortunately, both data and code is private for now !\n3. I will try \n4. I did it both at CLI level when call my script, and tried inside the python script with os.environ[\"HF_HUB_DISABLE_XET\"] = \"1\"\n\nThe load is also partial, it starts for one file, but does not complete and no data file is pushed. \n\n```\n5. Pushing to Hugging Face Hub...\nPushing dataset to YourOrg/dataset-10000-test_set...\nCreating parquet from Arrow format: 100%|███████████████████████████████████████████████████████████████████████████████████████| 9/9 [00:00<00:00, 1235.07ba/s]\nProcessing Files (0 / 0) : | | 0.00B / 0.00B 2025-09-11T15:14:37.018887Z ERROR Fatal Error: \"cas::upload_xorb\" api call failed (request id 01K4WNFGSQV1FH8846S0DNS91C): HTTP status client error (401 Unauthorized) for url (https://cas-server.xethub.hf.co/xorb/default/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX)\n at /home/runner/work/xet-core/xet-core/cas_client/src/retry_wrapper.rs:113\n\nProcessing Files (0 / 0) : 0%| | 0.00B / 291kB, 0.00B/s \nNew Data Upload : 0%| | 0.00B / 291kB, 0.00B/s \n❌ Failed to push test_set: Data processing error: CAS service error : Reqwest Error: HTTP status client error (401 Unauthorized), domain: https://cas-server.xethub.hf.co/xorb/default/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\nUploading the dataset shards: 0%| | 0/1 [00:00<?, ? shards/s]\nPushing dataset to YourOrg/dataset-10000-indic_test_set...\nCreating parquet from Arrow format: 100%|███████████████████████████████████████████████████████████████████████████████████████| 9/9 [00:00<00:00, 1289.10ba/s]\nProcessing Files (0 / 0) : | | 0.00B / 0.00B 2025-09-11T15:14:37.721996Z ERROR Fatal Error: \"cas::upload_xorb\" api call failed (request id 01K4WNFHFPJ2DC5D6JC93172H9): HTTP status client error (401 Unauthorized) for url (https://cas-server.xethub.hf.co/xorb/default/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX)\n at /home/runner/work/xet-core/xet-core/cas_client/src/retry_wrapper.rs:113\n\nProcessing Files (0 / 0) : 0%| | 0.00B / 277kB, 0.00B/s \nNew Data Upload : 0%| | 0.00B / 277kB, 0.00B/s \n❌ Failed to push indic_test_set: Data processing error: CAS service error : Reqwest Error: HTTP status client error (401 Unauthorized), domain: https://cas-server.xethub.hf.co/xorb/default/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\nUploading the dataset shards: 0%| | 0/1 [00:00<?, ? shards/s]\nPushing dataset to YourOrg/dataset-10000-indic_test_set_combined...\nCreating parquet from Arrow format: 100%|███████████████████████████████████████████████████████████████████████████████████████| 6/6 [00:00<00:00, 1310.04ba/s]\nProcessing Files (0 / 0) : | | 0.00B / 0.00B 2025-09-11T15:14:38.685575Z ERROR Fatal Error: \"cas::upload_xorb\" api call failed (request id 01K4WNFJDTVAYM9MFTRDSWKTD6): HTTP status client error (401 Unauthorized) for url (https://cas-server.xethub.hf.co/xorb/default/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX)\n at /home/runner/work/xet-core/xet-core/cas_client/src/retry_wrapper.rs:113\n\nProcessing Files (0 / 0) : 0%| | 0.00B / 184kB, 0.00B/s \nNew Data Upload : 0%| | 0.00B / 184kB, 0.00B/s \n❌ Failed to push indic_test_set_combined: Data processing error: CAS service error : Reqwest Error: HTTP status client error (401 Unauthorized), domain: https://cas-server.xethub.hf.co/xorb/default/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\nUploading the dataset shards: 0%| | 0/1 [00:00<?, ? shards/s]\n\nSummary:\n Succeeded: None\n Failed: [('test_set', 'Data processing error: CAS service error : Reqwest Error: HTTP status client error (401 Unauthorized), domain: https://cas-server.xethub.hf.co/xorb/default/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'), ('indic_test_set', 'Data processing error: CAS service error : Reqwest Error: HTTP status client error (401 Unauthorized), domain: https://cas-server.xethub.hf.co/xorb/default/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'), ('indic_test_set_combined', 'Data processing error: CAS service error : Reqwest Error: HTTP status client error (401 Unauthorized), domain: https://cas-server.xethub.hf.co/xorb/default/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')]\n❌ Some datasets failed to upload\n```\n\n", "Thanks for following up with more details, @n-bkoe \n\nCould you tell me more about your Sagemaker environment and how you are running this script? In testing with your steps to reproduce in a Sagemaker Jupyter notebook instance (and uploading Parquet datasets with splits of anywhere from a few KBs to a few hundred MBs), I've yet to reproduce this error. This makes me believe that it's either something about the Sagemaker environment or the reproduction steps that I'm not yet emulating. \n\nConcerning the `HF_HUB_DISABLE_XET` flag, you should ensure it is set before any package imports and in the same process where you are running the script itself. If either aren't true, then this environment variable will not work. You could also explicitly uninstall `hf-xet` from the environment, although that should be unnecessary with the `HF_HUB_DISABLE_XET` flag." ]
https://api.github.com/repos/huggingface/datasets/issues/7759
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7759/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7759/comments
https://api.github.com/repos/huggingface/datasets/issues/7759/events
https://github.com/huggingface/datasets/issues/7759
3,398,099,513
I_kwDODunzps7KiuI5
7,759
Comment/feature request: Huggingface 502s from GHA
[]
open
false
null
[]
null
0
1,757
1,757
null
NONE
null
null
This is no longer a pressing issue, but for completeness I am reporting that in August 26th, GET requests to `https://datasets-server.huggingface.co/info\?dataset\=livebench/math` were returning 502s when invoked from [github actions](https://github.com/UKGovernmentBEIS/inspect_evals/actions/runs/17241892475/job/48921123754) (that link will expire eventually, [here are the logs](https://github.com/user-attachments/files/22233578/logs_44225296943.zip)). When invoked from actions, it appeared to be consistently failing for ~6 hours. However, these 502s never occurred when the request was invoked from my local machine in that same time period. I suspect that this is related to how the requests are routed with github actions versus locally. Its not clear to me if the request even reached huggingface servers or if its the github proxy that stopped it from going through, but I wanted to report it nonetheless in case this is helpful information. I'm curious if huggingface can do anything on their end to confirm cause. And a feature request for if this happens in the future (assuming huggingface has visibilty on it): A "datasets status" page highlighting if 502s occur for specific individual datasets could be useful for people debugging on the other end of this!
null
https://api.github.com/repos/huggingface/datasets/issues/7759/timeline
null
null
Scott-Simmons
52,365,471
MDQ6VXNlcjUyMzY1NDcx
https://avatars.githubusercontent.com/u/52365471?v=4
https://api.github.com/users/Scott-Simmons
https://github.com/Scott-Simmons
https://api.github.com/users/Scott-Simmons/followers
https://api.github.com/users/Scott-Simmons/following{/other_user}
https://api.github.com/users/Scott-Simmons/gists{/gist_id}
https://api.github.com/users/Scott-Simmons/starred{/owner}{/repo}
https://api.github.com/users/Scott-Simmons/subscriptions
https://api.github.com/users/Scott-Simmons/orgs
https://api.github.com/users/Scott-Simmons/repos
https://api.github.com/users/Scott-Simmons/events{/privacy}
https://api.github.com/users/Scott-Simmons/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7759/reactions
0
0
0
0
0
0
0
0
0
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[]
https://api.github.com/repos/huggingface/datasets/issues/7758
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7758/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7758/comments
https://api.github.com/repos/huggingface/datasets/issues/7758/events
https://github.com/huggingface/datasets/issues/7758
3,395,590,783
I_kwDODunzps7KZJp_
7,758
Option for Anonymous Dataset link
[ { "id": 1935892871, "node_id": "MDU6TGFiZWwxOTM1ODkyODcx", "url": "https://api.github.com/repos/huggingface/datasets/labels/enhancement", "name": "enhancement", "color": "a2eeef", "default": true, "description": "New feature or request" } ]
open
false
null
[]
null
0
1,757
1,757
null
NONE
null
null
### Feature request Allow for anonymized viewing of datasets. For instance, something similar to [Anonymous GitHub](https://anonymous.4open.science/). ### Motivation We generally publish our data through Hugging Face. This has worked out very well as it's both our repository and archive (thanks to the DOI feature!). However, we have an increasing challenge when it comes to sharing our datasets for paper (both conference and journal) submissions. Due to the need to share data anonymously, we can't use the Hugging Face URLs, but datasets tend to be too large for inclusion as a zip. Being able to have an anonymous link would be great since we can't be double-publishing the data. ### Your contribution Sorry, I don't have a contribution to make to the implementation of this. Perhaps it would be possible to work off the [Anonymous GitHub](https://github.com/tdurieux/anonymous_github) code to generate something analogous with pointers to the data still on Hugging Face's servers (instead of the duplication of data required for the GitHub version)?
null
https://api.github.com/repos/huggingface/datasets/issues/7758/timeline
null
null
egrace479
38,985,481
MDQ6VXNlcjM4OTg1NDgx
https://avatars.githubusercontent.com/u/38985481?v=4
https://api.github.com/users/egrace479
https://github.com/egrace479
https://api.github.com/users/egrace479/followers
https://api.github.com/users/egrace479/following{/other_user}
https://api.github.com/users/egrace479/gists{/gist_id}
https://api.github.com/users/egrace479/starred{/owner}{/repo}
https://api.github.com/users/egrace479/subscriptions
https://api.github.com/users/egrace479/orgs
https://api.github.com/users/egrace479/repos
https://api.github.com/users/egrace479/events{/privacy}
https://api.github.com/users/egrace479/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7758/reactions
1
1
0
0
0
0
0
0
0
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[]
https://api.github.com/repos/huggingface/datasets/issues/7757
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7757/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7757/comments
https://api.github.com/repos/huggingface/datasets/issues/7757/events
https://github.com/huggingface/datasets/issues/7757
3,389,535,011
I_kwDODunzps7KCDMj
7,757
Add support for `.conll` file format in datasets
[ { "id": 1935892871, "node_id": "MDU6TGFiZWwxOTM1ODkyODcx", "url": "https://api.github.com/repos/huggingface/datasets/labels/enhancement", "name": "enhancement", "color": "a2eeef", "default": true, "description": "New feature or request" } ]
open
false
null
[]
null
1
1,757
1,757
null
NONE
null
null
### Feature request I’d like to request native support in the Hugging Face datasets library for reading .conll files (CoNLL format). This format is widely used in NLP tasks, especially for Named Entity Recognition (NER), POS tagging, and other token classification problems. Right now `.conll` datasets need to be manually parsed or preprocessed before being loaded into datasets. Having built in support would save time and make workflows smoother for researchers and practitioners. I propose - Add a conll dataset builder or file parser to datasets that can: - Read `.conll` files with customizable delimiters (space, tab). - Handle sentence/document boundaries (typically indicated by empty lines). - Support common CoNLL variants (e.g., CoNLL-2000 chunking, CoNLL-2003 NER). - Output a dataset where each example contains: - tokens: list of strings - tags (or similar): list of labels aligned with tokens Given a .conll snippet like: ``` EU NNP B-ORG rejects VBZ O German JJ B-MISC call NN O . . O ``` The dataset should load as: ``` { "tokens": ["EU", "rejects", "German", "call", "."], "tags": ["B-ORG", "O", "B-MISC", "O", "O"] } ``` ### Motivation - CoNLL files are a standard benchmark format in NLP (e.g., CoNLL-2003, CoNLL-2000). - Many users train NER or sequence labeling models (like BERT for token classification) directly on `.conll` - Right now you have to write your own parsing scripts. Built in support would unify this process and would be much more convenient ### Your contribution I’d be happy to contribute by implementing this feature. My plan is to- - Add a new dataset script (conll.py) to handle .conll files. - Implement parsing logic that supports sentence/document boundaries and token-label alignment. - Write unit tests with small `.conll` examples to ensure correctness. - Add documentation and usage examples so new users can easily load `.conll` datasets. This would be my first open source contribution, so I’ll follow the `CONTRIBUTING.md` guidelines closely and adjust based on feedback from the maintainers.
null
https://api.github.com/repos/huggingface/datasets/issues/7757/timeline
null
null
namesarnav
88,763,593
MDQ6VXNlcjg4NzYzNTkz
https://avatars.githubusercontent.com/u/88763593?v=4
https://api.github.com/users/namesarnav
https://github.com/namesarnav
https://api.github.com/users/namesarnav/followers
https://api.github.com/users/namesarnav/following{/other_user}
https://api.github.com/users/namesarnav/gists{/gist_id}
https://api.github.com/users/namesarnav/starred{/owner}{/repo}
https://api.github.com/users/namesarnav/subscriptions
https://api.github.com/users/namesarnav/orgs
https://api.github.com/users/namesarnav/repos
https://api.github.com/users/namesarnav/events{/privacy}
https://api.github.com/users/namesarnav/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7757/reactions
0
0
0
0
0
0
0
0
0
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[ "That would be cool ! feel free to ping me if I can help reviewing a PR" ]
https://api.github.com/repos/huggingface/datasets/issues/7756
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7756/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7756/comments
https://api.github.com/repos/huggingface/datasets/issues/7756/events
https://github.com/huggingface/datasets/issues/7756
3,387,076,693
I_kwDODunzps7J4rBV
7,756
datasets.map(f, num_proc=N) hangs with N>1 when run on import
[]
open
false
null
[]
null
0
1,757
1,757
null
NONE
null
null
### Describe the bug If you `import` a module that runs `datasets.map(f, num_proc=N)` at the top-level, Python hangs. ### Steps to reproduce the bug 1. Create a file that runs datasets.map at the top-level: ```bash cat <<EOF > import_me.py import datasets the_dataset = datasets.load_dataset("openai/openai_humaneval") the_dataset = the_dataset.map(lambda item: item, num_proc=2) EOF ``` 2. Start Python REPL: ```bash uv run --python 3.12.3 --with "datasets==4.0.0" python3 Python 3.12.3 (main, Aug 14 2025, 17:47:21) [GCC 13.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. ``` 3. Import the file: ```python import import_me ```` Observe hang. ### Expected behavior Ideally would not hang, or would fallback to num_proc=1 with a warning. ### Environment info - `datasets` version: 4.0.0 - Platform: Linux-6.14.0-29-generic-x86_64-with-glibc2.39 - Python version: 3.12.3 - `huggingface_hub` version: 0.34.4 - PyArrow version: 21.0.0 - Pandas version: 2.3.2 - `fsspec` version: 2025.3.0
null
https://api.github.com/repos/huggingface/datasets/issues/7756/timeline
null
null
arjunguha
20,065
MDQ6VXNlcjIwMDY1
https://avatars.githubusercontent.com/u/20065?v=4
https://api.github.com/users/arjunguha
https://github.com/arjunguha
https://api.github.com/users/arjunguha/followers
https://api.github.com/users/arjunguha/following{/other_user}
https://api.github.com/users/arjunguha/gists{/gist_id}
https://api.github.com/users/arjunguha/starred{/owner}{/repo}
https://api.github.com/users/arjunguha/subscriptions
https://api.github.com/users/arjunguha/orgs
https://api.github.com/users/arjunguha/repos
https://api.github.com/users/arjunguha/events{/privacy}
https://api.github.com/users/arjunguha/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7756/reactions
0
0
0
0
0
0
0
0
0
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[]
https://api.github.com/repos/huggingface/datasets/issues/7753
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7753/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7753/comments
https://api.github.com/repos/huggingface/datasets/issues/7753/events
https://github.com/huggingface/datasets/issues/7753
3,381,831,487
I_kwDODunzps7Jkqc_
7,753
datasets massively slows data reads, even in memory
[]
open
false
null
[]
null
2
1,756
1,758
null
NONE
null
null
### Describe the bug Loading image data in a huggingface dataset results in very slow read speeds, approximately 1000 times longer than reading the same data from a pytorch dataset. This applies even when the dataset is loaded into RAM using a `keep_in_memory=True` flag. The following script reproduces the result with random data, but it applies equally to datasets that are loaded from the hub. ### Steps to reproduce the bug The following script should reproduce the behavior ``` import torch import time from datasets import Dataset images = torch.randint(0, 255, (1000, 3, 224, 224), dtype=torch.uint8) labels = torch.randint(0, 200, (1000,), dtype=torch.uint8) pt_dataset = torch.utils.data.TensorDataset(images, labels) hf_dataset = Dataset.from_dict({'image': images, 'label':labels}) hf_dataset.set_format('torch', dtype=torch.uint8) hf_in_memory = hf_dataset.map(lambda x: x, keep_in_memory=True) # measure access speeds def time_access(dataset, img_col): start_time = time.time() for i in range(1000): _ = dataset[i][img_col].shape end_time = time.time() return end_time - start_time print(f"In-memory Tensor access: {time_access(pt_dataset, 0):.4f} seconds") print(f"HF Dataset access: {time_access(hf_dataset, 'image'):.4f} seconds") print(f"In-memory HF Dataset access: {time_access(hf_in_memory, 'image'):.4f} seconds") ``` ### Expected behavior For me, the above script produces ``` In-memory Tensor access: 0.0025 seconds HF Dataset access: 2.9317 seconds In-memory HF Dataset access: 2.8082 seconds ``` I think that this difference is larger than expected. ### Environment info - `datasets` version: 4.0.0 - Platform: macOS-14.7.7-arm64-arm-64bit - Python version: 3.12.11 - `huggingface_hub` version: 0.34.3 - PyArrow version: 18.0.0 - Pandas version: 2.2.3 - `fsspec` version: 2024.9.0
null
https://api.github.com/repos/huggingface/datasets/issues/7753/timeline
null
null
lrast
1,191,040
MDQ6VXNlcjExOTEwNDA=
https://avatars.githubusercontent.com/u/1191040?v=4
https://api.github.com/users/lrast
https://github.com/lrast
https://api.github.com/users/lrast/followers
https://api.github.com/users/lrast/following{/other_user}
https://api.github.com/users/lrast/gists{/gist_id}
https://api.github.com/users/lrast/starred{/owner}{/repo}
https://api.github.com/users/lrast/subscriptions
https://api.github.com/users/lrast/orgs
https://api.github.com/users/lrast/repos
https://api.github.com/users/lrast/events{/privacy}
https://api.github.com/users/lrast/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7753/reactions
0
0
0
0
0
0
0
0
0
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[ "Hi ! you should try\n\n```python\nfrom datasets import Array3D, Dataset, Features, Value\n\nfeatures = Features({\"image\": Array3D(shape=(3, 224, 224), dtype=\"uint8\"), \"label\": Value(\"uint8\")})\nhf_dataset = Dataset.from_dict({'image': images, 'label':labels}, features=features)\n```\n\notherwise the type of the \"image\" column is List(List(List(Value(\"uint8\")))) and is less efficient.", "Thanks! This leads to a 10x speedup:\n```python\nimport torch\nimport time\nfrom datasets import Array3D, Dataset, Features, Value\n\nimages = torch.randint(0, 255, (1000, 3, 224, 224), dtype=torch.uint8)\nlabels = torch.randint(0, 200, (1000,), dtype=torch.uint8)\n\npt_dataset = torch.utils.data.TensorDataset(images, labels)\n\nfeatures = Features({\"image\": Array3D(shape=(3, 224, 224), dtype=\"uint8\"), \"label\": Value(\"uint8\")})\nhf_dataset = Dataset.from_dict({'image': images, 'label':labels}, features=features)\nhf_in_memory = hf_dataset.map(lambda x: x, keep_in_memory=True)\n\nhf_dataset.set_format('torch', dtype=torch.uint8)\nhf_in_memory.set_format('torch', dtype=torch.uint8)\n\n# measure access speeds\ndef time_access(dataset, img_col):\n start_time = time.time()\n for i in range(1000):\n _ = dataset[i][img_col].shape\n end_time = time.time()\n return end_time - start_time\n\n\nprint(f\"In-memory Tensor access: {time_access(pt_dataset, 0):.4f} seconds\")\nprint(f\"HF Dataset access: {time_access(hf_dataset, 'image'):.4f} seconds\")\nprint(f\"In-memory HF Dataset access: {time_access(hf_in_memory, 'image'):.4f} seconds\")\n```\nProduces\n```\nIn-memory Tensor access: 0.0026 seconds\nHF Dataset access: 0.2070 seconds\nIn-memory HF Dataset access: 0.2112 seconds\n```\n\nCurious if there is a reason why this is not the default behavior for huggingface image processors?\n```python\nfrom transformers import ViTImageProcessor\nfrom transformers import AutoImageProcessor\n\nfrom datasets import load_dataset\n# Load the dataset\nds = load_dataset('ylecun/mnist', split='train[0:100]')\n\n# Instantiate the processor, explicitly requesting NumPy arrays\nprocessor1 = ViTImageProcessor.from_pretrained('facebook/vit-mae-base', do_convert_rgb=True)\nprocessor2 = AutoImageProcessor.from_pretrained(\"facebook/detr-resnet-50\", use_fast=True)\n\nprocessed1 = ds.map(lambda row: processor1(row['image']))\nprocessed2 = ds.map(lambda row: processor2(row['image']))\n\nprint( type(processed1['pixel_values'][0]), type(processed1['pixel_values'][0]))\n```\nproduces\n```\n<class 'list'> <class 'list'>\n```\n\nI can, of course, manually manipulate the dataset to the use the correct format, but this is fairly standard for images, and the performance implications seem large." ]
https://api.github.com/repos/huggingface/datasets/issues/7751
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7751/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7751/comments
https://api.github.com/repos/huggingface/datasets/issues/7751/events
https://github.com/huggingface/datasets/issues/7751
3,358,369,976
I_kwDODunzps7ILKi4
7,751
Dill version update
[]
open
false
null
[]
null
2
1,756
1,757
null
NONE
null
null
### Describe the bug Why the datasets is not updating the dill ? Just want to know if I update the dill version in dill what will be the repucssion. For now in multiplaces I have to update the library like process requirequire dill 0.4.0 so why not datasets. Adding a pr too. ### Steps to reproduce the bug . ### Expected behavior . ### Environment info .
null
https://api.github.com/repos/huggingface/datasets/issues/7751/timeline
null
null
Navanit-git
98,005,188
U_kgDOBddwxA
https://avatars.githubusercontent.com/u/98005188?v=4
https://api.github.com/users/Navanit-git
https://github.com/Navanit-git
https://api.github.com/users/Navanit-git/followers
https://api.github.com/users/Navanit-git/following{/other_user}
https://api.github.com/users/Navanit-git/gists{/gist_id}
https://api.github.com/users/Navanit-git/starred{/owner}{/repo}
https://api.github.com/users/Navanit-git/subscriptions
https://api.github.com/users/Navanit-git/orgs
https://api.github.com/users/Navanit-git/repos
https://api.github.com/users/Navanit-git/events{/privacy}
https://api.github.com/users/Navanit-git/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7751/reactions
0
0
0
0
0
0
0
0
0
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[ "#7752 ", "related: #7510 " ]
https://api.github.com/repos/huggingface/datasets/issues/7746
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7746/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7746/comments
https://api.github.com/repos/huggingface/datasets/issues/7746/events
https://github.com/huggingface/datasets/issues/7746
3,345,391,211
I_kwDODunzps7HZp5r
7,746
Fix: Canonical 'multi_news' dataset is broken and should be updated to a Parquet version
[]
open
false
null
[]
null
1
1,755
1,756
null
NONE
null
null
Hi, The canonical `multi_news` dataset is currently broken and fails to load. This is because it points to the [alexfabri/multi_news](https://huggingface.co/datasets/alexfabbri/multi_news) repository, which contains a legacy loading script (`multi_news.py`) that requires the now-removed `trust_remote_code` parameter. The original maintainer's GitHub and Hugging Face repositories appear to be inactive, so a community-led fix is needed. I have created a working fix by converting the dataset to the modern Parquet format, which does not require a loading script. The fixed version is available here and loads correctly: **[Awesome075/multi_news_parquet](https://huggingface.co/datasets/Awesome075/multi_news_parquet)** Could the maintainers please guide me or themselves update the official `multi_news` dataset to use this working Parquet version? This would involve updating the canonical pointer for "multi_news" to resolve to the new repository. This action would fix the dataset for all users and ensure its continued availability. Thank you!
null
https://api.github.com/repos/huggingface/datasets/issues/7746/timeline
null
null
Awesome075
187,888,489
U_kgDOCzLzaQ
https://avatars.githubusercontent.com/u/187888489?v=4
https://api.github.com/users/Awesome075
https://github.com/Awesome075
https://api.github.com/users/Awesome075/followers
https://api.github.com/users/Awesome075/following{/other_user}
https://api.github.com/users/Awesome075/gists{/gist_id}
https://api.github.com/users/Awesome075/starred{/owner}{/repo}
https://api.github.com/users/Awesome075/subscriptions
https://api.github.com/users/Awesome075/orgs
https://api.github.com/users/Awesome075/repos
https://api.github.com/users/Awesome075/events{/privacy}
https://api.github.com/users/Awesome075/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7746/reactions
0
0
0
0
0
0
0
0
0
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[ "@sayakpaul @a-r-r-o-w could you verify this issue then i can contribute to solve this issue!😊" ]
https://api.github.com/repos/huggingface/datasets/issues/7745
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7745/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7745/comments
https://api.github.com/repos/huggingface/datasets/issues/7745/events
https://github.com/huggingface/datasets/issues/7745
3,345,286,773
I_kwDODunzps7HZQZ1
7,745
Audio mono argument no longer supported, despite class documentation
[]
open
false
null
[]
null
1
1,755
1,756
null
NONE
null
null
### Describe the bug Either update the documentation, or re-introduce the flag (and corresponding logic to convert the audio to mono) ### Steps to reproduce the bug Audio(sampling_rate=16000, mono=True) raises the error TypeError: Audio.__init__() got an unexpected keyword argument 'mono' However, in the class documentation, is says: Args: sampling_rate (`int`, *optional*): Target sampling rate. If `None`, the native sampling rate is used. mono (`bool`, defaults to `True`): Whether to convert the audio signal to mono by averaging samples across channels. [...] ### Expected behavior The above call should either work, or the documentation within the Audio class should be updated ### Environment info - `datasets` version: 4.0.0 - Platform: Linux-5.15.0-124-generic-x86_64-with-glibc2.35 - Python version: 3.12.11 - `huggingface_hub` version: 0.34.4 - PyArrow version: 21.0.0 - Pandas version: 2.3.2 - `fsspec` version: 2025.3.0
null
https://api.github.com/repos/huggingface/datasets/issues/7745/timeline
null
null
jheitz
5,666,041
MDQ6VXNlcjU2NjYwNDE=
https://avatars.githubusercontent.com/u/5666041?v=4
https://api.github.com/users/jheitz
https://github.com/jheitz
https://api.github.com/users/jheitz/followers
https://api.github.com/users/jheitz/following{/other_user}
https://api.github.com/users/jheitz/gists{/gist_id}
https://api.github.com/users/jheitz/starred{/owner}{/repo}
https://api.github.com/users/jheitz/subscriptions
https://api.github.com/users/jheitz/orgs
https://api.github.com/users/jheitz/repos
https://api.github.com/users/jheitz/events{/privacy}
https://api.github.com/users/jheitz/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7745/reactions
0
0
0
0
0
0
0
0
0
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[ "I want to solve this problem can you please assign it to me\nand also can you please guide whether the mono parameter is required to be re-added or the documentation needs an update?" ]
https://api.github.com/repos/huggingface/datasets/issues/7744
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7744/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7744/comments
https://api.github.com/repos/huggingface/datasets/issues/7744/events
https://github.com/huggingface/datasets/issues/7744
3,343,510,686
I_kwDODunzps7HSeye
7,744
dtype: ClassLabel is not parsed correctly in `features.py`
[]
closed
false
null
[]
null
3
1,755
1,757
1,757
NONE
null
null
`dtype: ClassLabel` in the README.md yaml metadata is parsed incorrectly and causes the data viewer to fail. This yaml in my metadata ([source](https://huggingface.co/datasets/BrentLab/yeast_genome_resources/blob/main/README.md), though i changed `ClassLabel` to `string` to using different dtype in order to avoid the error): ```yaml license: mit pretty_name: BrentLab Yeast Genome Resources size_categories: - 1K<n<10K language: - en dataset_info: features: - name: start dtype: int32 description: Start coordinate (1-based, **inclusive**) - name: end dtype: int32 description: End coordinate (1-based, **inclusive**) - name: strand dtype: ClassLabel ... ``` is producing the following error in the data viewer: ``` Error code: ConfigNamesError Exception: ValueError Message: Feature type 'Classlabel' not found. Available feature types: ['Value', 'ClassLabel', 'Translation', 'TranslationVariableLanguages', 'LargeList', 'List', 'Array2D', 'Array3D', 'Array4D', 'Array5D', 'Audio', 'Image', 'Video', 'Pdf'] Traceback: Traceback (most recent call last): File "/src/services/worker/src/worker/job_runners/dataset/config_names.py", line 66, in compute_config_names_response config_names = get_dataset_config_names( File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/inspect.py", line 161, in get_dataset_config_names dataset_module = dataset_module_factory( File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py", line 1031, in dataset_module_factory raise e1 from None File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py", line 996, in dataset_module_factory return HubDatasetModuleFactory( File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py", line 605, in get_module dataset_infos = DatasetInfosDict.from_dataset_card_data(dataset_card_data) File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/info.py", line 386, in from_dataset_card_data dataset_info = DatasetInfo._from_yaml_dict(dataset_card_data["dataset_info"]) File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/info.py", line 317, in _from_yaml_dict yaml_data["features"] = Features._from_yaml_list(yaml_data["features"]) File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/features/features.py", line 2027, in _from_yaml_list return cls.from_dict(from_yaml_inner(yaml_data)) File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/features/features.py", line 1872, in from_dict obj = generate_from_dict(dic) File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/features/features.py", line 1459, in generate_from_dict return {key: generate_from_dict(value) for key, value in obj.items()} File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/features/features.py", line 1459, in <dictcomp> return {key: generate_from_dict(value) for key, value in obj.items()} File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/features/features.py", line 1465, in generate_from_dict raise ValueError(f"Feature type '{_type}' not found. Available feature types: {list(_FEATURE_TYPES.keys())}") ValueError: Feature type 'Classlabel' not found. Available feature types: ['Value', 'ClassLabel', 'Translation', 'TranslationVariableLanguages', 'LargeList', 'List', 'Array2D', 'Array3D', 'Array4D', 'Array5D', 'Audio', 'Image', 'Video', 'Pdf'] ``` I think that this is caused by this line https://github.com/huggingface/datasets/blob/896616c6cb03d92a33248c3529b0796cda27e955/src/datasets/features/features.py#L2013 Reproducible example from [naming.py](https://github.com/huggingface/datasets/blob/896616c6cb03d92a33248c3529b0796cda27e955/src/datasets/naming.py) ```python import itertools import os import re _uppercase_uppercase_re = re.compile(r"([A-Z]+)([A-Z][a-z])") _lowercase_uppercase_re = re.compile(r"([a-z\d])([A-Z])") _single_underscore_re = re.compile(r"(?<!_)_(?!_)") _multiple_underscores_re = re.compile(r"(_{2,})") _split_re = r"^\w+(\.\w+)*$" def snakecase_to_camelcase(name): """Convert snake-case string to camel-case string.""" name = _single_underscore_re.split(name) name = [_multiple_underscores_re.split(n) for n in name] return "".join(n.capitalize() for n in itertools.chain.from_iterable(name) if n != "") snakecase_to_camelcase("ClassLabel") ``` Result: ```raw 'Classlabel' ```
null
https://api.github.com/repos/huggingface/datasets/issues/7744/timeline
null
completed
cmatKhan
43,553,003
MDQ6VXNlcjQzNTUzMDAz
https://avatars.githubusercontent.com/u/43553003?v=4
https://api.github.com/users/cmatKhan
https://github.com/cmatKhan
https://api.github.com/users/cmatKhan/followers
https://api.github.com/users/cmatKhan/following{/other_user}
https://api.github.com/users/cmatKhan/gists{/gist_id}
https://api.github.com/users/cmatKhan/starred{/owner}{/repo}
https://api.github.com/users/cmatKhan/subscriptions
https://api.github.com/users/cmatKhan/orgs
https://api.github.com/users/cmatKhan/repos
https://api.github.com/users/cmatKhan/events{/privacy}
https://api.github.com/users/cmatKhan/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7744/reactions
0
0
0
0
0
0
0
0
0
null
null
null
null
null
null
cmatKhan
43,553,003
MDQ6VXNlcjQzNTUzMDAz
https://avatars.githubusercontent.com/u/43553003?v=4
https://api.github.com/users/cmatKhan
https://github.com/cmatKhan
https://api.github.com/users/cmatKhan/followers
https://api.github.com/users/cmatKhan/following{/other_user}
https://api.github.com/users/cmatKhan/gists{/gist_id}
https://api.github.com/users/cmatKhan/starred{/owner}{/repo}
https://api.github.com/users/cmatKhan/subscriptions
https://api.github.com/users/cmatKhan/orgs
https://api.github.com/users/cmatKhan/repos
https://api.github.com/users/cmatKhan/events{/privacy}
https://api.github.com/users/cmatKhan/received_events
User
public
false
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[ "I think it's \"class_label\"", "> I think it's \"class_label\"\n\nI see -- thank you. This works\n\n```yaml\nlicense: mit\nlanguage:\n- en\ntags:\n- genomics\n- yeast\n- transcription\n- perturbation\n- response\n- overexpression\npretty_name: Hackett, 2020 Overexpression\nsize_categories:\n- 1M<n<10M\ndataset_info:\n features:\n ...\n - name: mechanism\n dtype:\n class_label:\n names: [\"GEV\", \"ZEV\"]\n description: induction system (GEV or ZEV)\n - name: restriction\n dtype:\n class_label:\n names: [\"M\", \"N\", \"P\"]\n description: nutrient limitation (M, N or P)\n```\n\nI see the documentation for [datasets.ClassLabel](https://huggingface.co/docs/datasets/v4.0.0/en/package_reference/main_classes#datasets.ClassLabel). And the documentation for the [dataset cards](https://huggingface.co/docs/hub/en/datasets-cards). I don't see anything in either of those places, though, that specifies the pattern above.\n\nI suppose rather than writing the yaml by hand, the expected workflow is to use `datasets` to construct these features?", "I generally copy/paste and adapt a YAML from another dataset.\n\nBut it's also possible to generate it from `datasets` like that\n\n```python\n>>> import yaml\n>>> print(yaml.dump(features._to_yaml_list(), sort_keys=False))\n- name: start\n dtype: int32\n- name: end\n dtype: int32\n- name: restriction\n dtype:\n class_label:\n names: [\"M\", \"N\", \"P\"]\n```" ]
https://api.github.com/repos/huggingface/datasets/issues/7742
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7742/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7742/comments
https://api.github.com/repos/huggingface/datasets/issues/7742/events
https://github.com/huggingface/datasets/issues/7742
3,336,704,928
I_kwDODunzps7G4hOg
7,742
module 'pyarrow' has no attribute 'PyExtensionType'
[]
open
false
null
[]
null
2
1,755
1,757
null
NONE
null
null
### Describe the bug When importing certain libraries, users will encounter the following error which can be traced back to the datasets library. module 'pyarrow' has no attribute 'PyExtensionType'. Example issue: https://github.com/explodinggradients/ragas/issues/2170 The issue occurs due to the following. I will proceed to submit a PR with the below fix: **Issue Reason** The issue is that PyArrow version 21.0.0 doesn’t have PyExtensionType. This was changed in newer versions of PyArrow. The PyExtensionType class was renamed to ExtensionType in PyArrow 13.0.0 and later versions. ** Issue Solution** Making the following changes to the following lib files should temporarily resolve the issue. I will submit a PR to the dataets library in the meantime. env_name/lib/python3.10/site-packages/datasets/features/features.py: ``` > 521 self.shape = tuple(shape) 522 self.value_type = dtype 523 self.storage_dtype = self._generate_dtype(self.value_type) 524 - pa.PyExtensionType.__init__(self, self.storage_dtype) 524 + pa.ExtensionType.__init__(self, self.storage_dtype) 525 526 def __reduce__(self): 527 return self.__class__, ( ``` Updated venv_name/lib/python3.10/site-packages/datasets/features/features.py: ``` 510 _type: str = field(default=“Array5D”, init=False, repr=False) 511 512 513 - class _ArrayXDExtensionType(pa.PyExtensionType): 513 + class _ArrayXDExtensionType(pa.ExtensionType): 514 ndims: Optional[int] = None 515 516 def __init__(self, shape: tuple, dtype: str): ``` ### Steps to reproduce the bug Ragas version: 0.3.1 Python version: 3.11 **Code to Reproduce** _**In notebook:**_ !pip install ragas from ragas import evaluate ### Expected behavior The required package installs without issue. ### Environment info In Jupyter Notebook. venv
null
https://api.github.com/repos/huggingface/datasets/issues/7742/timeline
null
null
mnedelko
6,106,392
MDQ6VXNlcjYxMDYzOTI=
https://avatars.githubusercontent.com/u/6106392?v=4
https://api.github.com/users/mnedelko
https://github.com/mnedelko
https://api.github.com/users/mnedelko/followers
https://api.github.com/users/mnedelko/following{/other_user}
https://api.github.com/users/mnedelko/gists{/gist_id}
https://api.github.com/users/mnedelko/starred{/owner}{/repo}
https://api.github.com/users/mnedelko/subscriptions
https://api.github.com/users/mnedelko/orgs
https://api.github.com/users/mnedelko/repos
https://api.github.com/users/mnedelko/events{/privacy}
https://api.github.com/users/mnedelko/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7742/reactions
1
1
0
0
0
0
0
0
0
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[ "Just checked out the files and thishad already been addressed", "For others who find this issue: \n\n`pip install --upgrade \"datasets>=2.20.0\"` \n\nfrom https://github.com/explodinggradients/ragas/issues/2170#issuecomment-3204393672 can fix it." ]
https://api.github.com/repos/huggingface/datasets/issues/7741
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7741/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7741/comments
https://api.github.com/repos/huggingface/datasets/issues/7741/events
https://github.com/huggingface/datasets/issues/7741
3,334,848,656
I_kwDODunzps7GxcCQ
7,741
Preserve tree structure when loading HDF5
[ { "id": 1935892871, "node_id": "MDU6TGFiZWwxOTM1ODkyODcx", "url": "https://api.github.com/repos/huggingface/datasets/labels/enhancement", "name": "enhancement", "color": "a2eeef", "default": true, "description": "New feature or request" } ]
closed
false
null
[]
null
0
1,755
1,756
1,756
CONTRIBUTOR
null
null
### Feature request https://github.com/huggingface/datasets/pull/7740#discussion_r2285605374 ### Motivation `datasets` has the `Features` class for representing nested features. HDF5 files have groups of datasets which are nested, though in #7690 the keys are flattened. We should preserve that structure for the user. ### Your contribution I'll open a PR (#7743)
null
https://api.github.com/repos/huggingface/datasets/issues/7741/timeline
null
completed
klamike
17,013,474
MDQ6VXNlcjE3MDEzNDc0
https://avatars.githubusercontent.com/u/17013474?v=4
https://api.github.com/users/klamike
https://github.com/klamike
https://api.github.com/users/klamike/followers
https://api.github.com/users/klamike/following{/other_user}
https://api.github.com/users/klamike/gists{/gist_id}
https://api.github.com/users/klamike/starred{/owner}{/repo}
https://api.github.com/users/klamike/subscriptions
https://api.github.com/users/klamike/orgs
https://api.github.com/users/klamike/repos
https://api.github.com/users/klamike/events{/privacy}
https://api.github.com/users/klamike/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7741/reactions
0
0
0
0
0
0
0
0
0
null
null
null
null
null
null
lhoestq
42,851,186
MDQ6VXNlcjQyODUxMTg2
https://avatars.githubusercontent.com/u/42851186?v=4
https://api.github.com/users/lhoestq
https://github.com/lhoestq
https://api.github.com/users/lhoestq/followers
https://api.github.com/users/lhoestq/following{/other_user}
https://api.github.com/users/lhoestq/gists{/gist_id}
https://api.github.com/users/lhoestq/starred{/owner}{/repo}
https://api.github.com/users/lhoestq/subscriptions
https://api.github.com/users/lhoestq/orgs
https://api.github.com/users/lhoestq/repos
https://api.github.com/users/lhoestq/events{/privacy}
https://api.github.com/users/lhoestq/received_events
User
public
false
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[]
https://api.github.com/repos/huggingface/datasets/issues/7739
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7739/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7739/comments
https://api.github.com/repos/huggingface/datasets/issues/7739/events
https://github.com/huggingface/datasets/issues/7739
3,331,537,762
I_kwDODunzps7Gkzti
7,739
Replacement of "Sequence" feature with "List" breaks backward compatibility
[]
open
false
null
[]
null
1
1,755
1,757
null
NONE
null
null
PR #7634 replaced the Sequence feature with List in 4.0.0, so datasets saved with version 4.0.0 with that feature cannot be loaded by earlier versions. There is no clear option in 4.0.0 to use the legacy feature type to preserve backward compatibility. Why is this a problem? I have a complex preprocessing and training pipeline dependent on 3.6.0; we manage a very large number of separate datasets that get concatenated during training. If just one of those datasets is saved with 4.0.0, they become unusable, and we have no way of "fixing" them. I can load them in 4.0.0 but I can't re-save with the legacy feature type, and I can't load it in 3.6.0 for obvious reasons. Perhaps I'm missing something here, since the PR says that backward compatibility is preserved; if so, it's not obvious to me how.
null
https://api.github.com/repos/huggingface/datasets/issues/7739/timeline
null
null
evmaki
15,764,776
MDQ6VXNlcjE1NzY0Nzc2
https://avatars.githubusercontent.com/u/15764776?v=4
https://api.github.com/users/evmaki
https://github.com/evmaki
https://api.github.com/users/evmaki/followers
https://api.github.com/users/evmaki/following{/other_user}
https://api.github.com/users/evmaki/gists{/gist_id}
https://api.github.com/users/evmaki/starred{/owner}{/repo}
https://api.github.com/users/evmaki/subscriptions
https://api.github.com/users/evmaki/orgs
https://api.github.com/users/evmaki/repos
https://api.github.com/users/evmaki/events{/privacy}
https://api.github.com/users/evmaki/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7739/reactions
2
2
0
0
0
0
0
0
0
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[ "Backward compatibility here means 4.0.0 can load datasets saved with older versions.\n\nYou will need 4.0.0 to load datasets saved with 4.0.0" ]
https://api.github.com/repos/huggingface/datasets/issues/7738
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7738/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7738/comments
https://api.github.com/repos/huggingface/datasets/issues/7738/events
https://github.com/huggingface/datasets/issues/7738
3,328,948,690
I_kwDODunzps7Ga7nS
7,738
Allow saving multi-dimensional ndarray with dynamic shapes
[ { "id": 1935892871, "node_id": "MDU6TGFiZWwxOTM1ODkyODcx", "url": "https://api.github.com/repos/huggingface/datasets/labels/enhancement", "name": "enhancement", "color": "a2eeef", "default": true, "description": "New feature or request" } ]
open
false
null
[]
null
2
1,755
1,756
null
NONE
null
null
### Feature request I propose adding a dedicated feature to the datasets library that allows for the efficient storage and retrieval of multi-dimensional ndarray with dynamic shapes. Similar to how Image columns handle variable-sized images, this feature would provide a structured way to store array data where the dimensions are not fixed. A possible implementation could be a new Array or Tensor feature type that stores the data in a structured format, for example, ```python { "shape": (5, 224, 224), "dtype": "uint8", "data": [...] } ``` This would allow the datasets library to handle heterogeneous array sizes within a single column without requiring a fixed shape definition in the feature schema. ### Motivation I am currently trying to upload data from astronomical telescopes, specifically FITS files, to the Hugging Face Hub. This type of data is very similar to images but often has more than three dimensions. For example, data from the SDSS project contains five channels (u, g, r, i, z), and the pixel values can exceed 255, making the Pillow based Image feature unsuitable. The current datasets library requires a fixed shape to be defined in the feature schema for multi-dimensional arrays, which is a major roadblock. This prevents me from saving my data, as the dimensions of the arrays can vary across different FITS files. https://github.com/huggingface/datasets/blob/985c9bee6bfc345787a8b9dd316e1d4f3b930503/src/datasets/features/features.py#L613-L614 A feature that supports dynamic shapes would be incredibly beneficial for the astronomy community and other fields dealing with similar high-dimensional, variable-sized data (e.g., medical imaging, scientific simulations). ### Your contribution I am willing to create a PR to help implement this feature if the proposal is accepted.
null
https://api.github.com/repos/huggingface/datasets/issues/7738/timeline
null
null
ryan-minato
82,735,346
MDQ6VXNlcjgyNzM1MzQ2
https://avatars.githubusercontent.com/u/82735346?v=4
https://api.github.com/users/ryan-minato
https://github.com/ryan-minato
https://api.github.com/users/ryan-minato/followers
https://api.github.com/users/ryan-minato/following{/other_user}
https://api.github.com/users/ryan-minato/gists{/gist_id}
https://api.github.com/users/ryan-minato/starred{/owner}{/repo}
https://api.github.com/users/ryan-minato/subscriptions
https://api.github.com/users/ryan-minato/orgs
https://api.github.com/users/ryan-minato/repos
https://api.github.com/users/ryan-minato/events{/privacy}
https://api.github.com/users/ryan-minato/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7738/reactions
0
0
0
0
0
0
0
0
0
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[ "I agree this would be super valuable.\n\nIt looks like this was discussed a few years ago in https://github.com/huggingface/datasets/issues/5272#issuecomment-1550200824 but there were some issues. Those PRs are merged now and it looks like Arrow [officially supports](https://arrow.apache.org/docs/format/CanonicalExtensions.html#variable-shape-tensor) this so it's a good time to re-evaluate!", "Happy to help with this, maybe we can think of adding a new type `Tensor` (instead of Array2D, 3D etc. which imply a fixed number of dims - we can keep them for backward compat anyways) that uses VariableShapeTensor (or FixedShapeTensor if the shape is provided maybe ? happy to discuss this)" ]
https://api.github.com/repos/huggingface/datasets/issues/7733
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7733/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7733/comments
https://api.github.com/repos/huggingface/datasets/issues/7733/events
https://github.com/huggingface/datasets/issues/7733
3,304,979,299
I_kwDODunzps7E_ftj
7,733
Dataset Repo Paths to Locally Stored Images Not Being Appended to Image Path
[]
closed
false
null
[]
null
2
1,754
1,759
1,759
NONE
null
null
### Describe the bug I’m not sure if this is a bug or a feature and I just don’t fully understand how dataset loading is to work, but it appears there may be a bug with how locally stored Image() are being accessed. I’ve uploaded a new dataset to hugging face (rmdig/rocky_mountain_snowpack) but I’ve come into a ton of trouble trying to have the images handled properly (at least in the way I’d expect them to be handled). I find that I cannot use relative paths for loading images remotely from the Hugging Face repo or from a local repository. Any time I do it always simply appends my current working directory to the dataset. As a result to use the datasets library with my dataset I have to change my working directory to the dataset folder or abandon the dataset object structure, which I cannot imagine you intended. As a result I have to use URL’s since an absolute path on my system obviously wouldn’t work for others. The URL works ok, but despite me having it locally downloaded, it appears to be redownloading the dataset every time I train my snowGAN model on it (and often times I’m coming into HTTPS errors for over requesting the data). Or maybe image relative paths aren't intended to be loaded directly through your datasets library as images and should be kept as strings for the user to handle? If so I feel like you’re missing out on some pretty seamless functionality ### Steps to reproduce the bug 1. Download a local copy of the dataset (rmdig/rocky_mountain_snowpack) through git or whatever you prefer. 2. Alter the README.md YAML for file_path (the relative path to each image) to be type Image instead of type string ` --- dataset_info: features: - name: image dtype: Image - name: file_path dtype: Image ` 3. Initialize the dataset locally, make sure your working directory is not the dataset directory root `dataset = datasets.load_dataset(‘path/to/local/rocky_mountain_snowpack/‘)` 4. Call to one of the samples and you’ll get an error that the image was not found in current/working/directory/preprocessed/cores/image_1.png. Showing that it’s simply looking in the current working directory + relative path ` >>> dataset['train'][0] Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Users/dennyschaedig/miniconda3/lib/python3.12/site-packages/datasets/arrow_dataset.py", line 2859, in __getitem__ return self._getitem(key) ^^^^^^^^^^^^^^^^^^ File "/Users/dennyschaedig/miniconda3/lib/python3.12/site-packages/datasets/arrow_dataset.py", line 2841, in _getitem formatted_output = format_table( ^^^^^^^^^^^^^ File "/Users/dennyschaedig/miniconda3/lib/python3.12/site-packages/datasets/formatting/formatting.py", line 657, in format_table return formatter(pa_table, query_type=query_type) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/dennyschaedig/miniconda3/lib/python3.12/site-packages/datasets/formatting/formatting.py", line 410, in __call__ return self.format_row(pa_table) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/dennyschaedig/miniconda3/lib/python3.12/site-packages/datasets/formatting/formatting.py", line 459, in format_row row = self.python_features_decoder.decode_row(row) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/dennyschaedig/miniconda3/lib/python3.12/site-packages/datasets/formatting/formatting.py", line 223, in decode_row return self.features.decode_example(row, token_per_repo_id=self.token_per_repo_id) if self.features else row ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/dennyschaedig/miniconda3/lib/python3.12/site-packages/datasets/features/features.py", line 2093, in decode_example column_name: decode_nested_example(feature, value, token_per_repo_id=token_per_repo_id) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/dennyschaedig/miniconda3/lib/python3.12/site-packages/datasets/features/features.py", line 1405, in decode_nested_example return schema.decode_example(obj, token_per_repo_id=token_per_repo_id) if obj is not None else None ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/dennyschaedig/miniconda3/lib/python3.12/site-packages/datasets/features/image.py", line 171, in decode_example image = PIL.Image.open(path) ^^^^^^^^^^^^^^^^^^^^ File "/Users/dennyschaedig/miniconda3/lib/python3.12/site-packages/PIL/Image.py", line 3277, in open fp = builtins.open(filename, "rb") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ FileNotFoundError: [Errno 2] No such file or directory: '/Users/dennyschaedig/Datasets/preprocessed/cores/image_1.png' ` ### Expected behavior I expect the datasets and Image() to load the locally hosted data using path/to/local/rocky_mountain_snowpack/ (that I pass in with my datasets.load_dataset() or the you all handle on the backend) call + relative path. Instead it appears to load from my current working directory + relative path. ### Environment info Tested on… Windows 11, Ubuntu Linux 22.04 and Mac Sequoia 15.5 Silicone M2 datasets version 4.0.0 Python 3.12 and 3.13
null
https://api.github.com/repos/huggingface/datasets/issues/7733/timeline
null
completed
dennys246
27,898,715
MDQ6VXNlcjI3ODk4NzE1
https://avatars.githubusercontent.com/u/27898715?v=4
https://api.github.com/users/dennys246
https://github.com/dennys246
https://api.github.com/users/dennys246/followers
https://api.github.com/users/dennys246/following{/other_user}
https://api.github.com/users/dennys246/gists{/gist_id}
https://api.github.com/users/dennys246/starred{/owner}{/repo}
https://api.github.com/users/dennys246/subscriptions
https://api.github.com/users/dennys246/orgs
https://api.github.com/users/dennys246/repos
https://api.github.com/users/dennys246/events{/privacy}
https://api.github.com/users/dennys246/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7733/reactions
0
0
0
0
0
0
0
0
0
null
null
null
null
null
null
dennys246
27,898,715
MDQ6VXNlcjI3ODk4NzE1
https://avatars.githubusercontent.com/u/27898715?v=4
https://api.github.com/users/dennys246
https://github.com/dennys246
https://api.github.com/users/dennys246/followers
https://api.github.com/users/dennys246/following{/other_user}
https://api.github.com/users/dennys246/gists{/gist_id}
https://api.github.com/users/dennys246/starred{/owner}{/repo}
https://api.github.com/users/dennys246/subscriptions
https://api.github.com/users/dennys246/orgs
https://api.github.com/users/dennys246/repos
https://api.github.com/users/dennys246/events{/privacy}
https://api.github.com/users/dennys246/received_events
User
public
false
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[ "This is the download issues I come into, about ever other time it fails...\n<img width=\"1719\" height=\"1226\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/2e5b4b3e-7c13-4bad-a77c-34b47a932831\" />", "I’m guessing this is just a feature so I’m going to close this thread. I also altered my loading scheme to start on the first index of a particular modality within the dataset (index ~390) and this issue went away with client error from too many requests. Due to how the dataset is sorted in HF, there are gaps in my dataset between modalities (~500) that this issue should theoretically also occur on but it does not. It seems after initially downloading the first image in a dataset the connection becomes approved on HF end and long lapses in checking entries in a dataset, without actually loading the full sample, are enabled. \n\nTL;DR Local handling doesn’t appear to be possible with images in the datasets library. Load the first image you need right away through storing it’s index and calling to it. Don’t iterate long sequences of HF repo’s looking for a condition to be met without first loading in a sample." ]
https://api.github.com/repos/huggingface/datasets/issues/7732
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7732/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7732/comments
https://api.github.com/repos/huggingface/datasets/issues/7732/events
https://github.com/huggingface/datasets/issues/7732
3,304,673,383
I_kwDODunzps7E-VBn
7,732
webdataset: key errors when `field_name` has upper case characters
[]
open
false
null
[]
null
0
1,754
1,754
null
CONTRIBUTOR
null
null
### Describe the bug When using a webdataset each sample can be a collection of different "fields" like this: ``` images17/image194.left.jpg images17/image194.right.jpg images17/image194.json images17/image12.left.jpg images17/image12.right.jpg images17/image12.json ``` if the field_name contains upper case characters, the HF webdataset integration throws a key error when trying to load the dataset: e.g. from a dataset (now updated so that it doesn't throw this error) ``` --------------------------------------------------------------------------- KeyError Traceback (most recent call last) Cell In[1], line 2 1 from datasets import load_dataset ----> 2 ds = load_dataset("commaai/comma2k19", data_files={'train': ['data-00000.tar.gz']}, num_proc=1) File ~/xx/.venv/lib/python3.11/site-packages/datasets/load.py:1412, in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, verification_mode, keep_in_memory, save_infos, revision, token, streaming, num_proc, storage_options, **config_kwargs) 1409 return builder_instance.as_streaming_dataset(split=split) 1411 # Download and prepare data -> 1412 builder_instance.download_and_prepare( 1413 download_config=download_config, 1414 download_mode=download_mode, 1415 verification_mode=verification_mode, 1416 num_proc=num_proc, 1417 storage_options=storage_options, 1418 ) 1420 # Build dataset for splits 1421 keep_in_memory = ( 1422 keep_in_memory if keep_in_memory is not None else is_small_dataset(builder_instance.info.dataset_size) 1423 ) File ~/xx/.venv/lib/python3.11/site-packages/datasets/builder.py:894, in DatasetBuilder.download_and_prepare(self, output_dir, download_config, download_mode, verification_mode, dl_manager, base_path, file_format, max_shard_size, num_proc, storage_options, **download_and_prepare_kwargs) 892 if num_proc is not None: 893 prepare_split_kwargs["num_proc"] = num_proc --> 894 self._download_and_prepare( 895 dl_manager=dl_manager, 896 verification_mode=verification_mode, 897 **prepare_split_kwargs, 898 **download_and_prepare_kwargs, 899 ) 900 # Sync info 901 self.info.dataset_size = sum(split.num_bytes for split in self.info.splits.values()) File ~/xx/.venv/lib/python3.11/site-packages/datasets/builder.py:1609, in GeneratorBasedBuilder._download_and_prepare(self, dl_manager, verification_mode, **prepare_splits_kwargs) 1608 def _download_and_prepare(self, dl_manager, verification_mode, **prepare_splits_kwargs): -> 1609 super()._download_and_prepare( 1610 dl_manager, 1611 verification_mode, 1612 check_duplicate_keys=verification_mode == VerificationMode.BASIC_CHECKS 1613 or verification_mode == VerificationMode.ALL_CHECKS, 1614 **prepare_splits_kwargs, 1615 ) File ~/xx/.venv/lib/python3.11/site-packages/datasets/builder.py:948, in DatasetBuilder._download_and_prepare(self, dl_manager, verification_mode, **prepare_split_kwargs) 946 split_dict = SplitDict(dataset_name=self.dataset_name) 947 split_generators_kwargs = self._make_split_generators_kwargs(prepare_split_kwargs) --> 948 split_generators = self._split_generators(dl_manager, **split_generators_kwargs) 950 # Checksums verification 951 if verification_mode == VerificationMode.ALL_CHECKS and dl_manager.record_checksums: File ~/xx/.venv/lib/python3.11/site-packages/datasets/packaged_modules/webdataset/webdataset.py:81, in WebDataset._split_generators(self, dl_manager) 78 if not self.info.features: 79 # Get one example to get the feature types 80 pipeline = self._get_pipeline_from_tar(tar_paths[0], tar_iterators[0]) ---> 81 first_examples = list(islice(pipeline, self.NUM_EXAMPLES_FOR_FEATURES_INFERENCE)) 82 if any(example.keys() != first_examples[0].keys() for example in first_examples): 83 raise ValueError( 84 "The TAR archives of the dataset should be in WebDataset format, " 85 "but the files in the archive don't share the same prefix or the same types." 86 ) File ~/xx/.venv/lib/python3.11/site-packages/datasets/packaged_modules/webdataset/webdataset.py:55, in WebDataset._get_pipeline_from_tar(cls, tar_path, tar_iterator) 53 data_extension = field_name.split(".")[-1] 54 if data_extension in cls.DECODERS: ---> 55 current_example[field_name] = cls.DECODERS[data_extension](current_example[field_name]) 56 if current_example: 57 yield current_example KeyError: 'processed_log_IMU_magnetometer_value.npy' ``` ### Steps to reproduce the bug unit test was added in: https://github.com/huggingface/datasets/pull/7726 it fails without the fixed proposed in the same PR ### Expected behavior Not throwing a key error. ### Environment info ``` - `datasets` version: 4.0.0 - Platform: Linux-6.8.0-51-generic-x86_64-with-glibc2.39 - Python version: 3.11.4 - `huggingface_hub` version: 0.33.4 - PyArrow version: 21.0.0 - Pandas version: 2.3.1 - `fsspec` version: 2025.7.0 ```
null
https://api.github.com/repos/huggingface/datasets/issues/7732/timeline
null
null
YassineYousfi
29,985,433
MDQ6VXNlcjI5OTg1NDMz
https://avatars.githubusercontent.com/u/29985433?v=4
https://api.github.com/users/YassineYousfi
https://github.com/YassineYousfi
https://api.github.com/users/YassineYousfi/followers
https://api.github.com/users/YassineYousfi/following{/other_user}
https://api.github.com/users/YassineYousfi/gists{/gist_id}
https://api.github.com/users/YassineYousfi/starred{/owner}{/repo}
https://api.github.com/users/YassineYousfi/subscriptions
https://api.github.com/users/YassineYousfi/orgs
https://api.github.com/users/YassineYousfi/repos
https://api.github.com/users/YassineYousfi/events{/privacy}
https://api.github.com/users/YassineYousfi/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7732/reactions
0
0
0
0
0
0
0
0
0
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[]
https://api.github.com/repos/huggingface/datasets/issues/7731
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7731/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7731/comments
https://api.github.com/repos/huggingface/datasets/issues/7731/events
https://github.com/huggingface/datasets/issues/7731
3,303,637,075
I_kwDODunzps7E6YBT
7,731
Add the possibility of a backend for audio decoding
[ { "id": 1935892871, "node_id": "MDU6TGFiZWwxOTM1ODkyODcx", "url": "https://api.github.com/repos/huggingface/datasets/labels/enhancement", "name": "enhancement", "color": "a2eeef", "default": true, "description": "New feature or request" } ]
open
false
null
[]
null
2
1,754
1,755
null
NONE
null
null
### Feature request Add the possibility of a backend for audio decoding. Before version 4.0.0, soundfile was used, and now torchcodec is used, but the problem is that torchcodec requires ffmpeg, which is problematic to install on the same colab. Therefore, I suggest adding a decoder selection when loading the dataset. ### Motivation I use a service for training models in which ffmpeg cannot be installed. ### Your contribution I use a service for training models in which ffmpeg cannot be installed.
null
https://api.github.com/repos/huggingface/datasets/issues/7731/timeline
null
null
intexcor
142,020,129
U_kgDOCHcOIQ
https://avatars.githubusercontent.com/u/142020129?v=4
https://api.github.com/users/intexcor
https://github.com/intexcor
https://api.github.com/users/intexcor/followers
https://api.github.com/users/intexcor/following{/other_user}
https://api.github.com/users/intexcor/gists{/gist_id}
https://api.github.com/users/intexcor/starred{/owner}{/repo}
https://api.github.com/users/intexcor/subscriptions
https://api.github.com/users/intexcor/orgs
https://api.github.com/users/intexcor/repos
https://api.github.com/users/intexcor/events{/privacy}
https://api.github.com/users/intexcor/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7731/reactions
0
0
0
0
0
0
0
0
0
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[ "is there a work around im stuck", "never mind just downgraded" ]
https://api.github.com/repos/huggingface/datasets/issues/7729
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7729/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7729/comments
https://api.github.com/repos/huggingface/datasets/issues/7729/events
https://github.com/huggingface/datasets/issues/7729
3,300,672,954
I_kwDODunzps7EvEW6
7,729
OSError: libcudart.so.11.0: cannot open shared object file: No such file or directory
[]
open
false
null
[]
null
1
1,754
1,758
null
NONE
null
null
> Hi is there any solution for that eror i try to install this one pip install torch==1.12.1+cpu torchaudio==0.12.1+cpu -f https://download.pytorch.org/whl/torch_stable.html this is working fine but tell me how to install pytorch version that is fit for gpu
null
https://api.github.com/repos/huggingface/datasets/issues/7729/timeline
null
null
SaleemMalikAI
115,183,904
U_kgDOBt2RIA
https://avatars.githubusercontent.com/u/115183904?v=4
https://api.github.com/users/SaleemMalikAI
https://github.com/SaleemMalikAI
https://api.github.com/users/SaleemMalikAI/followers
https://api.github.com/users/SaleemMalikAI/following{/other_user}
https://api.github.com/users/SaleemMalikAI/gists{/gist_id}
https://api.github.com/users/SaleemMalikAI/starred{/owner}{/repo}
https://api.github.com/users/SaleemMalikAI/subscriptions
https://api.github.com/users/SaleemMalikAI/orgs
https://api.github.com/users/SaleemMalikAI/repos
https://api.github.com/users/SaleemMalikAI/events{/privacy}
https://api.github.com/users/SaleemMalikAI/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7729/reactions
0
0
0
0
0
0
0
0
0
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[ "Is this related to the \"datasets\" library? @SaleemMalikAI " ]
https://api.github.com/repos/huggingface/datasets/issues/7728
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7728/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7728/comments
https://api.github.com/repos/huggingface/datasets/issues/7728/events
https://github.com/huggingface/datasets/issues/7728
3,298,854,904
I_kwDODunzps7EoIf4
7,728
NonMatchingSplitsSizesError and ExpectedMoreSplitsError
[]
open
false
null
[]
null
3
1,754
1,759
null
NONE
null
null
### Describe the bug When loading dataset, the info specified by `data_files` did not overwrite the original info. ### Steps to reproduce the bug ```python from datasets import load_dataset traindata = load_dataset( "allenai/c4", "en", data_files={"train": "en/c4-train.00000-of-01024.json.gz", "validation": "en/c4-validation.00000-of-00008.json.gz"}, ) ``` ```log NonMatchingSplitsSizesError: [{'expected': SplitInfo(name='train', num_bytes=828589180707, num_examples=364868892, shard_lengths=None, dataset_name=None), 'recorded': SplitInfo(name='train', num_bytes=809262831, num_examples=356317, shard_lengths=[223006, 133311], dataset_name='c4')}, {'expected': SplitInfo(name='validation', num_bytes=825767266, num_examples=364608, shard_lengths=None, dataset_name=None), 'recorded': SplitInfo(name='validation', num_bytes=102199431, num_examples=45576, shard_lengths=None, dataset_name='c4')}] ``` ```python from datasets import load_dataset traindata = load_dataset( "allenai/c4", "en", data_files={"train": "en/c4-train.00000-of-01024.json.gz"}, split="train" ) ``` ```log ExpectedMoreSplitsError: {'validation'} ``` ### Expected behavior No error ### Environment info datasets 4.0.0
null
https://api.github.com/repos/huggingface/datasets/issues/7728/timeline
null
null
efsotr
104,755,879
U_kgDOBj5ypw
https://avatars.githubusercontent.com/u/104755879?v=4
https://api.github.com/users/efsotr
https://github.com/efsotr
https://api.github.com/users/efsotr/followers
https://api.github.com/users/efsotr/following{/other_user}
https://api.github.com/users/efsotr/gists{/gist_id}
https://api.github.com/users/efsotr/starred{/owner}{/repo}
https://api.github.com/users/efsotr/subscriptions
https://api.github.com/users/efsotr/orgs
https://api.github.com/users/efsotr/repos
https://api.github.com/users/efsotr/events{/privacy}
https://api.github.com/users/efsotr/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7728/reactions
0
0
0
0
0
0
0
0
0
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[ "To load just one shard without errors, you should use data_files directly with split set to \"train\", but don’t specify \"allenai/c4\", since that points to the full dataset with all shards.\n\nInstead, do this:\n```\nfrom datasets import load_dataset\nfrom datasets import load_dataset\n\n# Load only one shard of C4\ntraindata = load_dataset(\n \"json\", # <-- use \"json\" since you’re directly passing JSON files\n data_files={\"train\": \"https://huggingface.co/datasets/allenai/c4/resolve/main/en/c4-train.00000-of-01024.json.gz\"},\n split=\"train\"\n)\n\nprint(traindata)\n```\nIf you want both train and validation but only a subset of shards, do:\n```\ntraindata = load_dataset(\n \"json\",\n data_files={\n \"train\": \"https://huggingface.co/datasets/allenai/c4/resolve/main/en/c4-train.00000-of-01024.json.gz\",\n \"validation\": \"https://huggingface.co/datasets/allenai/c4/resolve/main/en/c4-validation.00000-of-00008.json.gz\"\n }\n)\n\nprint(traindata)\n```", "I just want to load a few files from allenai/c4.\nIf I do not specify allenai/c4, where will the files be loaded from?", "My apologies, I’ve modified my previous answer.\nYou just need to specify the full path, for example:\n\nhttps://huggingface.co/datasets/allenai/c4/resolve/main/en/c4-train.00000-of-01024.json.gz\n\n<img width=\"1843\" height=\"633\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/b2922958-9d87-4b62-a00e-c5ca02e31c27\" />\n\nI hope this updated answer is helpful." ]
https://api.github.com/repos/huggingface/datasets/issues/7727
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7727/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7727/comments
https://api.github.com/repos/huggingface/datasets/issues/7727/events
https://github.com/huggingface/datasets/issues/7727
3,295,718,578
I_kwDODunzps7EcKyy
7,727
config paths that start with ./ are not valid as hf:// accessed repos, but are valid when accessed locally
[]
open
false
null
[]
null
0
1,754
1,754
null
NONE
null
null
### Describe the bug ``` - config_name: some_config data_files: - split: train path: - images/xyz/*.jpg ``` will correctly download but ``` - config_name: some_config data_files: - split: train path: - ./images/xyz/*.jpg ``` will error with `FileNotFoundError` due to improper url joining. `load_dataset` on the same directory locally works fine. ### Steps to reproduce the bug 1. create a README.md with the front matter of the form ``` - config_name: some_config data_files: - split: train path: - ./images/xyz/*.jpg ``` 2. `touch ./images/xyz/1.jpg` 3. Observe this directory loads with `load_dataset("filesystem_path", "some_config")` correctly. 4. Observe exceptions when you load this with `load_dataset("repoid/filesystem_path", "some_config")` ### Expected behavior `./` prefix should be interpreted correctly ### Environment info datasets 4.0.0 datasets 3.4.0 reproduce
null
https://api.github.com/repos/huggingface/datasets/issues/7727/timeline
null
null
doctorpangloss
2,229,300
MDQ6VXNlcjIyMjkzMDA=
https://avatars.githubusercontent.com/u/2229300?v=4
https://api.github.com/users/doctorpangloss
https://github.com/doctorpangloss
https://api.github.com/users/doctorpangloss/followers
https://api.github.com/users/doctorpangloss/following{/other_user}
https://api.github.com/users/doctorpangloss/gists{/gist_id}
https://api.github.com/users/doctorpangloss/starred{/owner}{/repo}
https://api.github.com/users/doctorpangloss/subscriptions
https://api.github.com/users/doctorpangloss/orgs
https://api.github.com/users/doctorpangloss/repos
https://api.github.com/users/doctorpangloss/events{/privacy}
https://api.github.com/users/doctorpangloss/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7727/reactions
0
0
0
0
0
0
0
0
0
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[]
https://api.github.com/repos/huggingface/datasets/issues/7724
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7724/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7724/comments
https://api.github.com/repos/huggingface/datasets/issues/7724/events
https://github.com/huggingface/datasets/issues/7724
3,292,315,241
I_kwDODunzps7EPL5p
7,724
Can not stepinto load_dataset.py?
[]
open
false
null
[]
null
0
1,754
1,754
null
NONE
null
null
I set a breakpoint in "load_dataset.py" and try to debug my data load codes, but it does not stop at any breakpoints, so "load_dataset.py" can not be stepped into ? <!-- Failed to upload "截图 2025-08-05 17-25-18.png" -->
null
https://api.github.com/repos/huggingface/datasets/issues/7724/timeline
null
null
micklexqg
13,776,012
MDQ6VXNlcjEzNzc2MDEy
https://avatars.githubusercontent.com/u/13776012?v=4
https://api.github.com/users/micklexqg
https://github.com/micklexqg
https://api.github.com/users/micklexqg/followers
https://api.github.com/users/micklexqg/following{/other_user}
https://api.github.com/users/micklexqg/gists{/gist_id}
https://api.github.com/users/micklexqg/starred{/owner}{/repo}
https://api.github.com/users/micklexqg/subscriptions
https://api.github.com/users/micklexqg/orgs
https://api.github.com/users/micklexqg/repos
https://api.github.com/users/micklexqg/events{/privacy}
https://api.github.com/users/micklexqg/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7724/reactions
0
0
0
0
0
0
0
0
0
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[]
https://api.github.com/repos/huggingface/datasets/issues/7723
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7723/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7723/comments
https://api.github.com/repos/huggingface/datasets/issues/7723/events
https://github.com/huggingface/datasets/issues/7723
3,289,943,261
I_kwDODunzps7EGIzd
7,723
Don't remove `trust_remote_code` arg!!!
[ { "id": 1935892871, "node_id": "MDU6TGFiZWwxOTM1ODkyODcx", "url": "https://api.github.com/repos/huggingface/datasets/labels/enhancement", "name": "enhancement", "color": "a2eeef", "default": true, "description": "New feature or request" } ]
open
false
null
[]
null
0
1,754
1,754
null
NONE
null
null
### Feature request defaulting it to False is nice balance. we need manully setting it to True in certain scenarios! Add `trust_remote_code` arg back please! ### Motivation defaulting it to False is nice balance. we need manully setting it to True in certain scenarios! ### Your contribution defaulting it to False is nice balance. we need manully setting it to True in certain scenarios!
null
https://api.github.com/repos/huggingface/datasets/issues/7723/timeline
null
null
autosquid
758,925
MDQ6VXNlcjc1ODkyNQ==
https://avatars.githubusercontent.com/u/758925?v=4
https://api.github.com/users/autosquid
https://github.com/autosquid
https://api.github.com/users/autosquid/followers
https://api.github.com/users/autosquid/following{/other_user}
https://api.github.com/users/autosquid/gists{/gist_id}
https://api.github.com/users/autosquid/starred{/owner}{/repo}
https://api.github.com/users/autosquid/subscriptions
https://api.github.com/users/autosquid/orgs
https://api.github.com/users/autosquid/repos
https://api.github.com/users/autosquid/events{/privacy}
https://api.github.com/users/autosquid/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7723/reactions
0
0
0
0
0
0
0
0
0
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[]
https://api.github.com/repos/huggingface/datasets/issues/7722
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7722/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7722/comments
https://api.github.com/repos/huggingface/datasets/issues/7722/events
https://github.com/huggingface/datasets/issues/7722
3,289,741,064
I_kwDODunzps7EFXcI
7,722
Out of memory even though using load_dataset(..., streaming=True)
[]
open
false
null
[]
null
0
1,754
1,754
null
NONE
null
null
### Describe the bug I am iterating over a large dataset that I load using streaming=True to avoid running out of memory. Unfortunately, I am observing that memory usage increases over time and I'm finally running in an oom. ### Steps to reproduce the bug ``` ds = load_dataset("openslr/librispeech_asr", split="train.clean.360", streaming=True) for i,sample in enumerate(tqdm(ds)): target_file = os.path.join(NSFW_TARGET_FOLDER, f'audio{i}.wav') try: sf.write(target_file, sample['audio']['array'], samplerate=sample['audio']['sampling_rate']) except Exception as e: print(f"Could not write audio {i} in ds: {e}") ``` ### Expected behavior I'd expect to have a small memory footprint and memory being freed after each iteration of the for loop. Instead the memory usage is increasing. I tried to remove the logic to write the sound file and just print the sample but the issue remains the same. ### Environment info Python 3.12.11 Ubuntu 24 datasets 4.0.0 and 3.6.0
null
https://api.github.com/repos/huggingface/datasets/issues/7722/timeline
null
null
padmalcom
3,961,950
MDQ6VXNlcjM5NjE5NTA=
https://avatars.githubusercontent.com/u/3961950?v=4
https://api.github.com/users/padmalcom
https://github.com/padmalcom
https://api.github.com/users/padmalcom/followers
https://api.github.com/users/padmalcom/following{/other_user}
https://api.github.com/users/padmalcom/gists{/gist_id}
https://api.github.com/users/padmalcom/starred{/owner}{/repo}
https://api.github.com/users/padmalcom/subscriptions
https://api.github.com/users/padmalcom/orgs
https://api.github.com/users/padmalcom/repos
https://api.github.com/users/padmalcom/events{/privacy}
https://api.github.com/users/padmalcom/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7722/reactions
0
0
0
0
0
0
0
0
0
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[]
https://api.github.com/repos/huggingface/datasets/issues/7721
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7721/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7721/comments
https://api.github.com/repos/huggingface/datasets/issues/7721/events
https://github.com/huggingface/datasets/issues/7721
3,289,426,104
I_kwDODunzps7EEKi4
7,721
Bad split error message when using percentages
[]
open
false
null
[]
null
2
1,754
1,755
null
NONE
null
null
### Describe the bug Hi, I'm trying to download a dataset. To not load the entire dataset in memory, I split it as described [here](https://huggingface.co/docs/datasets/v4.0.0/loading#slice-splits) in 10% steps. When doing so, the library returns this error: raise ValueError(f"Bad split: {split}. Available splits: {list(splits_generators)}") ValueError: Bad split: train[0%:10%]. Available splits: ['train'] Edit: Same happens with a split like _train[:90000]_ ### Steps to reproduce the bug ``` for split in range(10): split_str = f"train[{split*10}%:{(split+1)*10}%]" print(f"Processing split {split_str}...") ds = load_dataset("user/dataset", split=split_str, streaming=True) ``` ### Expected behavior I'd expect the library to split my dataset in 10% steps. ### Environment info python 3.12.11 ubuntu 24 dataset 4.0.0
null
https://api.github.com/repos/huggingface/datasets/issues/7721/timeline
null
null
padmalcom
3,961,950
MDQ6VXNlcjM5NjE5NTA=
https://avatars.githubusercontent.com/u/3961950?v=4
https://api.github.com/users/padmalcom
https://github.com/padmalcom
https://api.github.com/users/padmalcom/followers
https://api.github.com/users/padmalcom/following{/other_user}
https://api.github.com/users/padmalcom/gists{/gist_id}
https://api.github.com/users/padmalcom/starred{/owner}{/repo}
https://api.github.com/users/padmalcom/subscriptions
https://api.github.com/users/padmalcom/orgs
https://api.github.com/users/padmalcom/repos
https://api.github.com/users/padmalcom/events{/privacy}
https://api.github.com/users/padmalcom/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7721/reactions
0
0
0
0
0
0
0
0
0
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[ "I'd like to work on this: add clearer validation/messages for percent-based splits + tests", "The most basic example is this code:\n`load_dataset(\"openslr/librispeech_asr\", split=\"train[10%:20%]\")`\n\nThis results in this ValueError:\n```\n raise ValueError(f'Unknown split \"{split}\". Should be one of {list(name2len)}.')\nValueError: Unknown split \"train\". Should be one of ['test.clean', 'test.other', 'train.clean.100', 'train.clean.360', 'train.other.500', 'validation.clean', 'validation.other'].\n```\n" ]
https://api.github.com/repos/huggingface/datasets/issues/7720
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7720/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7720/comments
https://api.github.com/repos/huggingface/datasets/issues/7720/events
https://github.com/huggingface/datasets/issues/7720
3,287,150,513
I_kwDODunzps7D7e-x
7,720
Datasets 4.0 map function causing column not found
[]
open
false
null
[]
null
3
1,754
1,754
null
NONE
null
null
### Describe the bug Column returned after mapping is not found in new instance of the dataset. ### Steps to reproduce the bug Code for reproduction. After running get_total_audio_length, it is errored out due to `data` not having `duration` ``` def compute_duration(x): return {"duration": len(x["audio"]["array"]) / x["audio"]["sampling_rate"]} def get_total_audio_length(dataset): data = dataset.map(compute_duration, num_proc=NUM_PROC) print(data) durations=data["duration"] total_seconds = sum(durations) return total_seconds ``` ### Expected behavior New datasets.Dataset instance should have new columns attached. ### Environment info - `datasets` version: 4.0.0 - Platform: Linux-5.4.0-124-generic-x86_64-with-glibc2.31 - Python version: 3.10.13 - `huggingface_hub` version: 0.33.2 - PyArrow version: 20.0.0 - Pandas version: 2.3.0 - `fsspec` version: 2023.12.2
null
https://api.github.com/repos/huggingface/datasets/issues/7720/timeline
null
null
Darejkal
55,143,337
MDQ6VXNlcjU1MTQzMzM3
https://avatars.githubusercontent.com/u/55143337?v=4
https://api.github.com/users/Darejkal
https://github.com/Darejkal
https://api.github.com/users/Darejkal/followers
https://api.github.com/users/Darejkal/following{/other_user}
https://api.github.com/users/Darejkal/gists{/gist_id}
https://api.github.com/users/Darejkal/starred{/owner}{/repo}
https://api.github.com/users/Darejkal/subscriptions
https://api.github.com/users/Darejkal/orgs
https://api.github.com/users/Darejkal/repos
https://api.github.com/users/Darejkal/events{/privacy}
https://api.github.com/users/Darejkal/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7720/reactions
0
0
0
0
0
0
0
0
0
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[ "Hi, I tried to reproduce this issue on the latest `main` branch but it seems to be working correctly now. My test script (which creates a dummy dataset and applies the `.map()` function) successfully creates and accesses the new column without a `KeyError`.\n\nIt's possible this was fixed by a recent commit. The maintainers might want to consider closing this issue.", "Hi, have you tried on a large dataset (200GB+) perhaps? I will try my best to do a rerun with main branch when I have the time.", "I ran it on a small dataset, maybe that’s why I didn’t hit the issue. If it still shows up on your side with the latest main, let me know. I can try it on a bigger set too." ]
https://api.github.com/repos/huggingface/datasets/issues/7719
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7719/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7719/comments
https://api.github.com/repos/huggingface/datasets/issues/7719/events
https://github.com/huggingface/datasets/issues/7719
3,285,928,491
I_kwDODunzps7D20or
7,719
Specify dataset columns types in typehint
[ { "id": 1935892871, "node_id": "MDU6TGFiZWwxOTM1ODkyODcx", "url": "https://api.github.com/repos/huggingface/datasets/labels/enhancement", "name": "enhancement", "color": "a2eeef", "default": true, "description": "New feature or request" } ]
open
false
null
[]
null
0
1,754
1,754
null
NONE
null
null
### Feature request Make dataset optionaly generic to datasets usage with type annotations like it was done in `torch.Dataloader` https://github.com/pytorch/pytorch/blob/134179474539648ba7dee1317959529fbd0e7f89/torch/utils/data/dataloader.py#L131 ### Motivation In MTEB we're using a lot of datasets objects, but they're a bit poor in typehints. E.g. we can specify this for dataloder ```python from typing import TypedDict from torch.utils.data import DataLoader class CorpusInput(TypedDict): title: list[str] body: list[str] class QueryInput(TypedDict): query: list[str] instruction: list[str] def queries_loader() -> DataLoader[QueryInput]: ... def corpus_loader() -> DataLoader[CorpusInput]: ... ``` But for datasets we can only specify columns in type in comments ```python from datasets import Dataset QueryDataset = Dataset """Query dataset should have `query` and `instructions` columns as `str` """ ``` ### Your contribution I can create draft implementation
null
https://api.github.com/repos/huggingface/datasets/issues/7719/timeline
null
null
Samoed
36,135,455
MDQ6VXNlcjM2MTM1NDU1
https://avatars.githubusercontent.com/u/36135455?v=4
https://api.github.com/users/Samoed
https://github.com/Samoed
https://api.github.com/users/Samoed/followers
https://api.github.com/users/Samoed/following{/other_user}
https://api.github.com/users/Samoed/gists{/gist_id}
https://api.github.com/users/Samoed/starred{/owner}{/repo}
https://api.github.com/users/Samoed/subscriptions
https://api.github.com/users/Samoed/orgs
https://api.github.com/users/Samoed/repos
https://api.github.com/users/Samoed/events{/privacy}
https://api.github.com/users/Samoed/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7719/reactions
2
2
0
0
0
0
0
0
0
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[]
https://api.github.com/repos/huggingface/datasets/issues/7717
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7717/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7717/comments
https://api.github.com/repos/huggingface/datasets/issues/7717/events
https://github.com/huggingface/datasets/issues/7717
3,282,855,127
I_kwDODunzps7DrGTX
7,717
Cached dataset is not used when explicitly passing the cache_dir parameter
[]
open
false
null
[]
null
1
1,754
1,754
null
NONE
null
null
### Describe the bug Hi, we are pre-downloading a dataset using snapshot_download(). When loading this exact dataset with load_dataset() the cached snapshot is not used. In both calls, I provide the cache_dir parameter. ### Steps to reproduce the bug ``` from datasets import load_dataset, concatenate_datasets from huggingface_hub import snapshot_download def download_ds(name: str): snapshot_download(repo_id=name, repo_type="dataset", cache_dir="G:/Datasets/cache") def prepare_ds(): audio_ds = load_dataset("openslr/librispeech_asr", num_proc=4, cache_dir="G:/Datasets/cache") print(sfw_ds.features) if __name__ == '__main__': download_ds("openslr/librispeech_asr") prepare_ds() ``` ### Expected behavior I'd expect that the cached version of the dataset is used. Instead, the same dataset is downloaded again to the default cache directory. ### Environment info Windows 11 datasets==4.0.0 Python 3.12.11
null
https://api.github.com/repos/huggingface/datasets/issues/7717/timeline
null
null
padmalcom
3,961,950
MDQ6VXNlcjM5NjE5NTA=
https://avatars.githubusercontent.com/u/3961950?v=4
https://api.github.com/users/padmalcom
https://github.com/padmalcom
https://api.github.com/users/padmalcom/followers
https://api.github.com/users/padmalcom/following{/other_user}
https://api.github.com/users/padmalcom/gists{/gist_id}
https://api.github.com/users/padmalcom/starred{/owner}{/repo}
https://api.github.com/users/padmalcom/subscriptions
https://api.github.com/users/padmalcom/orgs
https://api.github.com/users/padmalcom/repos
https://api.github.com/users/padmalcom/events{/privacy}
https://api.github.com/users/padmalcom/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7717/reactions
0
0
0
0
0
0
0
0
0
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[ "Hi, I've investigated this issue and can confirm the bug. Here are my findings:\n\n**1. Reproduction:**\nI was able to reproduce the issue on the latest `main` branch. Using the provided code snippet, `snapshot_download` correctly populates the custom `cache_dir`, but `load_dataset` with the same `cache_dir` triggers a full re-download and re-processing of the dataset, ignoring the existing cache.\n\n**2. Investigation:**\nI traced the `cache_dir` parameter from `load_dataset` down to the `DatasetBuilder` class in `src/datasets/builder.py`. The root cause seems to be a mismatch between the cache path structure created by `snapshot_download` and the path structure expected by the `DatasetBuilder`.\n\nSpecifically, the `_relative_data_dir` method in `DatasetBuilder` constructs a path using `namespace___dataset_name` (with three underscores), while the cache from `snapshot_download` appears to use a `repo_id` based format like `datasets--namespace--dataset_name` (with double hyphens).\n\n**3. Attempted Fix & Result:**\nI attempted a fix by modifying the `_relative_data_dir` method to replace the path separator \"/\" in `self.repo_id` with \"--\", to align it with the `snapshot_download` structure.\n\nThis partially worked: `load_dataset` no longer re-downloads the files. However, it still re-processes them every time (triggering \"Generating train split...\", etc.) instead of loading the already processed Arrow files from the cache.\n\nThis suggests the issue is deeper than just the directory name and might be related to how the builder verifies the integrity or presence of the processed cache files.\n\nI hope these findings are helpful for whoever picks up this issue." ]
https://api.github.com/repos/huggingface/datasets/issues/7709
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7709/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7709/comments
https://api.github.com/repos/huggingface/datasets/issues/7709/events
https://github.com/huggingface/datasets/issues/7709
3,276,677,990
I_kwDODunzps7DTiNm
7,709
Release 4.0.0 breaks usage patterns of with_format
[]
closed
false
null
[]
null
2
1,753
1,754
1,754
NONE
null
null
### Describe the bug Previously it was possible to access a whole column that was e.g. in numpy format via `with_format` by indexing the column. Now this possibility seems to be gone with the new Column() class. As far as I see, this makes working on a whole column (in-memory) more complex, i.e. normalizing an in-memory dataset for which iterating would be too slow. Is this intended behaviour? I couldn't find much documentation on the intended usage of the new Column class yet. ### Steps to reproduce the bug Steps to reproduce: ``` from datasets import load_dataset dataset = load_dataset("lhoestq/demo1") dataset = dataset.with_format("numpy") print(dataset["star"].ndim) ``` ### Expected behavior Working on whole columns should be possible. ### Environment info - `datasets` version: 4.0.0 - Platform: Linux-6.8.0-63-generic-x86_64-with-glibc2.36 - Python version: 3.12.11 - `huggingface_hub` version: 0.34.3 - PyArrow version: 21.0.0 - Pandas version: 2.3.1 - `fsspec` version: 2025.3.0
null
https://api.github.com/repos/huggingface/datasets/issues/7709/timeline
null
completed
wittenator
9,154,515
MDQ6VXNlcjkxNTQ1MTU=
https://avatars.githubusercontent.com/u/9154515?v=4
https://api.github.com/users/wittenator
https://github.com/wittenator
https://api.github.com/users/wittenator/followers
https://api.github.com/users/wittenator/following{/other_user}
https://api.github.com/users/wittenator/gists{/gist_id}
https://api.github.com/users/wittenator/starred{/owner}{/repo}
https://api.github.com/users/wittenator/subscriptions
https://api.github.com/users/wittenator/orgs
https://api.github.com/users/wittenator/repos
https://api.github.com/users/wittenator/events{/privacy}
https://api.github.com/users/wittenator/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7709/reactions
0
0
0
0
0
0
0
0
0
null
null
null
null
null
null
wittenator
9,154,515
MDQ6VXNlcjkxNTQ1MTU=
https://avatars.githubusercontent.com/u/9154515?v=4
https://api.github.com/users/wittenator
https://github.com/wittenator
https://api.github.com/users/wittenator/followers
https://api.github.com/users/wittenator/following{/other_user}
https://api.github.com/users/wittenator/gists{/gist_id}
https://api.github.com/users/wittenator/starred{/owner}{/repo}
https://api.github.com/users/wittenator/subscriptions
https://api.github.com/users/wittenator/orgs
https://api.github.com/users/wittenator/repos
https://api.github.com/users/wittenator/events{/privacy}
https://api.github.com/users/wittenator/received_events
User
public
false
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[ "This is a breaking change with 4.0 which introduced `Column` objects. To get the numpy array from a `Column` you can `col[i]`, `col[i:j]` or even `col[:]` if you want the full column as a numpy array:\n\n```python\nfrom datasets import load_dataset\ndataset = load_dataset(...)\ndataset = dataset.with_format(\"numpy\")\nprint(dataset[\"star\"][:].ndim)\n```", "Ah perfect, thanks for clearing this up. I would close this ticket then." ]
https://api.github.com/repos/huggingface/datasets/issues/7707
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7707/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7707/comments
https://api.github.com/repos/huggingface/datasets/issues/7707/events
https://github.com/huggingface/datasets/issues/7707
3,271,867,998
I_kwDODunzps7DBL5e
7,707
load_dataset() in 4.0.0 failed when decoding audio
[]
closed
false
null
[]
null
16
1,753
1,759
1,754
NONE
null
null
### Describe the bug Cannot decode audio data. ### Steps to reproduce the bug ```python from datasets import load_dataset dataset = load_dataset("hf-internal-testing/librispeech_asr_demo", "clean", split="validation") print(dataset[0]["audio"]["array"]) ``` 1st round run, got ``` File "/usr/local/lib/python3.12/dist-packages/datasets/features/audio.py", line 172, in decode_example raise ImportError("To support decoding audio data, please install 'torchcodec'.") ImportError: To support decoding audio data, please install 'torchcodec'. ``` After `pip install torchcodec` and run, got ``` File "/usr/local/lib/python3.12/dist-packages/torchcodec/_core/_metadata.py", line 16, in <module> from torchcodec._core.ops import ( File "/usr/local/lib/python3.12/dist-packages/torchcodec/_core/ops.py", line 84, in <module> load_torchcodec_shared_libraries() File "/usr/local/lib/python3.12/dist-packages/torchcodec/_core/ops.py", line 69, in load_torchcodec_shared_libraries raise RuntimeError( RuntimeError: Could not load libtorchcodec. Likely causes: 1. FFmpeg is not properly installed in your environment. We support versions 4, 5, 6 and 7. 2. The PyTorch version (2.8.0a0+5228986c39.nv25.06) is not compatible with this version of TorchCodec. Refer to the version compatibility table: https://github.com/pytorch/torchcodec?tab=readme-ov-file#installing-torchcodec. 3. Another runtime dependency; see exceptions below. The following exceptions were raised as we tried to load libtorchcodec: [start of libtorchcodec loading traceback] FFmpeg version 7: libavutil.so.59: cannot open shared object file: No such file or directory FFmpeg version 6: libavutil.so.58: cannot open shared object file: No such file or directory FFmpeg version 5: libavutil.so.57: cannot open shared object file: No such file or directory FFmpeg version 4: libavutil.so.56: cannot open shared object file: No such file or directory [end of libtorchcodec loading traceback]. ``` After `apt update && apt install ffmpeg -y`, got ``` Traceback (most recent call last): File "/workspace/jiqing/test_datasets.py", line 4, in <module> print(dataset[0]["audio"]["array"]) ~~~~~~~^^^ File "/usr/local/lib/python3.12/dist-packages/datasets/arrow_dataset.py", line 2859, in __getitem__ return self._getitem(key) ^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/dist-packages/datasets/arrow_dataset.py", line 2841, in _getitem formatted_output = format_table( ^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/dist-packages/datasets/formatting/formatting.py", line 657, in format_table return formatter(pa_table, query_type=query_type) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/dist-packages/datasets/formatting/formatting.py", line 410, in __call__ return self.format_row(pa_table) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/dist-packages/datasets/formatting/formatting.py", line 459, in format_row row = self.python_features_decoder.decode_row(row) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/dist-packages/datasets/formatting/formatting.py", line 223, in decode_row return self.features.decode_example(row, token_per_repo_id=self.token_per_repo_id) if self.features else row ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/dist-packages/datasets/features/features.py", line 2093, in decode_example column_name: decode_nested_example(feature, value, token_per_repo_id=token_per_repo_id) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/dist-packages/datasets/features/features.py", line 1405, in decode_nested_example return schema.decode_example(obj, token_per_repo_id=token_per_repo_id) if obj is not None else None ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/dist-packages/datasets/features/audio.py", line 198, in decode_example audio = AudioDecoder(bytes, stream_index=self.stream_index, sample_rate=self.sampling_rate) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/dist-packages/torchcodec/decoders/_audio_decoder.py", line 62, in __init__ self._decoder = create_decoder(source=source, seek_mode="approximate") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/dist-packages/torchcodec/decoders/_decoder_utils.py", line 33, in create_decoder return core.create_from_bytes(source, seek_mode) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/dist-packages/torchcodec/_core/ops.py", line 144, in create_from_bytes return create_from_tensor(buffer, seek_mode) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/dist-packages/torch/_ops.py", line 756, in __call__ return self._op(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^ NotImplementedError: Could not run 'torchcodec_ns::create_from_tensor' with arguments from the 'CPU' backend. This could be because the operator doesn't exist for this backend, or was omitted during the selective/custom build process (if using custom build). If you are a Facebook employee using PyTorch on mobile, please visit https://fburl.com/ptmfixes for possible resolutions. 'torchcodec_ns::create_from_tensor' is only available for these backends: [Meta, BackendSelect, Python, FuncTorchDynamicLayerBackMode, Functionalize, Named, Conjugate, Negative, ZeroTensor, ADInplaceOrView, AutogradOther, AutogradCPU, AutogradCUDA, AutogradXLA, AutogradMPS, AutogradXPU, AutogradHPU, AutogradLazy, AutogradMTIA, AutogradMAIA, AutogradMeta, Tracer, AutocastCPU, AutocastMTIA, AutocastMAIA, AutocastXPU, AutocastMPS, AutocastCUDA, FuncTorchBatched, BatchedNestedTensor, FuncTorchVmapMode, Batched, VmapMode, FuncTorchGradWrapper, PythonTLSSnapshot, FuncTorchDynamicLayerFrontMode, PreDispatch, PythonDispatcher]. Meta: registered at /dev/null:214 [kernel] BackendSelect: fallthrough registered at /opt/pytorch/pytorch/aten/src/ATen/core/BackendSelectFallbackKernel.cpp:3 [backend fallback] Python: registered at /__w/torchcodec/torchcodec/pytorch/torchcodec/src/torchcodec/_core/custom_ops.cpp:694 [kernel] FuncTorchDynamicLayerBackMode: registered at /opt/pytorch/pytorch/aten/src/ATen/functorch/DynamicLayer.cpp:479 [backend fallback] Functionalize: registered at /opt/pytorch/pytorch/aten/src/ATen/FunctionalizeFallbackKernel.cpp:349 [backend fallback] Named: registered at /opt/pytorch/pytorch/aten/src/ATen/core/NamedRegistrations.cpp:7 [backend fallback] Conjugate: registered at /opt/pytorch/pytorch/aten/src/ATen/ConjugateFallback.cpp:17 [backend fallback] Negative: registered at /opt/pytorch/pytorch/aten/src/ATen/native/NegateFallback.cpp:18 [backend fallback] ZeroTensor: registered at /opt/pytorch/pytorch/aten/src/ATen/ZeroTensorFallback.cpp:86 [backend fallback] ADInplaceOrView: fallthrough registered at /opt/pytorch/pytorch/aten/src/ATen/core/VariableFallbackKernel.cpp:104 [backend fallback] AutogradOther: registered at /opt/pytorch/pytorch/aten/src/ATen/core/VariableFallbackKernel.cpp:63 [backend fallback] AutogradCPU: registered at /opt/pytorch/pytorch/aten/src/ATen/core/VariableFallbackKernel.cpp:67 [backend fallback] AutogradCUDA: registered at /opt/pytorch/pytorch/aten/src/ATen/core/VariableFallbackKernel.cpp:75 [backend fallback] AutogradXLA: registered at /opt/pytorch/pytorch/aten/src/ATen/core/VariableFallbackKernel.cpp:87 [backend fallback] AutogradMPS: registered at /opt/pytorch/pytorch/aten/src/ATen/core/VariableFallbackKernel.cpp:95 [backend fallback] AutogradXPU: registered at /opt/pytorch/pytorch/aten/src/ATen/core/VariableFallbackKernel.cpp:71 [backend fallback] AutogradHPU: registered at /opt/pytorch/pytorch/aten/src/ATen/core/VariableFallbackKernel.cpp:108 [backend fallback] AutogradLazy: registered at /opt/pytorch/pytorch/aten/src/ATen/core/VariableFallbackKernel.cpp:91 [backend fallback] AutogradMTIA: registered at /opt/pytorch/pytorch/aten/src/ATen/core/VariableFallbackKernel.cpp:79 [backend fallback] AutogradMAIA: registered at /opt/pytorch/pytorch/aten/src/ATen/core/VariableFallbackKernel.cpp:83 [backend fallback] AutogradMeta: registered at /opt/pytorch/pytorch/aten/src/ATen/core/VariableFallbackKernel.cpp:99 [backend fallback] Tracer: registered at /opt/pytorch/pytorch/torch/csrc/autograd/TraceTypeManual.cpp:294 [backend fallback] AutocastCPU: fallthrough registered at /opt/pytorch/pytorch/aten/src/ATen/autocast_mode.cpp:322 [backend fallback] AutocastMTIA: fallthrough registered at /opt/pytorch/pytorch/aten/src/ATen/autocast_mode.cpp:466 [backend fallback] AutocastMAIA: fallthrough registered at /opt/pytorch/pytorch/aten/src/ATen/autocast_mode.cpp:504 [backend fallback] AutocastXPU: fallthrough registered at /opt/pytorch/pytorch/aten/src/ATen/autocast_mode.cpp:542 [backend fallback] AutocastMPS: fallthrough registered at /opt/pytorch/pytorch/aten/src/ATen/autocast_mode.cpp:209 [backend fallback] AutocastCUDA: fallthrough registered at /opt/pytorch/pytorch/aten/src/ATen/autocast_mode.cpp:165 [backend fallback] FuncTorchBatched: registered at /opt/pytorch/pytorch/aten/src/ATen/functorch/LegacyBatchingRegistrations.cpp:731 [backend fallback] BatchedNestedTensor: registered at /opt/pytorch/pytorch/aten/src/ATen/functorch/LegacyBatchingRegistrations.cpp:758 [backend fallback] FuncTorchVmapMode: fallthrough registered at /opt/pytorch/pytorch/aten/src/ATen/functorch/VmapModeRegistrations.cpp:27 [backend fallback] Batched: registered at /opt/pytorch/pytorch/aten/src/ATen/LegacyBatchingRegistrations.cpp:1075 [backend fallback] VmapMode: fallthrough registered at /opt/pytorch/pytorch/aten/src/ATen/VmapModeRegistrations.cpp:33 [backend fallback] FuncTorchGradWrapper: registered at /opt/pytorch/pytorch/aten/src/ATen/functorch/TensorWrapper.cpp:208 [backend fallback] PythonTLSSnapshot: registered at /opt/pytorch/pytorch/aten/src/ATen/core/PythonFallbackKernel.cpp:202 [backend fallback] FuncTorchDynamicLayerFrontMode: registered at /opt/pytorch/pytorch/aten/src/ATen/functorch/DynamicLayer.cpp:475 [backend fallback] PreDispatch: registered at /opt/pytorch/pytorch/aten/src/ATen/core/PythonFallbackKernel.cpp:206 [backend fallback] PythonDispatcher: registered at /opt/pytorch/pytorch/aten/src/ATen/core/PythonFallbackKernel.cpp:198 [backend fallback] ``` ### Expected behavior The result is ``` [0.00238037 0.0020752 0.00198364 ... 0.00042725 0.00057983 0.0010376 ] ``` on `datasets==3.6.0` ### Environment info [NV official docker image](https://catalog.ngc.nvidia.com/orgs/nvidia/containers/pytorch): `nvcr.io/nvidia/pytorch:25.06-py3` ``` - `datasets` version: 4.0.0 - Platform: Linux-5.4.292-1.el8.elrepo.x86_64-x86_64-with-glibc2.39 - Python version: 3.12.3 - `huggingface_hub` version: 0.34.2 - PyArrow version: 19.0.1 - Pandas version: 2.2.3 - `fsspec` version: 2025.3.0 ```
null
https://api.github.com/repos/huggingface/datasets/issues/7707/timeline
null
completed
jiqing-feng
107,918,818
U_kgDOBm614g
https://avatars.githubusercontent.com/u/107918818?v=4
https://api.github.com/users/jiqing-feng
https://github.com/jiqing-feng
https://api.github.com/users/jiqing-feng/followers
https://api.github.com/users/jiqing-feng/following{/other_user}
https://api.github.com/users/jiqing-feng/gists{/gist_id}
https://api.github.com/users/jiqing-feng/starred{/owner}{/repo}
https://api.github.com/users/jiqing-feng/subscriptions
https://api.github.com/users/jiqing-feng/orgs
https://api.github.com/users/jiqing-feng/repos
https://api.github.com/users/jiqing-feng/events{/privacy}
https://api.github.com/users/jiqing-feng/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7707/reactions
3
3
0
0
0
0
0
0
0
null
null
null
null
null
null
jiqing-feng
107,918,818
U_kgDOBm614g
https://avatars.githubusercontent.com/u/107918818?v=4
https://api.github.com/users/jiqing-feng
https://github.com/jiqing-feng
https://api.github.com/users/jiqing-feng/followers
https://api.github.com/users/jiqing-feng/following{/other_user}
https://api.github.com/users/jiqing-feng/gists{/gist_id}
https://api.github.com/users/jiqing-feng/starred{/owner}{/repo}
https://api.github.com/users/jiqing-feng/subscriptions
https://api.github.com/users/jiqing-feng/orgs
https://api.github.com/users/jiqing-feng/repos
https://api.github.com/users/jiqing-feng/events{/privacy}
https://api.github.com/users/jiqing-feng/received_events
User
public
false
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[ "Hi @lhoestq . Would you please have a look at it? I use the official NV Docker ([NV official docker image](https://catalog.ngc.nvidia.com/orgs/nvidia/containers/pytorch): `nvcr.io/nvidia/pytorch:25.06-py3`) on A100 and encountered this issue, but I don't know how to fix it.", "Use !pip install -U datasets[audio] rather than !pip install datasets\n\nI got the solution from this link [https://github.com/huggingface/datasets/issues/7678](https://github.com/huggingface/datasets/issues/7678), and it processes the data; however, it led to certain transformer importnerrors", "> https://github.com/huggingface/datasets/issues/7678\n\nHi @asantewaa-bremang . Thanks for your reply, but sadly it does not work for me.", "It looks like a torchcodec issue, have you tried to look at the torchcodec issues here in case someone has the same issue ? https://github.com/pytorch/torchcodec/issues\n\notherwise feel free to open a new issue there", "@jiqing-feng, are you running the code on Colab? If you are, you should restart after making this installation ! pip install -U datasets[audio]. ", "> [@jiqing-feng](https://github.com/jiqing-feng), are you running the code on Colab? If you are, you should restart after making this installation ! pip install -U datasets[audio].\n\nNo, I ran the script on the A100 instance locally.", "> It looks like a torchcodec issue, have you tried to look at the torchcodec issues here in case someone has the same issue ? https://github.com/pytorch/torchcodec/issues\n> \n> otherwise feel free to open a new issue there\n\nThanks! I've opened a new issue on torchcodec. Could we have a fallback implementation without torchcodec (just like datasets==3.6.0) ?", "> Thanks! I've opened a new issue on torchcodec. Could we have a fallback implementation without torchcodec (just like datasets==3.6.0) ?\n\nFor now I'd recommend using `datasets==3.6.0` if this issue is blocking for you", "Resolved by installing the pre-release torchcodec. Thanks!", "Same. torchcodec==0.6.0 failed, torchcodec==0.5.0 solved", "So what combination of 'datasets' and 'torchcodec' worked out?", "> So what combination of 'datasets' and 'torchcodec' worked out?\n\nnice mate! \njust about to write this massage!!!!!\n\n\n\nwhen this will solve????\n", "torchcodec 0.7 fails\n0.5 not guaranty to work with torch 2.8\n\n", "> Resolved by installing the pre-release torchcodec. Thanks!\n\nhow to install the pre-release torchcodec, when I use pip install --pre torchcodec, it do not download new version", "i fixed this issue by install :\n\nconda install \"ffmpeg<8\"\nor\nconda install \"ffmpeg<8\" -c conda-forge\n\nyou can find more info : https://github.com/meta-pytorch/torchcodec?tab=readme-ov-file#installing-torchcodec", "It loads fine with datasets==3.6.0" ]
https://api.github.com/repos/huggingface/datasets/issues/7705
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7705/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7705/comments
https://api.github.com/repos/huggingface/datasets/issues/7705/events
https://github.com/huggingface/datasets/issues/7705
3,269,070,499
I_kwDODunzps7C2g6j
7,705
Can Not read installed dataset in dataset.load(.)
[]
open
false
null
[]
null
3
1,753
1,754
null
NONE
null
null
Hi, folks, I'm newbie in huggingface dataset api. As title, i'm facing the issue that the dataset.load api can not connect to the installed dataset. code snippet : <img width="572" height="253" alt="Image" src="https://github.com/user-attachments/assets/10f48aaf-d6ca-4239-b1cf-145d74f125d1" /> data path : "/xxx/joseph/llava_ds/vlm_ds" it contains all video clips i want! <img width="1398" height="261" alt="Image" src="https://github.com/user-attachments/assets/bf213b66-e344-4311-97e7-bc209677ae77" /> i run the py script by <img width="1042" height="38" alt="Image" src="https://github.com/user-attachments/assets/8b3fcee4-e1a6-41b8-bee1-91567b00d9d2" /> But bad happended, even i provide dataset path by "HF_HUB_CACHE", it still attempt to download data from remote side : <img width="1697" height="813" alt="Image" src="https://github.com/user-attachments/assets/baa6cff1-a724-4710-a8c4-4805459deffb" /> Any suggestion will be appreciated!!
null
https://api.github.com/repos/huggingface/datasets/issues/7705/timeline
null
null
HuangChiEn
52,521,165
MDQ6VXNlcjUyNTIxMTY1
https://avatars.githubusercontent.com/u/52521165?v=4
https://api.github.com/users/HuangChiEn
https://github.com/HuangChiEn
https://api.github.com/users/HuangChiEn/followers
https://api.github.com/users/HuangChiEn/following{/other_user}
https://api.github.com/users/HuangChiEn/gists{/gist_id}
https://api.github.com/users/HuangChiEn/starred{/owner}{/repo}
https://api.github.com/users/HuangChiEn/subscriptions
https://api.github.com/users/HuangChiEn/orgs
https://api.github.com/users/HuangChiEn/repos
https://api.github.com/users/HuangChiEn/events{/privacy}
https://api.github.com/users/HuangChiEn/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7705/reactions
0
0
0
0
0
0
0
0
0
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[ "You can download the dataset locally using [huggingface_hub.snapshot_download](https://huggingface.co/docs/huggingface_hub/v0.34.3/en/package_reference/file_download#huggingface_hub.snapshot_download) and then do\n\n```python\ndataset = load_dataset(local_directory_path)\n```", "> You can download the dataset locally using [huggingface_hub.snapshot_download](https://huggingface.co/docs/huggingface_hub/v0.34.3/en/package_reference/file_download#huggingface_hub.snapshot_download) and then do\n> \n> dataset = load_dataset(local_directory_path)\n\nIt's good suggestion, but my server env is network restriction. It can not directly fetch data from huggingface. I spent lot of time to download and transfer it to the server.\nSo, I attempt to make load_dataset connect to my local dataset. ", "Just Solved it few day before. Will post solution later...\nalso thanks folks quick reply.." ]
https://api.github.com/repos/huggingface/datasets/issues/7703
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7703/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7703/comments
https://api.github.com/repos/huggingface/datasets/issues/7703/events
https://github.com/huggingface/datasets/issues/7703
3,265,648,942
I_kwDODunzps7Cpdku
7,703
[Docs] map() example uses undefined `tokenizer` — causes NameError
[]
open
false
null
[]
null
1
1,753
1,753
null
CONTRIBUTOR
null
null
## Description The current documentation example for `datasets.Dataset.map()` demonstrates batched processing but uses a `tokenizer` object without defining or importing it. This causes an error every time it's copied. Here is the problematic line: ```python # process a batch of examples >>> ds = ds.map(lambda example: tokenizer(example["text"]), batched=True) ``` This assumes the user has already set up a tokenizer, which contradicts the goal of having self-contained, copy-paste-friendly examples. ## Problem Users who copy and run the example as-is will encounter: ```python NameError: name 'tokenizer' is not defined ``` This breaks the flow for users and violates HuggingFace's documentation principle that examples should "work as expected" when copied directly. ## Proposal Update the example to include the required tokenizer setup using the Transformers library, like so: ```python from transformers import AutoTokenizer tokenizer = AutoTokenizer.from_pretrained("bert-base-uncased") ds_tokenized = ds.map(lambda example: tokenizer(example["text"]), batched=True) ``` This will help new users understand the workflow and apply the method correctly. ## Note This PR complements ongoing improvements like #7700, which clarifies multiprocessing in .map(). My change focuses on undefined tokenizer — causes NameError
null
https://api.github.com/repos/huggingface/datasets/issues/7703/timeline
null
null
Sanjaykumar030
183,703,408
U_kgDOCvMXcA
https://avatars.githubusercontent.com/u/183703408?v=4
https://api.github.com/users/Sanjaykumar030
https://github.com/Sanjaykumar030
https://api.github.com/users/Sanjaykumar030/followers
https://api.github.com/users/Sanjaykumar030/following{/other_user}
https://api.github.com/users/Sanjaykumar030/gists{/gist_id}
https://api.github.com/users/Sanjaykumar030/starred{/owner}{/repo}
https://api.github.com/users/Sanjaykumar030/subscriptions
https://api.github.com/users/Sanjaykumar030/orgs
https://api.github.com/users/Sanjaykumar030/repos
https://api.github.com/users/Sanjaykumar030/events{/privacy}
https://api.github.com/users/Sanjaykumar030/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7703/reactions
0
0
0
0
0
0
0
0
0
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[ "I've submitted PR #7704 which adds documentation to clarify the behavior of `map()` when returning `None`." ]
https://api.github.com/repos/huggingface/datasets/issues/7700
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7700/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7700/comments
https://api.github.com/repos/huggingface/datasets/issues/7700/events
https://github.com/huggingface/datasets/issues/7700
3,263,922,255
I_kwDODunzps7Ci4BP
7,700
[doc] map.num_proc needs clarification
[]
open
false
null
[]
null
0
1,753
1,753
null
NONE
null
null
https://huggingface.co/docs/datasets/v4.0.0/en/package_reference/main_classes#datasets.Dataset.map.num_proc ``` num_proc (int, optional, defaults to None) — Max number of processes when generating cache. Already cached shards are loaded sequentially. ``` for batch: ``` num_proc (int, optional, defaults to None): The number of processes to use for multiprocessing. If None, no multiprocessing is used. This can significantly speed up batching for large datasets. ``` So what happens to `map.num_proc` - is it the same behavior as `batch.num_proc` - so only if `num_proc=None` then no multiprocessing is used? Let's update the doc to be unambiguous. **bonus**: we could make all of these behave similarly to `DataLoader.num_workers` - where `num_workers==0` implies no multiprocessing. I think that's the most intuitive, IMHO. 0 workers - the main process has to do all the work. `None` could be the same as `0`. context: debugging a failing `map` Thank you!
null
https://api.github.com/repos/huggingface/datasets/issues/7700/timeline
null
null
sfc-gh-sbekman
196,988,264
U_kgDOC73NaA
https://avatars.githubusercontent.com/u/196988264?v=4
https://api.github.com/users/sfc-gh-sbekman
https://github.com/sfc-gh-sbekman
https://api.github.com/users/sfc-gh-sbekman/followers
https://api.github.com/users/sfc-gh-sbekman/following{/other_user}
https://api.github.com/users/sfc-gh-sbekman/gists{/gist_id}
https://api.github.com/users/sfc-gh-sbekman/starred{/owner}{/repo}
https://api.github.com/users/sfc-gh-sbekman/subscriptions
https://api.github.com/users/sfc-gh-sbekman/orgs
https://api.github.com/users/sfc-gh-sbekman/repos
https://api.github.com/users/sfc-gh-sbekman/events{/privacy}
https://api.github.com/users/sfc-gh-sbekman/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7700/reactions
1
1
0
0
0
0
0
0
0
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[]
https://api.github.com/repos/huggingface/datasets/issues/7699
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7699/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7699/comments
https://api.github.com/repos/huggingface/datasets/issues/7699/events
https://github.com/huggingface/datasets/issues/7699
3,261,053,171
I_kwDODunzps7CX7jz
7,699
Broken link in documentation for "Create a video dataset"
[]
open
false
null
[]
null
1
1,753
1,753
null
NONE
null
null
The link to "the [WebDataset documentation](https://webdataset.github.io/webdataset)." is broken. https://huggingface.co/docs/datasets/main/en/video_dataset#webdataset <img width="2048" height="264" alt="Image" src="https://github.com/user-attachments/assets/975dd10c-aad8-42fc-9fbc-de0e2747a326" />
null
https://api.github.com/repos/huggingface/datasets/issues/7699/timeline
null
null
cleong110
122,366,389
U_kgDOB0sptQ
https://avatars.githubusercontent.com/u/122366389?v=4
https://api.github.com/users/cleong110
https://github.com/cleong110
https://api.github.com/users/cleong110/followers
https://api.github.com/users/cleong110/following{/other_user}
https://api.github.com/users/cleong110/gists{/gist_id}
https://api.github.com/users/cleong110/starred{/owner}{/repo}
https://api.github.com/users/cleong110/subscriptions
https://api.github.com/users/cleong110/orgs
https://api.github.com/users/cleong110/repos
https://api.github.com/users/cleong110/events{/privacy}
https://api.github.com/users/cleong110/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7699/reactions
0
0
0
0
0
0
0
0
0
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[ "The URL is ok but it seems the webdataset website is down. There seems to be a related issue here: https://github.com/webdataset/webdataset/issues/155\n\nFeel free to ask the authors there for an update. Otherwise happy to witch the link to the mirror shared in that issue" ]
https://api.github.com/repos/huggingface/datasets/issues/7698
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7698/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7698/comments
https://api.github.com/repos/huggingface/datasets/issues/7698/events
https://github.com/huggingface/datasets/issues/7698
3,255,350,916
I_kwDODunzps7CCLaE
7,698
NotImplementedError when using streaming=True in Google Colab environment
[]
open
false
null
[]
null
2
1,753
1,753
null
NONE
null
null
### Describe the bug When attempting to load a large dataset (like tiiuae/falcon-refinedweb or allenai/c4) using streaming=True in a standard Google Colab notebook, the process fails with a NotImplementedError: Loading a streaming dataset cached in a LocalFileSystem is not supported yet. This issue persists even after upgrading datasets and huggingface_hub and restarting the session. ### Steps to reproduce the bug Open a new Google Colab notebook. (Optional but recommended) Run !pip install --upgrade datasets huggingface_hub and restart the runtime. Run the following code: Python from datasets import load_dataset try: print("Attempting to load a stream...") streaming_dataset = load_dataset('tiiuae/falcon-refinedweb', streaming=True) print("Success!") except Exception as e: print(e) ### Expected behavior The load_dataset command should return a StreamingDataset object without raising an error, allowing iteration over the dataset. Actual Behavior The code fails and prints the following error traceback: [PASTE THE FULL ERROR TRACEBACK HERE] (Note: Copy the entire error message you received, from Traceback... to the final error line, and paste it in this section.) ### Environment info Platform: Google Colab datasets version: [Run !pip show datasets in Colab and paste the version here] huggingface_hub version: [Run !pip show huggingface_hub and paste the version here] Python version: [Run !python --version and paste the version here]
null
https://api.github.com/repos/huggingface/datasets/issues/7698/timeline
null
null
Aniket17200
100,470,741
U_kgDOBf0P1Q
https://avatars.githubusercontent.com/u/100470741?v=4
https://api.github.com/users/Aniket17200
https://github.com/Aniket17200
https://api.github.com/users/Aniket17200/followers
https://api.github.com/users/Aniket17200/following{/other_user}
https://api.github.com/users/Aniket17200/gists{/gist_id}
https://api.github.com/users/Aniket17200/starred{/owner}{/repo}
https://api.github.com/users/Aniket17200/subscriptions
https://api.github.com/users/Aniket17200/orgs
https://api.github.com/users/Aniket17200/repos
https://api.github.com/users/Aniket17200/events{/privacy}
https://api.github.com/users/Aniket17200/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7698/reactions
0
0
0
0
0
0
0
0
0
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[ "Hi, @Aniket17200, try upgrading datasets using '!pip install -U datasets'. I hope this will resolve your issue.", "Thank you @tanuj-rai, it's working great " ]
https://api.github.com/repos/huggingface/datasets/issues/7697
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7697/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7697/comments
https://api.github.com/repos/huggingface/datasets/issues/7697/events
https://github.com/huggingface/datasets/issues/7697
3,254,526,399
I_kwDODunzps7B_CG_
7,697
-
[]
closed
false
null
[]
null
0
1,753
1,753
1,753
NONE
null
null
-
null
https://api.github.com/repos/huggingface/datasets/issues/7697/timeline
null
completed
ghost
10,137
MDQ6VXNlcjEwMTM3
https://avatars.githubusercontent.com/u/10137?v=4
https://api.github.com/users/ghost
https://github.com/ghost
https://api.github.com/users/ghost/followers
https://api.github.com/users/ghost/following{/other_user}
https://api.github.com/users/ghost/gists{/gist_id}
https://api.github.com/users/ghost/starred{/owner}{/repo}
https://api.github.com/users/ghost/subscriptions
https://api.github.com/users/ghost/orgs
https://api.github.com/users/ghost/repos
https://api.github.com/users/ghost/events{/privacy}
https://api.github.com/users/ghost/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7697/reactions
0
0
0
0
0
0
0
0
0
null
null
null
null
null
null
lhoestq
42,851,186
MDQ6VXNlcjQyODUxMTg2
https://avatars.githubusercontent.com/u/42851186?v=4
https://api.github.com/users/lhoestq
https://github.com/lhoestq
https://api.github.com/users/lhoestq/followers
https://api.github.com/users/lhoestq/following{/other_user}
https://api.github.com/users/lhoestq/gists{/gist_id}
https://api.github.com/users/lhoestq/starred{/owner}{/repo}
https://api.github.com/users/lhoestq/subscriptions
https://api.github.com/users/lhoestq/orgs
https://api.github.com/users/lhoestq/repos
https://api.github.com/users/lhoestq/events{/privacy}
https://api.github.com/users/lhoestq/received_events
User
public
false
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[]
https://api.github.com/repos/huggingface/datasets/issues/7696
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7696/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7696/comments
https://api.github.com/repos/huggingface/datasets/issues/7696/events
https://github.com/huggingface/datasets/issues/7696
3,253,433,350
I_kwDODunzps7B63QG
7,696
load_dataset() in 4.0.0 returns different audio samples compared to earlier versions breaking reproducibility
[]
closed
false
null
[]
null
2
1,753
1,753
1,753
NONE
null
null
### Describe the bug In datasets 4.0.0 release, `load_dataset()` returns different audio samples compared to earlier versions, this breaks integration tests that depend on consistent sample data across different environments (first and second envs specified below). ### Steps to reproduce the bug ```python from datasets import Audio, load_dataset ds = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean", split="validation") ds = ds.cast_column("audio", Audio(24000)) sample= ds[0]["audio"]["array"] print(sample) # sample in 3.6.0 [0.00231914 0.00245417 0.00187414 ... 0.00061956 0.00101157 0.00076325] # sample in 4.0.0 array([0.00238037, 0.00220794, 0.00198703, ..., 0.00057983, 0.00085863, 0.00115309], dtype=float32) ``` ### Expected behavior The same dataset should load identical samples across versions to maintain reproducibility. ### Environment info First env: - datasets version: 3.6.0 - Platform: Windows-10-10.0.26100-SP0 - Python: 3.11.0 Second env: - datasets version: 4.0.0 - Platform: Linux-6.1.123+-x86_64-with-glibc2.35 - Python: 3.11.13
null
https://api.github.com/repos/huggingface/datasets/issues/7696/timeline
null
completed
Manalelaidouni
25,346,345
MDQ6VXNlcjI1MzQ2MzQ1
https://avatars.githubusercontent.com/u/25346345?v=4
https://api.github.com/users/Manalelaidouni
https://github.com/Manalelaidouni
https://api.github.com/users/Manalelaidouni/followers
https://api.github.com/users/Manalelaidouni/following{/other_user}
https://api.github.com/users/Manalelaidouni/gists{/gist_id}
https://api.github.com/users/Manalelaidouni/starred{/owner}{/repo}
https://api.github.com/users/Manalelaidouni/subscriptions
https://api.github.com/users/Manalelaidouni/orgs
https://api.github.com/users/Manalelaidouni/repos
https://api.github.com/users/Manalelaidouni/events{/privacy}
https://api.github.com/users/Manalelaidouni/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7696/reactions
0
0
0
0
0
0
0
0
0
null
null
null
null
null
null
Manalelaidouni
25,346,345
MDQ6VXNlcjI1MzQ2MzQ1
https://avatars.githubusercontent.com/u/25346345?v=4
https://api.github.com/users/Manalelaidouni
https://github.com/Manalelaidouni
https://api.github.com/users/Manalelaidouni/followers
https://api.github.com/users/Manalelaidouni/following{/other_user}
https://api.github.com/users/Manalelaidouni/gists{/gist_id}
https://api.github.com/users/Manalelaidouni/starred{/owner}{/repo}
https://api.github.com/users/Manalelaidouni/subscriptions
https://api.github.com/users/Manalelaidouni/orgs
https://api.github.com/users/Manalelaidouni/repos
https://api.github.com/users/Manalelaidouni/events{/privacy}
https://api.github.com/users/Manalelaidouni/received_events
User
public
false
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[ "Hi ! This is because `datasets` now uses the FFmpeg-based library `torchcodec` instead of the libsndfile-based library `soundfile` to decode audio data. Those two have different decoding implementations", "I’m all for torchcodec, good luck with the migration!" ]
https://api.github.com/repos/huggingface/datasets/issues/7694
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7694/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7694/comments
https://api.github.com/repos/huggingface/datasets/issues/7694/events
https://github.com/huggingface/datasets/issues/7694
3,247,600,408
I_kwDODunzps7BknMY
7,694
Dataset.to_json consumes excessive memory, appears to not be a streaming operation
[]
open
false
null
[]
null
1
1,753
1,753
null
NONE
null
null
### Describe the bug When exporting a Dataset object to a JSON Lines file using the .to_json(lines=True) method, the process consumes a very large amount of memory. The memory usage is proportional to the size of the entire Dataset object being saved, rather than being a low, constant memory operation. This behavior is unexpected, as the JSONL format is line-oriented and ideally suited for streaming writes. This issue can easily lead to Out-of-Memory (OOM) errors when exporting large datasets, especially in memory-constrained environments like Docker containers. <img width="1343" height="329" alt="Image" src="https://github.com/user-attachments/assets/518b4263-ad12-422d-9672-28ffe97240ce" /> ### Steps to reproduce the bug ``` import os from datasets import load_dataset, Dataset from loguru import logger # A public dataset to test with REPO_ID = "adam89/TinyStoriesChinese" SUBSET = "default" SPLIT = "train" NUM_ROWS_TO_LOAD = 10 # Use a reasonably large number to see the memory spike def run_test(): """Loads data into memory and then saves it, triggering the memory issue.""" logger.info("Step 1: Loading data into an in-memory Dataset object...") # Create an in-memory Dataset object from a stream # This simulates having a processed dataset ready to be saved iterable_dataset = load_dataset(REPO_ID, name=SUBSET, split=SPLIT, streaming=True) limited_stream = iterable_dataset.take(NUM_ROWS_TO_LOAD) in_memory_dataset = Dataset.from_generator(limited_stream.__iter__) logger.info(f"Dataset with {len(in_memory_dataset)} rows created in memory.") output_path = "./test_output.jsonl" logger.info(f"Step 2: Saving the dataset to {output_path} using .to_json()...") logger.info("Please monitor memory usage during this step.") # This is the step that causes the massive memory allocation in_memory_dataset.to_json(output_path, force_ascii=False) logger.info("Save operation complete.") os.remove(output_path) if __name__ == "__main__": # To see the memory usage clearly, run this script with a memory profiler: # python -m memray run your_script_name.py # python -m memray tree xxx.bin run_test() ``` ### Expected behavior I would expect the .to_json(lines=True) method to be a memory-efficient, streaming operation. The memory usage should remain low and relatively constant, as data is converted and written to the file line-by-line or in small batches. The memory footprint should not be proportional to the total number of rows in the in_memory_dataset. ### Environment info datasets version:3.6.0 Python version:3.9.18 os:macOS 15.3.1 (arm64)
null
https://api.github.com/repos/huggingface/datasets/issues/7694/timeline
null
null
ycq0125
49,603,999
MDQ6VXNlcjQ5NjAzOTk5
https://avatars.githubusercontent.com/u/49603999?v=4
https://api.github.com/users/ycq0125
https://github.com/ycq0125
https://api.github.com/users/ycq0125/followers
https://api.github.com/users/ycq0125/following{/other_user}
https://api.github.com/users/ycq0125/gists{/gist_id}
https://api.github.com/users/ycq0125/starred{/owner}{/repo}
https://api.github.com/users/ycq0125/subscriptions
https://api.github.com/users/ycq0125/orgs
https://api.github.com/users/ycq0125/repos
https://api.github.com/users/ycq0125/events{/privacy}
https://api.github.com/users/ycq0125/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7694/reactions
0
0
0
0
0
0
0
0
0
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[ "Hi ! to_json is memory efficient and writes the data by batch:\n\nhttps://github.com/huggingface/datasets/blob/d9861d86be222884dabbd534a2db770c70c9b558/src/datasets/io/json.py#L153-L159\n\nWhat memory are you mesuring ? If you are mesuring RSS, it is likely that it counts the memory mapped data of the dataset. Memory mapped data are loaded as physical memory when accessed and are automatically discarded when your OS needs more memory, and therefore doesn't OOM." ]
https://api.github.com/repos/huggingface/datasets/issues/7693
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7693/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7693/comments
https://api.github.com/repos/huggingface/datasets/issues/7693/events
https://github.com/huggingface/datasets/issues/7693
3,246,369,678
I_kwDODunzps7Bf6uO
7,693
Dataset scripts are no longer supported, but found superb.py
[]
open
false
null
[]
null
18
1,753
1,756
null
NONE
null
null
### Describe the bug Hello, I'm trying to follow the [Hugging Face Pipelines tutorial](https://huggingface.co/docs/transformers/main_classes/pipelines) but the tutorial seems to work only on old datasets versions. I then get the error : ``` -------------------------------------------------------------------------- RuntimeError Traceback (most recent call last) Cell In[65], [line 1](vscode-notebook-cell:?execution_count=65&line=1) ----> [1](vscode-notebook-cell:?execution_count=65&line=1) dataset = datasets.load_dataset("superb", name="asr", split="test") 3 # KeyDataset (only *pt*) will simply return the item in the dict returned by the dataset item 4 # as we're not interested in the *target* part of the dataset. For sentence pair use KeyPairDataset 5 for out in tqdm(pipe(KeyDataset(dataset, "file"))): File ~/Desktop/debug/llm_course/.venv/lib/python3.11/site-packages/datasets/load.py:1392, in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, verification_mode, keep_in_memory, save_infos, revision, token, streaming, num_proc, storage_options, **config_kwargs) 1387 verification_mode = VerificationMode( 1388 (verification_mode or VerificationMode.BASIC_CHECKS) if not save_infos else VerificationMode.ALL_CHECKS 1389 ) 1391 # Create a dataset builder -> [1392](https://file+.vscode-resource.vscode-cdn.net/home/edwin/Desktop/debug/llm_course/~/Desktop/debug/llm_course/.venv/lib/python3.11/site-packages/datasets/load.py:1392) builder_instance = load_dataset_builder( 1393 path=path, 1394 name=name, 1395 data_dir=data_dir, 1396 data_files=data_files, 1397 cache_dir=cache_dir, 1398 features=features, 1399 download_config=download_config, 1400 download_mode=download_mode, 1401 revision=revision, 1402 token=token, 1403 storage_options=storage_options, 1404 **config_kwargs, 1405 ) 1407 # Return iterable dataset in case of streaming 1408 if streaming: File ~/Desktop/debug/llm_course/.venv/lib/python3.11/site-packages/datasets/load.py:1132, in load_dataset_builder(path, name, data_dir, data_files, cache_dir, features, download_config, download_mode, revision, token, storage_options, **config_kwargs) 1130 if features is not None: 1131 features = _fix_for_backward_compatible_features(features) -> [1132](https://file+.vscode-resource.vscode-cdn.net/home/edwin/Desktop/debug/llm_course/~/Desktop/debug/llm_course/.venv/lib/python3.11/site-packages/datasets/load.py:1132) dataset_module = dataset_module_factory( 1133 path, 1134 revision=revision, 1135 download_config=download_config, 1136 download_mode=download_mode, 1137 data_dir=data_dir, 1138 data_files=data_files, 1139 cache_dir=cache_dir, 1140 ) 1141 # Get dataset builder class 1142 builder_kwargs = dataset_module.builder_kwargs File ~/Desktop/debug/llm_course/.venv/lib/python3.11/site-packages/datasets/load.py:1031, in dataset_module_factory(path, revision, download_config, download_mode, data_dir, data_files, cache_dir, **download_kwargs) 1026 if isinstance(e1, FileNotFoundError): 1027 raise FileNotFoundError( 1028 f"Couldn't find any data file at {relative_to_absolute_path(path)}. " 1029 f"Couldn't find '{path}' on the Hugging Face Hub either: {type(e1).__name__}: {e1}" 1030 ) from None -> [1031](https://file+.vscode-resource.vscode-cdn.net/home/edwin/Desktop/debug/llm_course/~/Desktop/debug/llm_course/.venv/lib/python3.11/site-packages/datasets/load.py:1031) raise e1 from None 1032 else: 1033 raise FileNotFoundError(f"Couldn't find any data file at {relative_to_absolute_path(path)}.") File ~/Desktop/debug/llm_course/.venv/lib/python3.11/site-packages/datasets/load.py:989, in dataset_module_factory(path, revision, download_config, download_mode, data_dir, data_files, cache_dir, **download_kwargs) 981 try: 982 api.hf_hub_download( 983 repo_id=path, 984 filename=filename, (...) 987 proxies=download_config.proxies, 988 ) --> [989](https://file+.vscode-resource.vscode-cdn.net/home/edwin/Desktop/debug/llm_course/~/Desktop/debug/llm_course/.venv/lib/python3.11/site-packages/datasets/load.py:989) raise RuntimeError(f"Dataset scripts are no longer supported, but found {filename}") 990 except EntryNotFoundError: 991 # Use the infos from the parquet export except in some cases: 992 if data_dir or data_files or (revision and revision != "main"): RuntimeError: Dataset scripts are no longer supported, but found superb.py ``` NB : I tried to replace "superb" by "anton-l/superb_demo" but I get a 'torchcodec' importing error. Maybe I misunderstood something. ### Steps to reproduce the bug ``` import datasets from transformers import pipeline from transformers.pipelines.pt_utils import KeyDataset from tqdm.auto import tqdm pipe = pipeline("automatic-speech-recognition", model="facebook/wav2vec2-base-960h", device=0) dataset = datasets.load_dataset("superb", name="asr", split="test") # KeyDataset (only *pt*) will simply return the item in the dict returned by the dataset item # as we're not interested in the *target* part of the dataset. For sentence pair use KeyPairDataset for out in tqdm(pipe(KeyDataset(dataset, "file"))): print(out) # {"text": "NUMBER TEN FRESH NELLY IS WAITING ON YOU GOOD NIGHT HUSBAND"} # {"text": ....} # .... ``` ### Expected behavior Get the tutorial expected results ### Environment info --- SYSTEM INFO --- Operating System: Ubuntu 24.10 Kernel: Linux 6.11.0-29-generic Architecture: x86-64 --- PYTHON --- Python 3.11.13 --- VENV INFO ---- datasets=4.0.0 transformers=4.53 tqdm=4.67.1
null
https://api.github.com/repos/huggingface/datasets/issues/7693/timeline
null
null
edwinzajac
114,297,534
U_kgDOBtAKvg
https://avatars.githubusercontent.com/u/114297534?v=4
https://api.github.com/users/edwinzajac
https://github.com/edwinzajac
https://api.github.com/users/edwinzajac/followers
https://api.github.com/users/edwinzajac/following{/other_user}
https://api.github.com/users/edwinzajac/gists{/gist_id}
https://api.github.com/users/edwinzajac/starred{/owner}{/repo}
https://api.github.com/users/edwinzajac/subscriptions
https://api.github.com/users/edwinzajac/orgs
https://api.github.com/users/edwinzajac/repos
https://api.github.com/users/edwinzajac/events{/privacy}
https://api.github.com/users/edwinzajac/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7693/reactions
2
2
0
0
0
0
0
0
0
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[ "I got a pretty similar issue when I try to load bigbio/neurotrial_ner dataset. \n`Dataset scripts are no longer supported, but found neurotrial_ner.py`", "Same here. I was running this tutorial and got a similar error: https://github.com/openai/whisper/discussions/654 (I'm a first-time transformers library user)\n\nRuntimeError: Dataset scripts are no longer supported, but found librispeech_asr.py\n\nWhat am I supposed to do at this point?\n\nThanks", "hey I got the same error and I have tried to downgrade version to 3.6.0 and it works.\n`pip install datasets==3.6.0`", "Thank you very much @Tin-viAct . That indeed did the trick for me :) \nNow the code continue its normal flow ", "Thanks @Tin-viAct, Works!", "I converted [openslr/librispeech_asr](https://huggingface.co/datasets/openslr/librispeech_asr) to Parquet - thanks for reporting.\n\nIt's now compatible with `datasets` 4.0 !\n\nI'll try to ping the authors of the other datasets like [s3prl/superb](https://huggingface.co/datasets/s3prl/superb) and [espnet/yodas2](https://huggingface.co/datasets/espnet/yodas2)", "How come a breaking change was allowed and now requires extra work from individual authors for things to be usable? \n\nhttps://en.wikipedia.org/wiki/Backward_compatibility", "We follow semantic versioning so that breaking changes only occur in major releases. Also note that dataset scripts have been legacy for some time now, with a message on the dataset pages to ask authors to update their datasets.\n\nIt's ok to ping older versions of `datasets`, but imo a few remaining datasets need to be converted since they are valuable to the community.", "I was facing the same issue with a not so familiar dataset in hugging hub . downgrading the datasets version worked ❤️. Thank you @Tin-viAct .", "Thank you so much, @Tin-viAct ! I’ve been struggling with this issue for about 3 hours, and your suggestion to downgrade datasets worked perfectly. I really appreciate the help—you saved me!", "> hey I got the same error and I have tried to downgrade version to 3.6.0 and it works. `pip install datasets==3.6.0`\n\nThank you so much! I was following the [quickstart](https://huggingface.co/docs/datasets/quickstart) and the very first sample fails. Not a good way to get started....", "> hey I got the same error and I have tried to downgrade version to 3.6.0 and it works. `pip install datasets==3.6.0`\nthank you! I get it.\n", "I updated `hotpot_qa` and pinged the PolyAI folks to update the dataset used in the quickstart as well: https://huggingface.co/datasets/PolyAI/minds14/discussions/35\nedit: merged !\nedit2: quickstart dataset is also fixed !", "[LegalBench](https://huggingface.co/datasets/nguha/legalbench) is downloaded 10k times a month and is now broken. Would be great to have this fixed.", "I opened a PR to convert LegalBench to Parquet and reached out to the author: https://huggingface.co/datasets/nguha/legalbench/discussions/34", "Thank you very much @Tin-viAct! I’d been looking everywhere for a fix, and your reply saved me :)", "Tried downgrading the datasets version. But the problem with this is that it had led to compatibility issues and other breaking changes and more errors on other parts of my code ", "I opened a few more PRs and reached out to the authors:\n- https://huggingface.co/datasets/Skylion007/openwebtext/discussions/22\n- https://huggingface.co/datasets/stas/openwebtext-10k/discussions/2\n\nBtw if you want to open a PR to a dataset to convert it to Parquet here is the command:\n\n```\nuv run --with \"datasets==3.6.0\" datasets-cli convert_to_parquet <username/dataset-name> --trust_remote_code\n```\n\n(just replace the `<username/dataset-name>` with the dataset repository name)" ]
https://api.github.com/repos/huggingface/datasets/issues/7692
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7692/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7692/comments
https://api.github.com/repos/huggingface/datasets/issues/7692/events
https://github.com/huggingface/datasets/issues/7692
3,246,268,635
I_kwDODunzps7BfiDb
7,692
xopen: invalid start byte for streaming dataset with trust_remote_code=True
[]
open
false
null
[]
null
1
1,753
1,753
null
NONE
null
null
### Describe the bug I am trying to load YODAS2 dataset with datasets==3.6.0 ``` from datasets import load_dataset next(iter(load_dataset('espnet/yodas2', name='ru000', split='train', streaming=True, trust_remote_code=True))) ``` And get `UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa8 in position 1: invalid start byte` The cause of the error is the following: ``` from datasets.utils.file_utils import xopen filepath = 'https://huggingface.co/datasets/espnet/yodas2/resolve/c9674490249665d658f527e2684848377108d82c/data/ru000/text/00000000.json' xopen(filepath, 'r').read() >>> UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa8 in position 1: invalid start byte ``` And the cause of this is the following: ``` import fsspec fsspec.open( 'hf://datasets/espnet/yodas2@c9674490249665d658f527e2684848377108d82c/data/ru000/text/00000000.json', mode='r', hf={'token': None, 'endpoint': 'https://huggingface.co'}, ).open().read() >>> UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa8 in position 1: invalid start byte ``` Is it true that streaming=True loading is not supported anymore for trust_remote_code=True, even with datasets==3.6.0? This breaks backward compatibility. ### Steps to reproduce the bug ``` from datasets import load_dataset next(iter(load_dataset('espnet/yodas2', name='ru000', split='train', streaming=True))) ``` ### Expected behavior No errors expected ### Environment info datasets==3.6.0, ubuntu 24.04
null
https://api.github.com/repos/huggingface/datasets/issues/7692/timeline
null
null
sedol1339
5,188,731
MDQ6VXNlcjUxODg3MzE=
https://avatars.githubusercontent.com/u/5188731?v=4
https://api.github.com/users/sedol1339
https://github.com/sedol1339
https://api.github.com/users/sedol1339/followers
https://api.github.com/users/sedol1339/following{/other_user}
https://api.github.com/users/sedol1339/gists{/gist_id}
https://api.github.com/users/sedol1339/starred{/owner}{/repo}
https://api.github.com/users/sedol1339/subscriptions
https://api.github.com/users/sedol1339/orgs
https://api.github.com/users/sedol1339/repos
https://api.github.com/users/sedol1339/events{/privacy}
https://api.github.com/users/sedol1339/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7692/reactions
0
0
0
0
0
0
0
0
0
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[ "Hi ! it would be cool to convert this dataset to Parquet. This will make it work for `datasets>=4.0`, enable the Dataset Viewer and make it more reliable to load/stream (currently it uses a loading script in python and those are known for having issues sometimes)\n\nusing `datasets==3.6.0`, here is the command to convert it and open a Pull Request:\n\n```\ndatasets-cli convert_to_parquet espnet/yodas2 --trust_remote_code\n```\n\nThough it's likely that the `UnicodeDecodeError` comes from the loading script. If the script has a bug, it must be fixed to be able to convert the dataset without errors" ]
https://api.github.com/repos/huggingface/datasets/issues/7691
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7691/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7691/comments
https://api.github.com/repos/huggingface/datasets/issues/7691/events
https://github.com/huggingface/datasets/issues/7691
3,245,547,170
I_kwDODunzps7Bcx6i
7,691
Large WebDataset: pyarrow.lib.ArrowCapacityError on load() even with streaming
[]
open
false
null
[]
null
5
1,752
1,753
null
NONE
null
null
### Describe the bug I am creating a large WebDataset-format dataset for sign language processing research, and a number of the videos are over 2GB. The instant I hit one of the shards with one of those videos, I get a ArrowCapacityError, even with streaming. I made a config for the dataset that specifically includes just one problem shard, and the error triggers the instant you even run load_dataset(), even with streaming=True ``` ds = load_dataset("bible-nlp/sign-bibles", "ase_chronological_bible_translation_in_american_sign_language_119_introductions_and_passages_debugging_problem_shard", streaming=True, split="train") ``` This gives: ``` File "/opt/home/cleong/projects/semantic_and_visual_similarity/sign-bibles-dataset/sign_bibles_dataset/tasks/test_iteration.py", line 13, in iterate_keys ds = load_dataset("bible-nlp/sign-bibles", language_subset, streaming=True, split="train") File "/opt/home/cleong/envs/sign-bibles-dataset/lib/python3.13/site-packages/datasets/load.py", line 1409, in load_dataset return builder_instance.as_streaming_dataset(split=split) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^ File "/opt/home/cleong/envs/sign-bibles-dataset/lib/python3.13/site-packages/datasets/builder.py", line 1225, in as_streaming_dataset splits_generators = {sg.name: sg for sg in self._split_generators(dl_manager)} ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^ File "/opt/home/cleong/envs/sign-bibles-dataset/lib/python3.13/site-packages/datasets/packaged_modules/webdataset/webdataset.py", line 88, in _split_generators pa.Table.from_pylist(cast_to_python_objects([example], only_1d_for_numpy=True)) ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "pyarrow/table.pxi", line 2046, in pyarrow.lib._Tabular.from_pylist File "pyarrow/table.pxi", line 6431, in pyarrow.lib._from_pylist File "pyarrow/table.pxi", line 4893, in pyarrow.lib.Table.from_arrays File "pyarrow/table.pxi", line 1607, in pyarrow.lib._sanitize_arrays File "pyarrow/table.pxi", line 1588, in pyarrow.lib._schema_from_arrays File "pyarrow/array.pxi", line 375, in pyarrow.lib.array File "pyarrow/array.pxi", line 45, in pyarrow.lib._sequence_to_array File "pyarrow/error.pxi", line 155, in pyarrow.lib.pyarrow_internal_check_status File "pyarrow/error.pxi", line 92, in pyarrow.lib.check_status pyarrow.lib.ArrowCapacityError: array cannot contain more than 2147483646 bytes, have 3980158992 ``` ### Steps to reproduce the bug ```python #!/usr/bin/env python import argparse from datasets import get_dataset_config_names, load_dataset from tqdm import tqdm from pyarrow.lib import ArrowCapacityError, ArrowInvalid def iterate_keys(language_subset: str) -> None: """Iterate over all samples in the Sign Bibles dataset and print idx and sample key.""" # https://huggingface.co/docs/datasets/v4.0.0/en/package_reference/loading_methods#datasets.load_dataset ds = load_dataset("bible-nlp/sign-bibles", language_subset, streaming=True, split="train") print(f"\n==> Loaded dataset config '{language_subset}'") idx = 0 estimated_shard_index = 0 samples_per_shard = 5 with tqdm(desc=f"{language_subset} samples") as pbar: iterator = iter(ds) while True: try: if idx % samples_per_shard == 0 and idx > 0: # 5 samples per shard: 0, 1, 2, 3, 4 print(f"Estimated Shard idx (starting at 0, {samples_per_shard}/shard): {estimated_shard_index}") estimated_shard_index += 1 sample = next(iterator) sample_key = sample.get("__key__", "missing-key") print(f"[{language_subset}] idx={idx}, key={sample_key}") idx += 1 pbar.update(1) except StopIteration: print(f"Finished iterating through {idx} samples of {language_subset}") break except (ArrowCapacityError, ArrowInvalid) as e: print(f"PyArrow error on idx={idx}, config={language_subset}: {e}") idx += 1 pbar.update(1) continue except KeyError as e: print(f"Missing key error on idx={idx}, config={language_subset}: {e}") idx += 1 pbar.update(1) continue def main(): configs = get_dataset_config_names("bible-nlp/sign-bibles") print(f"Available configs: {configs}") configs = [ "ase_chronological_bible_translation_in_american_sign_language_119_introductions_and_passages_debugging_problem_shard" ] for language_subset in configs: print(f"TESTING CONFIG {language_subset}") iterate_keys(language_subset) # try: # except (ArrowCapacityError, ArrowInvalid) as e: # print(f"PyArrow error at config level for {language_subset}: {e}") # continue # except RuntimeError as e: # print(f"RuntimeError at config level for {language_subset}: {e}") # continue if __name__ == "__main__": parser = argparse.ArgumentParser(description="Iterate through Sign Bibles dataset and print sample keys.") args = parser.parse_args() main() ``` ### Expected behavior I expect, when I load with streaming=True, that there should not be any data loaded or anything like that. https://huggingface.co/docs/datasets/main/en/package_reference/loading_methods#datasets.load_dataset says that with streaming=true, I did expect to have some trouble with large files, but that the streaming mode would not actually try to load them unless requested, e.g. with sample["mp4"] >In the streaming case: > Don’t download or cache anything. Instead, the dataset is lazily loaded and will be streamed on-the-fly when iterating on it. ### Environment info Local setup: Conda environment on Ubuntu, pip list includes the following datasets 4.0.0 pyarrow 20.0.0 Verified on Colab: https://colab.research.google.com/drive/1HdN8stlROWrLSYXUoNeV0vQ9pClhIVM8?usp=sharing, though there it crashes by using up all available RAM
null
https://api.github.com/repos/huggingface/datasets/issues/7691/timeline
null
null
cleong110
122,366,389
U_kgDOB0sptQ
https://avatars.githubusercontent.com/u/122366389?v=4
https://api.github.com/users/cleong110
https://github.com/cleong110
https://api.github.com/users/cleong110/followers
https://api.github.com/users/cleong110/following{/other_user}
https://api.github.com/users/cleong110/gists{/gist_id}
https://api.github.com/users/cleong110/starred{/owner}{/repo}
https://api.github.com/users/cleong110/subscriptions
https://api.github.com/users/cleong110/orgs
https://api.github.com/users/cleong110/repos
https://api.github.com/users/cleong110/events{/privacy}
https://api.github.com/users/cleong110/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7691/reactions
0
0
0
0
0
0
0
0
0
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[ "It seems the error occurs right here, as it tries to infer the Features: https://github.com/huggingface/datasets/blob/main/src/datasets/packaged_modules/webdataset/webdataset.py#L78-L90", "It seems to me that if we have something that is so large that it cannot fit in pa.table, the fallback method should be to just set it as \"binary\" type, perhaps?", "I also tried creating a dataset_info.json but the webdataset builder didn't seem to look for it and load it", "Workaround on my end, removed all videos larger than 2GB for now. The dataset no longer crashes.", "Potential patch to webdataset.py could be like so: \n```python\nLARGE_THRESHOLD = 2 * 1024 * 1024 * 1024 # 2 GB\nlarge_fields = set()\n\n# Replace large binary fields with None for schema inference\nprocessed_examples = []\nfor example in first_examples:\n new_example = {}\n for k, v in example.items():\n if isinstance(v, bytes) and len(v) > LARGE_THRESHOLD:\n large_fields.add(k)\n new_example[k] = None # Replace with None to avoid Arrow errors\n else:\n new_example[k] = v\n processed_examples.append(new_example)\n\n# Proceed to infer schema\npa_tables = [\n pa.Table.from_pylist(cast_to_python_objects([example], only_1d_for_numpy=True))\n for example in processed_examples\n]\ninferred_arrow_schema = pa.concat_tables(pa_tables, promote_options=\"default\").schema\n\n# Patch features to reflect large_binary\nfeatures = datasets.Features.from_arrow_schema(inferred_arrow_schema)\nfor field in large_fields:\n features[field] = datasets.Value(\"large_binary\")\n\n```" ]
https://api.github.com/repos/huggingface/datasets/issues/7689
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7689/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7689/comments
https://api.github.com/repos/huggingface/datasets/issues/7689/events
https://github.com/huggingface/datasets/issues/7689
3,242,580,301
I_kwDODunzps7BRdlN
7,689
BadRequestError for loading dataset?
[]
closed
false
null
[]
null
17
1,752
1,752
1,752
NONE
null
null
### Describe the bug Up until a couple days ago I was having no issues loading `Helsinki-NLP/europarl` and `Helsinki-NLP/un_pc`, but now suddenly I get the following error: ``` huggingface_hub.errors.BadRequestError: (Request ID: ...) Bad request: * Invalid input: expected array, received string * at paths * Invalid input: expected boolean, received string * at expand ✖ Invalid input: expected array, received string → at paths ✖ Invalid input: expected boolean, received string → at expand ``` I tried with both `4.0.0` and `3.5.1` since this dataset uses `trust_remote_code`, but I get the same error with both. What can I do to load the dataset? I checked the documentation and GitHub issues here, but couldn't find a solution. ### Steps to reproduce the bug ```python import datasets ds = datasets.load_dataset("Helsinki-NLP/europarl", "en-fr", streaming=True, trust_remote_code=True)["train"] ``` ### Expected behavior That the dataset loads as it did a couple days ago. ### Environment info - `datasets` version: 3.5.1 - Platform: Linux-4.18.0-513.24.1.el8_9.x86_64-x86_64-with-glibc2.28 - Python version: 3.11.11 - `huggingface_hub` version: 0.30.2 - PyArrow version: 20.0.0 - Pandas version: 2.2.2 - `fsspec` version: 2024.6.1
null
https://api.github.com/repos/huggingface/datasets/issues/7689/timeline
null
completed
WPoelman
45,011,687
MDQ6VXNlcjQ1MDExNjg3
https://avatars.githubusercontent.com/u/45011687?v=4
https://api.github.com/users/WPoelman
https://github.com/WPoelman
https://api.github.com/users/WPoelman/followers
https://api.github.com/users/WPoelman/following{/other_user}
https://api.github.com/users/WPoelman/gists{/gist_id}
https://api.github.com/users/WPoelman/starred{/owner}{/repo}
https://api.github.com/users/WPoelman/subscriptions
https://api.github.com/users/WPoelman/orgs
https://api.github.com/users/WPoelman/repos
https://api.github.com/users/WPoelman/events{/privacy}
https://api.github.com/users/WPoelman/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7689/reactions
23
23
0
0
0
0
0
0
0
null
null
null
null
null
null
sergiopaniego
17,179,696
MDQ6VXNlcjE3MTc5Njk2
https://avatars.githubusercontent.com/u/17179696?v=4
https://api.github.com/users/sergiopaniego
https://github.com/sergiopaniego
https://api.github.com/users/sergiopaniego/followers
https://api.github.com/users/sergiopaniego/following{/other_user}
https://api.github.com/users/sergiopaniego/gists{/gist_id}
https://api.github.com/users/sergiopaniego/starred{/owner}{/repo}
https://api.github.com/users/sergiopaniego/subscriptions
https://api.github.com/users/sergiopaniego/orgs
https://api.github.com/users/sergiopaniego/repos
https://api.github.com/users/sergiopaniego/events{/privacy}
https://api.github.com/users/sergiopaniego/received_events
User
public
false
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[ "Same here, for `HuggingFaceFW/fineweb`. Code that worked with no issues for the last 2 months suddenly fails today. Tried updating `datasets`, `huggingface_hub`, `fsspec` to newest versions, but the same error occurs.", "I'm also hitting this issue, with `mandarjoshi/trivia_qa`; My dataset loading was working successfully yesterday - I'm using `huggingface-hub==0.27.1`, `datasets==3.2.0`", "Same, here with `datasets==3.6.0`", "Same, with `datasets==4.0.0`.", "Same here tried different versions of huggingface-hub and datasets but the error keeps occuring ", "A temporary workaround is to first download your dataset with\n\nhuggingface-cli download HuggingFaceH4/ultrachat_200k --repo-type dataset\n\nThen find the local path of the dataset typically like ~/.cache/huggingface/hub/HuggingFaceH4-ultrachat_200k/snapshots/*id*\n\nAnd then load like \n\nfrom datasets import load_dataset\ndataset = load_dataset(\"~/.cache/huggingface/hub/HuggingFaceH4-ultrachat_200k/snapshots/*id*\")\n", "I am also experiencing this issue. I was trying to load TinyStories\nds = datasets.load_dataset(\"roneneldan/TinyStories\", streaming=True, split=\"train\")\n\nresulting in the previously stated error:\nException has occurred: BadRequestError\n(Request ID: Root=1-687a1d09-66cceb496c9401b1084133d6;3550deed-c459-4799-bc74-97924742bd94)\n\nBad request:\n* Invalid input: expected array, received string * at paths * Invalid input: expected boolean, received string * at expand\n✖ Invalid input: expected array, received string\n → at paths\n✖ Invalid input: expected boolean, received string\n → at expand\nFileNotFoundError: Dataset roneneldan/TinyStories is not cached in None\n\nThis very code worked fine yesterday, so it's a very recent issue.\n\nEnvironment info:\nprint(\"datasets version:\", datasets.__version__)\nprint(\"huggingface_hub version:\", huggingface_hub.__version__)\nprint(\"pyarrow version:\", pyarrow.__version__)\nprint(\"pandas version:\", pandas.__version__)\nprint(\"fsspec version:\", fsspec.__version__)\nprint(\"Python version:\", sys.version)\nprint(\"Platform:\", platform.platform())\ndatasets version: 4.0.0\nhuggingface_hub version: 0.33.4\npyarrow version: 19.0.0\npandas version: 2.2.3\nfsspec version: 2024.9.0\nPython version: 3.12.11 (main, Jun 10 2025, 11:55:20) [GCC 15.1.1 20250425]\nPlatform: Linux-6.15.6-arch1-1-x86_64-with-glibc2.41", "Same here with datasets==3.6.0\n```\nhuggingface_hub.errors.BadRequestError: (Request ID: Root=1-687a238d-27374f964534f79f702bc239;61f0669c-cb70-4aff-b57b-73a446f9c65e)\n\nBad request:\n* Invalid input: expected array, received string * at paths * Invalid input: expected boolean, received string * at expand\n✖ Invalid input: expected array, received string\n → at paths\n✖ Invalid input: expected boolean, received string\n → at expand\n```", "Same here, works perfectly yesterday\n\n```\nError code: ConfigNamesError\nException: BadRequestError\nMessage: (Request ID: Root=1-687a23a5-314b45b36ce962cf0e431b9a;b979ddb2-a80b-483c-8b1e-403e24e83127)\n\nBad request:\n* Invalid input: expected array, received string * at paths * Invalid input: expected boolean, received string * at expand\n✖ Invalid input: expected array, received string\n → at paths\n✖ Invalid input: expected boolean, received string\n → at expand\n```", "It was literally working for me and then suddenly it stopped working next time I run the command. Same issue but private repo so I can't share example. ", "A bug from Hugging Face not us", "Same here!", "@LMSPaul thanks! The workaround seems to work (at least for the datasets I tested).\n\nOn the command line:\n```sh\nhuggingface-cli download <dataset-name> --repo-type dataset --local-dir <local-dir>\n```\n\nAnd then in Python:\n```python\nfrom datasets import load_dataset\n\n# The dataset-specific options seem to work with this as well, \n# except for a warning from \"trust_remote_code\"\nds = load_dataset(<local-dir>)\n```", "Same for me.. I couldn't load ..\nIt was perfectly working yesterday..\n\n\nfrom datasets import load_dataset\nraw_datasets = load_dataset(\"glue\", \"mrpc\")\n\nThe error resulting is given below\n\n---------------------------------------------------------------------------\nBadRequestError Traceback (most recent call last)\n/tmp/ipykernel_60/772458687.py in <cell line: 0>()\n 1 from datasets import load_dataset\n----> 2 raw_datasets = load_dataset(\"glue\", \"mrpc\")\n\n/usr/local/lib/python3.11/dist-packages/datasets/load.py in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, verification_mode, keep_in_memory, save_infos, revision, token, streaming, num_proc, storage_options, trust_remote_code, **config_kwargs)\n 2060 \n 2061 # Create a dataset builder\n-> 2062 builder_instance = load_dataset_builder(\n 2063 path=path,\n 2064 name=name,\n\n/usr/local/lib/python3.11/dist-packages/datasets/load.py in load_dataset_builder(path, name, data_dir, data_files, cache_dir, features, download_config, download_mode, revision, token, storage_options, trust_remote_code, _require_default_config_name, **config_kwargs)\n 1780 download_config = download_config.copy() if download_config else DownloadConfig()\n 1781 download_config.storage_options.update(storage_options)\n-> 1782 dataset_module = dataset_module_factory(\n 1783 path,\n 1784 revision=revision,\n\n/usr/local/lib/python3.11/dist-packages/datasets/load.py in dataset_module_factory(path, revision, download_config, download_mode, dynamic_modules_path, data_dir, data_files, cache_dir, trust_remote_code, _require_default_config_name, _require_custom_configs, **download_kwargs)\n 1662 f\"Couldn't find '{path}' on the Hugging Face Hub either: {type(e1).__name__}: {e1}\"\n 1663 ) from None\n-> 1664 raise e1 from None\n 1665 elif trust_remote_code:\n 1666 raise FileNotFoundError(\n\n/usr/local/lib/python3.11/dist-packages/datasets/load.py in dataset_module_factory(path, revision, download_config, download_mode, dynamic_modules_path, data_dir, data_files, cache_dir, trust_remote_code, _require_default_config_name, _require_custom_configs, **download_kwargs)\n 1627 download_mode=download_mode,\n 1628 use_exported_dataset_infos=use_exported_dataset_infos,\n-> 1629 ).get_module()\n 1630 except GatedRepoError as e:\n 1631 message = f\"Dataset '{path}' is a gated dataset on the Hub.\"\n\n/usr/local/lib/python3.11/dist-packages/datasets/load.py in get_module(self)\n 1017 else:\n 1018 patterns = get_data_patterns(base_path, download_config=self.download_config)\n-> 1019 data_files = DataFilesDict.from_patterns(\n 1020 patterns,\n 1021 base_path=base_path,\n\n/usr/local/lib/python3.11/dist-packages/datasets/data_files.py in from_patterns(cls, patterns, base_path, allowed_extensions, download_config)\n 687 patterns_for_key\n 688 if isinstance(patterns_for_key, DataFilesList)\n--> 689 else DataFilesList.from_patterns(\n 690 patterns_for_key,\n 691 base_path=base_path,\n\n/usr/local/lib/python3.11/dist-packages/datasets/data_files.py in from_patterns(cls, patterns, base_path, allowed_extensions, download_config)\n 580 try:\n 581 data_files.extend(\n--> 582 resolve_pattern(\n 583 pattern,\n 584 base_path=base_path,\n\n/usr/local/lib/python3.11/dist-packages/datasets/data_files.py in resolve_pattern(pattern, base_path, allowed_extensions, download_config)\n 358 matched_paths = [\n 359 filepath if filepath.startswith(protocol_prefix) else protocol_prefix + filepath\n--> 360 for filepath, info in fs.glob(pattern, detail=True, **glob_kwargs).items()\n 361 if (info[\"type\"] == \"file\" or (info.get(\"islink\") and os.path.isfile(os.path.realpath(filepath))))\n 362 and (xbasename(filepath) not in files_to_ignore)\n\n/usr/local/lib/python3.11/dist-packages/huggingface_hub/hf_file_system.py in glob(self, path, **kwargs)\n 519 kwargs = {\"expand_info\": kwargs.get(\"detail\", False), **kwargs}\n 520 path = self.resolve_path(path, revision=kwargs.get(\"revision\")).unresolve()\n--> 521 return super().glob(path, **kwargs)\n 522 \n 523 def find(\n\n/usr/local/lib/python3.11/dist-packages/fsspec/spec.py in glob(self, path, maxdepth, **kwargs)\n 635 # any exception allowed bar FileNotFoundError?\n 636 return False\n--> 637 \n 638 def lexists(self, path, **kwargs):\n 639 \"\"\"If there is a file at the given path (including\n\n/usr/local/lib/python3.11/dist-packages/huggingface_hub/hf_file_system.py in find(self, path, maxdepth, withdirs, detail, refresh, revision, **kwargs)\n 554 \"\"\"\n 555 if maxdepth:\n--> 556 return super().find(\n 557 path, maxdepth=maxdepth, withdirs=withdirs, detail=detail, refresh=refresh, revision=revision, **kwargs\n 558 )\n\n/usr/local/lib/python3.11/dist-packages/fsspec/spec.py in find(self, path, maxdepth, withdirs, detail, **kwargs)\n 498 # This is needed for posix glob compliance\n 499 if withdirs and path != \"\" and self.isdir(path):\n--> 500 out[path] = self.info(path)\n 501 \n 502 for _, dirs, files in self.walk(path, maxdepth, detail=True, **kwargs):\n\n/usr/local/lib/python3.11/dist-packages/huggingface_hub/hf_file_system.py in info(self, path, refresh, revision, **kwargs)\n 717 out = out1[0]\n 718 if refresh or out is None or (expand_info and out and out[\"last_commit\"] is None):\n--> 719 paths_info = self._api.get_paths_info(\n 720 resolved_path.repo_id,\n 721 resolved_path.path_in_repo,\n\n/usr/local/lib/python3.11/dist-packages/huggingface_hub/utils/_validators.py in _inner_fn(*args, **kwargs)\n 112 kwargs = smoothly_deprecate_use_auth_token(fn_name=fn.__name__, has_token=has_token, kwargs=kwargs)\n 113 \n--> 114 return fn(*args, **kwargs)\n 115 \n 116 return _inner_fn # type: ignore\n\n/usr/local/lib/python3.11/dist-packages/huggingface_hub/hf_api.py in get_paths_info(self, repo_id, paths, expand, revision, repo_type, token)\n 3397 headers=headers,\n 3398 )\n-> 3399 hf_raise_for_status(response)\n 3400 paths_info = response.json()\n 3401 return [\n\n/usr/local/lib/python3.11/dist-packages/huggingface_hub/utils/_http.py in hf_raise_for_status(response, endpoint_name)\n 463 f\"\\n\\nBad request for {endpoint_name} endpoint:\" if endpoint_name is not None else \"\\n\\nBad request:\"\n 464 )\n--> 465 raise _format(BadRequestError, message, response) from e\n 466 \n 467 elif response.status_code == 403:\n\nBadRequestError: (Request ID: Root=1-687a3201-087954b9245ab59672e6068e;d5bb4dbe-03e1-4912-bcec-5964c017b920)\n\nBad request:\n* Invalid input: expected array, received string * at paths * Invalid input: expected boolean, received string * at expand\n✖ Invalid input: expected array, received string\n → at paths\n✖ Invalid input: expected boolean, re", "Thanks for the report!\nThe issue has been fixed and should now work without any code changes 😄\nSorry for the inconvenience!\n\nClosing, please open again if needed.", "Works for me. Thanks!\n", "Yes Now it's works for me..Thanks\r\n\r\nOn Fri, 18 Jul 2025, 5:25 pm Karol Brejna, ***@***.***> wrote:\r\n\r\n> *karol-brejna-i* left a comment (huggingface/datasets#7689)\r\n> <https://github.com/huggingface/datasets/issues/7689#issuecomment-3089238320>\r\n>\r\n> Works for me. Thanks!\r\n>\r\n> —\r\n> Reply to this email directly, view it on GitHub\r\n> <https://github.com/huggingface/datasets/issues/7689#issuecomment-3089238320>,\r\n> or unsubscribe\r\n> <https://github.com/notifications/unsubscribe-auth/AJRBXNEWBJ5UYVC2IRJM5DD3JDODZAVCNFSM6AAAAACB2FDG4GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTAOBZGIZTQMZSGA>\r\n> .\r\n> You are receiving this because you commented.Message ID:\r\n> ***@***.***>\r\n>\r\n" ]
https://api.github.com/repos/huggingface/datasets/issues/7688
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7688/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7688/comments
https://api.github.com/repos/huggingface/datasets/issues/7688/events
https://github.com/huggingface/datasets/issues/7688
3,238,851,443
I_kwDODunzps7BDPNz
7,688
No module named "distributed"
[]
open
false
null
[]
null
3
1,752
1,753
null
NONE
null
null
### Describe the bug hello, when I run the command "from datasets.distributed import split_dataset_by_node", I always met the bug "No module named 'datasets.distributed" in different version like 4.0.0, 2.21.0 and so on. How can I solve this? ### Steps to reproduce the bug 1. pip install datasets 2. from datasets.distributed import split_dataset_by_node ### Expected behavior expecting the command "from datasets.distributed import split_dataset_by_node" can be ran successfully ### Environment info python: 3.12
null
https://api.github.com/repos/huggingface/datasets/issues/7688/timeline
null
null
yingtongxiong
45,058,324
MDQ6VXNlcjQ1MDU4MzI0
https://avatars.githubusercontent.com/u/45058324?v=4
https://api.github.com/users/yingtongxiong
https://github.com/yingtongxiong
https://api.github.com/users/yingtongxiong/followers
https://api.github.com/users/yingtongxiong/following{/other_user}
https://api.github.com/users/yingtongxiong/gists{/gist_id}
https://api.github.com/users/yingtongxiong/starred{/owner}{/repo}
https://api.github.com/users/yingtongxiong/subscriptions
https://api.github.com/users/yingtongxiong/orgs
https://api.github.com/users/yingtongxiong/repos
https://api.github.com/users/yingtongxiong/events{/privacy}
https://api.github.com/users/yingtongxiong/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7688/reactions
0
0
0
0
0
0
0
0
0
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[ "The error ModuleNotFoundError: No module named 'datasets.distributed' means your installed datasets library is too old or incompatible with the version of Library you are using(in my case it was BEIR). The datasets.distributed module was removed in recent versions of the datasets library.\n\nDowngrade datasets to version 2.14.6 : ! pip install datasets==2.14.6\n", "this code does run in `datasets` 4.0:\n```python\nfrom datasets.distributed import split_dataset_by_node\n```\n\nmake sure you have a python version that is recent enough (>=3.9) to be able to install `datasets` 4.0", "I do think the problem is caused by the python version, because I do have python version 3.12.5" ]
https://api.github.com/repos/huggingface/datasets/issues/7687
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7687/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7687/comments
https://api.github.com/repos/huggingface/datasets/issues/7687/events
https://github.com/huggingface/datasets/issues/7687
3,238,760,301
I_kwDODunzps7BC49t
7,687
Datasets keeps rebuilding the dataset every time i call the python script
[]
open
false
null
[]
null
1
1,752
1,753
null
NONE
null
null
### Describe the bug Every time it runs, somehow, samples increase. This can cause a 12mb dataset to have other built versions of 400 mbs+ <img width="363" height="481" alt="Image" src="https://github.com/user-attachments/assets/766ce958-bd2b-41bc-b950-86710259bfdc" /> ### Steps to reproduce the bug `from datasets import load_dataset s = load_dataset('~/.cache/huggingface/datasets/databricks___databricks-dolly-15k')['train'] ` 1. A dataset needs to be available in the .cache folder 2. Run the code multiple times, and every time it runs, more versions are created ### Expected behavior The number of samples increases every time the script runs ### Environment info - `datasets` version: 3.6.0 - Platform: Windows-11-10.0.26100-SP0 - Python version: 3.13.3 - `huggingface_hub` version: 0.32.3 - PyArrow version: 20.0.0 - Pandas version: 2.2.3 - `fsspec` version: 2025.3.0
null
https://api.github.com/repos/huggingface/datasets/issues/7687/timeline
null
null
CALEB789
58,883,113
MDQ6VXNlcjU4ODgzMTEz
https://avatars.githubusercontent.com/u/58883113?v=4
https://api.github.com/users/CALEB789
https://github.com/CALEB789
https://api.github.com/users/CALEB789/followers
https://api.github.com/users/CALEB789/following{/other_user}
https://api.github.com/users/CALEB789/gists{/gist_id}
https://api.github.com/users/CALEB789/starred{/owner}{/repo}
https://api.github.com/users/CALEB789/subscriptions
https://api.github.com/users/CALEB789/orgs
https://api.github.com/users/CALEB789/repos
https://api.github.com/users/CALEB789/events{/privacy}
https://api.github.com/users/CALEB789/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7687/reactions
2
2
0
0
0
0
0
0
0
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[ "here is the code to load the dataset form the cache:\n\n```python\ns = load_dataset('databricks/databricks-dolly-15k')['train']\n```\n\nif you pass the location of a local directory it will create a new cache based on that directory content" ]
https://api.github.com/repos/huggingface/datasets/issues/7686
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7686/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7686/comments
https://api.github.com/repos/huggingface/datasets/issues/7686/events
https://github.com/huggingface/datasets/issues/7686
3,237,201,090
I_kwDODunzps7A88TC
7,686
load_dataset does not check .no_exist files in the hub cache
[]
open
false
null
[]
null
0
1,752
1,752
null
NONE
null
null
### Describe the bug I'm not entirely sure if this should be submitted as a bug in the `datasets` library or the `huggingface_hub` library, given it could be fixed at different levels of the stack. The fundamental issue is that the `load_datasets` api doesn't use the `.no_exist` files in the hub cache unlike other wrapper APIs that do. This is because the `utils.file_utils.cached_path` used directly calls `hf_hub_download` instead of using `file_download.try_to_load_from_cache` from `huggingface_hub` (see `transformers` library `utils.hub.cached_files` for one alternate example). This results in unnecessary metadata HTTP requests occurring for files that don't exist on every call. It won't generate the .no_exist cache files, nor will it use them. ### Steps to reproduce the bug Run the following snippet as one example (setting cache dirs to clean paths for clarity) `env HF_HOME=~/local_hf_hub python repro.py` ``` from datasets import load_dataset import huggingface_hub # monkeypatch to print out metadata requests being made original_get_hf_file_metadata = huggingface_hub.file_download.get_hf_file_metadata def get_hf_file_metadata_wrapper(*args, **kwargs): print("File metadata request made (get_hf_file_metadata):", args, kwargs) return original_get_hf_file_metadata(*args, **kwargs) # Apply the patch huggingface_hub.file_download.get_hf_file_metadata = get_hf_file_metadata_wrapper dataset = load_dataset( "Salesforce/wikitext", "wikitext-2-v1", split="test", trust_remote_code=True, cache_dir="~/local_datasets", revision="b08601e04326c79dfdd32d625aee71d232d685c3", ) ``` This may be called over and over again, and you will see the same calls for files that don't exist: ``` File metadata request made (get_hf_file_metadata): () {'url': 'https://huggingface.co/datasets/Salesforce/wikitext/resolve/b08601e04326c79dfdd32d625aee71d232d685c3/wikitext.py', 'proxies': None, 'timeout': 10, 'headers': {'user-agent': 'datasets/3.6.0; hf_hub/0.33.2; python/3.12.11; torch/2.7.0; huggingface_hub/0.33.2; pyarrow/20.0.0; jax/0.5.3'}, 'token': None} File metadata request made (get_hf_file_metadata): () {'url': 'https://huggingface.co/datasets/Salesforce/wikitext/resolve/b08601e04326c79dfdd32d625aee71d232d685c3/.huggingface.yaml', 'proxies': None, 'timeout': 10, 'headers': {'user-agent': 'datasets/3.6.0; hf_hub/0.33.2; python/3.12.11; torch/2.7.0; huggingface_hub/0.33.2; pyarrow/20.0.0; jax/0.5.3'}, 'token': None} File metadata request made (get_hf_file_metadata): () {'url': 'https://huggingface.co/datasets/Salesforce/wikitext/resolve/b08601e04326c79dfdd32d625aee71d232d685c3/dataset_infos.json', 'proxies': None, 'timeout': 10, 'headers': {'user-agent': 'datasets/3.6.0; hf_hub/0.33.2; python/3.12.11; torch/2.7.0; huggingface_hub/0.33.2; pyarrow/20.0.0; jax/0.5.3'}, 'token': None} ``` And you can see that the .no_exist folder is never created ``` $ ls ~/local_hf_hub/hub/datasets--Salesforce--wikitext/ blobs refs snapshots ``` ### Expected behavior The expected behavior is for the print "File metadata request made" to stop after the first call, and for .no_exist directory & files to be populated under ~/local_hf_hub/hub/datasets--Salesforce--wikitext/ ### Environment info - `datasets` version: 3.6.0 - Platform: Linux-6.5.13-65-650-4141-22041-coreweave-amd64-85c45edc-x86_64-with-glibc2.35 - Python version: 3.12.11 - `huggingface_hub` version: 0.33.2 - PyArrow version: 20.0.0 - Pandas version: 2.3.1 - `fsspec` version: 2024.9.0
null
https://api.github.com/repos/huggingface/datasets/issues/7686/timeline
null
null
jmaccarl
3,627,235
MDQ6VXNlcjM2MjcyMzU=
https://avatars.githubusercontent.com/u/3627235?v=4
https://api.github.com/users/jmaccarl
https://github.com/jmaccarl
https://api.github.com/users/jmaccarl/followers
https://api.github.com/users/jmaccarl/following{/other_user}
https://api.github.com/users/jmaccarl/gists{/gist_id}
https://api.github.com/users/jmaccarl/starred{/owner}{/repo}
https://api.github.com/users/jmaccarl/subscriptions
https://api.github.com/users/jmaccarl/orgs
https://api.github.com/users/jmaccarl/repos
https://api.github.com/users/jmaccarl/events{/privacy}
https://api.github.com/users/jmaccarl/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7686/reactions
0
0
0
0
0
0
0
0
0
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[]
https://api.github.com/repos/huggingface/datasets/issues/7685
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7685/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7685/comments
https://api.github.com/repos/huggingface/datasets/issues/7685/events
https://github.com/huggingface/datasets/issues/7685
3,236,979,340
I_kwDODunzps7A8GKM
7,685
Inconsistent range request behavior for parquet REST api
[]
open
false
null
[]
null
5
1,752
1,754
null
NONE
null
null
### Describe the bug First off, I do apologize if this is not the correct repo for submitting this issue. Please direct me to another one if it's more appropriate elsewhere. The datasets rest api is inconsistently giving `416 Range Not Satisfiable` when using a range request to get portions of the parquet files. More often than not, I am seeing 416, but other times for an identical request, it gives me the data along with `206 Partial Content` as expected. ### Steps to reproduce the bug repeating this request multiple times will return either 416 or 206. ```sh $ curl -v -L -H "Range: bytes=217875070-218006142" -o output.parquet "https://huggingface.co/api/datasets/HuggingFaceTB/smoltalk2/parquet/Mid/Llama_Nemotron_Post_Training_Dataset_reasoning_r1/0.parquet" ``` Note: this is not limited to just the above file, I tried with many different datasets and am able to consistently reproduce issue across multiple datasets. when the 416 is returned, I get the following headers ``` < HTTP/2 416 < content-type: text/html < content-length: 49 < server: CloudFront < date: Wed, 16 Jul 2025 14:58:43 GMT < expires: Wed, 16 Jul 2025 14:58:43 GMT < content-range: bytes */177 < x-cache: Error from cloudfront < via: 1.1 873527676a354c5998cad133525df9c0.cloudfront.net (CloudFront) < ``` this suggests to me that there is likely a CDN/caching/routing issue happening and the request is not getting routed properly. Full verbose output via curl. <details> ❯ curl -v -L -H "Range: bytes=217875070-218006142" -o output.parquet "https://huggingface.co/api/datasets/HuggingFaceTB/smoltalk2/parquet/Mid/Llama_Nemotron_Post_Training_Dataset_reasoning_r1/0.parquet" % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Host huggingface.co:443 was resolved. * IPv6: (none) * IPv4: 18.160.102.96, 18.160.102.110, 18.160.102.4, 18.160.102.86 * Trying 18.160.102.96:443... * Connected to huggingface.co (18.160.102.96) port 443 * ALPN: curl offers h2,http/1.1 * (304) (OUT), TLS handshake, Client hello (1): } [319 bytes data] * CAfile: /etc/ssl/cert.pem * CApath: none * (304) (IN), TLS handshake, Server hello (2): { [122 bytes data] * (304) (IN), TLS handshake, Unknown (8): { [19 bytes data] * (304) (IN), TLS handshake, Certificate (11): { [3821 bytes data] * (304) (IN), TLS handshake, CERT verify (15): { [264 bytes data] * (304) (IN), TLS handshake, Finished (20): { [36 bytes data] * (304) (OUT), TLS handshake, Finished (20): } [36 bytes data] * SSL connection using TLSv1.3 / AEAD-AES128-GCM-SHA256 / [blank] / UNDEF * ALPN: server accepted h2 * Server certificate: * subject: CN=huggingface.co * start date: Apr 13 00:00:00 2025 GMT * expire date: May 12 23:59:59 2026 GMT * subjectAltName: host "huggingface.co" matched cert's "huggingface.co" * issuer: C=US; O=Amazon; CN=Amazon RSA 2048 M02 * SSL certificate verify ok. * using HTTP/2 * [HTTP/2] [1] OPENED stream for https://huggingface.co/api/datasets/HuggingFaceTB/smoltalk2/parquet/Mid/Llama_Nemotron_Post_Training_Dataset_reasoning_r1/0.parquet * [HTTP/2] [1] [:method: GET] * [HTTP/2] [1] [:scheme: https] * [HTTP/2] [1] [:authority: huggingface.co] * [HTTP/2] [1] [:path: /api/datasets/HuggingFaceTB/smoltalk2/parquet/Mid/Llama_Nemotron_Post_Training_Dataset_reasoning_r1/0.parquet] * [HTTP/2] [1] [user-agent: curl/8.7.1] * [HTTP/2] [1] [accept: */*] * [HTTP/2] [1] [range: bytes=217875070-218006142] > GET /api/datasets/HuggingFaceTB/smoltalk2/parquet/Mid/Llama_Nemotron_Post_Training_Dataset_reasoning_r1/0.parquet HTTP/2 > Host: huggingface.co > User-Agent: curl/8.7.1 > Accept: */* > Range: bytes=217875070-218006142 > * Request completely sent off < HTTP/2 416 < content-type: text/html < content-length: 49 < server: CloudFront < date: Wed, 16 Jul 2025 14:58:41 GMT < expires: Wed, 16 Jul 2025 14:58:41 GMT < content-range: bytes */177 < x-cache: Error from cloudfront < via: 1.1 e2f1bed2f82641d6d5439eac20a790ba.cloudfront.net (CloudFront) < x-amz-cf-pop: MSP50-P1 < x-amz-cf-id: Mo8hn-EZLJqE_hoBday8DdhmVXhV3v9-Wg-EEHI6gX_fNlkanVIUBA== < { [49 bytes data] 100 49 100 49 0 0 2215 0 --:--:-- --:--:-- --:--:-- 2227 * Connection #0 to host huggingface.co left intact (.venv) Daft main*​* ≡❯ curl -v -L -H "Range: bytes=217875070-218006142" -o output.parquet "https://huggingface.co/api/datasets/HuggingFaceTB/smoltalk2/parquet/Mid/Llama_Nemotron_Post_Training_Dataset_reasoning_r1/0.parquet" % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Host huggingface.co:443 was resolved. * IPv6: (none) * IPv4: 18.160.102.96, 18.160.102.110, 18.160.102.4, 18.160.102.86 * Trying 18.160.102.96:443... * Connected to huggingface.co (18.160.102.96) port 443 * ALPN: curl offers h2,http/1.1 * (304) (OUT), TLS handshake, Client hello (1): } [319 bytes data] * CAfile: /etc/ssl/cert.pem * CApath: none * (304) (IN), TLS handshake, Server hello (2): { [122 bytes data] * (304) (IN), TLS handshake, Unknown (8): { [19 bytes data] * (304) (IN), TLS handshake, Certificate (11): { [3821 bytes data] * (304) (IN), TLS handshake, CERT verify (15): { [264 bytes data] * (304) (IN), TLS handshake, Finished (20): { [36 bytes data] * (304) (OUT), TLS handshake, Finished (20): } [36 bytes data] * SSL connection using TLSv1.3 / AEAD-AES128-GCM-SHA256 / [blank] / UNDEF * ALPN: server accepted h2 * Server certificate: * subject: CN=huggingface.co * start date: Apr 13 00:00:00 2025 GMT * expire date: May 12 23:59:59 2026 GMT * subjectAltName: host "huggingface.co" matched cert's "huggingface.co" * issuer: C=US; O=Amazon; CN=Amazon RSA 2048 M02 * SSL certificate verify ok. * using HTTP/2 * [HTTP/2] [1] OPENED stream for https://huggingface.co/api/datasets/HuggingFaceTB/smoltalk2/parquet/Mid/Llama_Nemotron_Post_Training_Dataset_reasoning_r1/0.parquet * [HTTP/2] [1] [:method: GET] * [HTTP/2] [1] [:scheme: https] * [HTTP/2] [1] [:authority: huggingface.co] * [HTTP/2] [1] [:path: /api/datasets/HuggingFaceTB/smoltalk2/parquet/Mid/Llama_Nemotron_Post_Training_Dataset_reasoning_r1/0.parquet] * [HTTP/2] [1] [user-agent: curl/8.7.1] * [HTTP/2] [1] [accept: */*] * [HTTP/2] [1] [range: bytes=217875070-218006142] > GET /api/datasets/HuggingFaceTB/smoltalk2/parquet/Mid/Llama_Nemotron_Post_Training_Dataset_reasoning_r1/0.parquet HTTP/2 > Host: huggingface.co > User-Agent: curl/8.7.1 > Accept: */* > Range: bytes=217875070-218006142 > * Request completely sent off < HTTP/2 416 < content-type: text/html < content-length: 49 < server: CloudFront < date: Wed, 16 Jul 2025 14:58:42 GMT < expires: Wed, 16 Jul 2025 14:58:42 GMT < content-range: bytes */177 < x-cache: Error from cloudfront < via: 1.1 bb352451e1eacf85f8786ee3ecd07eca.cloudfront.net (CloudFront) < x-amz-cf-pop: MSP50-P1 < x-amz-cf-id: 9xy-CX9KvlS8Ye4eFr8jXMDobZHFkvdyvkLJGmK_qiwZQywCCwfq7Q== < { [49 bytes data] 100 49 100 49 0 0 2381 0 --:--:-- --:--:-- --:--:-- 2450 * Connection #0 to host huggingface.co left intact (.venv) Daft main*​* ≡❯ curl -v -L -H "Range: bytes=217875070-218006142" -o output.parquet "https://huggingface.co/api/datasets/HuggingFaceTB/smoltalk2/parquet/Mid/Llama_Nemotron_Post_Training_Dataset_reasoning_r1/0.parquet" % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Host huggingface.co:443 was resolved. * IPv6: (none) * IPv4: 18.160.102.96, 18.160.102.110, 18.160.102.4, 18.160.102.86 * Trying 18.160.102.96:443... * Connected to huggingface.co (18.160.102.96) port 443 * ALPN: curl offers h2,http/1.1 * (304) (OUT), TLS handshake, Client hello (1): } [319 bytes data] * CAfile: /etc/ssl/cert.pem * CApath: none * (304) (IN), TLS handshake, Server hello (2): { [122 bytes data] * (304) (IN), TLS handshake, Unknown (8): { [19 bytes data] * (304) (IN), TLS handshake, Certificate (11): { [3821 bytes data] * (304) (IN), TLS handshake, CERT verify (15): { [264 bytes data] * (304) (IN), TLS handshake, Finished (20): { [36 bytes data] * (304) (OUT), TLS handshake, Finished (20): } [36 bytes data] * SSL connection using TLSv1.3 / AEAD-AES128-GCM-SHA256 / [blank] / UNDEF * ALPN: server accepted h2 * Server certificate: * subject: CN=huggingface.co * start date: Apr 13 00:00:00 2025 GMT * expire date: May 12 23:59:59 2026 GMT * subjectAltName: host "huggingface.co" matched cert's "huggingface.co" * issuer: C=US; O=Amazon; CN=Amazon RSA 2048 M02 * SSL certificate verify ok. * using HTTP/2 * [HTTP/2] [1] OPENED stream for https://huggingface.co/api/datasets/HuggingFaceTB/smoltalk2/parquet/Mid/Llama_Nemotron_Post_Training_Dataset_reasoning_r1/0.parquet * [HTTP/2] [1] [:method: GET] * [HTTP/2] [1] [:scheme: https] * [HTTP/2] [1] [:authority: huggingface.co] * [HTTP/2] [1] [:path: /api/datasets/HuggingFaceTB/smoltalk2/parquet/Mid/Llama_Nemotron_Post_Training_Dataset_reasoning_r1/0.parquet] * [HTTP/2] [1] [user-agent: curl/8.7.1] * [HTTP/2] [1] [accept: */*] * [HTTP/2] [1] [range: bytes=217875070-218006142] > GET /api/datasets/HuggingFaceTB/smoltalk2/parquet/Mid/Llama_Nemotron_Post_Training_Dataset_reasoning_r1/0.parquet HTTP/2 > Host: huggingface.co > User-Agent: curl/8.7.1 > Accept: */* > Range: bytes=217875070-218006142 > * Request completely sent off < HTTP/2 416 < content-type: text/html < content-length: 49 < server: CloudFront < date: Wed, 16 Jul 2025 14:58:43 GMT < expires: Wed, 16 Jul 2025 14:58:43 GMT < content-range: bytes */177 < x-cache: Error from cloudfront < via: 1.1 873527676a354c5998cad133525df9c0.cloudfront.net (CloudFront) < x-amz-cf-pop: MSP50-P1 < x-amz-cf-id: wtBgwY4u4YJ2pD1ovM8UV770UiJoqWfs7i7VzschDyoLv5g7swGGmw== < { [49 bytes data] 100 49 100 49 0 0 2273 0 --:--:-- --:--:-- --:--:-- 2333 * Connection #0 to host huggingface.co left intact (.venv) Daft main*​* ≡❯ curl -v -L -H "Range: bytes=217875070-218006142" -o output.parquet "https://huggingface.co/api/datasets/HuggingFaceTB/smoltalk2/parquet/Mid/Llama_Nemotron_Post_Training_Dataset_reasoning_r1/0.parquet" % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Host huggingface.co:443 was resolved. * IPv6: (none) * IPv4: 18.160.102.96, 18.160.102.110, 18.160.102.4, 18.160.102.86 * Trying 18.160.102.96:443... * Connected to huggingface.co (18.160.102.96) port 443 * ALPN: curl offers h2,http/1.1 * (304) (OUT), TLS handshake, Client hello (1): } [319 bytes data] * CAfile: /etc/ssl/cert.pem * CApath: none * (304) (IN), TLS handshake, Server hello (2): { [122 bytes data] * (304) (IN), TLS handshake, Unknown (8): { [19 bytes data] * (304) (IN), TLS handshake, Certificate (11): { [3821 bytes data] * (304) (IN), TLS handshake, CERT verify (15): { [264 bytes data] * (304) (IN), TLS handshake, Finished (20): { [36 bytes data] * (304) (OUT), TLS handshake, Finished (20): } [36 bytes data] * SSL connection using TLSv1.3 / AEAD-AES128-GCM-SHA256 / [blank] / UNDEF * ALPN: server accepted h2 * Server certificate: * subject: CN=huggingface.co * start date: Apr 13 00:00:00 2025 GMT * expire date: May 12 23:59:59 2026 GMT * subjectAltName: host "huggingface.co" matched cert's "huggingface.co" * issuer: C=US; O=Amazon; CN=Amazon RSA 2048 M02 * SSL certificate verify ok. * using HTTP/2 * [HTTP/2] [1] OPENED stream for https://huggingface.co/api/datasets/HuggingFaceTB/smoltalk2/parquet/Mid/Llama_Nemotron_Post_Training_Dataset_reasoning_r1/0.parquet * [HTTP/2] [1] [:method: GET] * [HTTP/2] [1] [:scheme: https] * [HTTP/2] [1] [:authority: huggingface.co] * [HTTP/2] [1] [:path: /api/datasets/HuggingFaceTB/smoltalk2/parquet/Mid/Llama_Nemotron_Post_Training_Dataset_reasoning_r1/0.parquet] * [HTTP/2] [1] [user-agent: curl/8.7.1] * [HTTP/2] [1] [accept: */*] * [HTTP/2] [1] [range: bytes=217875070-218006142] > GET /api/datasets/HuggingFaceTB/smoltalk2/parquet/Mid/Llama_Nemotron_Post_Training_Dataset_reasoning_r1/0.parquet HTTP/2 > Host: huggingface.co > User-Agent: curl/8.7.1 > Accept: */* > Range: bytes=217875070-218006142 > * Request completely sent off < HTTP/2 302 < content-type: text/plain; charset=utf-8 < content-length: 177 < location: https://huggingface.co/datasets/HuggingFaceTB/smoltalk2/resolve/refs%2Fconvert%2Fparquet/Mid/Llama_Nemotron_Post_Training_Dataset_reasoning_r1/0000.parquet < date: Wed, 16 Jul 2025 14:58:44 GMT < x-powered-by: huggingface-moon < cross-origin-opener-policy: same-origin < referrer-policy: strict-origin-when-cross-origin < x-request-id: Root=1-6877be24-476860f03849cb1a1570c9d8 < access-control-allow-origin: https://huggingface.co < access-control-expose-headers: X-Repo-Commit,X-Request-Id,X-Error-Code,X-Error-Message,X-Total-Count,ETag,Link,Accept-Ranges,Content-Range,X-Linked-Size,X-Linked-ETag,X-Xet-Hash < set-cookie: token=; Path=/; Expires=Thu, 01 Jan 1970 00:00:00 GMT; Secure; SameSite=None < set-cookie: token=; Domain=huggingface.co; Path=/; Expires=Thu, 01 Jan 1970 00:00:00 GMT; Secure; SameSite=Lax < x-cache: Miss from cloudfront < via: 1.1 dd5af138aa8a11d8a70d5ef690ad1a2a.cloudfront.net (CloudFront) < x-amz-cf-pop: MSP50-P1 < x-amz-cf-id: xuSi0X5RpH1OZqQOM8gGQLQLU8eOM6Gbkk-bgIX_qBnTTaa1VNkExA== < * Ignoring the response-body 100 177 100 177 0 0 2021 0 --:--:-- --:--:-- --:--:-- 2034 * Connection #0 to host huggingface.co left intact * Issue another request to this URL: 'https://huggingface.co/datasets/HuggingFaceTB/smoltalk2/resolve/refs%2Fconvert%2Fparquet/Mid/Llama_Nemotron_Post_Training_Dataset_reasoning_r1/0000.parquet' * Found bundle for host: 0x600002d54570 [can multiplex] * Re-using existing connection with host huggingface.co * [HTTP/2] [3] OPENED stream for https://huggingface.co/datasets/HuggingFaceTB/smoltalk2/resolve/refs%2Fconvert%2Fparquet/Mid/Llama_Nemotron_Post_Training_Dataset_reasoning_r1/0000.parquet * [HTTP/2] [3] [:method: GET] * [HTTP/2] [3] [:scheme: https] * [HTTP/2] [3] [:authority: huggingface.co] * [HTTP/2] [3] [:path: /datasets/HuggingFaceTB/smoltalk2/resolve/refs%2Fconvert%2Fparquet/Mid/Llama_Nemotron_Post_Training_Dataset_reasoning_r1/0000.parquet] * [HTTP/2] [3] [user-agent: curl/8.7.1] * [HTTP/2] [3] [accept: */*] * [HTTP/2] [3] [range: bytes=217875070-218006142] > GET /datasets/HuggingFaceTB/smoltalk2/resolve/refs%2Fconvert%2Fparquet/Mid/Llama_Nemotron_Post_Training_Dataset_reasoning_r1/0000.parquet HTTP/2 > Host: huggingface.co > User-Agent: curl/8.7.1 > Accept: */* > Range: bytes=217875070-218006142 > * Request completely sent off < HTTP/2 302 < content-type: text/plain; charset=utf-8 < content-length: 1317 < location: https://cas-bridge.xethub.hf.co/xet-bridge-us/686fc33898943c873b45c9a0/cf8a3a5665cf8b2ff667fb5236a1e5cb13c7582955f9533c88e1387997ef3af9?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=cas%2F20250716%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20250716T145416Z&X-Amz-Expires=3600&X-Amz-Signature=21a15b50740d73fd8ce82d5105733ca067d2e612ada22570e09e93ebcc7f8842&X-Amz-SignedHeaders=host&X-Xet-Cas-Uid=public&response-content-disposition=inline%3B+filename*%3DUTF-8%27%270000.parquet%3B+filename%3D%220000.parquet%22%3B&x-id=GetObject&Expires=1752681256&Policy=eyJTdGF0ZW1lbnQiOlt7IkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiQVdTOkVwb2NoVGltZSI6MTc1MjY4MTI1Nn19LCJSZXNvdXJjZSI6Imh0dHBzOi8vY2FzLWJyaWRnZS54ZXRodWIuaGYuY28veGV0LWJyaWRnZS11cy82ODZmYzMzODk4OTQzYzg3M2I0NWM5YTAvY2Y4YTNhNTY2NWNmOGIyZmY2NjdmYjUyMzZhMWU1Y2IxM2M3NTgyOTU1Zjk1MzNjODhlMTM4Nzk5N2VmM2FmOSoifV19&Signature=Tl3xorJ-7yaWvG6Y1AhhRlV2Wko9QpoK1tdPOfNZaRbHo%7EdaAkJRJfcLAYD5YzozfHWBZMLlJsaMPJ1MAne21nr5%7E737sE6yLfBwHdP3ZFZhgrLsN%7EvkIWK2GYX543qTg-pVsf3it92w1oWyoyYNQ9srxLfEIuG2AKV2Nu3Ejl7S%7EaAq4Gv4jNemvRTLBFGgYPdUeuavudl4OD4RGkSGTnpzh-P-OBk5WvgpdZZnbb1cRAP73tFHsPDX4%7ETfQIor109G%7E0TB3Jq0wopO9WV0sMQyQs9peZc6bxONiTxb9aHM4yNvWNbVGtlPuC6YS4c9T1e9%7EehdgU4sDOI%7EhpaCvg__&Key-Pair-Id=K2L8F4GPSG1IFC < date: Wed, 16 Jul 2025 14:58:44 GMT < x-powered-by: huggingface-moon < cross-origin-opener-policy: same-origin < referrer-policy: strict-origin-when-cross-origin < x-request-id: Root=1-6877be24-4f628b292dc8a7a5339c41d3 < access-control-allow-origin: https://huggingface.co < vary: Origin, Accept < access-control-expose-headers: X-Repo-Commit,X-Request-Id,X-Error-Code,X-Error-Message,X-Total-Count,ETag,Link,Accept-Ranges,Content-Range,X-Linked-Size,X-Linked-ETag,X-Xet-Hash < set-cookie: token=; Path=/; Expires=Thu, 01 Jan 1970 00:00:00 GMT; Secure; SameSite=None < set-cookie: token=; Domain=huggingface.co; Path=/; Expires=Thu, 01 Jan 1970 00:00:00 GMT; Secure; SameSite=Lax < x-repo-commit: 712df366ffbc959d9f4279bf2da579230b7ca5d8 < accept-ranges: bytes < x-linked-size: 218006142 < x-linked-etag: "01736bf26d0046ddec4ab8900fba3f0dc6500b038314b44d0edb73a7c88dec07" < x-xet-hash: cf8a3a5665cf8b2ff667fb5236a1e5cb13c7582955f9533c88e1387997ef3af9 < link: <https://huggingface.co/api/datasets/HuggingFaceTB/smoltalk2/xet-read-token/712df366ffbc959d9f4279bf2da579230b7ca5d8>; rel="xet-auth", <https://cas-server.xethub.hf.co/reconstruction/cf8a3a5665cf8b2ff667fb5236a1e5cb13c7582955f9533c88e1387997ef3af9>; rel="xet-reconstruction-info" < x-cache: Miss from cloudfront < via: 1.1 dd5af138aa8a11d8a70d5ef690ad1a2a.cloudfront.net (CloudFront) < x-amz-cf-pop: MSP50-P1 < x-amz-cf-id: 0qXw2sJGrWCLVt7c-Vtn09uE3nu6CrJw9RmAKvNr_flG75muclvlIg== < * Ignoring the response-body 100 1317 100 1317 0 0 9268 0 --:--:-- --:--:-- --:--:-- 9268 * Connection #0 to host huggingface.co left intact * Issue another request to this URL: 'https://cas-bridge.xethub.hf.co/xet-bridge-us/686fc33898943c873b45c9a0/cf8a3a5665cf8b2ff667fb5236a1e5cb13c7582955f9533c88e1387997ef3af9?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=cas%2F20250716%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20250716T145416Z&X-Amz-Expires=3600&X-Amz-Signature=21a15b50740d73fd8ce82d5105733ca067d2e612ada22570e09e93ebcc7f8842&X-Amz-SignedHeaders=host&X-Xet-Cas-Uid=public&response-content-disposition=inline%3B+filename*%3DUTF-8%27%270000.parquet%3B+filename%3D%220000.parquet%22%3B&x-id=GetObject&Expires=1752681256&Policy=eyJTdGF0ZW1lbnQiOlt7IkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiQVdTOkVwb2NoVGltZSI6MTc1MjY4MTI1Nn19LCJSZXNvdXJjZSI6Imh0dHBzOi8vY2FzLWJyaWRnZS54ZXRodWIuaGYuY28veGV0LWJyaWRnZS11cy82ODZmYzMzODk4OTQzYzg3M2I0NWM5YTAvY2Y4YTNhNTY2NWNmOGIyZmY2NjdmYjUyMzZhMWU1Y2IxM2M3NTgyOTU1Zjk1MzNjODhlMTM4Nzk5N2VmM2FmOSoifV19&Signature=Tl3xorJ-7yaWvG6Y1AhhRlV2Wko9QpoK1tdPOfNZaRbHo%7EdaAkJRJfcLAYD5YzozfHWBZMLlJsaMPJ1MAne21nr5%7E737sE6yLfBwHdP3ZFZhgrLsN%7EvkIWK2GYX543qTg-pVsf3it92w1oWyoyYNQ9srxLfEIuG2AKV2Nu3Ejl7S%7EaAq4Gv4jNemvRTLBFGgYPdUeuavudl4OD4RGkSGTnpzh-P-OBk5WvgpdZZnbb1cRAP73tFHsPDX4%7ETfQIor109G%7E0TB3Jq0wopO9WV0sMQyQs9peZc6bxONiTxb9aHM4yNvWNbVGtlPuC6YS4c9T1e9%7EehdgU4sDOI%7EhpaCvg__&Key-Pair-Id=K2L8F4GPSG1IFC' * Host cas-bridge.xethub.hf.co:443 was resolved. * IPv6: (none) * IPv4: 18.160.181.55, 18.160.181.54, 18.160.181.52, 18.160.181.88 * Trying 18.160.181.55:443... * Connected to cas-bridge.xethub.hf.co (18.160.181.55) port 443 * ALPN: curl offers h2,http/1.1 * (304) (OUT), TLS handshake, Client hello (1): } [328 bytes data] * (304) (IN), TLS handshake, Server hello (2): { [122 bytes data] * (304) (IN), TLS handshake, Unknown (8): { [19 bytes data] * (304) (IN), TLS handshake, Certificate (11): { [3818 bytes data] * (304) (IN), TLS handshake, CERT verify (15): { [264 bytes data] * (304) (IN), TLS handshake, Finished (20): { [36 bytes data] * (304) (OUT), TLS handshake, Finished (20): } [36 bytes data] * SSL connection using TLSv1.3 / AEAD-AES128-GCM-SHA256 / [blank] / UNDEF * ALPN: server accepted h2 * Server certificate: * subject: CN=cas-bridge.xethub.hf.co * start date: Jun 4 00:00:00 2025 GMT * expire date: Jul 3 23:59:59 2026 GMT * subjectAltName: host "cas-bridge.xethub.hf.co" matched cert's "cas-bridge.xethub.hf.co" * issuer: C=US; O=Amazon; CN=Amazon RSA 2048 M04 * SSL certificate verify ok. * using HTTP/2 * [HTTP/2] [1] OPENED stream for https://cas-bridge.xethub.hf.co/xet-bridge-us/686fc33898943c873b45c9a0/cf8a3a5665cf8b2ff667fb5236a1e5cb13c7582955f9533c88e1387997ef3af9?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=cas%2F20250716%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20250716T145416Z&X-Amz-Expires=3600&X-Amz-Signature=21a15b50740d73fd8ce82d5105733ca067d2e612ada22570e09e93ebcc7f8842&X-Amz-SignedHeaders=host&X-Xet-Cas-Uid=public&response-content-disposition=inline%3B+filename*%3DUTF-8%27%270000.parquet%3B+filename%3D%220000.parquet%22%3B&x-id=GetObject&Expires=1752681256&Policy=eyJTdGF0ZW1lbnQiOlt7IkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiQVdTOkVwb2NoVGltZSI6MTc1MjY4MTI1Nn19LCJSZXNvdXJjZSI6Imh0dHBzOi8vY2FzLWJyaWRnZS54ZXRodWIuaGYuY28veGV0LWJyaWRnZS11cy82ODZmYzMzODk4OTQzYzg3M2I0NWM5YTAvY2Y4YTNhNTY2NWNmOGIyZmY2NjdmYjUyMzZhMWU1Y2IxM2M3NTgyOTU1Zjk1MzNjODhlMTM4Nzk5N2VmM2FmOSoifV19&Signature=Tl3xorJ-7yaWvG6Y1AhhRlV2Wko9QpoK1tdPOfNZaRbHo%7EdaAkJRJfcLAYD5YzozfHWBZMLlJsaMPJ1MAne21nr5%7E737sE6yLfBwHdP3ZFZhgrLsN%7EvkIWK2GYX543qTg-pVsf3it92w1oWyoyYNQ9srxLfEIuG2AKV2Nu3Ejl7S%7EaAq4Gv4jNemvRTLBFGgYPdUeuavudl4OD4RGkSGTnpzh-P-OBk5WvgpdZZnbb1cRAP73tFHsPDX4%7ETfQIor109G%7E0TB3Jq0wopO9WV0sMQyQs9peZc6bxONiTxb9aHM4yNvWNbVGtlPuC6YS4c9T1e9%7EehdgU4sDOI%7EhpaCvg__&Key-Pair-Id=K2L8F4GPSG1IFC * [HTTP/2] [1] [:method: GET] * [HTTP/2] [1] [:scheme: https] * [HTTP/2] [1] [:authority: cas-bridge.xethub.hf.co] * [HTTP/2] [1] [:path: /xet-bridge-us/686fc33898943c873b45c9a0/cf8a3a5665cf8b2ff667fb5236a1e5cb13c7582955f9533c88e1387997ef3af9?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=cas%2F20250716%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20250716T145416Z&X-Amz-Expires=3600&X-Amz-Signature=21a15b50740d73fd8ce82d5105733ca067d2e612ada22570e09e93ebcc7f8842&X-Amz-SignedHeaders=host&X-Xet-Cas-Uid=public&response-content-disposition=inline%3B+filename*%3DUTF-8%27%270000.parquet%3B+filename%3D%220000.parquet%22%3B&x-id=GetObject&Expires=1752681256&Policy=eyJTdGF0ZW1lbnQiOlt7IkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiQVdTOkVwb2NoVGltZSI6MTc1MjY4MTI1Nn19LCJSZXNvdXJjZSI6Imh0dHBzOi8vY2FzLWJyaWRnZS54ZXRodWIuaGYuY28veGV0LWJyaWRnZS11cy82ODZmYzMzODk4OTQzYzg3M2I0NWM5YTAvY2Y4YTNhNTY2NWNmOGIyZmY2NjdmYjUyMzZhMWU1Y2IxM2M3NTgyOTU1Zjk1MzNjODhlMTM4Nzk5N2VmM2FmOSoifV19&Signature=Tl3xorJ-7yaWvG6Y1AhhRlV2Wko9QpoK1tdPOfNZaRbHo%7EdaAkJRJfcLAYD5YzozfHWBZMLlJsaMPJ1MAne21nr5%7E737sE6yLfBwHdP3ZFZhgrLsN%7EvkIWK2GYX543qTg-pVsf3it92w1oWyoyYNQ9srxLfEIuG2AKV2Nu3Ejl7S%7EaAq4Gv4jNemvRTLBFGgYPdUeuavudl4OD4RGkSGTnpzh-P-OBk5WvgpdZZnbb1cRAP73tFHsPDX4%7ETfQIor109G%7E0TB3Jq0wopO9WV0sMQyQs9peZc6bxONiTxb9aHM4yNvWNbVGtlPuC6YS4c9T1e9%7EehdgU4sDOI%7EhpaCvg__&Key-Pair-Id=K2L8F4GPSG1IFC] * [HTTP/2] [1] [user-agent: curl/8.7.1] * [HTTP/2] [1] [accept: */*] * [HTTP/2] [1] [range: bytes=217875070-218006142] > GET /xet-bridge-us/686fc33898943c873b45c9a0/cf8a3a5665cf8b2ff667fb5236a1e5cb13c7582955f9533c88e1387997ef3af9?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=cas%2F20250716%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20250716T145416Z&X-Amz-Expires=3600&X-Amz-Signature=21a15b50740d73fd8ce82d5105733ca067d2e612ada22570e09e93ebcc7f8842&X-Amz-SignedHeaders=host&X-Xet-Cas-Uid=public&response-content-disposition=inline%3B+filename*%3DUTF-8%27%270000.parquet%3B+filename%3D%220000.parquet%22%3B&x-id=GetObject&Expires=1752681256&Policy=eyJTdGF0ZW1lbnQiOlt7IkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiQVdTOkVwb2NoVGltZSI6MTc1MjY4MTI1Nn19LCJSZXNvdXJjZSI6Imh0dHBzOi8vY2FzLWJyaWRnZS54ZXRodWIuaGYuY28veGV0LWJyaWRnZS11cy82ODZmYzMzODk4OTQzYzg3M2I0NWM5YTAvY2Y4YTNhNTY2NWNmOGIyZmY2NjdmYjUyMzZhMWU1Y2IxM2M3NTgyOTU1Zjk1MzNjODhlMTM4Nzk5N2VmM2FmOSoifV19&Signature=Tl3xorJ-7yaWvG6Y1AhhRlV2Wko9QpoK1tdPOfNZaRbHo%7EdaAkJRJfcLAYD5YzozfHWBZMLlJsaMPJ1MAne21nr5%7E737sE6yLfBwHdP3ZFZhgrLsN%7EvkIWK2GYX543qTg-pVsf3it92w1oWyoyYNQ9srxLfEIuG2AKV2Nu3Ejl7S%7EaAq4Gv4jNemvRTLBFGgYPdUeuavudl4OD4RGkSGTnpzh-P-OBk5WvgpdZZnbb1cRAP73tFHsPDX4%7ETfQIor109G%7E0TB3Jq0wopO9WV0sMQyQs9peZc6bxONiTxb9aHM4yNvWNbVGtlPuC6YS4c9T1e9%7EehdgU4sDOI%7EhpaCvg__&Key-Pair-Id=K2L8F4GPSG1IFC HTTP/2 > Host: cas-bridge.xethub.hf.co > User-Agent: curl/8.7.1 > Accept: */* > Range: bytes=217875070-218006142 > * Request completely sent off < HTTP/2 206 < content-length: 131072 < date: Mon, 14 Jul 2025 08:40:28 GMT < x-request-id: 01K041FDPVA03RR2PRXDZSN30G < content-disposition: inline; filename*=UTF-8''0000.parquet; filename="0000.parquet"; < cache-control: public, max-age=31536000 < etag: "cf8a3a5665cf8b2ff667fb5236a1e5cb13c7582955f9533c88e1387997ef3af9" < access-control-allow-origin: * < access-control-allow-headers: Content-Range, Content-Type, Content-Disposition, ETag < access-control-expose-headers: Accept-Ranges, Content-Range, Content-Type, Content-Disposition, ETag, X-Cache < x-cache: Hit from cloudfront < via: 1.1 1c857e24a4dc84d2d9c78d5b3463bed6.cloudfront.net (CloudFront) < x-amz-cf-pop: MSP50-P2 < x-amz-cf-id: 3SxFmQa5wLeeXbNiwaAo0_RwoR_n7-SivjsLjDLG-Pwn5UhG2oiEQA== < age: 195496 < content-security-policy: default-src 'none'; sandbox < content-range: bytes 217875070-218006141/218006142 < { [8192 bytes data] 100 128k 100 128k 0 0 769k 0 --:--:-- --:--:-- --:--:-- 769k * Connection #1 to host cas-bridge.xethub.hf.co left intact </details> ### Expected behavior always get back a `206` ### Environment info n/a
null
https://api.github.com/repos/huggingface/datasets/issues/7685/timeline
null
null
universalmind303
21,327,470
MDQ6VXNlcjIxMzI3NDcw
https://avatars.githubusercontent.com/u/21327470?v=4
https://api.github.com/users/universalmind303
https://github.com/universalmind303
https://api.github.com/users/universalmind303/followers
https://api.github.com/users/universalmind303/following{/other_user}
https://api.github.com/users/universalmind303/gists{/gist_id}
https://api.github.com/users/universalmind303/starred{/owner}{/repo}
https://api.github.com/users/universalmind303/subscriptions
https://api.github.com/users/universalmind303/orgs
https://api.github.com/users/universalmind303/repos
https://api.github.com/users/universalmind303/events{/privacy}
https://api.github.com/users/universalmind303/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7685/reactions
0
0
0
0
0
0
0
0
0
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[ "This is a weird bug, is it a range that is supposed to be satisfiable ? I mean, is it on the boundraries ?\n\nLet me know if you'r e still having the issue, in case it was just a transient bug", "@lhoestq yes the ranges are supposed to be satisfiable, and _sometimes_ they are. \n\nThe head requests show that it does in fact accept a byte range. \n\n```\n> curl -IL \"https://huggingface.co/api/datasets/HuggingFaceTB/smoltalk2/parquet/Mid/Llama_Nemotron_Post_Training_Dataset_reasoning_r1/0.parquet\" \n\n\nHTTP/2 200\ncontent-length: 218006142\ncontent-disposition: inline; filename*=UTF-8''0000.parquet; filename=\"0000.parquet\";\ncache-control: public, max-age=31536000\netag: \"cf8a3a5665cf8b2ff667fb5236a1e5cb13c7582955f9533c88e1387997ef3af9\"\naccess-control-allow-origin: *\naccess-control-allow-headers: Content-Range, Content-Type, Content-Disposition, ETag\naccess-control-expose-headers: Accept-Ranges, Content-Range, Content-Type, Content-Disposition, ETag, X-Cache\naccept-ranges: bytes\nx-request-id: 01K11493PRMCZKVSNCBF1EX1WJ\ndate: Fri, 25 Jul 2025 15:47:25 GMT\nx-cache: Hit from cloudfront\nvia: 1.1 ad637ff39738449b56ab4eac4b02cbf4.cloudfront.net (CloudFront)\nx-amz-cf-pop: MSP50-P2\nx-amz-cf-id: ti1Ze3e0knGMl0PkeZ_F_snZNZe4007D9uT502MkGjM4NWPYWy13wA==\nage: 15\ncontent-security-policy: default-src 'none'; sandbox\n```\n\nand as I mentioned, _sometimes_ it satisfies the request \n\n```\n* Request completely sent off\n< HTTP/2 206\n< content-length: 131072\n< content-disposition: inline; filename*=UTF-8''0000.parquet; filename=\"0000.parquet\";\n< cache-control: public, max-age=31536000\n< etag: \"cf8a3a5665cf8b2ff667fb5236a1e5cb13c7582955f9533c88e1387997ef3af9\"\n< access-control-allow-origin: *\n< access-control-allow-headers: Content-Range, Content-Type, Content-Disposition, ETag\n< access-control-expose-headers: Accept-Ranges, Content-Range, Content-Type, Content-Disposition, ETag, X-Cache\n< x-request-id: 01K1146P5PNC4D2XD348C78BTC\n< date: Fri, 25 Jul 2025 15:46:06 GMT\n< x-cache: Hit from cloudfront\n< via: 1.1 990606ab91bf6503d073ad5fee40784c.cloudfront.net (CloudFront)\n< x-amz-cf-pop: MSP50-P2\n< x-amz-cf-id: l58ghqEzNZn4eo4IRNl76fOFrHTk_TJKeLi0-g8YYHmq7Oh3s8sXnQ==\n< age: 248\n< content-security-policy: default-src 'none'; sandbox\n< content-range: bytes 217875070-218006141/218006142\n```\n\nbut more often than not, it returns a 416\n```\n* Request completely sent off\n< HTTP/2 416\n< content-type: text/html\n< content-length: 49\n< server: CloudFront\n< date: Fri, 25 Jul 2025 15:51:08 GMT\n< expires: Fri, 25 Jul 2025 15:51:08 GMT\n< content-range: bytes */177\n< x-cache: Error from cloudfront\n< via: 1.1 65ba38c8dc30018660c405d1f32ef3a0.cloudfront.net (CloudFront)\n< x-amz-cf-pop: MSP50-P1\n< x-amz-cf-id: 1t1Att_eqiO-LmlnnaO-cCPoh6G2AIQDaklhS08F_revXNqijMpseA==\n```\n\n\n", "As a workaround, adding a unique parameter to the url avoids the CDN caching and returns the correct result. \n\n```\n❯ curl -v -L -H \"Range: bytes=217875070-218006142\" -o output.parquet \"https://huggingface.co/api/datasets/HuggingFaceTB/smoltalk2/parquet/Mid/Llama_Nemotron_Post_Training_Dataset_reasoning_r1/0.parquet?cachebust=<SOMEUNIQUESTRING>\" \n``` \n", "@lhoestq Is there any update on this? We (daft) have been getting more reports of this when users are reading huggingface datasets. ", "> [@lhoestq](https://github.com/lhoestq) Is there any update on this? We (daft) have been getting more reports of this when users are reading huggingface datasets.\n\nHello, \nWe have temporarily disabled the caching rule that could be the origin of this issue. Meanwhile, the problem is still being investigated by us" ]
https://api.github.com/repos/huggingface/datasets/issues/7682
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7682/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7682/comments
https://api.github.com/repos/huggingface/datasets/issues/7682/events
https://github.com/huggingface/datasets/issues/7682
3,229,687,253
I_kwDODunzps7AgR3V
7,682
Fail to cast Audio feature for numpy arrays in datasets 4.0.0
[]
closed
false
null
[]
null
2
1,752
1,752
1,752
NONE
null
null
### Describe the bug Casting features with Audio for numpy arrays - done here with `ds.map(gen_sine, features=features)` fails in version 4.0.0 but not in version 3.6.0 ### Steps to reproduce the bug The following `uv script` should be able to reproduce the bug in version 4.0.0 and pass in version 3.6.0 on a macOS Sequoia 15.5 ```python # /// script # requires-python = ">=3.13" # dependencies = [ # "datasets[audio]==4.0.0", # "librosa>=0.11.0", # ] # /// # NAME # create_audio_dataset.py - create an audio dataset of sine waves # # SYNOPSIS # uv run create_audio_dataset.py # # DESCRIPTION # Create an audio dataset using the Hugging Face [datasets] library. # Illustrates how to create synthetic audio datasets using the [map] # datasets function. # # The strategy is to first create a dataset with the input to the # generation function, then execute the map function that generates # the result, and finally cast the final features. # # BUG # Casting features with Audio for numpy arrays - # done here with `ds.map(gen_sine, features=features)` fails # in version 4.0.0 but not in version 3.6.0 # # This happens both in cases where --extra audio is provided and where is not. # When audio is not provided i've installed the latest compatible version # of soundfile. # # The error when soundfile is installed but the audio --extra is not # indicates that the array values do not have the `.T` property, # whilst also indicating that the value is a list instead of a numpy array. # # Last lines of error report when for datasets + soundfile case # ... # # File "/Users/luasantilli/.cache/uv/archive-v0/tc_5IhQe7Zpw8ZXgQWpnl/lib/python3.13/site-packages/datasets/features/audio.py", line 239, in cast_storage # storage = pa.array([Audio().encode_example(x) if x is not None else None for x in storage.to_pylist()]) # ~~~~~~~~~~~~~~~~~~~~~~^^^ # File "/Users/luasantilli/.cache/uv/archive-v0/tc_5IhQe7Zpw8ZXgQWpnl/lib/python3.13/site-packages/datasets/features/audio.py", line 122, in encode_example # sf.write(buffer, value["array"].T, value["sampling_rate"], format="wav") # ^^^^^^^^^^^^^^^^ # AttributeError: 'list' object has no attribute 'T' # ... # # For the case of datasets[audio] without explicit adding soundfile I get an FFmpeg # error. # # Last lines of error report: # # ... # RuntimeError: Could not load libtorchcodec. Likely causes: # 1. FFmpeg is not properly installed in your environment. We support # versions 4, 5, 6 and 7. # 2. The PyTorch version (2.7.1) is not compatible with # this version of TorchCodec. Refer to the version compatibility # table: # https://github.com/pytorch/torchcodec?tab=readme-ov-file#installing-torchcodec. # 3. Another runtime dependency; see exceptions below. # The following exceptions were raised as we tried to load libtorchcodec: # # [start of libtorchcodec loading traceback] # FFmpeg version 7: dlopen(/Users/luasantilli/.cache/uv/archive-v0/RK3IAlGfiICwDkHm2guLC/lib/python3.13/site-packages/torchcodec/libtorchcodec_decoder7.dylib, 0x0006): Library not loaded: @rpath/libavutil.59.dylib # Referenced from: <6DB21246-F28A-31A6-910A-D8F3355D1064> /Users/luasantilli/.cache/uv/archive-v0/RK3IAlGfiICwDkHm2guLC/lib/python3.13/site-packages/torchcodec/libtorchcodec_decoder7.dylib # Reason: no LC_RPATH's found # FFmpeg version 6: dlopen(/Users/luasantilli/.cache/uv/archive-v0/RK3IAlGfiICwDkHm2guLC/lib/python3.13/site-packages/torchcodec/libtorchcodec_decoder6.dylib, 0x0006): Library not loaded: @rpath/libavutil.58.dylib # Referenced from: <BD3B44FC-E14B-3ABF-800F-BB54B6CCA3B1> /Users/luasantilli/.cache/uv/archive-v0/RK3IAlGfiICwDkHm2guLC/lib/python3.13/site-packages/torchcodec/libtorchcodec_decoder6.dylib # Reason: no LC_RPATH's found # FFmpeg version 5: dlopen(/Users/luasantilli/.cache/uv/archive-v0/RK3IAlGfiICwDkHm2guLC/lib/python3.13/site-packages/torchcodec/libtorchcodec_decoder5.dylib, 0x0006): Library not loaded: @rpath/libavutil.57.dylib # Referenced from: <F06EBF8A-238C-3A96-BFBB-B34E0BBDABF0> /Users/luasantilli/.cache/uv/archive-v0/RK3IAlGfiICwDkHm2guLC/lib/python3.13/site-packages/torchcodec/libtorchcodec_decoder5.dylib # Reason: no LC_RPATH's found # FFmpeg version 4: dlopen(/Users/luasantilli/.cache/uv/archive-v0/RK3IAlGfiICwDkHm2guLC/lib/python3.13/site-packages/torchcodec/libtorchcodec_decoder4.dylib, 0x0006): Library not loaded: @rpath/libavutil.56.dylib # Referenced from: <6E59F017-C703-3AF6-A271-6277DD5F8170> /Users/luasantilli/.cache/uv/archive-v0/RK3IAlGfiICwDkHm2guLC/lib/python3.13/site-packages/torchcodec/libtorchcodec_decoder4.dylib # Reason: no LC_RPATH's found # ... # # This is strange because the the same error does not happen when using version 3.6.0 with datasets[audio]. # # The same error appears in python3.12 ## Imports import numpy as np from datasets import Dataset, Features, Audio, Value ## Parameters NUM_WAVES = 128 SAMPLE_RATE = 16_000 DURATION = 1.0 ## Input dataset arguments freqs = np.linspace(100, 2000, NUM_WAVES).tolist() ds = Dataset.from_dict({"frequency": freqs}) ## Features for the final dataset features = Features( {"frequency": Value("float32"), "audio": Audio(sampling_rate=SAMPLE_RATE)} ) ## Generate audio sine waves and cast features def gen_sine(example): t = np.linspace(0, DURATION, int(SAMPLE_RATE * DURATION), endpoint=False) wav = np.sin(2 * np.pi * example["frequency"] * t) return { "frequency": example["frequency"], "audio": {"array": wav, "sampling_rate": SAMPLE_RATE}, } ds = ds.map(gen_sine, features=features) print(ds) print(ds.features) ``` ### Expected behavior I expect the result of version `4.0.0` to be the same of that in version `3.6.0`. Switching the value of the script above to `3.6.0` I get the following, expected, result: ``` $ uv run bug_report.py Map: 100%|███████████████████████████████████████████████████████| 128/128 [00:00<00:00, 204.58 examples/s] Dataset({ features: ['frequency', 'audio'], num_rows: 128 }) {'frequency': Value(dtype='float32', id=None), 'audio': Audio(sampling_rate=16000, mono=True, decode=True, id=None)} ``` ### Environment info - `datasets` version: 4.0.0 - Platform: macOS-15.5-arm64-arm-64bit-Mach-O - Python version: 3.13.1 - `huggingface_hub` version: 0.33.4 - PyArrow version: 20.0.0 - Pandas version: 2.3.1 - `fsspec` version: 2025.3.0
null
https://api.github.com/repos/huggingface/datasets/issues/7682/timeline
null
completed
luatil-cloud
163,345,686
U_kgDOCbx1Fg
https://avatars.githubusercontent.com/u/163345686?v=4
https://api.github.com/users/luatil-cloud
https://github.com/luatil-cloud
https://api.github.com/users/luatil-cloud/followers
https://api.github.com/users/luatil-cloud/following{/other_user}
https://api.github.com/users/luatil-cloud/gists{/gist_id}
https://api.github.com/users/luatil-cloud/starred{/owner}{/repo}
https://api.github.com/users/luatil-cloud/subscriptions
https://api.github.com/users/luatil-cloud/orgs
https://api.github.com/users/luatil-cloud/repos
https://api.github.com/users/luatil-cloud/events{/privacy}
https://api.github.com/users/luatil-cloud/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7682/reactions
1
0
0
0
0
0
0
0
1
null
null
null
null
null
null
lhoestq
42,851,186
MDQ6VXNlcjQyODUxMTg2
https://avatars.githubusercontent.com/u/42851186?v=4
https://api.github.com/users/lhoestq
https://github.com/lhoestq
https://api.github.com/users/lhoestq/followers
https://api.github.com/users/lhoestq/following{/other_user}
https://api.github.com/users/lhoestq/gists{/gist_id}
https://api.github.com/users/lhoestq/starred{/owner}{/repo}
https://api.github.com/users/lhoestq/subscriptions
https://api.github.com/users/lhoestq/orgs
https://api.github.com/users/lhoestq/repos
https://api.github.com/users/lhoestq/events{/privacy}
https://api.github.com/users/lhoestq/received_events
User
public
false
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[ "thanks for reporting, I opened a PR and I'll make a patch release soon ", "> thanks for reporting, I opened a PR and I'll make a patch release soon\n\nThank you very much @lhoestq!" ]
https://api.github.com/repos/huggingface/datasets/issues/7681
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7681/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7681/comments
https://api.github.com/repos/huggingface/datasets/issues/7681/events
https://github.com/huggingface/datasets/issues/7681
3,227,112,736
I_kwDODunzps7AWdUg
7,681
Probabilistic High Memory Usage and Freeze on Python 3.10
[]
open
false
null
[]
null
0
1,752
1,752
null
NONE
null
null
### Describe the bug A probabilistic issue encountered when processing datasets containing PIL.Image columns using the huggingface/datasets library on Python 3.10. The process occasionally experiences a sudden and significant memory spike, reaching 100% utilization, leading to a complete freeze. During this freeze, the process becomes unresponsive, cannot be forcefully terminated, and does not throw any exceptions. I have attempted to mitigate this issue by setting `datasets.config.IN_MEMORY_MAX_SIZE`, but it had no effect. In fact, based on the document of `load_dataset`, I suspect that setting `IN_MEMORY_MAX_SIZE` might even have a counterproductive effect. This bug is not consistently reproducible, but its occurrence rate significantly decreases or disappears entirely when upgrading Python to version 3.11 or higher. Therefore, this issue also serves to share a potential solution for others who might encounter similar problems. ### Steps to reproduce the bug Due to the probabilistic nature of this bug, consistent reproduction cannot be guaranteed for every run. However, in my environment, processing large datasets like timm/imagenet-1k-wds(whether reading, casting, or mapping operations) almost certainly triggers the issue at some point. The probability of the issue occurring drastically increases when num_proc is set to a value greater than 1 during operations. When the issue occurs, my system logs repeatedly show the following warnings: ``` WARN: very high memory utilization: 57.74GiB / 57.74GiB (100 %) WARN: container is unhealthy: triggered memory limits (OOM) WARN: container is unhealthy: triggered memory limits (OOM) WARN: container is unhealthy: triggered memory limits (OOM) ``` ### Expected behavior The dataset should be read and processed normally without memory exhaustion or freezing. If an unrecoverable error occurs, an appropriate exception should be raised. I have found that upgrading Python to version 3.11 or above completely resolves this issue. On Python 3.11, when memory usage approaches 100%, it suddenly drops before slowly increasing again. I suspect this behavior is due to an expected memory management action, possibly involving writing to disk cache, which prevents the complete freeze observed in Python 3.10. ### Environment info - `datasets` version: 4.0.0 - Platform: Linux-5.15.0-71-generic-x86_64-with-glibc2.35 - Python version: 3.10.12 - `huggingface_hub` version: 0.33.4 - PyArrow version: 20.0.0 - Pandas version: 2.3.1 - `fsspec` version: 2025.3.0
null
https://api.github.com/repos/huggingface/datasets/issues/7681/timeline
null
null
ryan-minato
82,735,346
MDQ6VXNlcjgyNzM1MzQ2
https://avatars.githubusercontent.com/u/82735346?v=4
https://api.github.com/users/ryan-minato
https://github.com/ryan-minato
https://api.github.com/users/ryan-minato/followers
https://api.github.com/users/ryan-minato/following{/other_user}
https://api.github.com/users/ryan-minato/gists{/gist_id}
https://api.github.com/users/ryan-minato/starred{/owner}{/repo}
https://api.github.com/users/ryan-minato/subscriptions
https://api.github.com/users/ryan-minato/orgs
https://api.github.com/users/ryan-minato/repos
https://api.github.com/users/ryan-minato/events{/privacy}
https://api.github.com/users/ryan-minato/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7681/reactions
0
0
0
0
0
0
0
0
0
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[]
https://api.github.com/repos/huggingface/datasets/issues/7680
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7680/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7680/comments
https://api.github.com/repos/huggingface/datasets/issues/7680/events
https://github.com/huggingface/datasets/issues/7680
3,224,824,151
I_kwDODunzps7ANulX
7,680
Question about iterable dataset and streaming
[]
open
false
null
[]
null
8
1,752
1,754
null
NONE
null
null
In the doc, I found the following example: https://github.com/huggingface/datasets/blob/611f5a592359ebac6f858f515c776aa7d99838b2/docs/source/stream.mdx?plain=1#L65-L78 I am confused, 1. If we have already loaded the dataset, why doing `to_iterable_dataset`? Does it go through the dataset faster than map-style dataset? 2. `load_dataset(streaming=True)` is useful for huge dataset, but the speed is slow. How to make it comparable to `to_iterable_dataset` without loading the whole dataset into RAM?
null
https://api.github.com/repos/huggingface/datasets/issues/7680/timeline
null
null
Tavish9
73,541,181
MDQ6VXNlcjczNTQxMTgx
https://avatars.githubusercontent.com/u/73541181?v=4
https://api.github.com/users/Tavish9
https://github.com/Tavish9
https://api.github.com/users/Tavish9/followers
https://api.github.com/users/Tavish9/following{/other_user}
https://api.github.com/users/Tavish9/gists{/gist_id}
https://api.github.com/users/Tavish9/starred{/owner}{/repo}
https://api.github.com/users/Tavish9/subscriptions
https://api.github.com/users/Tavish9/orgs
https://api.github.com/users/Tavish9/repos
https://api.github.com/users/Tavish9/events{/privacy}
https://api.github.com/users/Tavish9/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7680/reactions
0
0
0
0
0
0
0
0
0
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[ "> If we have already loaded the dataset, why doing to_iterable_dataset? Does it go through the dataset faster than map-style dataset?\n\nyes, it makes a faster DataLoader for example (otherwise DataLoader uses `__getitem__` which is slower than iterating)\n\n> load_dataset(streaming=True) is useful for huge dataset, but the speed is slow. How to make it comparable to to_iterable_dataset without loading the whole dataset into RAM?\n\nYou can aim for saturating your bandwidth using a DataLoader with num_workers and prefetch_factor. The maximum speed will be your internet bandwidth (unless your CPU is a bottlenbeck for CPU operations like image decoding).", "> > If we have already loaded the dataset, why doing to_iterable_dataset? Does it go through the dataset faster than map-style dataset?\n> \n> yes, it makes a faster DataLoader for example (otherwise DataLoader uses `__getitem__` which is slower than iterating)\n\nOkay, but `__getitem__` seems suitable for distributed settings. A distributed sampler would dispatch distinct indexes to each rank (rank0 got 0,1,2,3, rank1 got 4,5,6,7), however, if we make it `to_iterable_dataset`, then each rank needs to iterate all the samples, making it slower (i,e, rank1 got 0,1,2,3, rank2 got 0,1,2,3,(4,5,6,7))\n\nWhat's your opinion here?", "> however, if we make it to_iterable_dataset, then each rank needs to iterate all the samples, making it slower (i,e, rank1 got 0,1,2,3, rank2 got 0,1,2,3,(4,5,6,7))\n\nActually if you specify `to_iterable_dataset(num_shards=world_size)` (or a factor of world_size) and use a `torch.utils.data.DataLoader` then each rank will get a subset of the data thanks to the sharding. E.g. rank0 gets 0,1,2,3 and rank1 gets 4,5,6,7.\n\nThis is because `datasets.IterableDataset` subclasses `torch.utils.data.IterableDataset` and is aware of the current rank.", "Got it, very nice features `num_shards` 👍🏻 \n\nI would benchmark `to_iterable_dataset(num_shards=world_size)` against traditional map-style one in distributed settings in the near future.", "Hi @lhoestq , I run a test for the speed in single node. Things are not expected as you mentioned before.\n\n```python\nimport time\n\nimport datasets\nfrom torch.utils.data import DataLoader\n\n\ndef time_decorator(func):\n def wrapper(*args, **kwargs):\n start_time = time.time()\n result = func(*args, **kwargs)\n end_time = time.time()\n print(f\"Time taken: {end_time - start_time} seconds\")\n return result\n\n return wrapper\n\n\ndataset = datasets.load_dataset(\n \"parquet\", data_dir=\"my_dir\", split=\"train\"\n)\n\n\n@time_decorator\ndef load_dataset1():\n for _ in dataset:\n pass\n\n\n@time_decorator\ndef load_dataloader1():\n for _ in DataLoader(dataset, batch_size=100, num_workers=5):\n pass\n\n\n@time_decorator\ndef load_dataset2():\n for _ in dataset.to_iterable_dataset():\n pass\n\n\n@time_decorator\ndef load_dataloader2():\n for _ in DataLoader(dataset.to_iterable_dataset(num_shards=5), batch_size=100, num_workers=5):\n pass\n\n\nload_dataset1()\nload_dataloader1()\nload_dataset2()\nload_dataloader2()\n```\n```bash\nResolving data files: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 53192/53192 [00:00<00:00, 227103.16it/s]\nTime taken: 100.36162948608398 seconds\nTime taken: 70.09702134132385 seconds\nTime taken: 343.09229612350464 seconds\nTime taken: 132.8996012210846 seconds\n```\n\n1. Why `for _ in dataset.to_iterable_dataset()` is much slower than `for _ in dataset`\n2. The `70 < 132`, the dataloader is slower when `to_iterable_dataset`", "Loading in batches is faster than one example at a time. In your test the dataset is loaded in batches while the iterable_dataset is loaded one example at a time and the dataloader has a buffer to turn the examples to batches.\n\ncan you try this ?\n\n```\nbatched_dataset = dataset.batch(100, num_proc=5)\n\n@time_decorator\ndef load_dataloader3():\n for _ in DataLoader(batched_dataset.to_iterable_dataset(num_shards=5), batch_size=None, num_workers=5):\n pass\n```", "To be fair, I test the time including batching:\n```python\n@time_decorator\ndef load_dataloader3():\n for _ in DataLoader(dataset.batch(100, num_proc=5).to_iterable_dataset(num_shards=5), batch_size=None, num_workers=5):\n pass\n```\n\n```bash\nTime taken: 49.722447633743286 seconds\n```", "I run another test about shuffling.\n\n```python\n@time_decorator\ndef load_map_dataloader1():\n for _ in DataLoader(dataset, batch_size=100, num_workers=5, shuffle=True):\n pass\n\n@time_decorator\ndef load_map_dataloader2():\n for _ in DataLoader(dataset.batch(100, num_proc=5), batch_size=None, num_workers=5, shuffle=True):\n pass\n\n\n@time_decorator\ndef load_iter_dataloader1():\n for _ in DataLoader(dataset.batch(100, num_proc=5).to_iterable_dataset(num_shards=5).shuffle(buffer_size=1000), batch_size=None, num_workers=5):\n pass\n\nload_map_dataloader1()\nload_map_dataloader2()\nload_iter_dataloader1()\n```\n\n```bash\nTime taken: 43.8506863117218 seconds\nTime taken: 38.02591300010681 seconds\nTime taken: 53.38815689086914 seconds\n```\n\n\n- What if I have custom collate_fn when batching?\n\n- And if I want to shuffle the dataset, what's the correct order for `to_iterable_dataset(num_shards=x)`, `batch()` and `shuffle()`. Is `dataset.batch().to_iterable_dataset().shuffle()`? This is not faster than map-style dataset" ]
https://api.github.com/repos/huggingface/datasets/issues/7679
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7679/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7679/comments
https://api.github.com/repos/huggingface/datasets/issues/7679/events
https://github.com/huggingface/datasets/issues/7679
3,220,787,371
I_kwDODunzps6_-VCr
7,679
metric glue breaks with 4.0.0
[]
closed
false
null
[]
null
2
1,752
1,752
1,752
CONTRIBUTOR
null
null
### Describe the bug worked fine with 3.6.0, and with 4.0.0 `eval_metric = metric.compute()` in HF Accelerate breaks. The code that fails is: https://huggingface.co/spaces/evaluate-metric/glue/blob/v0.4.0/glue.py#L84 ``` def simple_accuracy(preds, labels): print(preds, labels) print(f"{preds==labels}") return float((preds == labels).mean()) ``` data: ``` Column([1, 0, 0, 1, 1]) Column([1, 0, 0, 1, 0]) False ``` ``` [rank0]: return float((preds == labels).mean()) [rank0]: ^^^^^^^^^^^^^^^^^^^^^^ [rank0]: AttributeError: 'bool' object has no attribute 'mean' ``` Some behavior has changed in this new major release of `datasets` and requires updating HF accelerate and perhaps the glue metric code, all belong to HF. ### Environment info datasets=4.0.0
null
https://api.github.com/repos/huggingface/datasets/issues/7679/timeline
null
completed
stas00
10,676,103
MDQ6VXNlcjEwNjc2MTAz
https://avatars.githubusercontent.com/u/10676103?v=4
https://api.github.com/users/stas00
https://github.com/stas00
https://api.github.com/users/stas00/followers
https://api.github.com/users/stas00/following{/other_user}
https://api.github.com/users/stas00/gists{/gist_id}
https://api.github.com/users/stas00/starred{/owner}{/repo}
https://api.github.com/users/stas00/subscriptions
https://api.github.com/users/stas00/orgs
https://api.github.com/users/stas00/repos
https://api.github.com/users/stas00/events{/privacy}
https://api.github.com/users/stas00/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7679/reactions
0
0
0
0
0
0
0
0
0
null
null
null
null
null
null
stas00
10,676,103
MDQ6VXNlcjEwNjc2MTAz
https://avatars.githubusercontent.com/u/10676103?v=4
https://api.github.com/users/stas00
https://github.com/stas00
https://api.github.com/users/stas00/followers
https://api.github.com/users/stas00/following{/other_user}
https://api.github.com/users/stas00/gists{/gist_id}
https://api.github.com/users/stas00/starred{/owner}{/repo}
https://api.github.com/users/stas00/subscriptions
https://api.github.com/users/stas00/orgs
https://api.github.com/users/stas00/repos
https://api.github.com/users/stas00/events{/privacy}
https://api.github.com/users/stas00/received_events
User
public
false
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[ "I released `evaluate` 0.4.5 yesterday to fix the issue - sorry for the inconvenience:\n\n```\npip install -U evaluate\n```", "Thanks so much, @lhoestq!" ]
https://api.github.com/repos/huggingface/datasets/issues/7678
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7678/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7678/comments
https://api.github.com/repos/huggingface/datasets/issues/7678/events
https://github.com/huggingface/datasets/issues/7678
3,218,625,544
I_kwDODunzps6_2FQI
7,678
To support decoding audio data, please install 'torchcodec'.
[]
closed
false
null
[]
null
2
1,752
1,753
1,752
NONE
null
null
In the latest version of datasets==4.0.0, i cannot print the audio data on the Colab notebook. But it works on the 3.6.0 version. !pip install -q -U datasets huggingface_hub fsspec from datasets import load_dataset downloaded_dataset = load_dataset("ymoslem/MediaSpeech", "tr", split="train") print(downloaded_dataset["audio"][0]) --------------------------------------------------------------------------- ImportError Traceback (most recent call last) [/tmp/ipython-input-4-90623240.py](https://localhost:8080/#) in <cell line: 0>() ----> 1 downloaded_dataset["audio"][0] 10 frames [/usr/local/lib/python3.11/dist-packages/datasets/features/audio.py](https://localhost:8080/#) in decode_example(self, value, token_per_repo_id) 170 from ._torchcodec import AudioDecoder 171 else: --> 172 raise ImportError("To support decoding audio data, please install 'torchcodec'.") 173 174 if not self.decode: ImportError: To support decoding audio data, please install 'torchcodec'. ### Environment info - `datasets` version: 4.0.0 - Platform: Linux-6.1.123+-x86_64-with-glibc2.35 - Python version: 3.11.13 - `huggingface_hub` version: 0.33.2 - PyArrow version: 18.1.0 - Pandas version: 2.2.2 - `fsspec` version: 2025.3.0
null
https://api.github.com/repos/huggingface/datasets/issues/7678/timeline
null
completed
alpcansoydas
48,163,702
MDQ6VXNlcjQ4MTYzNzAy
https://avatars.githubusercontent.com/u/48163702?v=4
https://api.github.com/users/alpcansoydas
https://github.com/alpcansoydas
https://api.github.com/users/alpcansoydas/followers
https://api.github.com/users/alpcansoydas/following{/other_user}
https://api.github.com/users/alpcansoydas/gists{/gist_id}
https://api.github.com/users/alpcansoydas/starred{/owner}{/repo}
https://api.github.com/users/alpcansoydas/subscriptions
https://api.github.com/users/alpcansoydas/orgs
https://api.github.com/users/alpcansoydas/repos
https://api.github.com/users/alpcansoydas/events{/privacy}
https://api.github.com/users/alpcansoydas/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7678/reactions
0
0
0
0
0
0
0
0
0
null
null
null
null
null
null
alpcansoydas
48,163,702
MDQ6VXNlcjQ4MTYzNzAy
https://avatars.githubusercontent.com/u/48163702?v=4
https://api.github.com/users/alpcansoydas
https://github.com/alpcansoydas
https://api.github.com/users/alpcansoydas/followers
https://api.github.com/users/alpcansoydas/following{/other_user}
https://api.github.com/users/alpcansoydas/gists{/gist_id}
https://api.github.com/users/alpcansoydas/starred{/owner}{/repo}
https://api.github.com/users/alpcansoydas/subscriptions
https://api.github.com/users/alpcansoydas/orgs
https://api.github.com/users/alpcansoydas/repos
https://api.github.com/users/alpcansoydas/events{/privacy}
https://api.github.com/users/alpcansoydas/received_events
User
public
false
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[ "Hi ! yes you should `!pip install -U datasets[audio]` to have the required dependencies.\n\n`datasets` 4.0 now relies on `torchcodec` for audio decoding. The `torchcodec` AudioDecoder enables streaming from HF and also allows to decode ranges of audio", "Same issues on Colab.\n\n> !pip install -U datasets[audio] \n\nThis works for me. Thanks." ]
https://api.github.com/repos/huggingface/datasets/issues/7677
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7677/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7677/comments
https://api.github.com/repos/huggingface/datasets/issues/7677/events
https://github.com/huggingface/datasets/issues/7677
3,218,044,656
I_kwDODunzps6_z3bw
7,677
Toxicity fails with datasets 4.0.0
[]
closed
false
null
[]
null
2
1,752
1,752
1,752
NONE
null
null
### Describe the bug With the latest 4.0.0 release, huggingface toxicity evaluation module fails with error: `ValueError: text input must be of type `str` (single example), `List[str]` (batch or single pretokenized example) or `List[List[str]]` (batch of pretokenized examples).` ### Steps to reproduce the bug Repro: ``` >>> toxicity.compute(predictions=["This is a response"]) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Users/serena.ruan/miniconda3/envs/mlflow-310/lib/python3.10/site-packages/evaluate/module.py", line 467, in compute output = self._compute(**inputs, **compute_kwargs) File "/Users/serena.ruan/.cache/huggingface/modules/evaluate_modules/metrics/evaluate-measurement--toxicity/2390290fa0bf6d78480143547c6b08f3d4f8805b249df8c7a8e80d0ce8e3778b/toxicity.py", line 135, in _compute scores = toxicity(predictions, self.toxic_classifier, toxic_label) File "/Users/serena.ruan/.cache/huggingface/modules/evaluate_modules/metrics/evaluate-measurement--toxicity/2390290fa0bf6d78480143547c6b08f3d4f8805b249df8c7a8e80d0ce8e3778b/toxicity.py", line 103, in toxicity for pred_toxic in toxic_classifier(preds): File "/Users/serena.ruan/miniconda3/envs/mlflow-310/lib/python3.10/site-packages/transformers/pipelines/text_classification.py", line 159, in __call__ result = super().__call__(*inputs, **kwargs) File "/Users/serena.ruan/miniconda3/envs/mlflow-310/lib/python3.10/site-packages/transformers/pipelines/base.py", line 1431, in __call__ return self.run_single(inputs, preprocess_params, forward_params, postprocess_params) File "/Users/serena.ruan/miniconda3/envs/mlflow-310/lib/python3.10/site-packages/transformers/pipelines/base.py", line 1437, in run_single model_inputs = self.preprocess(inputs, **preprocess_params) File "/Users/serena.ruan/miniconda3/envs/mlflow-310/lib/python3.10/site-packages/transformers/pipelines/text_classification.py", line 183, in preprocess return self.tokenizer(inputs, return_tensors=return_tensors, **tokenizer_kwargs) File "/Users/serena.ruan/miniconda3/envs/mlflow-310/lib/python3.10/site-packages/transformers/tokenization_utils_base.py", line 2867, in __call__ encodings = self._call_one(text=text, text_pair=text_pair, **all_kwargs) File "/Users/serena.ruan/miniconda3/envs/mlflow-310/lib/python3.10/site-packages/transformers/tokenization_utils_base.py", line 2927, in _call_one raise ValueError( ValueError: text input must be of type `str` (single example), `List[str]` (batch or single pretokenized example) or `List[List[str]]` (batch of pretokenized examples). ``` ### Expected behavior This works before 4.0.0 release ### Environment info - `datasets` version: 4.0.0 - Platform: macOS-15.5-arm64-arm-64bit - Python version: 3.10.16 - `huggingface_hub` version: 0.33.0 - PyArrow version: 19.0.1 - Pandas version: 2.2.3 - `fsspec` version: 2024.12.0
null
https://api.github.com/repos/huggingface/datasets/issues/7677/timeline
null
completed
serena-ruan
82,044,803
MDQ6VXNlcjgyMDQ0ODAz
https://avatars.githubusercontent.com/u/82044803?v=4
https://api.github.com/users/serena-ruan
https://github.com/serena-ruan
https://api.github.com/users/serena-ruan/followers
https://api.github.com/users/serena-ruan/following{/other_user}
https://api.github.com/users/serena-ruan/gists{/gist_id}
https://api.github.com/users/serena-ruan/starred{/owner}{/repo}
https://api.github.com/users/serena-ruan/subscriptions
https://api.github.com/users/serena-ruan/orgs
https://api.github.com/users/serena-ruan/repos
https://api.github.com/users/serena-ruan/events{/privacy}
https://api.github.com/users/serena-ruan/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7677/reactions
0
0
0
0
0
0
0
0
0
null
null
null
null
null
null
serena-ruan
82,044,803
MDQ6VXNlcjgyMDQ0ODAz
https://avatars.githubusercontent.com/u/82044803?v=4
https://api.github.com/users/serena-ruan
https://github.com/serena-ruan
https://api.github.com/users/serena-ruan/followers
https://api.github.com/users/serena-ruan/following{/other_user}
https://api.github.com/users/serena-ruan/gists{/gist_id}
https://api.github.com/users/serena-ruan/starred{/owner}{/repo}
https://api.github.com/users/serena-ruan/subscriptions
https://api.github.com/users/serena-ruan/orgs
https://api.github.com/users/serena-ruan/repos
https://api.github.com/users/serena-ruan/events{/privacy}
https://api.github.com/users/serena-ruan/received_events
User
public
false
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[ "Hi ! You can fix this by upgrading `evaluate`:\n\n```\npip install -U evaluate\n```", "Thanks, verified evaluate 0.4.5 works!" ]
https://api.github.com/repos/huggingface/datasets/issues/7676
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7676/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7676/comments
https://api.github.com/repos/huggingface/datasets/issues/7676/events
https://github.com/huggingface/datasets/issues/7676
3,216,857,559
I_kwDODunzps6_vVnX
7,676
Many things broken since the new 4.0.0 release
[]
open
false
null
[]
null
15
1,752
1,758
null
NONE
null
null
### Describe the bug The new changes in 4.0.0 are breaking many datasets, including those from lm-evaluation-harness. I am trying to revert back to older versions, like 3.6.0 to make the eval work but I keep getting: ``` Python File /venv/main/lib/python3.12/site-packages/datasets/features/features.py:1474, in generate_from_dict(obj) 1471 class_type = _FEATURE_TYPES.get(_type, None) or globals().get(_type, None) 1473 if class_type is None: -> 1474 raise ValueError(f"Feature type '{_type}' not found. Available feature types: {list(_FEATURE_TYPES.keys())}") 1476 if class_type == LargeList: 1477 feature = obj.pop("feature") ValueError: Feature type 'List' not found. Available feature types: ['Value', 'ClassLabel', 'Translation', 'TranslationVariableLanguages', 'LargeList', 'Sequence', 'Array2D', 'Array3D', 'Array4D', 'Array5D', 'Audio', 'Image', 'Video', 'Pdf'] ``` ### Steps to reproduce the bug ``` Python import lm_eval model_eval = lm_eval.models.huggingface.HFLM(pretrained=model, tokenizer=tokenizer) lm_eval.evaluator.simple_evaluate(model_eval, tasks=["winogrande"], num_fewshot=5, batch_size=1) ``` ### Expected behavior Older `datasets` versions should work just fine as before ### Environment info - `datasets` version: 3.6.0 - Platform: Linux-6.8.0-60-generic-x86_64-with-glibc2.39 - Python version: 3.12.11 - `huggingface_hub` version: 0.33.1 - PyArrow version: 20.0.0 - Pandas version: 2.3.1 - `fsspec` version: 2025.3.0
null
https://api.github.com/repos/huggingface/datasets/issues/7676/timeline
null
null
mobicham
37,179,323
MDQ6VXNlcjM3MTc5MzIz
https://avatars.githubusercontent.com/u/37179323?v=4
https://api.github.com/users/mobicham
https://github.com/mobicham
https://api.github.com/users/mobicham/followers
https://api.github.com/users/mobicham/following{/other_user}
https://api.github.com/users/mobicham/gists{/gist_id}
https://api.github.com/users/mobicham/starred{/owner}{/repo}
https://api.github.com/users/mobicham/subscriptions
https://api.github.com/users/mobicham/orgs
https://api.github.com/users/mobicham/repos
https://api.github.com/users/mobicham/events{/privacy}
https://api.github.com/users/mobicham/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7676/reactions
21
21
0
0
0
0
0
0
0
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[ "Happy to take a look, do you have a list of impacted datasets ?", "Thanks @lhoestq , related to lm-eval, at least `winogrande`, `mmlu` and `hellaswag`, based on my tests yesterday. But many others like <a href=\"https://huggingface.co/datasets/lukaemon/bbh\">bbh</a>, most probably others too. ", "Hi @mobicham ,\n\nI was having the same issue `ValueError: Feature type 'List' not found` yesterday, when I tried to load my dataset using the `load_dataset()` function.\nBy updating to `4.0.0`, I don't see this error anymore.\n\np.s. I used `Sequence` in replace of list when building my dataset (see below)\n```\nfeatures = Features({\n ...\n \"objects\": Sequence({\n \"id\": Value(\"int64\"),\n \"bbox\": Sequence(Value(\"float32\"), length=4),\n \"category\": Value(\"string\")\n }),\n ...\n})\ndataset = Dataset.from_dict(data_dict)\ndataset = dataset.cast(features)\n\n``` \n", "The issue comes from [hails/mmlu_no_train](https://huggingface.co/datasets/hails/mmlu_no_train), [allenai/winogrande](https://huggingface.co/datasets/allenai/winogrande), [lukaemon/bbh](https://huggingface.co/datasets/lukaemon/bbh) and [Rowan/hellaswag](https://huggingface.co/datasets/Rowan/hellaswag) which are all unsupported in `datasets` 4.0 since they are based on python scripts. Fortunately there are PRs to fix those datasets (I did some of them a year ago but dataset authors haven't merged yet... will have to ping people again about it and update here):\n\n- https://huggingface.co/datasets/hails/mmlu_no_train/discussions/2 merged ! ✅ \n- https://huggingface.co/datasets/allenai/winogrande/discussions/6 merged ! ✅ \n- https://huggingface.co/datasets/Rowan/hellaswag/discussions/7 merged ! ✅ \n- https://huggingface.co/datasets/lukaemon/bbh/discussions/2 merged ! ✅ ", "Thank you very much @lhoestq , I will try next week 👍 ", "I get this error when using datasets 3.5.1 to load a dataset saved with datasets 4.0.0. If you are hitting this issue, make sure that both dataset saving code and the loading code are <4.0.0 or >=4.0.0.", "This broke several lm-eval-harness workflows for me and reverting to older versions of datasets is not fixing the issue, does anyone have a workaround?", "> I get this error when using datasets 3.5.1 to load a dataset saved with datasets 4.0.0. If you are hitting this issue, make sure that both dataset saving code and the loading code are <4.0.0 or >=4.0.0.\n\n`datasets` 4.0 can load datasets saved using any older version. But the other way around is not always true: if you save a dataset with `datasets` 4.0 it may use the new `List` type that requires 4.0 and raise `ValueError: Feature type 'List' not found.`\n\nHowever issues with lm eval harness seem to come from another issue: unsupported dataset scripts (see https://github.com/huggingface/datasets/issues/7676#issuecomment-3057550659)\n\n> This broke several lm-eval-harness workflows for me and reverting to older versions of datasets is not fixing the issue, does anyone have a workaround?\n\nwhen reverting to an old `datasets` version I'd encourage you to clear your cache (by default it is located at `~/.cache/huggingface/datasets`) otherwise it might try to load a `List` type that didn't exist in old versions", "All the impacted datasets in lm eval harness have been fixed thanks to the reactivity of dataset authors ! let me know if you encounter issues with other datasets :)", "Hello folks, I have found `patrickvonplaten/librispeech_asr_dummy` to be another dataset that is currently broken since the 4.0.0 release. Is there a PR on this as well?", "https://huggingface.co/datasets/microsoft/prototypical-hai-collaborations seems to be impacted as well.\n\n```\n_temp = load_dataset(\"microsoft/prototypical-hai-collaborations\", \"wildchat1m_en3u-task_anns\")\n``` \nleads to \n`ValueError: Feature type 'List' not found. Available feature types: ['Value', 'ClassLabel', 'Translation', 'TranslationVariableLanguages', 'LargeList', 'Sequence', 'Array2D', 'Array3D', 'Array4D', 'Array5D', 'Audio', 'Image', 'Video', 'Pdf']`", "`microsoft/prototypical-hai-collaborations` is not impacted, you can load it using both `datasets` 3.6 and 4.0. I also tried on colab to confirm.\n\nOne thing that could explain `ValueError: Feature type 'List' not found.` is maybe if you have loaded and cached this dataset with `datasets` 4.0 and then tried to reload it from cache using 3.6.0.\n\nEDIT: actually I tried and 3.6 can reload datasets cached with 4.0 so I'm not sure why you have this error. Which version of `datasets` are you using ?", "> Hello folks, I have found patrickvonplaten/librispeech_asr_dummy to be another dataset that is currently broken since the 4.0.0 release. Is there a PR on this as well?\n\nI guess you can use [hf-internal-testing/librispeech_asr_dummy](https://huggingface.co/datasets/hf-internal-testing/librispeech_asr_dummy) instead of `patrickvonplaten/librispeech_asr_dummy`, or ask the dataset author to convert their dataset to Parquet", "i am having a similar issue with these evals under leaderboard: https://github.com/EleutherAI/lm-evaluation-harness/tree/main/lm_eval/tasks/leaderboard\n\nsome datasets look pretty old (2years), not sure if the author would fix it", "For datasets based on scripts, I shared a command here to update them: https://github.com/huggingface/datasets/issues/7693#issuecomment-3253005348\n\nOtherwise if you are getting `ValueError: Feature type 'List' not found.` as in the original post, make sure you use `datasets` v4 to reload datasets that were loaded with v4." ]
https://api.github.com/repos/huggingface/datasets/issues/7675
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7675/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7675/comments
https://api.github.com/repos/huggingface/datasets/issues/7675/events
https://github.com/huggingface/datasets/issues/7675
3,216,699,094
I_kwDODunzps6_uu7W
7,675
common_voice_11_0.py failure in dataset library
[]
open
false
null
[]
null
5
1,752
1,753
null
NONE
null
null
### Describe the bug I tried to download dataset but have got this error: from datasets import load_dataset load_dataset("mozilla-foundation/common_voice_11_0", "en", split="test", streaming=True) --------------------------------------------------------------------------- RuntimeError Traceback (most recent call last) Cell In[8], line 4 1 from datasets import load_dataset ----> 4 load_dataset("mozilla-foundation/common_voice_11_0", "en", split="test", streaming=True) File c:\Users\ege_g\AppData\Local\Programs\Python\Python312\Lib\site-packages\datasets\load.py:1392, in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, verification_mode, keep_in_memory, save_infos, revision, token, streaming, num_proc, storage_options, **config_kwargs) 1387 verification_mode = VerificationMode( 1388 (verification_mode or VerificationMode.BASIC_CHECKS) if not save_infos else VerificationMode.ALL_CHECKS 1389 ) 1391 # Create a dataset builder -> 1392 builder_instance = load_dataset_builder( 1393 path=path, 1394 name=name, 1395 data_dir=data_dir, 1396 data_files=data_files, 1397 cache_dir=cache_dir, 1398 features=features, 1399 download_config=download_config, 1400 download_mode=download_mode, 1401 revision=revision, 1402 token=token, 1403 storage_options=storage_options, 1404 **config_kwargs, 1405 ) 1407 # Return iterable dataset in case of streaming 1408 if streaming: File c:\Users\ege_g\AppData\Local\Programs\Python\Python312\Lib\site-packages\datasets\load.py:1132, in load_dataset_builder(path, name, data_dir, data_files, cache_dir, features, download_config, download_mode, revision, token, storage_options, **config_kwargs) 1130 if features is not None: 1131 features = _fix_for_backward_compatible_features(features) -> 1132 dataset_module = dataset_module_factory( 1133 path, 1134 revision=revision, 1135 download_config=download_config, 1136 download_mode=download_mode, 1137 data_dir=data_dir, 1138 data_files=data_files, 1139 cache_dir=cache_dir, 1140 ) 1141 # Get dataset builder class 1142 builder_kwargs = dataset_module.builder_kwargs File c:\Users\ege_g\AppData\Local\Programs\Python\Python312\Lib\site-packages\datasets\load.py:1031, in dataset_module_factory(path, revision, download_config, download_mode, data_dir, data_files, cache_dir, **download_kwargs) 1026 if isinstance(e1, FileNotFoundError): 1027 raise FileNotFoundError( 1028 f"Couldn't find any data file at {relative_to_absolute_path(path)}. " 1029 f"Couldn't find '{path}' on the Hugging Face Hub either: {type(e1).__name__}: {e1}" 1030 ) from None -> 1031 raise e1 from None 1032 else: 1033 raise FileNotFoundError(f"Couldn't find any data file at {relative_to_absolute_path(path)}.") File c:\Users\ege_g\AppData\Local\Programs\Python\Python312\Lib\site-packages\datasets\load.py:989, in dataset_module_factory(path, revision, download_config, download_mode, data_dir, data_files, cache_dir, **download_kwargs) 981 try: 982 api.hf_hub_download( 983 repo_id=path, 984 filename=filename, (...) 987 proxies=download_config.proxies, 988 ) --> 989 raise RuntimeError(f"Dataset scripts are no longer supported, but found {filename}") 990 except EntryNotFoundError: 991 # Use the infos from the parquet export except in some cases: 992 if data_dir or data_files or (revision and revision != "main"): RuntimeError: Dataset scripts are no longer supported, but found common_voice_11_0.py ### Steps to reproduce the bug from datasets import load_dataset load_dataset("mozilla-foundation/common_voice_11_0", "en", split="test", streaming=True) ### Expected behavior its supposed to download this dataset. ### Environment info Python 3.12 , Windows 11
null
https://api.github.com/repos/huggingface/datasets/issues/7675/timeline
null
null
egegurel
98,793,855
U_kgDOBeN5fw
https://avatars.githubusercontent.com/u/98793855?v=4
https://api.github.com/users/egegurel
https://github.com/egegurel
https://api.github.com/users/egegurel/followers
https://api.github.com/users/egegurel/following{/other_user}
https://api.github.com/users/egegurel/gists{/gist_id}
https://api.github.com/users/egegurel/starred{/owner}{/repo}
https://api.github.com/users/egegurel/subscriptions
https://api.github.com/users/egegurel/orgs
https://api.github.com/users/egegurel/repos
https://api.github.com/users/egegurel/events{/privacy}
https://api.github.com/users/egegurel/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7675/reactions
0
0
0
0
0
0
0
0
0
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[ "Hi ! This dataset is not in a supported format and `datasets` 4 doesn't support datasets that based on python scripts which are often source of errors. Feel free to ask the dataset authors to convert the dataset to a supported format at https://huggingface.co/datasets/mozilla-foundation/common_voice_11_0/discussions, e.g. parquet.\n\nIn the meantime you can pin old versions of `datasets` like `datasets==3.6.0`", "Thanks @lhoestq! I encountered the same issue and switching to an older version of `datasets` worked.", ">which version of datasets worked for you, I tried switching to 4.6.0 and also moved back for fsspec, but still facing issues for this.\n\n", "Try datasets<=3.6.0", "same issue " ]
https://api.github.com/repos/huggingface/datasets/issues/7671
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7671/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7671/comments
https://api.github.com/repos/huggingface/datasets/issues/7671/events
https://github.com/huggingface/datasets/issues/7671
3,213,223,886
I_kwDODunzps6_hefO
7,671
Mapping function not working if the first example is returned as None
[]
closed
false
null
[]
null
2
1,751
1,752
1,752
NONE
null
null
### Describe the bug https://github.com/huggingface/datasets/blob/8a19de052e3d79f79cea26821454bbcf0e9dcd68/src/datasets/arrow_dataset.py#L3652C29-L3652C37 Here we can see the writer is initialized on `i==0`. However, there can be cases where in the user mapping function, the first example is filtered out (length constraints, etc). In this case, the writer would be a `None` type and the code will report `NoneType has no write function`. A simple fix is available, simply change line 3652 from `if i == 0:` to `if writer is None:` ### Steps to reproduce the bug Prepare a dataset have this function ``` import datasets def make_map_fn(split, max_prompt_tokens=3): def process_fn(example, idx): question = example['question'] reasoning_steps = example['reasoning_steps'] label = example['label'] answer_format = "" for i in range(len(reasoning_steps)): system_message = "Dummy" all_steps_formatted = [] content = f"""Dummy""" prompt = [ {"role": "system", "content": system_message}, {"role": "user", "content": content}, ] tokenized = tokenizer.apply_chat_template(prompt, return_tensors="pt", truncation=False) if tokenized.shape[1] > max_prompt_tokens: return None # skip overly long examples data = { "dummy": "dummy" } return data return process_fn ... # load your dataset ... train = train.map(function=make_map_fn('train'), with_indices=True) ``` ### Expected behavior The dataset mapping shall behave even when the first example is filtered out. ### Environment info I am using `datasets==3.6.0` but I have observed this issue in the github repo too: https://github.com/huggingface/datasets/blob/8a19de052e3d79f79cea26821454bbcf0e9dcd68/src/datasets/arrow_dataset.py#L3652C29-L3652C37
null
https://api.github.com/repos/huggingface/datasets/issues/7671/timeline
null
completed
dnaihao
46,325,823
MDQ6VXNlcjQ2MzI1ODIz
https://avatars.githubusercontent.com/u/46325823?v=4
https://api.github.com/users/dnaihao
https://github.com/dnaihao
https://api.github.com/users/dnaihao/followers
https://api.github.com/users/dnaihao/following{/other_user}
https://api.github.com/users/dnaihao/gists{/gist_id}
https://api.github.com/users/dnaihao/starred{/owner}{/repo}
https://api.github.com/users/dnaihao/subscriptions
https://api.github.com/users/dnaihao/orgs
https://api.github.com/users/dnaihao/repos
https://api.github.com/users/dnaihao/events{/privacy}
https://api.github.com/users/dnaihao/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7671/reactions
0
0
0
0
0
0
0
0
0
null
null
null
null
null
null
dnaihao
46,325,823
MDQ6VXNlcjQ2MzI1ODIz
https://avatars.githubusercontent.com/u/46325823?v=4
https://api.github.com/users/dnaihao
https://github.com/dnaihao
https://api.github.com/users/dnaihao/followers
https://api.github.com/users/dnaihao/following{/other_user}
https://api.github.com/users/dnaihao/gists{/gist_id}
https://api.github.com/users/dnaihao/starred{/owner}{/repo}
https://api.github.com/users/dnaihao/subscriptions
https://api.github.com/users/dnaihao/orgs
https://api.github.com/users/dnaihao/repos
https://api.github.com/users/dnaihao/events{/privacy}
https://api.github.com/users/dnaihao/received_events
User
public
false
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[ "Hi, map() always expect an output.\n\nIf you wish to filter examples, you should use filter(), in your case it could be something like this:\n\n```python\nds = ds.map(my_processing_function).filter(ignore_long_prompts)\n```", "Realized this! Thanks a lot, I will close this issue then." ]
https://api.github.com/repos/huggingface/datasets/issues/7669
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7669/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7669/comments
https://api.github.com/repos/huggingface/datasets/issues/7669/events
https://github.com/huggingface/datasets/issues/7669
3,203,541,091
I_kwDODunzps6-8ihj
7,669
How can I add my custom data to huggingface datasets
[]
open
false
null
[]
null
1
1,751
1,751
null
NONE
null
null
I want to add my custom dataset in huggingface dataset. Please guide me how to achieve that.
null
https://api.github.com/repos/huggingface/datasets/issues/7669/timeline
null
null
xiagod
219,205,504
U_kgDODRDPgA
https://avatars.githubusercontent.com/u/219205504?v=4
https://api.github.com/users/xiagod
https://github.com/xiagod
https://api.github.com/users/xiagod/followers
https://api.github.com/users/xiagod/following{/other_user}
https://api.github.com/users/xiagod/gists{/gist_id}
https://api.github.com/users/xiagod/starred{/owner}{/repo}
https://api.github.com/users/xiagod/subscriptions
https://api.github.com/users/xiagod/orgs
https://api.github.com/users/xiagod/repos
https://api.github.com/users/xiagod/events{/privacy}
https://api.github.com/users/xiagod/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7669/reactions
0
0
0
0
0
0
0
0
0
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[ "Hey @xiagod \n\nThe easiest way to add your custom data to Hugging Face Datasets is to use the built-in load_dataset function with your local files. Some examples include:\n\nCSV files:\nfrom datasets import load_dataset\ndataset = load_dataset(\"csv\", data_files=\"my_file.csv\")\n\nJSON or JSONL files:\nfrom datasets import load_dataset\ndataset = load_dataset(\"json\", data_files=\"my_file.json\")\n\n\nImages stored in folders (e.g. data/train/cat/, data/train/dog/):\nfrom datasets import load_dataset\ndataset = load_dataset(\"imagefolder\", data_dir=\"/path/to/pokemon\")\n\n\nThese methods let you quickly create a custom dataset without needing to write a full script.\n\nMore information can be found in Hugging Face's tutorial \"Create a dataset\" or \"Load\" documentation here: \n\nhttps://huggingface.co/docs/datasets/create_dataset \n\nhttps://huggingface.co/docs/datasets/loading#local-and-remote-files\n\n\n\nIf you want to submit your dataset to the Hugging Face Datasets GitHub repo so others can load it follow this guide: \n\nhttps://huggingface.co/docs/datasets/upload_dataset \n\n\n" ]
https://api.github.com/repos/huggingface/datasets/issues/7668
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7668/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7668/comments
https://api.github.com/repos/huggingface/datasets/issues/7668/events
https://github.com/huggingface/datasets/issues/7668
3,199,039,322
I_kwDODunzps6-rXda
7,668
Broken EXIF crash the whole program
[]
open
false
null
[]
null
1
1,751
1,751
null
NONE
null
null
### Describe the bug When parsing this image in the ImageNet1K dataset, the `datasets` crashs whole training process just because unable to parse an invalid EXIF tag. ![Image](https://github.com/user-attachments/assets/3c840203-ac8c-41a0-9cf7-45f64488037d) ### Steps to reproduce the bug Use the `datasets.Image.decode_example` method to decode the aforementioned image could reproduce the bug. The decoding function will throw an unhandled exception at the `image.getexif()` method call due to invalid utf-8 stream in EXIF tags. ``` File lib/python3.12/site-packages/datasets/features/image.py:188, in Image.decode_example(self, value, token_per_repo_id) 186 image = PIL.Image.open(BytesIO(bytes_)) 187 image.load() # to avoid "Too many open files" errors --> 188 if image.getexif().get(PIL.Image.ExifTags.Base.Orientation) is not None: 189 image = PIL.ImageOps.exif_transpose(image) 190 if self.mode and self.mode != image.mode: File lib/python3.12/site-packages/PIL/Image.py:1542, in Image.getexif(self) 1540 xmp_tags = self.info.get("XML:com.adobe.xmp") 1541 if not xmp_tags and (xmp_tags := self.info.get("xmp")): -> 1542 xmp_tags = xmp_tags.decode("utf-8") 1543 if xmp_tags: 1544 match = re.search(r'tiff:Orientation(="|>)([0-9])', xmp_tags) UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa8 in position 4312: invalid start byte ``` ### Expected behavior The invalid EXIF tag should simply be ignored or issue a warning message, instead of crash the whole program at once. ### Environment info - `datasets` version: 3.6.0 - Platform: Linux-6.5.0-18-generic-x86_64-with-glibc2.35 - Python version: 3.12.11 - `huggingface_hub` version: 0.33.0 - PyArrow version: 20.0.0 - Pandas version: 2.3.0 - `fsspec` version: 2025.3.0
null
https://api.github.com/repos/huggingface/datasets/issues/7668/timeline
null
null
Seas0
30,485,844
MDQ6VXNlcjMwNDg1ODQ0
https://avatars.githubusercontent.com/u/30485844?v=4
https://api.github.com/users/Seas0
https://github.com/Seas0
https://api.github.com/users/Seas0/followers
https://api.github.com/users/Seas0/following{/other_user}
https://api.github.com/users/Seas0/gists{/gist_id}
https://api.github.com/users/Seas0/starred{/owner}{/repo}
https://api.github.com/users/Seas0/subscriptions
https://api.github.com/users/Seas0/orgs
https://api.github.com/users/Seas0/repos
https://api.github.com/users/Seas0/events{/privacy}
https://api.github.com/users/Seas0/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7668/reactions
0
0
0
0
0
0
0
0
0
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[ "There are other discussions about error handling for images decoding here : https://github.com/huggingface/datasets/issues/7632 https://github.com/huggingface/datasets/issues/7612\n\nand a PR here: https://github.com/huggingface/datasets/pull/7638 (would love your input on the proposed solution !)" ]
https://api.github.com/repos/huggingface/datasets/issues/7665
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7665/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7665/comments
https://api.github.com/repos/huggingface/datasets/issues/7665/events
https://github.com/huggingface/datasets/issues/7665
3,193,239,955
I_kwDODunzps6-VPmT
7,665
Function load_dataset() misinterprets string field content as part of dataset schema when dealing with `.jsonl` files
[]
closed
false
null
[]
null
1
1,751
1,751
1,751
NONE
null
null
### Describe the bug When loading a `.jsonl` file using `load_dataset("json", data_files="data.jsonl", split="train")`, the function misinterprets the content of a string field as if it were part of the dataset schema. In my case there is a field `body:` with a string value ``` "### Describe the bug (...) ,action: string, datetime: timestamp[s], author: string, (...) Pandas version: 1.3.4" ``` As a result, I got an exception ``` "TypeError: Couldn't cast array of type timestamp[s] to null". ``` Full stack-trace in the attached file below. I also attach a minimized dataset (data.json, a single entry) that reproduces the error. **Observations**(on the minimal example): - if I remove _all fields before_ `body`, a different error appears, - if I remove _all fields after_ `body`, yet another error appears, - if `body` is _the only field_, the error disappears. So this might be one complex bug or several edge cases interacting. I haven’t dug deeper. Also changing the file extension to `.json` or `.txt` avoids the problem. This suggests **a possible workaround** for the general case: convert `.jsonl` to `.json`. Though I haven’t verified correctness of that workaround yet. Anyway my understanding is that `load_dataset` with first argument set to "json" should properly handle `.jsonl` files. Correct me if I'm wrong. [stack_trace.txt](https://github.com/user-attachments/files/21004153/stack_trace.txt) [data.json](https://github.com/user-attachments/files/21004164/data.json) P.S. I discovered this while going through the HuggingFace tutorial. Specifically [this part](https://huggingface.co/learn/llm-course/chapter5/5?fw=pt).I will try to inform the tutorial team about this issue, as it can be a showstopper for young 🤗 adepts. ### Steps to reproduce the bug 1. Download attached [data.json](https://github.com/user-attachments/files/21004164/data.json) file. 2. Run the following code which should work correctly: ``` from datasets import load_dataset load_dataset("json", data_files="data.json", split="train") ``` 3. Change extension of the `data` file to `.jsonl` and run: ``` from datasets import load_dataset load_dataset("json", data_files="data.jsonl", split="train") ``` This will trigger an error like the one in the attached [stack_trace.txt](https://github.com/user-attachments/files/21004153/stack_trace.txt). One can also try removing fields before the `body` field and after it. These actions give different errors. ### Expected behavior Parsing data in `.jsonl` format should yield the same result as parsing the same data in `.json` format. In any case, the content of a string field should never be interpreted as part of the dataset schema. ### Environment info datasets version: _3.6.0_ pyarrow version: _20.0.0_ Python version: _3.11.9_ platform version: _macOS-15.5-arm64-arm-64bit_
null
https://api.github.com/repos/huggingface/datasets/issues/7665/timeline
null
duplicate
zdzichukowalski
1,151,198
MDQ6VXNlcjExNTExOTg=
https://avatars.githubusercontent.com/u/1151198?v=4
https://api.github.com/users/zdzichukowalski
https://github.com/zdzichukowalski
https://api.github.com/users/zdzichukowalski/followers
https://api.github.com/users/zdzichukowalski/following{/other_user}
https://api.github.com/users/zdzichukowalski/gists{/gist_id}
https://api.github.com/users/zdzichukowalski/starred{/owner}{/repo}
https://api.github.com/users/zdzichukowalski/subscriptions
https://api.github.com/users/zdzichukowalski/orgs
https://api.github.com/users/zdzichukowalski/repos
https://api.github.com/users/zdzichukowalski/events{/privacy}
https://api.github.com/users/zdzichukowalski/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7665/reactions
0
0
0
0
0
0
0
0
0
null
null
null
null
null
null
zdzichukowalski
1,151,198
MDQ6VXNlcjExNTExOTg=
https://avatars.githubusercontent.com/u/1151198?v=4
https://api.github.com/users/zdzichukowalski
https://github.com/zdzichukowalski
https://api.github.com/users/zdzichukowalski/followers
https://api.github.com/users/zdzichukowalski/following{/other_user}
https://api.github.com/users/zdzichukowalski/gists{/gist_id}
https://api.github.com/users/zdzichukowalski/starred{/owner}{/repo}
https://api.github.com/users/zdzichukowalski/subscriptions
https://api.github.com/users/zdzichukowalski/orgs
https://api.github.com/users/zdzichukowalski/repos
https://api.github.com/users/zdzichukowalski/events{/privacy}
https://api.github.com/users/zdzichukowalski/received_events
User
public
false
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[ "Somehow I created the issue twice🙈 This one is an exact duplicate of #7664." ]
https://api.github.com/repos/huggingface/datasets/issues/7664
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7664/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7664/comments
https://api.github.com/repos/huggingface/datasets/issues/7664/events
https://github.com/huggingface/datasets/issues/7664
3,193,239,035
I_kwDODunzps6-VPX7
7,664
Function load_dataset() misinterprets string field content as part of dataset schema when dealing with `.jsonl` files
[]
open
false
null
[]
null
6
1,751
1,752
null
NONE
null
null
### Describe the bug When loading a `.jsonl` file using `load_dataset("json", data_files="data.jsonl", split="train")`, the function misinterprets the content of a string field as if it were part of the dataset schema. In my case there is a field `body:` with a string value ``` "### Describe the bug (...) ,action: string, datetime: timestamp[s], author: string, (...) Pandas version: 1.3.4" ``` As a result, I got an exception ``` "TypeError: Couldn't cast array of type timestamp[s] to null". ``` Full stack-trace in the attached file below. I also attach a minimized dataset (data.json, a single entry) that reproduces the error. **Observations**(on the minimal example): - if I remove _all fields before_ `body`, a different error appears, - if I remove _all fields after_ `body`, yet another error appears, - if `body` is _the only field_, the error disappears. So this might be one complex bug or several edge cases interacting. I haven’t dug deeper. Also changing the file extension to `.json` or `.txt` avoids the problem. This suggests **a possible workaround** for the general case: convert `.jsonl` to `.json`. Though I haven’t verified correctness of that workaround yet. Anyway my understanding is that `load_dataset` with first argument set to "json" should properly handle `.jsonl` files. Correct me if I'm wrong. [stack_trace.txt](https://github.com/user-attachments/files/21004153/stack_trace.txt) [data.json](https://github.com/user-attachments/files/21004164/data.json) P.S. I discovered this while going through the HuggingFace tutorial. Specifically [this part](https://huggingface.co/learn/llm-course/chapter5/5?fw=pt). I will try to inform the tutorial team about this issue, as it can be a showstopper for young 🤗 adepts. ### Steps to reproduce the bug 1. Download attached [data.json](https://github.com/user-attachments/files/21004164/data.json) file. 2. Run the following code which should work correctly: ``` from datasets import load_dataset load_dataset("json", data_files="data.json", split="train") ``` 3. Change extension of the `data` file to `.jsonl` and run: ``` from datasets import load_dataset load_dataset("json", data_files="data.jsonl", split="train") ``` This will trigger an error like the one in the attached [stack_trace.txt](https://github.com/user-attachments/files/21004153/stack_trace.txt). One can also try removing fields before the `body` field and after it. These actions give different errors. ### Expected behavior Parsing data in `.jsonl` format should yield the same result as parsing the same data in `.json` format. In any case, the content of a string field should never be interpreted as part of the dataset schema. ### Environment info datasets version: _3.6.0_ pyarrow version: _20.0.0_ Python version: _3.11.9_ platform version: _macOS-15.5-arm64-arm-64bit_
null
https://api.github.com/repos/huggingface/datasets/issues/7664/timeline
null
null
zdzichukowalski
1,151,198
MDQ6VXNlcjExNTExOTg=
https://avatars.githubusercontent.com/u/1151198?v=4
https://api.github.com/users/zdzichukowalski
https://github.com/zdzichukowalski
https://api.github.com/users/zdzichukowalski/followers
https://api.github.com/users/zdzichukowalski/following{/other_user}
https://api.github.com/users/zdzichukowalski/gists{/gist_id}
https://api.github.com/users/zdzichukowalski/starred{/owner}{/repo}
https://api.github.com/users/zdzichukowalski/subscriptions
https://api.github.com/users/zdzichukowalski/orgs
https://api.github.com/users/zdzichukowalski/repos
https://api.github.com/users/zdzichukowalski/events{/privacy}
https://api.github.com/users/zdzichukowalski/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7664/reactions
0
0
0
0
0
0
0
0
0
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[ "Hey @zdzichukowalski, I was not able to reproduce this on python 3.11.9 and datasets 3.6.0. The contents of \"body\" are correctly parsed as a string and no other fields like timestamps are created. Could you try reproducing this in a fresh environment, or posting the complete code where you encountered that stacktrace? (I noticed in the stacktrace you had a bigger program, perhaps there are some side effects)", "Hi @zdzichukowalski, thanks for reporting this!\n\nTo help investigate this further, could you please share the following:\n\nExact contents of the data.jsonl file you're using — especially the first few lines that trigger the error.\n\nThe full code snippet you used to run load_dataset(), along with any environment setup (if not already shared).\n\nCan you confirm whether the issue persists when running in a clean virtual environment (e.g., with only datasets, pyarrow, and their dependencies)?\n\nIf possible, could you try running the same with an explicit features schema, like:\n\n```\nfrom datasets import load_dataset, Features, Value\nfeatures = Features({\"body\": Value(\"string\")})\nds = load_dataset(\"json\", data_files=\"data.jsonl\", split=\"train\", features=features)\n```\nAlso, just to clarify — does the \"body\" field contain plain string content, or is it sometimes being parsed from multi-line or structured inputs (like embedded JSON or CSV-like text)?\n\nOnce we have this info, we can check whether this is a schema inference issue, a PyArrow type coercion bug, or something else.", "Ok I can confirm that I also cannot reproduce the error in a clean environment with the minimized version of the dataset that I provided. Same story for the old environment. Nonetheless the bug still happens in the new environment with the full version of the dataset, which I am providing now. Please let me know if now you can reproduce the problem.\n\nAdditionally I'm attaching result of the `pip freeze` command.\n\n[datasets-issues.jsonl.zip](https://github.com/user-attachments/files/21081755/datasets-issues.jsonl.zip)\n[requirements.txt](https://github.com/user-attachments/files/21081776/requirements.txt)\n\n@ArjunJagdale running with explicit script gives the following stack:\n[stack_features_version.txt](https://github.com/user-attachments/files/21082056/stack_features_version.txt)\n\nThe problematic `body` field seems to be e.g. content of [this comment](https://github.com/huggingface/datasets/issues/5596#issue-1604919993) from Github in which someone provided a stack trace containing json structure ;) I would say that it is intended to be a plain string. \n\nTo find a part that triggers an error, simply search for the \"timestamp[s]\" in the dataset. There are few such entries.\n\nI think I provided all the information you asked. \n\nOh, and workaround I suggested, that is convert `.jsonl` to `.json` worked for me.\n\nP.S\n1. @itsmejul the stack trace I provided is coming from running the two-liner script that I attached. There is no bigger program, although there were some jupiter files alongside the script, which were run in the same env. I am not sure what part of the stack trace suggests that there is something more ;) \n\n2. Is it possible that on some layer in the python/env/jupiter there is some caching mechanism for files that would give false results for my minimized version of the dataset file? There is of course possibility that I made a mistake and run the script with the wrong file, but I double and triple checked things before creating an issue. Earlier I wrote that \"(...) changing the file extension to `.json` or `.txt` avoids the problem\". But with the full version this is not true(when I change to `txt`), and minimized version always works. So it looks like that when I changed the extension to e.g. `txt` then a minimized file loaded from the disk and it was parsed correctly, but every time when I changed back to `jsonl` my script must have used an original content of the file - the one before I made a minimization. But this is still all strange because I even removed the fields before and after the body from my minimized `jsonl` and there were some different errors(I mention it in my original post), so I do not get why today I cannot reproduce it in the original env... \n\n", "Hi @zdzichukowalski, thanks again for the detailed info and files!\n\nI’ve reviewed the `datasets-issues.jsonl` you shared, and I can now confirm the issue with full clarity:\n\nSome entries in the `\"body\"` field contain string content that resembles schema definitions — for example:\n\n```\nstruct<type: string, action: string, datetime: timestamp[s], ...>\n```\n\nThese strings appear to be copied from GitHub comments or stack traces (e.g., from #5596)\n\nWhen using the `.jsonl` format, `load_dataset()` relies on row-wise schema inference via PyArrow. If some rows contain real structured fields like `pull_request.merged_at` (a valid timestamp), and others contain schema-like text inside string fields, PyArrow can get confused while unifying the schema — leading to cast errors.\n\nThat’s why:\n\n* Using a reduced schema like `features={\"body\": Value(\"string\")}` fails — because the full table has many more fields.\n* Converting the file to `.json` (a list of objects) works — because global schema inference kicks in.\n* Filtering the dataset to only the `body` field avoids the issue entirely.\n\n### Suggested Workarounds\n\n* Convert the `.jsonl` file to `.json` to enable global schema inference.\n* Or, preprocess the `.jsonl` file to extract only the `\"body\"` field if that’s all you need.", "So in summary should we treat it as a low severity bug in `PyArrow`, in `Datasets` library, or as a proper behavior and do nothing with it?", "You are right actually! I’d also categorize this as a low-severity schema inference edge case, mainly stemming from PyArrow, but exposed by how datasets handles .jsonl inputs.\n\nIt's not a bug in datasets per se, but confusing when string fields (like body) contain text that resembles schema — e.g., \"timestamp[s]\".\n\nMaybe @lhoestq — could this be considered as a small feature/improvement?" ]
https://api.github.com/repos/huggingface/datasets/issues/7662
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7662/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7662/comments
https://api.github.com/repos/huggingface/datasets/issues/7662/events
https://github.com/huggingface/datasets/issues/7662
3,190,805,531
I_kwDODunzps6-L9Qb
7,662
Applying map after transform with multiprocessing will cause OOM
[]
open
false
null
[]
null
5
1,751
1,752
null
NONE
null
null
### Describe the bug I have a 30TB dataset. When I perform add_column and cast_column operations on it and then execute a multiprocessing map, it results in an OOM (Out of Memory) error. However, if I skip the add_column and cast_column steps and directly run the map, there is no OOM. After debugging step by step, I found that the OOM is caused at this point, and I suspect it’s because the add_column and cast_column operations are not cached, which causes the entire dataset to be loaded in each subprocess, leading to the OOM. The critical line of code is: https://github.com/huggingface/datasets/blob/e71b0b19d79c7531f9b9bea7c09916b5f6157f42/src/datasets/utils/py_utils.py#L607 Note num_process=1 would not cause OOM. I'm confused. ### Steps to reproduce the bug For reproduce, you can load dataset and set cache_dir (for caching): amphion/Emilia-Dataset which is a veru large datasets that RAM can not fits. And apply the map with multiprocessing after a transform operation (e.g. add_column, cast_column). As long as num_process>1, it must cause OOM. ### Expected behavior It should not cause OOM. ### Environment info - `datasets` version: 3.6.0 - Platform: Linux-5.10.134-16.101.al8.x86_64-x86_64-with-glibc2.35 - Python version: 3.10.12 - `huggingface_hub` version: 0.33.1 - PyArrow version: 20.0.0 - Pandas version: 2.3.0 - `fsspec` version: 2024.6.1
null
https://api.github.com/repos/huggingface/datasets/issues/7662/timeline
null
null
JunjieLl
26,482,910
MDQ6VXNlcjI2NDgyOTEw
https://avatars.githubusercontent.com/u/26482910?v=4
https://api.github.com/users/JunjieLl
https://github.com/JunjieLl
https://api.github.com/users/JunjieLl/followers
https://api.github.com/users/JunjieLl/following{/other_user}
https://api.github.com/users/JunjieLl/gists{/gist_id}
https://api.github.com/users/JunjieLl/starred{/owner}{/repo}
https://api.github.com/users/JunjieLl/subscriptions
https://api.github.com/users/JunjieLl/orgs
https://api.github.com/users/JunjieLl/repos
https://api.github.com/users/JunjieLl/events{/privacy}
https://api.github.com/users/JunjieLl/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7662/reactions
0
0
0
0
0
0
0
0
0
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[ "Hi ! `add_column` loads the full column data in memory:\n\nhttps://github.com/huggingface/datasets/blob/bfa497b1666f4c58bd231c440d8b92f9859f3a58/src/datasets/arrow_dataset.py#L6021-L6021\n\na workaround to add the new column is to include the new data in the map() function instead, which only loads one batch at a time", "> Hi ! `add_column` loads the full column data in memory:\n> \n> [datasets/src/datasets/arrow_dataset.py](https://github.com/huggingface/datasets/blob/bfa497b1666f4c58bd231c440d8b92f9859f3a58/src/datasets/arrow_dataset.py#L6021-L6021)\n> \n> Line 6021 in [bfa497b](/huggingface/datasets/commit/bfa497b1666f4c58bd231c440d8b92f9859f3a58)\n> \n> column_table = InMemoryTable.from_pydict({name: column}, schema=pyarrow_schema) \n> a workaround to add the new column is to include the new data in the map() function instead, which only loads one batch at a time\n\n\nHow about cast_column,since map cannot apply type transformation, e.g. Audio(16000) to Audio(24000)", "cast_column calls `pyarrow.Table.cast` on the full dataset which I believe the memory usage depends on the source and target types but should be low in general\n\ncasting from Audio(16000) to Audio(24000) is cheap since the source and target arrow types are the same", "> cast_column calls `pyarrow.Table.cast` on the full dataset which I believe the memory usage depends on the source and target types but should be low in general\n> \n> casting from Audio(16000) to Audio(24000) is cheap since the source and target arrow types are the same\n\nThanks for replying. So the OOM is caused by add_column operation. When I skip the operation, low memory will be achieved. Right?", "> Hi ! `add_column` loads the full column data in memory:\n> \n> [datasets/src/datasets/arrow_dataset.py](https://github.com/huggingface/datasets/blob/bfa497b1666f4c58bd231c440d8b92f9859f3a58/src/datasets/arrow_dataset.py#L6021-L6021)\n> \n> Line 6021 in [bfa497b](/huggingface/datasets/commit/bfa497b1666f4c58bd231c440d8b92f9859f3a58)\n> \n> column_table = InMemoryTable.from_pydict({name: column}, schema=pyarrow_schema) \n> a workaround to add the new column is to include the new data in the map() function instead, which only loads one batch at a time\n\n\nNote num_process=1 would not cause OOM. I'm confused.\n\n" ]
https://api.github.com/repos/huggingface/datasets/issues/7660
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7660/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7660/comments
https://api.github.com/repos/huggingface/datasets/issues/7660/events
https://github.com/huggingface/datasets/issues/7660
3,189,028,251
I_kwDODunzps6-FLWb
7,660
AttributeError: type object 'tqdm' has no attribute '_lock'
[]
open
false
null
[]
null
2
1,751
1,751
null
NONE
null
null
### Describe the bug `AttributeError: type object 'tqdm' has no attribute '_lock'` It occurs when I'm trying to load datasets in thread pool. Issue https://github.com/huggingface/datasets/issues/6066 and PR https://github.com/huggingface/datasets/pull/6067 https://github.com/huggingface/datasets/pull/6068 tried to fix this. ### Steps to reproduce the bug Will have to try several times to reproduce the error because it is concerned with threads. 1. save some datasets for test ```pythonfrom datasets import Dataset, DatasetDict import os os.makedirs("test_dataset_shards", exist_ok=True) for i in range(10): data = Dataset.from_dict({"text": [f"example {j}" for j in range(1000000)]}) data = DatasetDict({'train': data}) data.save_to_disk(f"test_dataset_shards/shard_{i}") ``` 2. load them in a thread pool ```python from datasets import load_from_disk from tqdm import tqdm from concurrent.futures import ThreadPoolExecutor, as_completed import glob datas = glob.glob('test_dataset_shards/shard_*') with ThreadPoolExecutor(max_workers=10) as pool: futures = [pool.submit(load_from_disk, it) for it in datas] datas = [] for future in tqdm(as_completed(futures), total=len(futures)): datas.append(future.result()) ``` ### Expected behavior no exception raised ### Environment info datasets==2.19.0 python==3.10
null
https://api.github.com/repos/huggingface/datasets/issues/7660/timeline
null
null
Hypothesis-Z
44,766,273
MDQ6VXNlcjQ0NzY2Mjcz
https://avatars.githubusercontent.com/u/44766273?v=4
https://api.github.com/users/Hypothesis-Z
https://github.com/Hypothesis-Z
https://api.github.com/users/Hypothesis-Z/followers
https://api.github.com/users/Hypothesis-Z/following{/other_user}
https://api.github.com/users/Hypothesis-Z/gists{/gist_id}
https://api.github.com/users/Hypothesis-Z/starred{/owner}{/repo}
https://api.github.com/users/Hypothesis-Z/subscriptions
https://api.github.com/users/Hypothesis-Z/orgs
https://api.github.com/users/Hypothesis-Z/repos
https://api.github.com/users/Hypothesis-Z/events{/privacy}
https://api.github.com/users/Hypothesis-Z/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7660/reactions
0
0
0
0
0
0
0
0
0
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[ "Deleting a class (**not instance**) attribute might be invalid in this case, which is `tqdm` doing in `ensure_lock`.\n\n```python\nfrom tqdm import tqdm as old_tqdm\n\nclass tqdm1(old_tqdm):\n def __delattr__(self, attr):\n try:\n super().__delattr__(attr)\n except AttributeError:\n if attr != '_lock':\n print(attr)\n raise\n\nclass Meta(type):\n def __delattr__(cls, name):\n if name == \"_lock\":\n return \n return super().__delattr__(name)\n \nclass tqdm2(old_tqdm, metaclass=Meta):\n pass\n\ndel tqdm2._lock\ndel tqdm1._lock # error\n```\n\nhttps://github.com/huggingface/datasets/blob/e71b0b19d79c7531f9b9bea7c09916b5f6157f42/src/datasets/utils/tqdm.py#L104-L122", "A cheaper option (seems to work in my case): \n```python\nfrom datasets import tqdm as hf_tqdm\nhf_tqdm.set_lock(hf_tqdm.get_lock())\n```" ]
https://api.github.com/repos/huggingface/datasets/issues/7650
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7650/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7650/comments
https://api.github.com/repos/huggingface/datasets/issues/7650/events
https://github.com/huggingface/datasets/issues/7650
3,182,745,315
I_kwDODunzps69tNbj
7,650
`load_dataset` defaults to json file format for datasets with 1 shard
[]
open
false
null
[]
null
0
1,751
1,751
null
NONE
null
null
### Describe the bug I currently have multiple datasets (train+validation) saved as 50MB shards. For one dataset the validation pair is small enough to fit into a single shard and this apparently causes problems when loading the dataset. I created the datasets using a DatasetDict, saved them as 50MB arrow files for streaming and then load each dataset. I have no problem loading any of the other datasets with more than 1 arrow file/shard. The error indicates the training set got loaded in arrow format (correct) and the validation set in json (incorrect). This seems to be because some of the metadata files are considered as dataset files. ``` Error loading /nfs/dataset_pt-uk: Couldn't infer the same data file format for all splits. Got {NamedSplit('train'): ('arrow', {}), NamedSplit('validation'): ('json', {})} ``` ![Image](https://github.com/user-attachments/assets/f6e7596a-dd53-46a9-9a23-4e9cac2ac049) Concretely, there is a mismatch between the metadata created by the `DatasetDict.save_to_file` and the builder for `datasets.load_dataset`: https://github.com/huggingface/datasets/blob/e71b0b19d79c7531f9b9bea7c09916b5f6157f42/src/datasets/data_files.py#L107 The `folder_based_builder` lists all files and with 1 arrow file the json files (that are actually metadata) are in the majority. https://github.com/huggingface/datasets/blob/e71b0b19d79c7531f9b9bea7c09916b5f6157f42/src/datasets/packaged_modules/folder_based_builder/folder_based_builder.py#L58 ### Steps to reproduce the bug Create a dataset with metadata and 1 arrow file in validation and multiple arrow files in the training set, following the above description. In my case, I saved the files via: ```python dataset = DatasetDict({ 'train': train_dataset, 'validation': val_dataset }) dataset.save_to_disk(output_path, max_shard_size="50MB") ``` ### Expected behavior The dataset would get loaded. ### Environment info - `datasets` version: 3.6.0 - Platform: Linux-6.14.0-22-generic-x86_64-with-glibc2.41 - Python version: 3.12.7 - `huggingface_hub` version: 0.31.1 - PyArrow version: 18.1.0 - Pandas version: 2.2.3 - `fsspec` version: 2024.6.1
null
https://api.github.com/repos/huggingface/datasets/issues/7650/timeline
null
null
iPieter
6,965,756
MDQ6VXNlcjY5NjU3NTY=
https://avatars.githubusercontent.com/u/6965756?v=4
https://api.github.com/users/iPieter
https://github.com/iPieter
https://api.github.com/users/iPieter/followers
https://api.github.com/users/iPieter/following{/other_user}
https://api.github.com/users/iPieter/gists{/gist_id}
https://api.github.com/users/iPieter/starred{/owner}{/repo}
https://api.github.com/users/iPieter/subscriptions
https://api.github.com/users/iPieter/orgs
https://api.github.com/users/iPieter/repos
https://api.github.com/users/iPieter/events{/privacy}
https://api.github.com/users/iPieter/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7650/reactions
0
0
0
0
0
0
0
0
0
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[]
https://api.github.com/repos/huggingface/datasets/issues/7647
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7647/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7647/comments
https://api.github.com/repos/huggingface/datasets/issues/7647/events
https://github.com/huggingface/datasets/issues/7647
3,178,952,517
I_kwDODunzps69evdF
7,647
loading mozilla-foundation--common_voice_11_0 fails
[]
open
false
null
[]
null
2
1,750
1,752
null
NONE
null
null
### Describe the bug Hello everyone, i am trying to load `mozilla-foundation--common_voice_11_0` and it fails. Reproducer ``` import datasets datasets.load_dataset("mozilla-foundation/common_voice_11_0", "en", split="test", streaming=True, trust_remote_code=True) ``` and it fails with ``` File ~/opt/envs/.../lib/python3.10/site-packages/datasets/utils/file_utils.py:827, in _add_retries_to_file_obj_read_method.<locals>.read_with_retries(*args, **kwargs) 825 for retry in range(1, max_retries + 1): 826 try: --> 827 out = read(*args, **kwargs) 828 break 829 except ( 830 _AiohttpClientError, 831 asyncio.TimeoutError, 832 requests.exceptions.ConnectionError, 833 requests.exceptions.Timeout, 834 ) as err: File /usr/lib/python3.10/codecs.py:322, in BufferedIncrementalDecoder.decode(self, input, final) 319 def decode(self, input, final=False): 320 # decode input (taking the buffer into account) 321 data = self.buffer + input --> 322 (result, consumed) = self._buffer_decode(data, self.errors, final) 323 # keep undecoded input until the next call 324 self.buffer = data[consumed:] UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8b in position 1: invalid start byte ``` When i remove streaming then everything is good but i need `streaming=True` ### Steps to reproduce the bug ``` import datasets datasets.load_dataset("mozilla-foundation/common_voice_11_0", "en", split="test", streaming=True, trust_remote_code=True) ``` ### Expected behavior Expected that it will download dataset ### Environment info datasets==3.6.0 python3.10 on all platforms linux/win/mac
null
https://api.github.com/repos/huggingface/datasets/issues/7647/timeline
null
null
pavel-esir
5,703,039
MDQ6VXNlcjU3MDMwMzk=
https://avatars.githubusercontent.com/u/5703039?v=4
https://api.github.com/users/pavel-esir
https://github.com/pavel-esir
https://api.github.com/users/pavel-esir/followers
https://api.github.com/users/pavel-esir/following{/other_user}
https://api.github.com/users/pavel-esir/gists{/gist_id}
https://api.github.com/users/pavel-esir/starred{/owner}{/repo}
https://api.github.com/users/pavel-esir/subscriptions
https://api.github.com/users/pavel-esir/orgs
https://api.github.com/users/pavel-esir/repos
https://api.github.com/users/pavel-esir/events{/privacy}
https://api.github.com/users/pavel-esir/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7647/reactions
0
0
0
0
0
0
0
0
0
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[ "@claude Could you please address this issue", "kinda related: https://github.com/huggingface/datasets/issues/7675" ]
https://api.github.com/repos/huggingface/datasets/issues/7637
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7637/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7637/comments
https://api.github.com/repos/huggingface/datasets/issues/7637/events
https://github.com/huggingface/datasets/issues/7637
3,171,883,522
I_kwDODunzps69DxoC
7,637
Introduce subset_name as an alias of config_name
[ { "id": 1935892871, "node_id": "MDU6TGFiZWwxOTM1ODkyODcx", "url": "https://api.github.com/repos/huggingface/datasets/labels/enhancement", "name": "enhancement", "color": "a2eeef", "default": true, "description": "New feature or request" } ]
open
false
null
[]
null
4
1,750
1,751
null
MEMBER
null
null
### Feature request Add support for `subset_name` as an alias for `config_name` in the datasets library and related tools (such as loading scripts, documentation, and metadata). ### Motivation The Hugging Face Hub dataset viewer displays a column named **"Subset"**, which refers to what is currently technically called config_name in the datasets library. This inconsistency has caused confusion for many users, especially those unfamiliar with the internal terminology. I have repeatedly received questions from users trying to understand what "config" means, and why it doesn’t match what they see as "subset" on the Hub. Renaming everything to `subset_name` might be too disruptive, but introducing subset_name as a clear alias for config_name could significantly improve user experience without breaking backward compatibility. This change would: - Align terminology across the Hub UI and datasets codebase - Reduce user confusion, especially for newcomers - Make documentation and examples more intuitive
null
https://api.github.com/repos/huggingface/datasets/issues/7637/timeline
null
null
albertvillanova
8,515,462
MDQ6VXNlcjg1MTU0NjI=
https://avatars.githubusercontent.com/u/8515462?v=4
https://api.github.com/users/albertvillanova
https://github.com/albertvillanova
https://api.github.com/users/albertvillanova/followers
https://api.github.com/users/albertvillanova/following{/other_user}
https://api.github.com/users/albertvillanova/gists{/gist_id}
https://api.github.com/users/albertvillanova/starred{/owner}{/repo}
https://api.github.com/users/albertvillanova/subscriptions
https://api.github.com/users/albertvillanova/orgs
https://api.github.com/users/albertvillanova/repos
https://api.github.com/users/albertvillanova/events{/privacy}
https://api.github.com/users/albertvillanova/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7637/reactions
2
1
0
0
0
0
1
0
0
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[ "I second this! When you come from the Hub, the intuitive question is \"how do I set the subset name\", and it's not easily answered from the docs: `subset_name` would answer this directly.", "I've submitted PR [#7657](https://github.com/huggingface/datasets/pull/7657) to introduce subset_name as a user-facing alias for name in load_dataset, keeping terminology consistent with the Hub UI (“Subset”). It’s fully backward-compatible and includes a conflict check.\n\nLet me know if you'd like me to include tests as part of the PR — happy to add them if needed!", "The main usage is as a positional argument anyway, so I wouldn't necessarily agree that we need an alias (with the risk of confusing users). But happy to have more mentions in the docs of syntaxes like `load_dataset(\"dataset_name\", \"subset_name\")`", "> The main usage is as a positional argument anyway, so I wouldn't necessarily agree that we need an alias (with the risk of confusing users). But happy to have more mentions in the docs of syntaxes like `load_dataset(\"dataset_name\", \"subset_name\")`\n\nThanks @lhoestq, totally fair point — especially with positional usage being the norm. I’m happy to align with the team’s direction here. If you'd prefer, I can update this PR to shift the focus to documentation/examples (e.g., showing \"subset_name\" as the second arg)." ]
https://api.github.com/repos/huggingface/datasets/issues/7636
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7636/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7636/comments
https://api.github.com/repos/huggingface/datasets/issues/7636/events
https://github.com/huggingface/datasets/issues/7636
3,170,878,167
I_kwDODunzps68_8LX
7,636
"open" in globals()["__builtins__"], an error occurs: "TypeError: argument of type 'module' is not iterable"
[]
open
false
null
[]
null
4
1,750
1,752
null
NONE
null
null
When I run the following code, an error occurs: "TypeError: argument of type 'module' is not iterable" ```python print("open" in globals()["__builtins__"]) ``` Traceback (most recent call last): File "./main.py", line 2, in <module> print("open" in globals()["__builtins__"]) ^^^^^^^^^^^^^^^^^^^^^^ TypeError: argument of type 'module' is not iterable But this code runs fine in datasets, I don't understand why [src/datasets/utils/patching.py#L96](https://github.com/huggingface/datasets/blob/3.6.0/src/datasets/utils/patching.py#L96)
null
https://api.github.com/repos/huggingface/datasets/issues/7636/timeline
null
reopened
kuanyan9527
51,187,979
MDQ6VXNlcjUxMTg3OTc5
https://avatars.githubusercontent.com/u/51187979?v=4
https://api.github.com/users/kuanyan9527
https://github.com/kuanyan9527
https://api.github.com/users/kuanyan9527/followers
https://api.github.com/users/kuanyan9527/following{/other_user}
https://api.github.com/users/kuanyan9527/gists{/gist_id}
https://api.github.com/users/kuanyan9527/starred{/owner}{/repo}
https://api.github.com/users/kuanyan9527/subscriptions
https://api.github.com/users/kuanyan9527/orgs
https://api.github.com/users/kuanyan9527/repos
https://api.github.com/users/kuanyan9527/events{/privacy}
https://api.github.com/users/kuanyan9527/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7636/reactions
0
0
0
0
0
0
0
0
0
null
null
null
null
null
null
kuanyan9527
51,187,979
MDQ6VXNlcjUxMTg3OTc5
https://avatars.githubusercontent.com/u/51187979?v=4
https://api.github.com/users/kuanyan9527
https://github.com/kuanyan9527
https://api.github.com/users/kuanyan9527/followers
https://api.github.com/users/kuanyan9527/following{/other_user}
https://api.github.com/users/kuanyan9527/gists{/gist_id}
https://api.github.com/users/kuanyan9527/starred{/owner}{/repo}
https://api.github.com/users/kuanyan9527/subscriptions
https://api.github.com/users/kuanyan9527/orgs
https://api.github.com/users/kuanyan9527/repos
https://api.github.com/users/kuanyan9527/events{/privacy}
https://api.github.com/users/kuanyan9527/received_events
User
public
false
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[ "@kuanyan9527 Your query is indeed valid. Following could be its reasoning:\n\nQuoting from https://stackoverflow.com/a/11181607:\n\"By default, when in the `__main__` module,` __builtins__` is the built-in module `__builtin__` (note: no 's'); when in any other module, `__builtins__` is an alias for the dictionary of the `__builtin__` module itself.\"\n\nCan you confirm if you are running the snippet `print(\"open\" in globals()[\"__builtins__\"])` in the default? In that case, as expected, `__builtins__` is a module which is causing the error. But in the codebase, the class `patch_submodule`, is primarily used in the second circumstance, where it acts as a dictionary. Hence causing the code to function successfully.\n\nHope this helps.", "@kuanyan9527 Are there any more queries in this regards, else please feel free to close the issue.\nThank you.", "Your answer is very important to me,thanks.", "I encountered this error when running datasets with pypy,\n`TypeError: argument of type 'module' is not iterable` in [src/datasets/utils/patching.py#L96](https://github.com/huggingface/datasets/blob/3.6.0/src/datasets/utils/patching.py#L96)\nby modifying `globals()[\"__builtins__\"]` to `builtins.__dict__`, importing via `import builtins`.\nCan this be applied to the community?" ]
https://api.github.com/repos/huggingface/datasets/issues/7633
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7633/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7633/comments
https://api.github.com/repos/huggingface/datasets/issues/7633/events
https://github.com/huggingface/datasets/issues/7633
3,168,399,637
I_kwDODunzps682fEV
7,633
Proposal: Small Tamil Discourse Coherence Dataset.
[]
open
false
null
[]
null
0
1,750
1,750
null
NONE
null
null
I’m a beginner from NIT Srinagar proposing a dataset of 50 Tamil text pairs for discourse coherence (coherent/incoherent labels) to support NLP research in low-resource languages. - Size: 50 samples - Format: CSV with columns (text1, text2, label) - Use case: Training NLP models for coherence I’ll use GitHub’s web editor and Google Colab. Please confirm if this fits.
null
https://api.github.com/repos/huggingface/datasets/issues/7633/timeline
null
null
bikkiNitSrinagar
66,418,501
MDQ6VXNlcjY2NDE4NTAx
https://avatars.githubusercontent.com/u/66418501?v=4
https://api.github.com/users/bikkiNitSrinagar
https://github.com/bikkiNitSrinagar
https://api.github.com/users/bikkiNitSrinagar/followers
https://api.github.com/users/bikkiNitSrinagar/following{/other_user}
https://api.github.com/users/bikkiNitSrinagar/gists{/gist_id}
https://api.github.com/users/bikkiNitSrinagar/starred{/owner}{/repo}
https://api.github.com/users/bikkiNitSrinagar/subscriptions
https://api.github.com/users/bikkiNitSrinagar/orgs
https://api.github.com/users/bikkiNitSrinagar/repos
https://api.github.com/users/bikkiNitSrinagar/events{/privacy}
https://api.github.com/users/bikkiNitSrinagar/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7633/reactions
0
0
0
0
0
0
0
0
0
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[]
https://api.github.com/repos/huggingface/datasets/issues/7632
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7632/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7632/comments
https://api.github.com/repos/huggingface/datasets/issues/7632/events
https://github.com/huggingface/datasets/issues/7632
3,168,283,589
I_kwDODunzps682CvF
7,632
Graceful Error Handling for cast_column("image", Image(decode=True)) in Hugging Face Datasets
[ { "id": 1935892871, "node_id": "MDU6TGFiZWwxOTM1ODkyODcx", "url": "https://api.github.com/repos/huggingface/datasets/labels/enhancement", "name": "enhancement", "color": "a2eeef", "default": true, "description": "New feature or request" } ]
open
false
null
[]
null
2
1,750
1,751
null
NONE
null
null
### Feature request Currently, when using dataset.cast_column("image", Image(decode=True)), the pipeline throws an error and halts if any image in the dataset is invalid or corrupted (e.g., truncated files, incorrect formats, unreachable URLs). This behavior disrupts large-scale processing where a few faulty samples are common. reference : https://discuss.huggingface.co/t/handle-errors-when-loading-images-404-corrupted-etc/50318/5 https://discuss.huggingface.co/t/handling-non-existing-url-in-image-dataset-while-cast-column/69185 Proposed Feature Introduce a mechanism (e.g., a continue_on_error=True flag or global error handling mode) in Image(decode=True) that: Skips invalid images and sets them as None, or Logs the error but allows the rest of the dataset to be processed without interruption. Example Usage from datasets import load_dataset, Image dataset = load_dataset("my_dataset") dataset = dataset.cast_column("image", Image(decode=True, continue_on_error=True)) Benefits Ensures robust large-scale image dataset processing. Improves developer productivity by avoiding custom retry/error-handling code. Aligns with best practices in dataset preprocessing pipelines that tolerate minor data corruption. Potential Implementation Options Internally wrap the decoding in a try/except block. Return None or a placeholder on failure. Optionally allow custom error callbacks or logging. ### Motivation Robustness: Large-scale image datasets often contain a small fraction of corrupt files or unreachable URLs. Halting on the first error forces users to write custom workarounds or preprocess externally. Simplicity: A built-in flag removes boilerplate try/except logic around every decode step. Performance: Skipping invalid samples inline is more efficient than a two-pass approach (filter then decode). ### Your contribution 1. API Change Extend datasets.features.Image(decode=True) to accept continue_on_error: bool = False. 2. Behavior If continue_on_error=False (default), maintain current behavior: any decode error raises an exception. If continue_on_error=True, wrap decode logic in try/except: On success: store the decoded image. On failure: log a warning (e.g., via logging.warning) and set the field to None (or a sentinel value). 3. Optional Enhancements Allow a callback hook: Image(decode=True, continue_on_error=True, on_error=lambda idx, url, exc: ...) Emit metrics or counts of skipped images.
null
https://api.github.com/repos/huggingface/datasets/issues/7632/timeline
null
null
ganiket19
37,377,515
MDQ6VXNlcjM3Mzc3NTE1
https://avatars.githubusercontent.com/u/37377515?v=4
https://api.github.com/users/ganiket19
https://github.com/ganiket19
https://api.github.com/users/ganiket19/followers
https://api.github.com/users/ganiket19/following{/other_user}
https://api.github.com/users/ganiket19/gists{/gist_id}
https://api.github.com/users/ganiket19/starred{/owner}{/repo}
https://api.github.com/users/ganiket19/subscriptions
https://api.github.com/users/ganiket19/orgs
https://api.github.com/users/ganiket19/repos
https://api.github.com/users/ganiket19/events{/privacy}
https://api.github.com/users/ganiket19/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7632/reactions
0
0
0
0
0
0
0
0
0
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[ "Hi! This is now handled in PR #7638", "Thank you for implementing the suggestion it would be great help in our use case. " ]
https://api.github.com/repos/huggingface/datasets/issues/7630
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7630/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7630/comments
https://api.github.com/repos/huggingface/datasets/issues/7630/events
https://github.com/huggingface/datasets/issues/7630
3,164,650,900
I_kwDODunzps68oL2U
7,630
[bug] resume from ckpt skips samples if .map is applied
[]
open
false
null
[]
null
2
1,750
1,751
null
NONE
null
null
### Describe the bug resume from ckpt skips samples if .map is applied Maybe related: https://github.com/huggingface/datasets/issues/7538 ### Steps to reproduce the bug ```python from datasets import Dataset from datasets.distributed import split_dataset_by_node # Create dataset with map transformation def create_dataset(): ds = Dataset.from_dict({"id": list(range(100))}) ds = ds.to_iterable_dataset(num_shards=4) ds = ds.map(lambda x: x) #comment it out to get desired behavior ds = split_dataset_by_node(ds, rank=0, world_size=2) return ds ds = create_dataset() # Iterate and save checkpoint after 10 samples it = iter(ds) for idx, sample in enumerate(it): if idx == 9: # Checkpoint after 10 samples checkpoint = ds.state_dict() print(f"Checkpoint saved at sample: {sample['id']}") break # Continue with original iterator original_next_samples = [] for idx, sample in enumerate(it): original_next_samples.append(sample["id"]) if idx >= 4: break # Resume from checkpoint ds_new = create_dataset() ds_new.load_state_dict(checkpoint) # Get samples from resumed iterator it_new = iter(ds_new) resumed_next_samples = [] for idx, sample in enumerate(it_new): resumed_next_samples.append(sample["id"]) if idx >= 4: break print(f"\nExpected next samples: {original_next_samples}") print(f"Actual next samples: {resumed_next_samples}") print( f"\n❌ BUG: {resumed_next_samples[0] - original_next_samples[0]} samples were skipped!" ) ``` With map ``` Checkpoint saved at sample: 9 Expected next samples: [10, 11, 12, 13, 14] Actual next samples: [50, 51, 52, 53, 54] ❌ BUG: 40 samples were skipped! ``` ### Expected behavior without map ``` Expected next samples: [10, 11, 12, 13, 14] Actual next samples: [10, 11, 12, 13, 14] ❌ BUG: 0 samples were skipped! ``` ### Environment info datasets == 3.6.0
null
https://api.github.com/repos/huggingface/datasets/issues/7630/timeline
null
null
felipemello1
23,004,953
MDQ6VXNlcjIzMDA0OTUz
https://avatars.githubusercontent.com/u/23004953?v=4
https://api.github.com/users/felipemello1
https://github.com/felipemello1
https://api.github.com/users/felipemello1/followers
https://api.github.com/users/felipemello1/following{/other_user}
https://api.github.com/users/felipemello1/gists{/gist_id}
https://api.github.com/users/felipemello1/starred{/owner}{/repo}
https://api.github.com/users/felipemello1/subscriptions
https://api.github.com/users/felipemello1/orgs
https://api.github.com/users/felipemello1/repos
https://api.github.com/users/felipemello1/events{/privacy}
https://api.github.com/users/felipemello1/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7630/reactions
0
0
0
0
0
0
0
0
0
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[ "Thanks for reporting this — it looks like a separate but related bug to #7538, which involved sample loss when resuming an `IterableDataset` wrapped in `FormattedExamplesIterable`. That was resolved in #7553 by re-batching the iterable to track offset correctly.\n\nIn this case, the issue seems to arise specifically from applying `.map()` before sharding and checkpointing. That wraps the iterable in `MappedExamplesIterable`, which may not preserve or propagate `shard_example_idx` correctly across `.state_dict()` and `.load_state_dict()` calls.\n\nYou can see that without `.map()`, resume works fine — but with `.map()`, it jumps from sample 9 to 50, skipping the rest of the shard.\n\nI'll dig deeper into how `MappedExamplesIterable` manages offsets and whether it supports proper checkpoint resumption. If not, we might need a fix similar to the one in #7553, or a wrapper to preserve resume metadata.\n\nHappy to help fix it!\n", "Let me know if a dedicated test case is required — happy to add one!" ]
https://api.github.com/repos/huggingface/datasets/issues/7627
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7627/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7627/comments
https://api.github.com/repos/huggingface/datasets/issues/7627/events
https://github.com/huggingface/datasets/issues/7627
3,160,544,390
I_kwDODunzps68YhSG
7,627
Creating a HF Dataset from lakeFS with S3 storage takes too much time!
[]
closed
false
null
[]
null
1
1,750
1,750
1,750
NONE
null
null
Hi, I’m new to HF dataset and I tried to create datasets based on data versioned in **lakeFS** _(**MinIO** S3 bucket as storage backend)_ Here I’m using ±30000 PIL image from MNIST data however it is taking around 12min to execute, which is a lot! From what I understand, it is loading the images into cache then building the dataset. – Please find bellow the execution screenshot – Is there a way to optimize this or am I doing something wrong? Thanks! ![Image](https://github.com/user-attachments/assets/c79257c8-f023-42a9-9e6f-0898b3ea93fe)
null
https://api.github.com/repos/huggingface/datasets/issues/7627/timeline
null
completed
Thunderhead-exe
118,734,142
U_kgDOBxO9Pg
https://avatars.githubusercontent.com/u/118734142?v=4
https://api.github.com/users/Thunderhead-exe
https://github.com/Thunderhead-exe
https://api.github.com/users/Thunderhead-exe/followers
https://api.github.com/users/Thunderhead-exe/following{/other_user}
https://api.github.com/users/Thunderhead-exe/gists{/gist_id}
https://api.github.com/users/Thunderhead-exe/starred{/owner}{/repo}
https://api.github.com/users/Thunderhead-exe/subscriptions
https://api.github.com/users/Thunderhead-exe/orgs
https://api.github.com/users/Thunderhead-exe/repos
https://api.github.com/users/Thunderhead-exe/events{/privacy}
https://api.github.com/users/Thunderhead-exe/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7627/reactions
0
0
0
0
0
0
0
0
0
null
null
null
null
null
null
Thunderhead-exe
118,734,142
U_kgDOBxO9Pg
https://avatars.githubusercontent.com/u/118734142?v=4
https://api.github.com/users/Thunderhead-exe
https://github.com/Thunderhead-exe
https://api.github.com/users/Thunderhead-exe/followers
https://api.github.com/users/Thunderhead-exe/following{/other_user}
https://api.github.com/users/Thunderhead-exe/gists{/gist_id}
https://api.github.com/users/Thunderhead-exe/starred{/owner}{/repo}
https://api.github.com/users/Thunderhead-exe/subscriptions
https://api.github.com/users/Thunderhead-exe/orgs
https://api.github.com/users/Thunderhead-exe/repos
https://api.github.com/users/Thunderhead-exe/events{/privacy}
https://api.github.com/users/Thunderhead-exe/received_events
User
public
false
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[ "### > Update\n\nThe bottleneck, from what I understand, was making one network request per file\n\nFor 30k images, this meant 30k separate GET requests to the MinIO server through the S3 API, and that was killing the performance\n\nUsing webDataset to transform the large number of files to few .tar files and passing “webdataset” instead of “imagefolder” to the load_dataset function worked perfectly (took only ~11s)" ]
https://api.github.com/repos/huggingface/datasets/issues/7624
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7624/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7624/comments
https://api.github.com/repos/huggingface/datasets/issues/7624/events
https://github.com/huggingface/datasets/issues/7624
3,156,136,624
I_kwDODunzps68HtKw
7,624
#Dataset Make "image" column appear first in dataset preview UI
[]
closed
false
null
[]
null
2
1,750
1,750
1,750
NONE
null
null
Hi! #Dataset I’m currently uploading a dataset that includes an `"image"` column (PNG files), along with some metadata columns. The dataset is loaded from a .jsonl file. My goal is to have the "image" column appear as the first column in the dataset card preview UI on the :hugs: Hub. However, at the moment, the `"image"` column is not the first—in fact, it appears last, which is not ideal for the presentation I’d like to achieve. I have a couple of questions: Is there a way to force the dataset card to display the `"image"` column first? Is there currently any way to control or influence the column order in the dataset preview UI? Does the order of keys in the .jsonl file or the features argument affect the display order? Thanks again for your time and help! :blush:
null
https://api.github.com/repos/huggingface/datasets/issues/7624/timeline
null
completed
jcerveto
98,875,217
U_kgDOBeS3UQ
https://avatars.githubusercontent.com/u/98875217?v=4
https://api.github.com/users/jcerveto
https://github.com/jcerveto
https://api.github.com/users/jcerveto/followers
https://api.github.com/users/jcerveto/following{/other_user}
https://api.github.com/users/jcerveto/gists{/gist_id}
https://api.github.com/users/jcerveto/starred{/owner}{/repo}
https://api.github.com/users/jcerveto/subscriptions
https://api.github.com/users/jcerveto/orgs
https://api.github.com/users/jcerveto/repos
https://api.github.com/users/jcerveto/events{/privacy}
https://api.github.com/users/jcerveto/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7624/reactions
0
0
0
0
0
0
0
0
0
null
null
null
null
null
null
jcerveto
98,875,217
U_kgDOBeS3UQ
https://avatars.githubusercontent.com/u/98875217?v=4
https://api.github.com/users/jcerveto
https://github.com/jcerveto
https://api.github.com/users/jcerveto/followers
https://api.github.com/users/jcerveto/following{/other_user}
https://api.github.com/users/jcerveto/gists{/gist_id}
https://api.github.com/users/jcerveto/starred{/owner}{/repo}
https://api.github.com/users/jcerveto/subscriptions
https://api.github.com/users/jcerveto/orgs
https://api.github.com/users/jcerveto/repos
https://api.github.com/users/jcerveto/events{/privacy}
https://api.github.com/users/jcerveto/received_events
User
public
false
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[ "Hi ! It should follow the same order as the order of the keys in the metadata file", "Hi! Thank you for your answer. \n\nAs you said it, I I forced every key in every JSON to have an order using `collections. OrderedDict` in Python. Now, it works!\n\nTY" ]
https://api.github.com/repos/huggingface/datasets/issues/7619
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7619/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7619/comments
https://api.github.com/repos/huggingface/datasets/issues/7619/events
https://github.com/huggingface/datasets/issues/7619
3,153,058,517
I_kwDODunzps6779rV
7,619
`from_list` fails while `from_generator` works for large datasets
[]
open
false
null
[]
null
4
1,750
1,751
null
NONE
null
null
### Describe the bug I am constructing a large time series dataset and observed that first constructing a list of entries and then using `Dataset.from_list` led to a crash as the number of items became large. However, this is not a problem when using `Dataset.from_generator`. ### Steps to reproduce the bug #### Snippet A (crashes) ```py from tqdm.auto import tqdm import numpy as np import datasets def data_generator(): for i in tqdm(range(10_000_000)): length = np.random.randint(2048) series = np.random.rand(length) yield {"target": series, "item_id": str(i), "start": np.datetime64("2000", "ms")} data_list = list(data_generator()) ds = datasets.Dataset.from_list(data_list) ``` The last line crashes with ``` ArrowInvalid: Value 2147483761 too large to fit in C integer type ``` #### Snippet B (works) ```py from tqdm.auto import tqdm import numpy as np import datasets def data_generator(): for i in tqdm(range(10_000_000)): length = np.random.randint(2048) series = np.random.rand(length) yield {"target": series, "item_id": str(i), "start": np.datetime64("2000", "ms")} ds = datasets.Dataset.from_generator(data_generator) ``` ### Expected behavior I expected both the approaches to work or to fail similarly. ### Environment info ``` - `datasets` version: 3.6.0 - Platform: Linux-6.8.0-1029-aws-x86_64-with-glibc2.35 - Python version: 3.11.11 - `huggingface_hub` version: 0.32.2 - PyArrow version: 19.0.1 - Pandas version: 2.2.3 - `fsspec` version: 2025.3.0 ```
null
https://api.github.com/repos/huggingface/datasets/issues/7619/timeline
null
null
abdulfatir
4,028,948
MDQ6VXNlcjQwMjg5NDg=
https://avatars.githubusercontent.com/u/4028948?v=4
https://api.github.com/users/abdulfatir
https://github.com/abdulfatir
https://api.github.com/users/abdulfatir/followers
https://api.github.com/users/abdulfatir/following{/other_user}
https://api.github.com/users/abdulfatir/gists{/gist_id}
https://api.github.com/users/abdulfatir/starred{/owner}{/repo}
https://api.github.com/users/abdulfatir/subscriptions
https://api.github.com/users/abdulfatir/orgs
https://api.github.com/users/abdulfatir/repos
https://api.github.com/users/abdulfatir/events{/privacy}
https://api.github.com/users/abdulfatir/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7619/reactions
0
0
0
0
0
0
0
0
0
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[ "@lhoestq any thoughts on this? ", "Thanks for the report! This behavior is expected due to how `from_list()` and `from_generator()` differ internally.\n\n- `from_list()` builds the entire dataset in memory at once, which can easily exceed limits (especially with variable-length arrays or millions of rows). The Arrow error you're seeing (`Value too large to fit in C integer type`) is related to that memory overload.\n- `from_generator()` avoids this issue by batching and streaming data incrementally, which is much more memory-efficient.\n\nSo for large datasets like time series or NLP data with large arrays, `from_generator()` (or `datasets.IterableDataset`) is the recommended approach.\n\nHope this helps clarify the behavior — let me know if you'd like me to point to prior issues/discussions where similar tradeoffs came up!\n", "@ArjunJagdale Yes, it is related to using large dataset but not in the way that you have described. As I understand, the problem here is that `datasets` does not use `LargeList` with 64-bit offsets from PyArrow when using `from_list`. However, with `from_generator` this seems to work okay, likely due to batching. As such, this is more like a bug than an expected outcome. If this is indeed \"expected\", `datasets` should fail more gracefully in these cases with a recommendation to use `from_generator`. ", "Thanks for the clarification — you're absolutely right, this seems tied to the use of 32-bit list offsets in from_list() under the hood. That distinction between List and LargeList in PyArrow is a crucial one, and definitely worth highlighting in the docs or error message. Happy to help if a check or fallback to LargeList makes sense here." ]
https://api.github.com/repos/huggingface/datasets/issues/7617
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7617/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7617/comments
https://api.github.com/repos/huggingface/datasets/issues/7617/events
https://github.com/huggingface/datasets/issues/7617
3,148,102,085
I_kwDODunzps67pDnF
7,617
Unwanted column padding in nested lists of dicts
[]
closed
false
null
[]
null
1
1,750
1,750
1,750
MEMBER
null
null
```python from datasets import Dataset dataset = Dataset.from_dict({ "messages": [ [ {"a": "...",}, {"b": "...",}, ], ] }) print(dataset[0]) ``` What I get: ``` {'messages': [{'a': '...', 'b': None}, {'a': None, 'b': '...'}]} ``` What I want: ``` {'messages': [{'a': '...'}, {'b': '...'}]} ``` Is there an easy way to automatically remove these auto-filled null/none values? If not, I probably need a recursive none exclusion function, don't I? Datasets 3.6.0
null
https://api.github.com/repos/huggingface/datasets/issues/7617/timeline
null
completed
qgallouedec
45,557,362
MDQ6VXNlcjQ1NTU3MzYy
https://avatars.githubusercontent.com/u/45557362?v=4
https://api.github.com/users/qgallouedec
https://github.com/qgallouedec
https://api.github.com/users/qgallouedec/followers
https://api.github.com/users/qgallouedec/following{/other_user}
https://api.github.com/users/qgallouedec/gists{/gist_id}
https://api.github.com/users/qgallouedec/starred{/owner}{/repo}
https://api.github.com/users/qgallouedec/subscriptions
https://api.github.com/users/qgallouedec/orgs
https://api.github.com/users/qgallouedec/repos
https://api.github.com/users/qgallouedec/events{/privacy}
https://api.github.com/users/qgallouedec/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7617/reactions
0
0
0
0
0
0
0
0
0
null
null
null
null
null
null
qgallouedec
45,557,362
MDQ6VXNlcjQ1NTU3MzYy
https://avatars.githubusercontent.com/u/45557362?v=4
https://api.github.com/users/qgallouedec
https://github.com/qgallouedec
https://api.github.com/users/qgallouedec/followers
https://api.github.com/users/qgallouedec/following{/other_user}
https://api.github.com/users/qgallouedec/gists{/gist_id}
https://api.github.com/users/qgallouedec/starred{/owner}{/repo}
https://api.github.com/users/qgallouedec/subscriptions
https://api.github.com/users/qgallouedec/orgs
https://api.github.com/users/qgallouedec/repos
https://api.github.com/users/qgallouedec/events{/privacy}
https://api.github.com/users/qgallouedec/received_events
User
public
false
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[ "Answer from @lhoestq:\n\n> No\n> This is because Arrow and Parquet a columnar format: they require a fixed type for each column. So if you have nested dicts, each item should have the same subfields\n\nThe way around I found is the handle it after sampling with this function:\n\n```python\ndef remove_padding(example):\n if isinstance(example, list):\n return [remove_padding(value) if isinstance(value, (dict, list)) else value for value in example]\n elif isinstance(example, Mapping):\n return {\n key: remove_padding(value) if isinstance(value, (dict, list)) else value\n for key, value in example.items()\n if value is not None\n }\n else:\n raise TypeError(\"Input must be a list or a dictionary.\")\n\n# Example:\nexample = next(iter(dataset))\nexample = remove_padding(example)\n```" ]
https://api.github.com/repos/huggingface/datasets/issues/7612
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7612/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7612/comments
https://api.github.com/repos/huggingface/datasets/issues/7612/events
https://github.com/huggingface/datasets/issues/7612
3,141,905,049
I_kwDODunzps67RaqZ
7,612
Provide an option of robust dataset iterator with error handling
[ { "id": 1935892871, "node_id": "MDU6TGFiZWwxOTM1ODkyODcx", "url": "https://api.github.com/repos/huggingface/datasets/labels/enhancement", "name": "enhancement", "color": "a2eeef", "default": true, "description": "New feature or request" } ]
open
false
null
[]
null
2
1,749
1,750
null
NONE
null
null
### Feature request Adding an option to skip corrupted data samples. Currently the datasets behavior is throwing errors if the data sample if corrupted and let user aware and handle the data corruption. When I tried to try-catch the error at user level, the iterator will raise StopIteration when I called next() again. The way I try to do error handling is: (This doesn't work, unfortunately) ``` # Load the dataset with streaming enabled dataset = load_dataset( "pixparse/cc12m-wds", split="train", streaming=True ) # Get an iterator from the dataset iterator = iter(dataset) while True: try: # Try to get the next example example = next(iterator) # Try to access and process the image image = example["jpg"] pil_image = Image.fromarray(np.array(image)) pil_image.verify() # Verify it's a valid image file except StopIteration: # Code path 1 print("\nStopIteration was raised! Reach the end of dataset") raise StopIteration except Exception as e: # Code path 2 errors += 1 print("Error! Skip this sample") cotinue else: successful += 1 ``` This is because the `IterableDataset` already throws an error (reaches Code path 2). And if I continue call next(), it will hit Code path 1. This is because the inner iterator of `IterableDataset`([code](https://github.com/huggingface/datasets/blob/89bd1f971402acb62805ef110bc1059c38b1c8c6/src/datasets/iterable_dataset.py#L2242)) as been stopped, so calling next() on it will raise StopIteration. So I can not skip the corrupted data sample in this way. Would also love to hear any suggestions about creating a robust dataloader. Thanks for your help in advance! ### Motivation ## Public dataset corruption might be common A lot of users would use public dataset, and the public dataset might contains some corrupted data, especially for dataset with image / video etc. I totally understand it's dataset owner and user's responsibility to ensure the data integrity / run data cleaning or preprocessing, but it would be easier for developers who would use the dataset ## Use cases For example, a robust dataloader would be easy for users who want to try quick tests on different dataset, and chose one dataset which fits their needs. So user could use IterableDataloader with `stream=True` to use the dataset easily without downloading and removing corrupted data samples from the dataset. ### Your contribution The error handling might not trivial and might need more careful design.
null
https://api.github.com/repos/huggingface/datasets/issues/7612/timeline
null
null
wwwjn
40,016,222
MDQ6VXNlcjQwMDE2MjIy
https://avatars.githubusercontent.com/u/40016222?v=4
https://api.github.com/users/wwwjn
https://github.com/wwwjn
https://api.github.com/users/wwwjn/followers
https://api.github.com/users/wwwjn/following{/other_user}
https://api.github.com/users/wwwjn/gists{/gist_id}
https://api.github.com/users/wwwjn/starred{/owner}{/repo}
https://api.github.com/users/wwwjn/subscriptions
https://api.github.com/users/wwwjn/orgs
https://api.github.com/users/wwwjn/repos
https://api.github.com/users/wwwjn/events{/privacy}
https://api.github.com/users/wwwjn/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7612/reactions
2
2
0
0
0
0
0
0
0
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[ "Hi ! Maybe we can add a parameter to the Image() type to make it to return `None` instead of raising an error in case of corruption ? Would that help ?", "Hi! 👋🏼 I just opened PR [#7638](https://github.com/huggingface/datasets/pull/7638) to address this issue.\n\n### 🔧 What it does:\nIt adds an `ignore_decode_errors` flag to the `Image` feature. When set to `True`, corrupted image samples will be skipped (with a warning), and `None` will be returned instead of raising an exception.\n\nThis allows users to stream datasets that may contain some invalid images without breaking the iteration loop:\n\n```python\nfeatures = Features({\n \"image\": Image(decode=True, ignore_decode_errors=True)\n})\n````\n\n### 🧩 Why this helps:\n\n* Prevents full iteration breakdown during `.streaming=True` usage\n* Enables downstream tooling like Flux (see [[Flux#1290](https://github.com/pytorch/torchtitan/pull/1290)](https://github.com/pytorch/torchtitan/pull/1290)) to implement robust loaders now that `datasets` supports graceful handling\n* Keeps current behavior unchanged unless explicitly opted-in\n\nLet me know if you'd like me to follow up with test coverage or additional enhancements!\n\ncc @lhoestq " ]
https://api.github.com/repos/huggingface/datasets/issues/7611
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7611/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7611/comments
https://api.github.com/repos/huggingface/datasets/issues/7611/events
https://github.com/huggingface/datasets/issues/7611
3,141,383,940
I_kwDODunzps67PbcE
7,611
Code example for dataset.add_column() does not reflect correct way to use function
[]
closed
false
null
[]
null
2
1,749
1,752
1,752
NONE
null
null
https://github.com/huggingface/datasets/blame/38d4d0e11e22fdbc4acf373d2421d25abeb43439/src/datasets/arrow_dataset.py#L5925C10-L5925C10 The example seems to suggest that dataset.add_column() can add column inplace, however, this is wrong -- it cannot. It returns a new dataset with the column added to it.
null
https://api.github.com/repos/huggingface/datasets/issues/7611/timeline
null
completed
shaily99
31,388,649
MDQ6VXNlcjMxMzg4NjQ5
https://avatars.githubusercontent.com/u/31388649?v=4
https://api.github.com/users/shaily99
https://github.com/shaily99
https://api.github.com/users/shaily99/followers
https://api.github.com/users/shaily99/following{/other_user}
https://api.github.com/users/shaily99/gists{/gist_id}
https://api.github.com/users/shaily99/starred{/owner}{/repo}
https://api.github.com/users/shaily99/subscriptions
https://api.github.com/users/shaily99/orgs
https://api.github.com/users/shaily99/repos
https://api.github.com/users/shaily99/events{/privacy}
https://api.github.com/users/shaily99/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7611/reactions
1
1
0
0
0
0
0
0
0
null
null
null
null
null
null
lhoestq
42,851,186
MDQ6VXNlcjQyODUxMTg2
https://avatars.githubusercontent.com/u/42851186?v=4
https://api.github.com/users/lhoestq
https://github.com/lhoestq
https://api.github.com/users/lhoestq/followers
https://api.github.com/users/lhoestq/following{/other_user}
https://api.github.com/users/lhoestq/gists{/gist_id}
https://api.github.com/users/lhoestq/starred{/owner}{/repo}
https://api.github.com/users/lhoestq/subscriptions
https://api.github.com/users/lhoestq/orgs
https://api.github.com/users/lhoestq/repos
https://api.github.com/users/lhoestq/events{/privacy}
https://api.github.com/users/lhoestq/received_events
User
public
false
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[ "Hi @shaily99 \n\nThanks for pointing this out — you're absolutely right!\n\nThe current example in the docstring for add_column() implies in-place modification, which is misleading since add_column() actually returns a new dataset.", "#self-assign\n" ]
https://api.github.com/repos/huggingface/datasets/issues/7610
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7610/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7610/comments
https://api.github.com/repos/huggingface/datasets/issues/7610/events
https://github.com/huggingface/datasets/issues/7610
3,141,281,560
I_kwDODunzps67PCcY
7,610
i cant confirm email
[]
open
false
null
[]
null
2
1,749
1,751
null
NONE
null
null
### Describe the bug This is dificult, I cant confirm email because I'm not get any email! I cant post forum because I cant confirm email! I can send help desk because... no exist on web page. paragraph 44 ### Steps to reproduce the bug rthjrtrt ### Expected behavior ewtgfwetgf ### Environment info sdgfswdegfwe
null
https://api.github.com/repos/huggingface/datasets/issues/7610/timeline
null
null
lykamspam
187,984,415
U_kgDOCzRqHw
https://avatars.githubusercontent.com/u/187984415?v=4
https://api.github.com/users/lykamspam
https://github.com/lykamspam
https://api.github.com/users/lykamspam/followers
https://api.github.com/users/lykamspam/following{/other_user}
https://api.github.com/users/lykamspam/gists{/gist_id}
https://api.github.com/users/lykamspam/starred{/owner}{/repo}
https://api.github.com/users/lykamspam/subscriptions
https://api.github.com/users/lykamspam/orgs
https://api.github.com/users/lykamspam/repos
https://api.github.com/users/lykamspam/events{/privacy}
https://api.github.com/users/lykamspam/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7610/reactions
0
0
0
0
0
0
0
0
0
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[ "Will you please clarify the issue by some screenshots or more in-depth explanation?", "![Image](https://github.com/user-attachments/assets/ebe58239-72ef-43f6-a849-35736878fbf3)\nThis is clarify answer. I have not received a letter.\n\n**The graphic at the top shows how I don't get any letter. Can you show in a clear way how you don't get a letter from me?**" ]
https://api.github.com/repos/huggingface/datasets/issues/7607
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7607/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7607/comments
https://api.github.com/repos/huggingface/datasets/issues/7607/events
https://github.com/huggingface/datasets/issues/7607
3,135,722,560
I_kwDODunzps6651RA
7,607
Video and audio decoding with torchcodec
[ { "id": 1935892871, "node_id": "MDU6TGFiZWwxOTM1ODkyODcx", "url": "https://api.github.com/repos/huggingface/datasets/labels/enhancement", "name": "enhancement", "color": "a2eeef", "default": true, "description": "New feature or request" } ]
closed
false
null
[]
null
16
1,749
1,750
1,750
CONTRIBUTOR
null
null
### Feature request Pytorch is migrating video processing to torchcodec and it's pretty cool. It would be nice to migrate both the audio and video features to use torchcodec instead of torchaudio/video. ### Motivation My use case is I'm working on a multimodal AV model, and what's nice about torchcodec is I can extract the audio tensors directly from MP4 files. Also, I can easily resample video data to whatever fps I like on the fly. I haven't found an easy/efficient way to do this with torchvision. ### Your contribution I’m modifying the Video dataclass to use torchcodec in place of the current backend, starting from a stable commit for a project I’m working on. If it ends up working well, I’m happy to open a PR on main.
null
https://api.github.com/repos/huggingface/datasets/issues/7607/timeline
null
completed
TyTodd
49,127,578
MDQ6VXNlcjQ5MTI3NTc4
https://avatars.githubusercontent.com/u/49127578?v=4
https://api.github.com/users/TyTodd
https://github.com/TyTodd
https://api.github.com/users/TyTodd/followers
https://api.github.com/users/TyTodd/following{/other_user}
https://api.github.com/users/TyTodd/gists{/gist_id}
https://api.github.com/users/TyTodd/starred{/owner}{/repo}
https://api.github.com/users/TyTodd/subscriptions
https://api.github.com/users/TyTodd/orgs
https://api.github.com/users/TyTodd/repos
https://api.github.com/users/TyTodd/events{/privacy}
https://api.github.com/users/TyTodd/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7607/reactions
1
1
0
0
0
0
0
0
0
null
null
null
null
null
null
lhoestq
42,851,186
MDQ6VXNlcjQyODUxMTg2
https://avatars.githubusercontent.com/u/42851186?v=4
https://api.github.com/users/lhoestq
https://github.com/lhoestq
https://api.github.com/users/lhoestq/followers
https://api.github.com/users/lhoestq/following{/other_user}
https://api.github.com/users/lhoestq/gists{/gist_id}
https://api.github.com/users/lhoestq/starred{/owner}{/repo}
https://api.github.com/users/lhoestq/subscriptions
https://api.github.com/users/lhoestq/orgs
https://api.github.com/users/lhoestq/repos
https://api.github.com/users/lhoestq/events{/privacy}
https://api.github.com/users/lhoestq/received_events
User
public
false
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[ "Good idea ! let me know if you have any question or if I can help", "@lhoestq Almost finished, but I'm having trouble understanding this test case.\nThis is how it looks originally. The `map` function is called, and then `with_format` is called. According to the test case example[\"video\"] is supposed to be a VideoReader. However, according to the [docs](https://huggingface.co/docs/datasets/package_reference/main_classes#datasets.Dataset.with_format) its supposed to be the type passed into `with_format` (numpy in this case). My implementation with VideoDecoder currently does the latter, is that correct, or should it be a VideoDecoder object instead?\n```\n@require_torchvision\ndef test_dataset_with_video_map_and_formatted(shared_datadir):\n from torchvision.io import VideoReader\n\n video_path = str(shared_datadir / \"test_video_66x50.mov\")\n data = {\"video\": [video_path]}\n features = Features({\"video\": Video()})\n dset = Dataset.from_dict(data, features=features)\n dset = dset.map(lambda x: x).with_format(\"numpy\")\n example = dset[0]\n assert isinstance(example[\"video\"], VideoReader)\n # assert isinstance(example[\"video\"][0], np.ndarray)\n\n # from bytes\n with open(video_path, \"rb\") as f:\n data = {\"video\": [f.read()]}\n dset = Dataset.from_dict(data, features=features)\n dset = dset.map(lambda x: x).with_format(\"numpy\")\n example = dset[0]\n assert isinstance(example[\"video\"], VideoReader)\n # assert isinstance(example[\"video\"][0], np.ndarray)\n\n```", "Hi ! It's maybe more convenient for users to always have a VideoDecoder, since they might only access a few frames and not the full video. So IMO it's fine to always return a VideoDecoder (maybe later we can extend the VideoDecoder to return other types of tensors than numpy arrays though ? 👀 it's not crucial for now though)", "@lhoestq ya that makes sense, looks like this functionality lives in `src/datasets/formatting`, where an exception is made for VideoReader objects to remain as themselves when being formatted. I'll make the necessary changes. ", "@lhoestq I'm assuming this was also the case for torchaudio objects?", "We're not using torchaudio but soundfile. But anyway we unfortunately decode full audio files instead of returning a Reader and it can be interesting to fix this. Currently it always returns a dict {\"array\": np.array(...), \"sampling_rate\": int(...)}, while it would be cool to return a reader with seek() and read() - like methods as for videos.\n\n(there is a way to make the audio change backward compatible anyway by allowing `reader[\"array\"]` to return the full array)", "@lhoestq (sorry for the spam btw)\nLooks like there's a # TODO to have these returned as np.arrays instead. I'm curious why the authors didn't do it initially. Maybe a performance thing?\nThis is from `/src/datasets/formatting/np_formatter.py` line 70\n```\nif config.TORCHVISION_AVAILABLE and \"torchvision\" in sys.modules:\n from torchvision.io import VideoReader\n\n if isinstance(value, VideoReader):\n return value # TODO(QL): set output to np arrays ?\n```", "Oh cool ya this is something that I could implement with torchcodec. I can add that to the PR as well.", "> Looks like there's a # TODO to have these returned as np.arrays instead. I'm curious why the authors didn't do it initially. Maybe a performance thing?\n\nyea that was me, I focused on a simple logic to start with, since I knew there was torchcodec coming and maybe wasn't worth it at the time ^^\n\nbut anyway it's fine to start with a logic without formatting to start with and then iterate", "Hey @lhoestq I ran into an error with this test case for the Audio feature\n\n```\n@require_sndfile\n@require_torchcodec\ndef test_dataset_with_audio_feature_map_is_decoded(shared_datadir):\n audio_path = str(shared_datadir / \"test_audio_44100.wav\")\n data = {\"audio\": [audio_path], \"text\": [\"Hello\"]}\n features = Features({\"audio\": Audio(), \"text\": Value(\"string\")})\n dset = Dataset.from_dict(data, features=features)\n\n def process_audio_sampling_rate_by_example(example):\n sample_rate = example[\"audio\"].get_all_samples().sample_rate\n example[\"double_sampling_rate\"] = 2 * sample_rate\n return example\n\n decoded_dset = dset.map(process_audio_sampling_rate_by_example)\n for item in decoded_dset.cast_column(\"audio\", Audio(decode=False)):\n assert item.keys() == {\"audio\", \"text\", \"double_sampling_rate\"}\n assert item[\"double_sampling_rate\"] == 88200\n\n def process_audio_sampling_rate_by_batch(batch):\n double_sampling_rates = []\n for audio in batch[\"audio\"]:\n double_sampling_rates.append(2 * audio.get_all_samples().sample_rate)\n batch[\"double_sampling_rate\"] = double_sampling_rates\n return batch\n\n decoded_dset = dset.map(process_audio_sampling_rate_by_batch, batched=True)\n for item in decoded_dset.cast_column(\"audio\", Audio(decode=False)):\n assert item.keys() == {\"audio\", \"text\", \"double_sampling_rate\"}\n assert item[\"double_sampling_rate\"] == 88200\n```\n\nthis is the error below\n```\nsrc/datasets/arrow_writer.py:626: in write_batch\n arrays.append(pa.array(typed_sequence))\n.....\nFAILED tests/features/test_audio.py::test_dataset_with_audio_feature_map_is_decoded - pyarrow.lib.ArrowInvalid: Could not convert <torchcodec.decoders._audio_decoder.AudioDecoder object at 0x138cdd810> with type AudioDecoder: did not recognize Python value type when inferring an Arrow data type\n```\n\nBy the way I copied the test case and ran it on the original implementation of the Video feature, which uses the torchvision backend and I got a similar error.\n```\ndef test_dataset_with_video_feature_map_is_decoded(shared_datadir):\n video_path = str(shared_datadir / \"test_video_66x50.mov\")\n data = {\"video\": [video_path], \"text\": [\"Hello\"]}\n features = Features({\"video\": Video(), \"text\": Value(\"string\")})\n dset = Dataset.from_dict(data, features=features)\n\n def process_audio_sampling_rate_by_example(example):\n metadata = example[\"video\"].get_metadata()\n example[\"double_fps\"] = 2 * metadata[\"video\"][\"fps\"][0]\n return example\n\n decoded_dset = dset.map(process_audio_sampling_rate_by_example)\n for item in decoded_dset.cast_column(\"video\", Video(decode=False)):\n assert item.keys() == {\"video\", \"text\", \"double_fps\"}\n assert item[\"double_fps\"] == 2 * 10 # prollly wont work past 2*10 is made up!! shouldn't pass\n\n def process_audio_sampling_rate_by_batch(batch):\n double_fps = []\n for video in batch[\"video\"]:\n double_fps.append(2 * video.metadata.begin_stream_seconds)\n batch[\"double_fps\"] = double_fps\n return batch\n\n decoded_dset = dset.map(process_audio_sampling_rate_by_batch, batched=True)\n for item in decoded_dset.cast_column(\"video\", Video(decode=False)):\n assert item.keys() == {\"video\", \"text\", \"double_fps\"}\n assert item[\"double_fps\"] == 2 * 10 # prollly wont work past this no reason it should\n```\n\nI was wondering if these error's are expected. They seem to be coming from the fact that the function `_cast_to_python_objects` in `src/datasets/features/features.py` doesn't handle VideoDecoders or AudioDecoders. I was able to fix it and get rid of the error by adding this to the bottom of the function\n```\n elif config.TORCHCODEC_AVAILABLE and \"torchcodec\" in sys.modules and isinstance(obj, VideoDecoder):\n v = Video()\n return v.encode_example(obj), True\n elif config.TORCHCODEC_AVAILABLE and \"torchcodec\" in sys.modules and isinstance(obj, AudioDecoder):\n a = Audio()\n return a.encode_example(obj), True\n```\nThis fixed it, but I just want to make sure I'm not adding things that are messing up the intended functionality.", "This is the right fix ! :)", "Btw I just remembered that we were using soundfile because it can support a wide range of audio formats, is it also the case for torchcodec ? including ogg, opus for example", "Yes from what I understand torchcodec supports everything ffmpeg supports.", "Okay just finished. However, I wasn't able to pass this test case:\n```python\n@require_torchcodec\n@require_sndfile\[email protected](\"streaming\", [False, True])\ndef test_load_dataset_with_audio_feature(streaming, jsonl_audio_dataset_path, shared_datadir):\n from torchcodec.decoders import AudioDecoder\n audio_path = str(shared_datadir / \"test_audio_44100.wav\")\n data_files = jsonl_audio_dataset_path\n features = Features({\"audio\": Audio(), \"text\": Value(\"string\")})\n dset = load_dataset(\"json\", split=\"train\", data_files=data_files, features=features, streaming=streaming)\n item = dset[0] if not streaming else next(iter(dset))\n assert item.keys() == {\"audio\", \"text\"}\n assert isinstance(item[\"audio\"], AudioDecoder)\n samples = item[\"audio\"].get_all_samples()\n assert samples.sample_rate == 44100\n assert samples.data.shape == (1, 202311)\n```\n\nIt returned this error\n```\nstreaming = False, jsonl_audio_dataset_path = '/private/var/folders/47/c7dlgs_n6lx8rtr8f5w5m1m00000gn/T/pytest-of-tytodd/pytest-103/data2/audio_dataset.jsonl'\nshared_datadir = PosixPath('/private/var/folders/47/c7dlgs_n6lx8rtr8f5w5m1m00000gn/T/pytest-of-tytodd/pytest-103/test_load_dataset_with_audio_f0/data')\n\n @require_torchcodec\n @require_sndfile\n @pytest.mark.parametrize(\"streaming\", [False, True])\n def test_load_dataset_with_audio_feature(streaming, jsonl_audio_dataset_path, shared_datadir):\n from torchcodec.decoders import AudioDecoder\n audio_path = str(shared_datadir / \"test_audio_44100.wav\")\n data_files = jsonl_audio_dataset_path\n features = Features({\"audio\": Audio(), \"text\": Value(\"string\")})\n> dset = load_dataset(\"json\", split=\"train\", data_files=data_files, features=features, streaming=streaming)\n\ntests/features/test_audio.py:686: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _\nsrc/datasets/load.py:1418: in load_dataset\n builder_instance.download_and_prepare(\nsrc/datasets/builder.py:925: in download_and_prepare\n self._download_and_prepare(\nsrc/datasets/builder.py:1019: in _download_and_prepare\n verify_splits(self.info.splits, split_dict)\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _\n\nexpected_splits = {'train': SplitInfo(name='train', num_bytes=2351563, num_examples=10000, shard_lengths=None, dataset_name=None), 'validation': SplitInfo(name='validation', num_bytes=238418, num_examples=1000, shard_lengths=None, dataset_name=None)}\nrecorded_splits = {'train': SplitInfo(name='train', num_bytes=167, num_examples=1, shard_lengths=None, dataset_name='json')}\n\n def verify_splits(expected_splits: Optional[dict], recorded_splits: dict):\n if expected_splits is None:\n logger.info(\"Unable to verify splits sizes.\")\n return\n if len(set(expected_splits) - set(recorded_splits)) > 0:\n> raise ExpectedMoreSplitsError(str(set(expected_splits) - set(recorded_splits)))\nE datasets.exceptions.ExpectedMoreSplitsError: {'validation'}\n\nsrc/datasets/utils/info_utils.py:68: ExpectedMoreSplitsError\n```\n\nIt looks like this test case wasn't passing when I forked the repo, so I assume I didn't do anything to break it. I also added this case to `test_video.py`, and it fails there as well. If this looks good, I'll go ahead and submit the PR.", "Awesome ! yes feel free to submit the PR, I can see what I can do for the remaining tests", "@lhoestq just submitted it #7616 " ]
https://api.github.com/repos/huggingface/datasets/issues/7600
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7600/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7600/comments
https://api.github.com/repos/huggingface/datasets/issues/7600/events
https://github.com/huggingface/datasets/issues/7600
3,127,296,182
I_kwDODunzps66ZsC2
7,600
`push_to_hub` is not concurrency safe (dataset schema corruption)
[]
closed
false
null
[]
null
4
1,749
1,753
1,753
NONE
null
null
### Describe the bug Concurrent processes modifying and pushing a dataset can overwrite each others' dataset card, leaving the dataset unusable. Consider this scenario: - we have an Arrow dataset - there are `N` configs of the dataset - there are `N` independent processes operating on each of the individual configs (e.g. adding a column, `new_col`) - each process calls `push_to_hub` on their particular config when they're done processing - all calls to `push_to_hub` succeed - the `README.md` now has some configs with `new_col` added and some with `new_col` missing Any attempt to load a config (using `load_dataset`) where `new_col` is missing will fail because of a schema mismatch between `README.md` and the Arrow files. Fixing the dataset requires updating `README.md` by hand with the correct schema for the affected config. In effect, `push_to_hub` is doing a `git push --force` (I found this behavior quite surprising). We have hit this issue every time we run processing jobs over our datasets and have to fix corrupted schemas by hand. Reading through the code, it seems that specifying a [`parent_commit`](https://github.com/huggingface/huggingface_hub/blob/v0.32.4/src/huggingface_hub/hf_api.py#L4587) hash around here https://github.com/huggingface/datasets/blob/main/src/datasets/arrow_dataset.py#L5794 would get us to a normal, non-forced git push, and avoid schema corruption. I'm not familiar enough with the code to know how to determine the commit hash from which the in-memory dataset card was loaded. ### Steps to reproduce the bug See above. ### Expected behavior Concurrent edits to disjoint configs of a dataset should never corrupt the dataset schema. ### Environment info - `datasets` version: 2.20.0 - Platform: Linux-5.15.0-118-generic-x86_64-with-glibc2.35 - Python version: 3.10.14 - `huggingface_hub` version: 0.30.2 - PyArrow version: 19.0.1 - Pandas version: 2.2.2 - `fsspec` version: 2023.9.0
null
https://api.github.com/repos/huggingface/datasets/issues/7600/timeline
null
completed
sharvil
391,004
MDQ6VXNlcjM5MTAwNA==
https://avatars.githubusercontent.com/u/391004?v=4
https://api.github.com/users/sharvil
https://github.com/sharvil
https://api.github.com/users/sharvil/followers
https://api.github.com/users/sharvil/following{/other_user}
https://api.github.com/users/sharvil/gists{/gist_id}
https://api.github.com/users/sharvil/starred{/owner}{/repo}
https://api.github.com/users/sharvil/subscriptions
https://api.github.com/users/sharvil/orgs
https://api.github.com/users/sharvil/repos
https://api.github.com/users/sharvil/events{/privacy}
https://api.github.com/users/sharvil/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7600/reactions
5
5
0
0
0
0
0
0
0
null
null
null
null
null
null
lhoestq
42,851,186
MDQ6VXNlcjQyODUxMTg2
https://avatars.githubusercontent.com/u/42851186?v=4
https://api.github.com/users/lhoestq
https://github.com/lhoestq
https://api.github.com/users/lhoestq/followers
https://api.github.com/users/lhoestq/following{/other_user}
https://api.github.com/users/lhoestq/gists{/gist_id}
https://api.github.com/users/lhoestq/starred{/owner}{/repo}
https://api.github.com/users/lhoestq/subscriptions
https://api.github.com/users/lhoestq/orgs
https://api.github.com/users/lhoestq/repos
https://api.github.com/users/lhoestq/events{/privacy}
https://api.github.com/users/lhoestq/received_events
User
public
false
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[ "@lhoestq can you please take a look? I've submitted a PR that fixes this issue. Thanks.", "Thanks for the ping ! As I said in https://github.com/huggingface/datasets/pull/7605 there is maybe a more general approach using retries :)", "Dropping this due to inactivity; we've implemented push_to_hub outside of HF datasets that's concurrency safe. Feel free to use the code I provided as a starting point if there's still interest in addressing this issue.", "Exploring another fix here: https://github.com/huggingface/datasets/issues/7600" ]
https://api.github.com/repos/huggingface/datasets/issues/7599
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7599/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7599/comments
https://api.github.com/repos/huggingface/datasets/issues/7599/events
https://github.com/huggingface/datasets/issues/7599
3,125,620,119
I_kwDODunzps66TS2X
7,599
My already working dataset (when uploaded few months ago) now is ignoring metadata.jsonl
[]
closed
false
null
[]
null
3
1,749
1,750
1,750
NONE
null
null
### Describe the bug Hi everyone, I uploaded my dataset https://huggingface.co/datasets/PRAIG/SMB a few months ago while I was waiting for a conference acceptance response. Without modifying anything in the dataset repository now the Dataset viewer is not rendering the metadata.jsonl annotations, neither it is being downloaded when using load_dataset. Can you please help? Thank you in advance. ### Steps to reproduce the bug from datasets import load_dataset ds = load_dataset("PRAIG/SMB") ds = ds["train"] ### Expected behavior It is expected to have all the metadata available in the jsonl file. Fields like: "score_id", "original_width", "original_height", "regions"... among others. ### Environment info datasets==3.6.0, python 3.13.3 (but he problem is already in the huggingface dataset page)
null
https://api.github.com/repos/huggingface/datasets/issues/7599/timeline
null
completed
JuanCarlosMartinezSevilla
97,530,443
U_kgDOBdAySw
https://avatars.githubusercontent.com/u/97530443?v=4
https://api.github.com/users/JuanCarlosMartinezSevilla
https://github.com/JuanCarlosMartinezSevilla
https://api.github.com/users/JuanCarlosMartinezSevilla/followers
https://api.github.com/users/JuanCarlosMartinezSevilla/following{/other_user}
https://api.github.com/users/JuanCarlosMartinezSevilla/gists{/gist_id}
https://api.github.com/users/JuanCarlosMartinezSevilla/starred{/owner}{/repo}
https://api.github.com/users/JuanCarlosMartinezSevilla/subscriptions
https://api.github.com/users/JuanCarlosMartinezSevilla/orgs
https://api.github.com/users/JuanCarlosMartinezSevilla/repos
https://api.github.com/users/JuanCarlosMartinezSevilla/events{/privacy}
https://api.github.com/users/JuanCarlosMartinezSevilla/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7599/reactions
0
0
0
0
0
0
0
0
0
null
null
null
null
null
null
JuanCarlosMartinezSevilla
97,530,443
U_kgDOBdAySw
https://avatars.githubusercontent.com/u/97530443?v=4
https://api.github.com/users/JuanCarlosMartinezSevilla
https://github.com/JuanCarlosMartinezSevilla
https://api.github.com/users/JuanCarlosMartinezSevilla/followers
https://api.github.com/users/JuanCarlosMartinezSevilla/following{/other_user}
https://api.github.com/users/JuanCarlosMartinezSevilla/gists{/gist_id}
https://api.github.com/users/JuanCarlosMartinezSevilla/starred{/owner}{/repo}
https://api.github.com/users/JuanCarlosMartinezSevilla/subscriptions
https://api.github.com/users/JuanCarlosMartinezSevilla/orgs
https://api.github.com/users/JuanCarlosMartinezSevilla/repos
https://api.github.com/users/JuanCarlosMartinezSevilla/events{/privacy}
https://api.github.com/users/JuanCarlosMartinezSevilla/received_events
User
public
false
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[ "Maybe its been a recent update, but i can manage to load the metadata.jsonl separately from the images with:\n\n```\nmetadata = load_dataset(\"PRAIG/SMB\", split=\"train\", data_files=[\"*.jsonl\"])\nimages = load_dataset(\"PRAIG/SMB\", split=\"train\")\n```\nDo you know it this is an expected behaviour? This makes my dataset viewer to only load the images without the labeling of metadata.jsonl.\n\nThanks", "Hi ! this is because we now expect the metadata file to be inside the directory named after the split \"train\" (this way each split can have its own metadata and can be loaded independently)\n\nYou can fix that by configuring it explicitly in the dataset's README.md header:\n\n```yaml\nconfigs:\n- config_name: default\n data_files:\n - split: train\n path:\n - \"train/**/*.png\"\n - \"metadata.jsonl\"\n```\n\n(or by moving the metadata.jsonl in train/ but in this case you also have to modify the content of the JSONL to fix the relative paths to the images)", "Thank you very much, dataset viewer is already working as expected!!" ]
https://api.github.com/repos/huggingface/datasets/issues/7597
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7597/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7597/comments
https://api.github.com/repos/huggingface/datasets/issues/7597/events
https://github.com/huggingface/datasets/issues/7597
3,123,962,709
I_kwDODunzps66M-NV
7,597
Download datasets from a private hub in 2025
[ { "id": 1935892871, "node_id": "MDU6TGFiZWwxOTM1ODkyODcx", "url": "https://api.github.com/repos/huggingface/datasets/labels/enhancement", "name": "enhancement", "color": "a2eeef", "default": true, "description": "New feature or request" } ]
closed
false
null
[]
null
2
1,749
1,749
1,749
NONE
null
null
### Feature request In the context of a private hub deployment, customers would like to use load_dataset() to load datasets from their hub, not from the public hub. This doesn't seem to be configurable at the moment and it would be nice to add this feature. The obvious workaround is to clone the repo first and then load it from local storage, but this adds an extra step. It'd be great to have the same experience regardless of where the hub is hosted. This issue was raised before here: https://github.com/huggingface/datasets/issues/3679 @juliensimon ### Motivation none ### Your contribution none
null
https://api.github.com/repos/huggingface/datasets/issues/7597/timeline
null
completed
DanielSchuhmacher
178,552,926
U_kgDOCqSAXg
https://avatars.githubusercontent.com/u/178552926?v=4
https://api.github.com/users/DanielSchuhmacher
https://github.com/DanielSchuhmacher
https://api.github.com/users/DanielSchuhmacher/followers
https://api.github.com/users/DanielSchuhmacher/following{/other_user}
https://api.github.com/users/DanielSchuhmacher/gists{/gist_id}
https://api.github.com/users/DanielSchuhmacher/starred{/owner}{/repo}
https://api.github.com/users/DanielSchuhmacher/subscriptions
https://api.github.com/users/DanielSchuhmacher/orgs
https://api.github.com/users/DanielSchuhmacher/repos
https://api.github.com/users/DanielSchuhmacher/events{/privacy}
https://api.github.com/users/DanielSchuhmacher/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7597/reactions
0
0
0
0
0
0
0
0
0
null
null
null
null
null
null
DanielSchuhmacher
178,552,926
U_kgDOCqSAXg
https://avatars.githubusercontent.com/u/178552926?v=4
https://api.github.com/users/DanielSchuhmacher
https://github.com/DanielSchuhmacher
https://api.github.com/users/DanielSchuhmacher/followers
https://api.github.com/users/DanielSchuhmacher/following{/other_user}
https://api.github.com/users/DanielSchuhmacher/gists{/gist_id}
https://api.github.com/users/DanielSchuhmacher/starred{/owner}{/repo}
https://api.github.com/users/DanielSchuhmacher/subscriptions
https://api.github.com/users/DanielSchuhmacher/orgs
https://api.github.com/users/DanielSchuhmacher/repos
https://api.github.com/users/DanielSchuhmacher/events{/privacy}
https://api.github.com/users/DanielSchuhmacher/received_events
User
public
false
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[ "Hi ! First, and in the general case, Hugging Face does offer to host private datasets, and with a subscription you can even choose the region in which the repositories are hosted (US, EU)\n\nThen if you happen to have a private deployment, you can set the HF_ENDPOINT environment variable (same as in https://github.com/huggingface/transformers/issues/38634)", "Thank you @lhoestq. Works as described!" ]
https://api.github.com/repos/huggingface/datasets/issues/7594
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7594/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7594/comments
https://api.github.com/repos/huggingface/datasets/issues/7594/events
https://github.com/huggingface/datasets/issues/7594
3,120,799,626
I_kwDODunzps66A5-K
7,594
Add option to ignore keys/columns when loading a dataset from jsonl(or any other data format)
[ { "id": 1935892871, "node_id": "MDU6TGFiZWwxOTM1ODkyODcx", "url": "https://api.github.com/repos/huggingface/datasets/labels/enhancement", "name": "enhancement", "color": "a2eeef", "default": true, "description": "New feature or request" } ]
open
false
null
[]
null
8
1,749
1,751
null
NONE
null
null
### Feature request Hi, I would like the option to ignore keys/columns when loading a dataset from files (e.g. jsonl). ### Motivation I am working on a dataset which is built on jsonl. It seems the dataset is unclean and a column has different types in each row. I can't clean this or remove the column (It is not my data and it is too big for me to clean and save on my own hardware). I would like the option to just ignore this column when using `load_dataset`, since i don't need it. I tried to look if this is already possible but couldn't find a solution. if there is I would love some help. If it is not currently possible, I would love this feature ### Your contribution I don't think I can help this time, unfortunately.
null
https://api.github.com/repos/huggingface/datasets/issues/7594/timeline
null
null
avishaiElmakies
36,810,152
MDQ6VXNlcjM2ODEwMTUy
https://avatars.githubusercontent.com/u/36810152?v=4
https://api.github.com/users/avishaiElmakies
https://github.com/avishaiElmakies
https://api.github.com/users/avishaiElmakies/followers
https://api.github.com/users/avishaiElmakies/following{/other_user}
https://api.github.com/users/avishaiElmakies/gists{/gist_id}
https://api.github.com/users/avishaiElmakies/starred{/owner}{/repo}
https://api.github.com/users/avishaiElmakies/subscriptions
https://api.github.com/users/avishaiElmakies/orgs
https://api.github.com/users/avishaiElmakies/repos
https://api.github.com/users/avishaiElmakies/events{/privacy}
https://api.github.com/users/avishaiElmakies/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7594/reactions
0
0
0
0
0
0
0
0
0
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[ "Good point, I'd be in favor of having the `columns` argument in `JsonConfig` (and the others) to align with `ParquetConfig` to let users choose which columns to load and ignore the rest", "Is it possible to ignore columns when using parquet? ", "Yes, you can pass `columns=...` to load_dataset to select which columns to load, and it is passed to `ParquetConfig` :)", "Ok, i didn't know that. \nAnyway, it would be good to add this to others", "Hi @lhoestq \n\nI'd like to take this up!\n\nAs you suggested, I’ll extend the support for the columns parameter (currently used in ParquetConfig) to JsonConfig as well. This will allow users to selectively load specific keys/columns from .jsonl (or .json) files and ignore the rest — solving the type inconsistency issues in unclean datasets.", "Hi @avishaiElmakies and @lhoestq \n\nJust wanted to let you know that this is now implemented in #7594\nAs suggested, support for the `columns=...` argument (previously available for Parquet) has now been extended to **JSON and JSONL** loading via `load_dataset(...)`. You can now load only specific keys/columns and skip the rest — which should help in cases where some fields are unclean, inconsistent, or just unnecessary.\n\n### ✅ Example:\n\n```python\nfrom datasets import load_dataset\n\ndataset = load_dataset(\"json\", data_files=\"your_data.jsonl\", columns=[\"id\", \"title\"])\nprint(dataset[\"train\"].column_names)\n# Output: ['id', 'title']\n```\n\n### 🔧 Summary of changes:\n\n* Added `columns: Optional[List[str]]` to `JsonConfig`\n* Updated `_generate_tables()` to filter selected columns\n* Forwarded `columns` argument from `load_dataset()` to the config\n* Added test case to validate behavior\n\nLet me know if you'd like the same to be added for CSV or others as a follow-up — happy to help.", "@ArjunJagdale this looks great! Thanks!\nI believe that every format that is supported by `datasets` should probably have this feature since it is very useful and will streamline the api (people will know that they can just use `columns` to select the columns they want, and it will not be dependent on the data format) ", "Thanks @avishaiElmakies — totally agree, making `columns=...` support consistent across all formats would be really helpful for users." ]
https://api.github.com/repos/huggingface/datasets/issues/7591
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7591/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7591/comments
https://api.github.com/repos/huggingface/datasets/issues/7591/events
https://github.com/huggingface/datasets/issues/7591
3,117,816,388
I_kwDODunzps651hpE
7,591
Add num_proc parameter to push_to_hub
[ { "id": 1935892871, "node_id": "MDU6TGFiZWwxOTM1ODkyODcx", "url": "https://api.github.com/repos/huggingface/datasets/labels/enhancement", "name": "enhancement", "color": "a2eeef", "default": true, "description": "New feature or request" } ]
closed
false
null
[]
null
4
1,749
1,756
1,756
NONE
null
null
### Feature request A number of processes parameter to the dataset.push_to_hub method ### Motivation Shards are currently uploaded serially which makes it slow for many shards, uploading can be done in parallel and much faster
null
https://api.github.com/repos/huggingface/datasets/issues/7591/timeline
null
completed
SwayStar123
46,050,679
MDQ6VXNlcjQ2MDUwNjc5
https://avatars.githubusercontent.com/u/46050679?v=4
https://api.github.com/users/SwayStar123
https://github.com/SwayStar123
https://api.github.com/users/SwayStar123/followers
https://api.github.com/users/SwayStar123/following{/other_user}
https://api.github.com/users/SwayStar123/gists{/gist_id}
https://api.github.com/users/SwayStar123/starred{/owner}{/repo}
https://api.github.com/users/SwayStar123/subscriptions
https://api.github.com/users/SwayStar123/orgs
https://api.github.com/users/SwayStar123/repos
https://api.github.com/users/SwayStar123/events{/privacy}
https://api.github.com/users/SwayStar123/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7591/reactions
2
2
0
0
0
0
0
0
0
null
null
null
null
null
null
lhoestq
42,851,186
MDQ6VXNlcjQyODUxMTg2
https://avatars.githubusercontent.com/u/42851186?v=4
https://api.github.com/users/lhoestq
https://github.com/lhoestq
https://api.github.com/users/lhoestq/followers
https://api.github.com/users/lhoestq/following{/other_user}
https://api.github.com/users/lhoestq/gists{/gist_id}
https://api.github.com/users/lhoestq/starred{/owner}{/repo}
https://api.github.com/users/lhoestq/subscriptions
https://api.github.com/users/lhoestq/orgs
https://api.github.com/users/lhoestq/repos
https://api.github.com/users/lhoestq/events{/privacy}
https://api.github.com/users/lhoestq/received_events
User
public
false
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[ "Hi @SwayStar123 \n\nI'd be interested in taking this up. I plan to add a `num_proc` parameter to `push_to_hub()` and use parallel uploads for shards using `concurrent.futures`. Will explore whether `ThreadPoolExecutor` or `ProcessPoolExecutor` is more suitable based on current implementation. Let me know if that sounds good!\n", "Just a quick update — `push_to_hub()` already had the `num_proc` argument in its signature and was correctly passing it internally to `_push_parquet_shards_to_hub()`.\n\nThe actual change required was inside `_push_parquet_shards_to_hub()` to enable parallel shard uploads using `multiprocessing` when `num_proc > 1`.\n\n@lhoestq @SwayStar123 ", "> Hi @SwayStar123 \n> \n> I'd be interested in taking this up. I plan to add a `num_proc` parameter to `push_to_hub()` and use parallel uploads for shards using `concurrent.futures`. Will explore whether `ThreadPoolExecutor` or `ProcessPoolExecutor` is more suitable based on current implementation. Let me know if that sounds good!\n> \n\nHey thanks for working on it. But I'm not a hf dev so I don't know the best way to do it.", "done in https://github.com/huggingface/datasets/pull/7606" ]
https://api.github.com/repos/huggingface/datasets/issues/7590
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7590/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7590/comments
https://api.github.com/repos/huggingface/datasets/issues/7590/events
https://github.com/huggingface/datasets/issues/7590
3,101,654,892
I_kwDODunzps64339s
7,590
`Sequence(Features(...))` causes PyArrow cast error in `load_dataset` despite correct schema.
[]
closed
false
null
[]
null
6
1,748
1,752
1,752
NONE
null
null
### Description When loading a dataset with a field declared as a list of structs using `Sequence(Features(...))`, `load_dataset` incorrectly infers the field as a plain `struct<...>` instead of a `list<struct<...>>`. This leads to the following error: ``` ArrowNotImplementedError: Unsupported cast from list<item: struct<id: string, data: string>> to struct using function cast_struct ``` This occurs even when the `features` schema is explicitly provided and the dataset format supports nested structures natively (e.g., JSON, JSONL). --- ### Minimal Reproduction [Colab Link.](https://colab.research.google.com/drive/1FZPQy6TP3jVd4B3mYKyfQaWNuOAvljUq?usp=sharing) #### Dataset ```python data = [ { "list": [ {"id": "example1", "data": "text"}, ] }, ] ``` #### Schema ```python from datasets import Features, Sequence, Value item = Features({ "id": Value("string"), "data": Value("string"), }) features = Features({ "list": Sequence(item), }) ``` --- ### Tested File Formats The same schema was tested across different formats: | Format | Method | Result | | --------- | --------------------------- | ------------------- | | JSONL | `load_dataset("json", ...)` | Arrow cast error | | JSON | `load_dataset("json", ...)` | Arrow cast error | | In-memory | `Dataset.from_list(...)` | Works as expected | The issue seems not to be in the schema or the data, but in how `load_dataset()` handles the `Sequence(Features(...))` pattern when parsing from files (specifically JSON and JSONL). --- ### Expected Behavior If `features` is explicitly defined as: ```python Features({"list": Sequence(Features({...}))}) ``` Then the data should load correctly across all backends — including from JSON and JSONL — without any Arrow casting errors. This works correctly when loading from memory via `Dataset.from_list`. --- ### Environment * `datasets`: 3.6.0 * `pyarrow`: 20.0.0 * Python: 3.12.10 * OS: Ubuntu 24.04.2 LTS * Notebook: \[Colab test notebook available] ---
null
https://api.github.com/repos/huggingface/datasets/issues/7590/timeline
null
completed
AHS-uni
183,279,820
U_kgDOCuygzA
https://avatars.githubusercontent.com/u/183279820?v=4
https://api.github.com/users/AHS-uni
https://github.com/AHS-uni
https://api.github.com/users/AHS-uni/followers
https://api.github.com/users/AHS-uni/following{/other_user}
https://api.github.com/users/AHS-uni/gists{/gist_id}
https://api.github.com/users/AHS-uni/starred{/owner}{/repo}
https://api.github.com/users/AHS-uni/subscriptions
https://api.github.com/users/AHS-uni/orgs
https://api.github.com/users/AHS-uni/repos
https://api.github.com/users/AHS-uni/events{/privacy}
https://api.github.com/users/AHS-uni/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7590/reactions
0
0
0
0
0
0
0
0
0
null
null
null
null
null
null
AHS-uni
183,279,820
U_kgDOCuygzA
https://avatars.githubusercontent.com/u/183279820?v=4
https://api.github.com/users/AHS-uni
https://github.com/AHS-uni
https://api.github.com/users/AHS-uni/followers
https://api.github.com/users/AHS-uni/following{/other_user}
https://api.github.com/users/AHS-uni/gists{/gist_id}
https://api.github.com/users/AHS-uni/starred{/owner}{/repo}
https://api.github.com/users/AHS-uni/subscriptions
https://api.github.com/users/AHS-uni/orgs
https://api.github.com/users/AHS-uni/repos
https://api.github.com/users/AHS-uni/events{/privacy}
https://api.github.com/users/AHS-uni/received_events
User
public
false
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[ "Hi @lhoestq \n\nCould you help confirm whether this qualifies as a bug?\n\nIt looks like the issue stems from how `Sequence(Features(...))` is interpreted as a plain struct during schema inference, which leads to a mismatch when casting with PyArrow (especially with nested structs inside lists). From the description, this seems like an inconsistency with expected behavior.\n\nIf confirmed, I’d be happy to take a shot at investigating and potentially submitting a fix.\n\nAlso looping in @AHS-uni — could you kindly share a minimal JSONL example that reproduces this?\n\nThanks!", "Hello @Flink-ddd \n\nI updated the minimal example and included both JSON and JSONL minimal examples in the Colab notebook. \n\nHere is the minimal JSON file for convenience (can't upload JSONL files).\n\n[mini.json](https://github.com/user-attachments/files/20535145/mini.json)\n\nI've also found a number of issues which describe a similar problem:\n\n[7569](https://github.com/huggingface/datasets/issues/7569) (Open)\n[7137](https://github.com/huggingface/datasets/issues/7137) (Open)\n[7501](https://github.com/huggingface/datasets/issues/7501) (Closed)\n[2434](https://github.com/huggingface/datasets/issues/2434) (Closed)\n\nThe closed issues don't really address the problem (IMO). [7501](https://github.com/huggingface/datasets/issues/7501) provides a workaround (using a Python list instead of `Sequence`), but it seem precarious. ", "Hi ! `Sequence({...})` corresponds to a struct of lists ([docs](https://huggingface.co/docs/datasets/v3.6.0/en/package_reference/main_classes#datasets.Features)). This come from Tensorflow Datasets.\n\nIf you want to use a list of structs, you should use `[{...}]`, e.g.\n\n```python\nitem = {\n \"id\": Value(\"string\"),\n \"data\": Value(\"string\"),\n}\n\nfeatures = Features({\n \"list\": [item],\n})\n```", "@lhoestq Thanks for your explanation, which helps me understand the logic behind. But I'm confused how to define that in `README.md`?\n\nMy jsonl data is: \n```\n{\"answers\": [{\"text\": \"text1\", \"label\": \"label1\"}, {\"text\": \"text2\", \"label\": \"label2\"},]}\n{\"answers\": [{\"text\": \"text1\", \"label\": \"label1\"}, {\"text\": \"text2\", \"label\": \"label2\"},]}\n...\n```\n\nMy README.md look like\n```\ndataset_info:\n- config_name: default\n features:\n - name: answers\n sequence:\n - name: text\n dtype: string\n - name: label\n dtype: string\n```\nI understand `sequence` here is not correct, but what's the correct format? I tried following (`sequence -> dtype`)and seems not the case:\n```\ndataset_info:\n- config_name: default\n features:\n - name: answers\n dtype:\n - name: text\n sequence: string\n - name: label\n sequence: string\n```", "The `List` type which doesn't have the weird dict behavior of `Sequence` has been added for `datasets` 4.0 (to be released next week). Feel free to install `datasets` from source to try it out :)\nEDIT: it's out !\n\nYou can fix the issue using `List` instead of `Sequence`, e.g. in the case of the original post:\n\n```python\n# Feature spec with List of structs\nitem = {\n \"id\": Value(\"string\"),\n \"data\": Value(\"string\"),\n}\n\nfeatures = Features({\n \"list\": List(item),\n})\n```\n\nfor which the README.md is\n\n```yaml\ndataset_info:\n- config_name: default\n features:\n - name: list\n list:\n - name: id\n dtype: string\n - name: data\n dtype: string\n```", "@lhoestq Thanks! I didn't realize there is a `list` keyword I could use. I thought I had to use `dtype` or something. Hope there could be better documentation on the `README.md` formats. I've closed my issue #7137 " ]
https://api.github.com/repos/huggingface/datasets/issues/7588
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7588/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7588/comments
https://api.github.com/repos/huggingface/datasets/issues/7588/events
https://github.com/huggingface/datasets/issues/7588
3,094,012,025
I_kwDODunzps64auB5
7,588
ValueError: Invalid pattern: '**' can only be an entire path component [Colab]
[]
closed
false
null
[]
null
5
1,748
1,748
1,748
NONE
null
null
### Describe the bug I have a dataset on HF [here](https://huggingface.co/datasets/kambale/luganda-english-parallel-corpus) that i've previously used to train a translation model [here](https://huggingface.co/kambale/pearl-11m-translate). now i changed a few hyperparameters to increase number of tokens for the model, increase Transformer layers, and all however, when i try to load the dataset, this error keeps coming up.. i have tried everything.. i have re-written the code a hundred times, and this keep coming up ### Steps to reproduce the bug Imports: ```bash !pip install datasets huggingface_hub fsspec ``` Python code: ```python from datasets import load_dataset HF_DATASET_NAME = "kambale/luganda-english-parallel-corpus" # Load the dataset try: if not HF_DATASET_NAME or HF_DATASET_NAME == "YOUR_HF_DATASET_NAME": raise ValueError( "Please provide a valid Hugging Face dataset name." ) dataset = load_dataset(HF_DATASET_NAME) # Omitted code as the error happens on the line above except ValueError as ve: print(f"Configuration Error: {ve}") raise except Exception as e: print(f"An error occurred while loading the dataset '{HF_DATASET_NAME}': {e}") raise e ``` now, i have tried going through this [issue](https://github.com/huggingface/datasets/issues/6737) and nothing helps ### Expected behavior loading the dataset successfully and perform splits (train, test, validation) ### Environment info from the imports, i do not install specific versions of these libraries, so the latest or available version is installed * `datasets` version: latest * `Platform`: Google Colab * `Hardware`: NVIDIA A100 GPU * `Python` version: latest * `huggingface_hub` version: latest * `fsspec` version: latest
null
https://api.github.com/repos/huggingface/datasets/issues/7588/timeline
null
completed
wkambale
43,061,081
MDQ6VXNlcjQzMDYxMDgx
https://avatars.githubusercontent.com/u/43061081?v=4
https://api.github.com/users/wkambale
https://github.com/wkambale
https://api.github.com/users/wkambale/followers
https://api.github.com/users/wkambale/following{/other_user}
https://api.github.com/users/wkambale/gists{/gist_id}
https://api.github.com/users/wkambale/starred{/owner}{/repo}
https://api.github.com/users/wkambale/subscriptions
https://api.github.com/users/wkambale/orgs
https://api.github.com/users/wkambale/repos
https://api.github.com/users/wkambale/events{/privacy}
https://api.github.com/users/wkambale/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7588/reactions
0
0
0
0
0
0
0
0
0
null
null
null
null
null
null
wkambale
43,061,081
MDQ6VXNlcjQzMDYxMDgx
https://avatars.githubusercontent.com/u/43061081?v=4
https://api.github.com/users/wkambale
https://github.com/wkambale
https://api.github.com/users/wkambale/followers
https://api.github.com/users/wkambale/following{/other_user}
https://api.github.com/users/wkambale/gists{/gist_id}
https://api.github.com/users/wkambale/starred{/owner}{/repo}
https://api.github.com/users/wkambale/subscriptions
https://api.github.com/users/wkambale/orgs
https://api.github.com/users/wkambale/repos
https://api.github.com/users/wkambale/events{/privacy}
https://api.github.com/users/wkambale/received_events
User
public
false
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[ "Could you please run the following code snippet in your environment and share the exact output? This will help check for any compatibility issues within the env itself. \n\n```\nimport datasets\nimport huggingface_hub\nimport fsspec\n\nprint(\"datasets version:\", datasets.__version__)\nprint(\"huggingface_hub version:\", huggingface_hub.__version__)\nprint(\"fsspec version:\", fsspec.__version__)\n```", "```bash\ndatasets version: 2.14.4\nhuggingface_hub version: 0.31.4\nfsspec version: 2025.3.2\n```", "Version 2.14.4 is not the latest version available, in fact it is from August 08, 2023 (you can check here: https://pypi.org/project/datasets/#history)\n\nUse pip install datasets==3.6.0 to install a more recent version (from May 7, 2025)\n\nI also had the same problem with Colab, after updating to the latest version it was solved.\n\nI hope it helps", "thank you @CleitonOERocha. it sure did help.\n\nupdating `datasets` to v3.6.0 and keeping `fsspec` on v2025.3.2 eliminates the issue.", "Very helpful, thank you!" ]
https://api.github.com/repos/huggingface/datasets/issues/7586
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7586/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7586/comments
https://api.github.com/repos/huggingface/datasets/issues/7586/events
https://github.com/huggingface/datasets/issues/7586
3,091,320,431
I_kwDODunzps64Qc5v
7,586
help is appreciated
[ { "id": 1935892871, "node_id": "MDU6TGFiZWwxOTM1ODkyODcx", "url": "https://api.github.com/repos/huggingface/datasets/labels/enhancement", "name": "enhancement", "color": "a2eeef", "default": true, "description": "New feature or request" } ]
open
false
null
[]
null
1
1,748
1,748
null
NONE
null
null
### Feature request https://github.com/rajasekarnp1/neural-audio-upscaler/tree/main ### Motivation ai model develpment and audio ### Your contribution ai model develpment and audio
null
https://api.github.com/repos/huggingface/datasets/issues/7586/timeline
null
null
rajasekarnp1
54,931,785
MDQ6VXNlcjU0OTMxNzg1
https://avatars.githubusercontent.com/u/54931785?v=4
https://api.github.com/users/rajasekarnp1
https://github.com/rajasekarnp1
https://api.github.com/users/rajasekarnp1/followers
https://api.github.com/users/rajasekarnp1/following{/other_user}
https://api.github.com/users/rajasekarnp1/gists{/gist_id}
https://api.github.com/users/rajasekarnp1/starred{/owner}{/repo}
https://api.github.com/users/rajasekarnp1/subscriptions
https://api.github.com/users/rajasekarnp1/orgs
https://api.github.com/users/rajasekarnp1/repos
https://api.github.com/users/rajasekarnp1/events{/privacy}
https://api.github.com/users/rajasekarnp1/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7586/reactions
0
0
0
0
0
0
0
0
0
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[ "how is this related to this repository ?" ]
https://api.github.com/repos/huggingface/datasets/issues/7584
https://api.github.com/repos/huggingface/datasets
https://api.github.com/repos/huggingface/datasets/issues/7584/labels{/name}
https://api.github.com/repos/huggingface/datasets/issues/7584/comments
https://api.github.com/repos/huggingface/datasets/issues/7584/events
https://github.com/huggingface/datasets/issues/7584
3,090,255,023
I_kwDODunzps64MYyv
7,584
Add LMDB format support
[ { "id": 1935892871, "node_id": "MDU6TGFiZWwxOTM1ODkyODcx", "url": "https://api.github.com/repos/huggingface/datasets/labels/enhancement", "name": "enhancement", "color": "a2eeef", "default": true, "description": "New feature or request" } ]
open
false
null
[]
null
1
1,748
1,748
null
NONE
null
null
### Feature request Add LMDB format support for large memory-mapping files ### Motivation Add LMDB format support for large memory-mapping files ### Your contribution I'm trying to add it
null
https://api.github.com/repos/huggingface/datasets/issues/7584/timeline
null
null
trotsky1997
30,512,160
MDQ6VXNlcjMwNTEyMTYw
https://avatars.githubusercontent.com/u/30512160?v=4
https://api.github.com/users/trotsky1997
https://github.com/trotsky1997
https://api.github.com/users/trotsky1997/followers
https://api.github.com/users/trotsky1997/following{/other_user}
https://api.github.com/users/trotsky1997/gists{/gist_id}
https://api.github.com/users/trotsky1997/starred{/owner}{/repo}
https://api.github.com/users/trotsky1997/subscriptions
https://api.github.com/users/trotsky1997/orgs
https://api.github.com/users/trotsky1997/repos
https://api.github.com/users/trotsky1997/events{/privacy}
https://api.github.com/users/trotsky1997/received_events
User
public
false
0
0
0
0
0
0
0
https://api.github.com/repos/huggingface/datasets/issues/7584/reactions
0
0
0
0
0
0
0
0
0
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
false
[ "Hi ! Can you explain what's your use case ? Is it about converting LMDB to Dataset objects (i.e. converting to Arrow) ?" ]