Dataset Viewer
Auto-converted to Parquet
id
int64
title
string
body
string
author
string
labels
list
created_at
timestamp[ns, tz=UTC]
comments_count
int64
url
string
year
int32
month
int32
title_length
int64
body_length
int64
actual_comments
int64
3,520,913,195
Building a dataset with large variable size arrays results in error ArrowInvalid: Value X too large to fit in C integer type
### Describe the bug I used map to store raw audio waveforms of variable lengths in a column of a dataset the `map` call fails with ArrowInvalid: Value X too large to fit in C integer type. ``` Traceback (most recent call last): Traceback (most recent call last): File "...lib/python3.12/site-packages/multiprocess/pool.py", line 125, in worker result = (True, func(*args, **kwds)) ^^^^^^^^^^^^^^^^^^^ File "...lib/python3.12/site-packages/datasets/utils/py_utils.py", line 678, in _write_generator_to_queue for i, result in enumerate(func(**kwargs)): ^^^^^^^^^^^^^^^^^^^^^^^^^ File "...lib/python3.12/site-packages/datasets/arrow_dataset.py", line 3526, in _map_single writer.write_batch(batch) File "...lib/python3.12/site-packages/datasets/arrow_writer.py", line 605, in write_batch arrays.append(pa.array(typed_sequence)) ^^^^^^^^^^^^^^^^^^^^^^^^ File "pyarrow/array.pxi", line 252, in pyarrow.lib.array File "pyarrow/array.pxi", line 114, in pyarrow.lib._handle_arrow_array_protocol File "...lib/python3.12/site-packages/datasets/arrow_writer.py", line 225, in __arrow_array__ out = list_of_np_array_to_pyarrow_listarray(data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "...lib/python3.12/site-packages/datasets/features/features.py", line 1538, in list_of_np_array_to_pyarrow_listarray return list_of_pa_arrays_to_pyarrow_listarray( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "...lib/python3.12/site-packages/datasets/features/features.py", line 1530, in list_of_pa_arrays_to_pyarrow_listarray offsets = pa.array(offsets, type=pa.int32()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "pyarrow/array.pxi", line 362, in pyarrow.lib.array File "pyarrow/array.pxi", line 87, in pyarrow.lib._ndarray_to_array File "pyarrow/error.pxi", line 92, in pyarrow.lib.check_status pyarrow.lib.ArrowInvalid: Value 2148479376 too large to fit in C integer type ``` ### Steps to reproduce the bug Calling map on a dataset that returns a column with long 1d numpy arrays of variable length. Example: ```python # %% import logging import datasets import pandas as pd import numpy as np # %% def process_batch(batch, rank): res = [] for _ in batch["id"]: res.append(np.zeros((2**30)).astype(np.uint16)) return {"audio": res} if __name__ == "__main__": df = pd.DataFrame( { "id": list(range(400)), } ) ds = datasets.Dataset.from_pandas(df) try: from multiprocess import set_start_method set_start_method("spawn") except RuntimeError: print("Spawn method already set, continuing...") mapped_ds = ds.map( process_batch, batched=True, batch_size=2, with_rank=True, num_proc=2, cache_file_name="path_to_cache/tmp.arrow", writer_batch_size=200, remove_columns=ds.column_names, # disable_nullable=True, ) ``` ### Expected behavior I think the offsets should be pa.int64() if needed and not forced to be `pa.int32()` in https://github.com/huggingface/datasets/blob/3e13d30823f8ec498d56adbc18c6880a5463b313/src/datasets/features/features.py#L1535 ### Environment info - `datasets` version: 3.3.1 - Platform: Linux-5.15.0-94-generic-x86_64-with-glibc2.35 - Python version: 3.12.9 - `huggingface_hub` version: 0.29.0 - PyArrow version: 19.0.1 - Pandas version: 2.2.3 - `fsspec` version: 2024.12.0
kkoutini
[]
2025-10-16T08:45:17
1
https://github.com/huggingface/datasets/issues/7821
2,025
10
124
3,517
0
3,517,086,110
Cannot download opus dataset
When I tried to download opus_books using: from datasets import load_dataset dataset = load_dataset("Helsinki-NLP/opus_books") I got the following errors: FileNotFoundError: Couldn't find any data file at /workspace/Helsinki-NLP/opus_books. Couldn't find 'Helsinki-NLP/opus_books' on the Hugging Face Hub either: LocalEntryNotFoundError: An error happened while trying to locate the file on the Hub and we cannot find the requested files in the local cache. Please check your connection and try again or make sure your Internet connection is on. I also tried: dataset = load_dataset("opus_books", "en-zh") and the errors remain the same. However, I can download "mlabonne/FineTome-100k" successfully. My datasets is version 4.2.0 Any clues? Big thanks.
liamsun2019
[]
2025-10-15T09:06:19
1
https://github.com/huggingface/datasets/issues/7819
2,025
10
28
758
0
3,515,887,618
train_test_split and stratify breaks with Numpy 2.0
### 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
davebulaval
[]
2025-10-15T00:01:19
1
https://github.com/huggingface/datasets/issues/7818
2,025
10
51
718
0
3,512,210,206
disable_progress_bar() not working as expected
### 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
windmaple
[]
2025-10-14T03:25:39
2
https://github.com/huggingface/datasets/issues/7816
2,025
10
46
799
0
3,503,446,288
Caching does not work when using python3.14
### 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
intexcor
[]
2025-10-10T15:36:46
2
https://github.com/huggingface/datasets/issues/7813
2,025
10
43
3,323
0
3,500,741,658
SIGSEGV when Python exits due to near null deref
### 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 ```
iankronquist
[]
2025-10-09T22:00:11
4
https://github.com/huggingface/datasets/issues/7811
2,025
10
48
2,733
0
3,498,534,596
Support scientific data formats
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
lhoestq
[]
2025-10-09T10:18:24
1
https://github.com/huggingface/datasets/issues/7804
2,025
10
31
285
0
3,497,454,119
[Docs] Missing documentation for `Dataset.from_dict`
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`] """ ```
aaronshenhao
[]
2025-10-09T02:54:41
2
https://github.com/huggingface/datasets/issues/7802
2,025
10
52
1,513
0
3,484,470,782
Audio dataset is not decoding on 4.1.1
### 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
thewh1teagle
[]
2025-10-05T06:37:50
3
https://github.com/huggingface/datasets/issues/7798
2,025
10
38
673
0
3,459,496,971
Cannot load dataset, fails with nested data conversions not implemented for chunked array outputs
### 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
neevparikh
[]
2025-09-27T01:03:12
1
https://github.com/huggingface/datasets/issues/7793
2,025
9
97
3,476
0
3,456,802,210
Concatenate IterableDataset instances and distribute underlying shards in a RoundRobin manner
### 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.
LTMeyer
[ "enhancement" ]
2025-09-26T10:05:19
17
https://github.com/huggingface/datasets/issues/7792
2,025
9
93
5,092
0
3,450,913,796
`Dataset.to_sql` doesn't utilize `num_proc`
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.
tcsmaster
[]
2025-09-24T20:34:47
0
https://github.com/huggingface/datasets/issues/7788
2,025
9
43
304
0
3,429,267,259
BIGPATENT dataset inaccessible (deprecated script loader)
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.
ishmaifan
[]
2025-09-18T08:25:34
2
https://github.com/huggingface/datasets/issues/7780
2,025
9
57
351
0
3,424,462,082
push_to_hub not overwriting but stuck in a loop when there are existing commits
### 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
Darejkal
[]
2025-09-17T03:15:35
4
https://github.com/huggingface/datasets/issues/7777
2,025
9
79
555
0
3,417,353,751
Error processing scalar columns using tensorflow.
`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()` ```
khteh
[]
2025-09-15T10:36:31
2
https://github.com/huggingface/datasets/issues/7772
2,025
9
49
987
0
3,411,654,444
Custom `dl_manager` in `load_dataset`
### 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.
ain-soph
[ "enhancement" ]
2025-09-12T19:06:23
0
https://github.com/huggingface/datasets/issues/7767
2,025
9
37
2,499
0
3,411,611,165
cast columns to Image/Audio/Video with `storage_options`
### 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
ain-soph
[ "enhancement" ]
2025-09-12T18:51:01
5
https://github.com/huggingface/datasets/issues/7766
2,025
9
56
868
0
3,411,556,378
polars dataset cannot cast column to Image/Audio/Video
### 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 ```
ain-soph
[]
2025-09-12T18:32:49
2
https://github.com/huggingface/datasets/issues/7765
2,025
9
54
1,492
0
3,401,799,485
Hugging Face Hub Dataset Upload CAS Error
### 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)
n-bkoe
[]
2025-09-10T10:01:19
4
https://github.com/huggingface/datasets/issues/7760
2,025
9
41
3,072
0
3,398,099,513
Comment/feature request: Huggingface 502s from GHA
This is no longer a pressing issue, but for completeness I am reporting that in August 26th, GET requests to `/static-proxy?url=https%3A%2F%2Fdatasets-server.huggingface.co%2Finfo%5C%3Fdataset%5C%3Dlivebench%2Fmath%60 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!
Scott-Simmons
[]
2025-09-09T11:59:20
0
https://github.com/huggingface/datasets/issues/7759
2,025
9
50
1,286
0
3,395,590,783
Option for Anonymous Dataset link
### 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)?
egrace479
[ "enhancement" ]
2025-09-08T20:20:10
0
https://github.com/huggingface/datasets/issues/7758
2,025
9
33
1,060
0
3,389,535,011
Add support for `.conll` file format in datasets
### 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.
namesarnav
[ "enhancement" ]
2025-09-06T07:25:39
1
https://github.com/huggingface/datasets/issues/7757
2,025
9
48
2,069
0
3,387,076,693
datasets.map(f, num_proc=N) hangs with N>1 when run on import
### 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
arjunguha
[]
2025-09-05T10:32:01
0
https://github.com/huggingface/datasets/issues/7756
2,025
9
61
1,039
0
3,381,831,487
datasets massively slows data reads, even in memory
### 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
lrast
[]
2025-09-04T01:45:24
2
https://github.com/huggingface/datasets/issues/7753
2,025
9
51
1,848
0
3,358,369,976
Dill version update
### 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 .
Navanit-git
[]
2025-08-27T07:38:30
2
https://github.com/huggingface/datasets/issues/7751
2,025
8
19
366
0
3,345,391,211
Fix: Canonical 'multi_news' dataset is broken and should be updated to a Parquet version
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!
Awesome075
[]
2025-08-22T12:52:03
1
https://github.com/huggingface/datasets/issues/7746
2,025
8
88
1,057
0
3,345,286,773
Audio mono argument no longer supported, despite class documentation
### 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
jheitz
[]
2025-08-22T12:15:41
1
https://github.com/huggingface/datasets/issues/7745
2,025
8
68
1,003
0
3,343,510,686
dtype: ClassLabel is not parsed correctly in `features.py`
`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' ```
cmatKhan
[]
2025-08-21T23:28:50
3
https://github.com/huggingface/datasets/issues/7744
2,025
8
58
4,875
0
3,336,704,928
module 'pyarrow' has no attribute 'PyExtensionType'
### 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
mnedelko
[]
2025-08-20T06:14:33
2
https://github.com/huggingface/datasets/issues/7742
2,025
8
51
1,983
0
3,334,848,656
Preserve tree structure when loading HDF5
### 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)
klamike
[ "enhancement" ]
2025-08-19T15:42:05
0
https://github.com/huggingface/datasets/issues/7741
2,025
8
41
368
0
3,331,537,762
Replacement of "Sequence" feature with "List" breaks backward compatibility
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.
evmaki
[]
2025-08-18T17:28:38
1
https://github.com/huggingface/datasets/issues/7739
2,025
8
75
806
0
3,328,948,690
Allow saving multi-dimensional ndarray with dynamic shapes
### 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.
ryan-minato
[ "enhancement" ]
2025-08-18T02:23:51
2
https://github.com/huggingface/datasets/issues/7738
2,025
8
58
1,828
0
3,304,979,299
Dataset Repo Paths to Locally Stored Images Not Being Appended to Image Path
### 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
dennys246
[]
2025-08-08T19:10:58
2
https://github.com/huggingface/datasets/issues/7733
2,025
8
76
5,250
0
3,304,673,383
webdataset: key errors when `field_name` has upper case characters
### 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 ```
YassineYousfi
[]
2025-08-08T16:56:42
0
https://github.com/huggingface/datasets/issues/7732
2,025
8
66
5,205
0
3,303,637,075
Add the possibility of a backend for audio decoding
### 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.
intexcor
[ "enhancement" ]
2025-08-08T11:08:56
2
https://github.com/huggingface/datasets/issues/7731
2,025
8
51
507
0
3,300,672,954
OSError: libcudart.so.11.0: cannot open shared object file: No such file or directory
> 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
SaleemMalikAI
[]
2025-08-07T14:07:23
1
https://github.com/huggingface/datasets/issues/7729
2,025
8
85
262
0
3,298,854,904
NonMatchingSplitsSizesError and ExpectedMoreSplitsError
### 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
efsotr
[]
2025-08-07T04:04:50
3
https://github.com/huggingface/datasets/issues/7728
2,025
8
55
1,329
0
3,295,718,578
config paths that start with ./ are not valid as hf:// accessed repos, but are valid when accessed locally
### 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
doctorpangloss
[]
2025-08-06T08:21:37
0
https://github.com/huggingface/datasets/issues/7727
2,025
8
106
925
0
3,292,315,241
Can not stepinto load_dataset.py?
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" -->
micklexqg
[]
2025-08-05T09:28:51
0
https://github.com/huggingface/datasets/issues/7724
2,025
8
33
220
0
3,289,943,261
Don't remove `trust_remote_code` arg!!!
### 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!
autosquid
[ "enhancement" ]
2025-08-04T15:42:07
0
https://github.com/huggingface/datasets/issues/7723
2,025
8
39
396
0

GitHub Issues Dataset

Dataset Description

This dataset contains 40 public GitHub issues collected from a repository of choice.
Although 100 issues were requested from the GitHub API, pull requests were excluded, reducing the dataset to 40 true issues.

It includes metadata about each issue, such as the author, creation date, labels, and content, as well as derived fields for analysis.

The dataset was created as part of a Task 1 Assessment for a data course, to demonstrate:

  • API data collection
  • Data augmentation
  • Publishing datasets on Hugging Face Hub

Dataset Features

Feature Name Type Description
id int64 Unique identifier of the GitHub issue
title string Issue title
body string Full text description of the issue
author string GitHub username of the issue creator
labels list of string Labels/tags associated with the issue
created_at timestamp[ns, tz=UTC] Date and time the issue was created
comments_count int64 Number of comments reported by GitHub API
url string Direct link to the GitHub issue
year int32 Year extracted from created_at
month int32 Month extracted from created_at
title_length int64 Number of characters in the title
body_length int64 Number of characters in the body
actual_comments int64 Count of comments fetched via API

Data Collection Method

  • Data was collected using the GitHub Issues API (requests library in Python).
  • Only public issues were retrieved; no private data or personally identifiable information was included.
  • Derived fields (year, month, title_length, body_length) were added for analysis purposes.
  • actual_comments was fetched from the issue comments endpoint to supplement the original comments_count.

Licensing

  • Data comes from public GitHub repositories, which are governed by GitHub’s Terms of Service.
  • This dataset itself is released under the MIT License, allowing reuse and modification.

Limitations

  • Small sample size: 40 issues only (after filtering out pull requests); not representative of all GitHub repositories.
  • Possible labeling bias, as labels depend on repository maintainer conventions.
  • Only issues in English were collected.
  • No guarantees on completeness; the dataset may contain truncated issue bodies.

Ethical Considerations

  • Only public data used.
  • No private, sensitive, or personally identifiable information collected.
  • Compliant with ethical and legal standards for open-source data use.

References

Downloads last month
33