html_url
stringlengths
51
51
title
stringlengths
9
280
comments
stringlengths
63
24.7k
body
stringlengths
51
58.6k
comments length
int64
16
1.45k
text
stringlengths
186
59.1k
https://github.com/huggingface/datasets/issues/7834
Audio.cast_column() or Audio.decode_example() causes Colab kernel crash (std::bad_alloc)
I am also encountering this same issue when i run `print(ug_court["train"][0])` to view the features of the first row of my audio data
### Describe the bug When using the huggingface datasets.Audio feature to decode a local or remote (public HF dataset) audio file inside Google Colab, the notebook kernel crashes with std::bad_alloc (C++ memory allocation failure). The crash happens even with a minimal code example and valid .wav file that can be read...
23
Audio.cast_column() or Audio.decode_example() causes Colab kernel crash (std::bad_alloc) ### Describe the bug When using the huggingface datasets.Audio feature to decode a local or remote (public HF dataset) audio file inside Google Colab, the notebook kernel crashes with std::bad_alloc (C++ memory allocation failure)...
https://github.com/huggingface/datasets/issues/7834
Audio.cast_column() or Audio.decode_example() causes Colab kernel crash (std::bad_alloc)
Thank you @lhoestq I've reinstalled the packages an the error is gone. My new versions are: ``` Name: torch Version: 2.8.0 --- Name: torchaudio Version: 2.8.0 --- Name: torchcodec Version: 0.8.1 ``` Regards
### Describe the bug When using the huggingface datasets.Audio feature to decode a local or remote (public HF dataset) audio file inside Google Colab, the notebook kernel crashes with std::bad_alloc (C++ memory allocation failure). The crash happens even with a minimal code example and valid .wav file that can be read...
33
Audio.cast_column() or Audio.decode_example() causes Colab kernel crash (std::bad_alloc) ### Describe the bug When using the huggingface datasets.Audio feature to decode a local or remote (public HF dataset) audio file inside Google Colab, the notebook kernel crashes with std::bad_alloc (C++ memory allocation failure)...
https://github.com/huggingface/datasets/issues/7834
Audio.cast_column() or Audio.decode_example() causes Colab kernel crash (std::bad_alloc)
Hi, I encounter the same problem when trying to inspect the first element in the dataset. My environment is: ``` root@3ac6f9f8c6c4:/workspace# pip3 list | grep torch pytorch-lightning 2.5.6 pytorch-metric-learning 2.9.0 torch 2.8.0+cu126 torch-audiomentations 0.12.0 torch_pitch_shift ...
### Describe the bug When using the huggingface datasets.Audio feature to decode a local or remote (public HF dataset) audio file inside Google Colab, the notebook kernel crashes with std::bad_alloc (C++ memory allocation failure). The crash happens even with a minimal code example and valid .wav file that can be read...
78
Audio.cast_column() or Audio.decode_example() causes Colab kernel crash (std::bad_alloc) ### Describe the bug When using the huggingface datasets.Audio feature to decode a local or remote (public HF dataset) audio file inside Google Colab, the notebook kernel crashes with std::bad_alloc (C++ memory allocation failure)...
https://github.com/huggingface/datasets/issues/5111
map and filter not working properly in multiprocessing with the new release 2.6.0
Thanks for reporting, @loubnabnl and for the additional information, @PartiallyTyped. However, I'm not able to reproduce this issue, neither locally nor on Colab: ``` Dataset({ features: ['repo_name', 'path', 'copies', 'size', 'content', 'license', 'hash', 'line_mean', 'line_max', 'alpha_frac', 'autogenerated...
## Describe the bug When mapping is used on a dataset with more than one process, there is a weird behavior when trying to use `filter` , it's like only the samples from one worker are retrieved, one needs to specify the same `num_proc` in filter for it to work properly. This doesn't happen with `datasets` version 2.5...
63
map and filter not working properly in multiprocessing with the new release 2.6.0 ## Describe the bug When mapping is used on a dataset with more than one process, there is a weird behavior when trying to use `filter` , it's like only the samples from one worker are retrieved, one needs to specify the same `num_proc` ...
https://github.com/huggingface/datasets/issues/5111
map and filter not working properly in multiprocessing with the new release 2.6.0
This is the minimum reproducible example. I ran this on the premium instances of colab. ``` # !pip install datasets import datasets from datasets import load_dataset ds = load_dataset("copenlu/answerable_tydiqa").filter("english".__eq__, input_columns="language") assert all(map("english".__eq__, ds["train"]["la...
## Describe the bug When mapping is used on a dataset with more than one process, there is a weird behavior when trying to use `filter` , it's like only the samples from one worker are retrieved, one needs to specify the same `num_proc` in filter for it to work properly. This doesn't happen with `datasets` version 2.5...
96
map and filter not working properly in multiprocessing with the new release 2.6.0 ## Describe the bug When mapping is used on a dataset with more than one process, there is a weird behavior when trying to use `filter` , it's like only the samples from one worker are retrieved, one needs to specify the same `num_proc` ...
https://github.com/huggingface/datasets/issues/5111
map and filter not working properly in multiprocessing with the new release 2.6.0
I can reproduce the issue on my mac too ``` - `datasets` version: 2.6.0 - Platform: macOS-12.2.1-arm64-arm-64bit - Python version: 3.9.13 - PyArrow version: 9.0.0 - Pandas version: 1.4.3 ``` But not on Colab with python 3.7, maybe related to python version? (didn't manage to install python 3.9) ``` - `datase...
## Describe the bug When mapping is used on a dataset with more than one process, there is a weird behavior when trying to use `filter` , it's like only the samples from one worker are retrieved, one needs to specify the same `num_proc` in filter for it to work properly. This doesn't happen with `datasets` version 2.5...
69
map and filter not working properly in multiprocessing with the new release 2.6.0 ## Describe the bug When mapping is used on a dataset with more than one process, there is a weird behavior when trying to use `filter` , it's like only the samples from one worker are retrieved, one needs to specify the same `num_proc` ...
https://github.com/huggingface/datasets/issues/5111
map and filter not working properly in multiprocessing with the new release 2.6.0
I think there are 2 different issues here: - the one reported by @loubnabnl is related to multiprocessing in map and then filter; we should reproduce it first: I have tried with Python version 3.9.7 and I can't reproduce it either; maybe it is related to the version of PyArrow? To be checked. - the issue reported by ...
## Describe the bug When mapping is used on a dataset with more than one process, there is a weird behavior when trying to use `filter` , it's like only the samples from one worker are retrieved, one needs to specify the same `num_proc` in filter for it to work properly. This doesn't happen with `datasets` version 2.5...
71
map and filter not working properly in multiprocessing with the new release 2.6.0 ## Describe the bug When mapping is used on a dataset with more than one process, there is a weird behavior when trying to use `filter` , it's like only the samples from one worker are retrieved, one needs to specify the same `num_proc` ...
https://github.com/huggingface/datasets/issues/5111
map and filter not working properly in multiprocessing with the new release 2.6.0
Could you create another issue for the @PartiallyTyped one please ? Regarding the OP issue, I also tried on colab or locally on py3.7 or py3.10 but didn't reproduce
## Describe the bug When mapping is used on a dataset with more than one process, there is a weird behavior when trying to use `filter` , it's like only the samples from one worker are retrieved, one needs to specify the same `num_proc` in filter for it to work properly. This doesn't happen with `datasets` version 2.5...
29
map and filter not working properly in multiprocessing with the new release 2.6.0 ## Describe the bug When mapping is used on a dataset with more than one process, there is a weird behavior when trying to use `filter` , it's like only the samples from one worker are retrieved, one needs to specify the same `num_proc` ...
https://github.com/huggingface/datasets/issues/5111
map and filter not working properly in multiprocessing with the new release 2.6.0
I managed to reproduce your issue @loubnabnl on colab by upgrading pyarrow to 9.0.0 instead of 6.0.1
## Describe the bug When mapping is used on a dataset with more than one process, there is a weird behavior when trying to use `filter` , it's like only the samples from one worker are retrieved, one needs to specify the same `num_proc` in filter for it to work properly. This doesn't happen with `datasets` version 2.5...
17
map and filter not working properly in multiprocessing with the new release 2.6.0 ## Describe the bug When mapping is used on a dataset with more than one process, there is a weird behavior when trying to use `filter` , it's like only the samples from one worker are retrieved, one needs to specify the same `num_proc` ...
https://github.com/huggingface/datasets/issues/5111
map and filter not working properly in multiprocessing with the new release 2.6.0
I managed to have a _super_ minimal reproducible example: ```python from datasets import Dataset, concatenate_datasets ds = concatenate_datasets([Dataset.from_dict({"a": [i]}) for i in range(10)]) ds2 = ds.map(lambda _: {}, batched=True) assert list(ds2) == list(ds) ``` (filter uses a batched `map` under the...
## Describe the bug When mapping is used on a dataset with more than one process, there is a weird behavior when trying to use `filter` , it's like only the samples from one worker are retrieved, one needs to specify the same `num_proc` in filter for it to work properly. This doesn't happen with `datasets` version 2.5...
42
map and filter not working properly in multiprocessing with the new release 2.6.0 ## Describe the bug When mapping is used on a dataset with more than one process, there is a weird behavior when trying to use `filter` , it's like only the samples from one worker are retrieved, one needs to specify the same `num_proc` ...
https://github.com/huggingface/datasets/issues/5111
map and filter not working properly in multiprocessing with the new release 2.6.0
> the one reported by @loubnabnl is related to multiprocessing in map and then filter; we should reproduce it first: I have tried with Python version 3.9.7 and I can't reproduce it either; maybe it is related to the version of PyArrow? To be checked. So finally it was related to PyArrow version! :+1:
## Describe the bug When mapping is used on a dataset with more than one process, there is a weird behavior when trying to use `filter` , it's like only the samples from one worker are retrieved, one needs to specify the same `num_proc` in filter for it to work properly. This doesn't happen with `datasets` version 2.5...
54
map and filter not working properly in multiprocessing with the new release 2.6.0 ## Describe the bug When mapping is used on a dataset with more than one process, there is a weird behavior when trying to use `filter` , it's like only the samples from one worker are retrieved, one needs to specify the same `num_proc` ...
https://github.com/huggingface/datasets/issues/4138
Incorrect Russian filenames encoding after extraction by datasets.DownloadManager.download_and_extract()
To reproduce: ```python >>> import datasets >>> datasets.get_dataset_split_names('MalakhovIlya/RuREBus', config_name='raw_txt') Traceback (most recent call last): File "/home/slesage/hf/datasets-preview-backend/.venv/lib/python3.9/site-packages/datasets/inspect.py", line 280, in get_dataset_config_info fo...
## Dataset viewer issue for 'MalakhovIlya/RuREBus' **Link:** https://huggingface.co/datasets/MalakhovIlya/RuREBus **Description** Using os.walk(topdown=False) in DatasetBuilder causes following error: Status code: 400 Exception: TypeError Message: xwalk() got an unexpected keyword argument 'topdow...
143
Incorrect Russian filenames encoding after extraction by datasets.DownloadManager.download_and_extract() ## Dataset viewer issue for 'MalakhovIlya/RuREBus' **Link:** https://huggingface.co/datasets/MalakhovIlya/RuREBus **Description** Using os.walk(topdown=False) in DatasetBuilder causes following error: Status...
https://github.com/huggingface/datasets/issues/4138
Incorrect Russian filenames encoding after extraction by datasets.DownloadManager.download_and_extract()
Hi! This issue stems from the fact that `xwalk`, which is a streamable version of `os.walk`, doesn't support the `topdown` param due to `fsspec`'s `walk` also not supporting it, so fixing this issue could be tricky. @MalakhovIlyaPavlovich You can avoid the error by tweaking your data processing and not using this ...
## Dataset viewer issue for 'MalakhovIlya/RuREBus' **Link:** https://huggingface.co/datasets/MalakhovIlya/RuREBus **Description** Using os.walk(topdown=False) in DatasetBuilder causes following error: Status code: 400 Exception: TypeError Message: xwalk() got an unexpected keyword argument 'topdow...
59
Incorrect Russian filenames encoding after extraction by datasets.DownloadManager.download_and_extract() ## Dataset viewer issue for 'MalakhovIlya/RuREBus' **Link:** https://huggingface.co/datasets/MalakhovIlya/RuREBus **Description** Using os.walk(topdown=False) in DatasetBuilder causes following error: Status...
https://github.com/huggingface/datasets/issues/4138
Incorrect Russian filenames encoding after extraction by datasets.DownloadManager.download_and_extract()
@mariosasko thank you for your reply. I couldn't reproduce error showed by @severo either on Ubuntu 20.04.3 LTS, Windows 10 and Google Colab environments. But trying to avoid using os.walk(topdown=False) and Path.rename(), In _split_generators I replaced ``` def decode_file_names(folder): for root, dirs, files i...
## Dataset viewer issue for 'MalakhovIlya/RuREBus' **Link:** https://huggingface.co/datasets/MalakhovIlya/RuREBus **Description** Using os.walk(topdown=False) in DatasetBuilder causes following error: Status code: 400 Exception: TypeError Message: xwalk() got an unexpected keyword argument 'topdow...
213
Incorrect Russian filenames encoding after extraction by datasets.DownloadManager.download_and_extract() ## Dataset viewer issue for 'MalakhovIlya/RuREBus' **Link:** https://huggingface.co/datasets/MalakhovIlya/RuREBus **Description** Using os.walk(topdown=False) in DatasetBuilder causes following error: Status...
https://github.com/huggingface/datasets/issues/4138
Incorrect Russian filenames encoding after extraction by datasets.DownloadManager.download_and_extract()
This is what I get when I try to stream the `raw_txt` subset: ```python >>> dset = load_dataset("MalakhovIlya/RuREBus", "raw_txt", split="raw_txt", streaming=True) >>> next(iter(dset)) Traceback (most recent call last): File "<stdin>", line 1, in <module> StopIteration ``` So there is a bug in your script.
## Dataset viewer issue for 'MalakhovIlya/RuREBus' **Link:** https://huggingface.co/datasets/MalakhovIlya/RuREBus **Description** Using os.walk(topdown=False) in DatasetBuilder causes following error: Status code: 400 Exception: TypeError Message: xwalk() got an unexpected keyword argument 'topdow...
44
Incorrect Russian filenames encoding after extraction by datasets.DownloadManager.download_and_extract() ## Dataset viewer issue for 'MalakhovIlya/RuREBus' **Link:** https://huggingface.co/datasets/MalakhovIlya/RuREBus **Description** Using os.walk(topdown=False) in DatasetBuilder causes following error: Status...
https://github.com/huggingface/datasets/issues/4138
Incorrect Russian filenames encoding after extraction by datasets.DownloadManager.download_and_extract()
streaming=True helped me to find solution. I fixed ``` def extract(zip_file_path): p = Path(zip_file_path) dest_dir = str(p.parent / 'extracted' / p.stem) os.makedirs(dest_dir, exist_ok=True) with zipfile.ZipFile(zip_file_path) as archive: for file_info in tqdm(archive.infolist(), desc='E...
## Dataset viewer issue for 'MalakhovIlya/RuREBus' **Link:** https://huggingface.co/datasets/MalakhovIlya/RuREBus **Description** Using os.walk(topdown=False) in DatasetBuilder causes following error: Status code: 400 Exception: TypeError Message: xwalk() got an unexpected keyword argument 'topdow...
89
Incorrect Russian filenames encoding after extraction by datasets.DownloadManager.download_and_extract() ## Dataset viewer issue for 'MalakhovIlya/RuREBus' **Link:** https://huggingface.co/datasets/MalakhovIlya/RuREBus **Description** Using os.walk(topdown=False) in DatasetBuilder causes following error: Status...
https://github.com/huggingface/datasets/issues/6484
[Feature Request] Dataset versioning
Hello @kenfus, this is meant to be possible to do yes. Let me ping @lhoestq or @mariosasko from the `datasets` team (`huggingface_hub` is only the underlying library to download files from the Hub but here it looks more like a `datasets` problem).
**Is your feature request related to a problem? Please describe.** I am working on a project, where I would like to test different preprocessing methods for my ML-data. Thus, I would like to work a lot with revisions and compare them. Currently, I was not able to make it work with the revision keyword because it was n...
42
[Feature Request] Dataset versioning **Is your feature request related to a problem? Please describe.** I am working on a project, where I would like to test different preprocessing methods for my ML-data. Thus, I would like to work a lot with revisions and compare them. Currently, I was not able to make it work with ...
https://github.com/huggingface/datasets/issues/6814
`map` with `num_proc` > 1 leads to OOM
Hi ! You can try to reduce `writer_batch_size`. It corresponds to the number of samples that stay in RAM before being flushed to disk
### Describe the bug When running `map` on parquet dataset loaded from local machine, the RAM usage increases linearly eventually leading to OOM. I was wondering if I should I save the `cache_file` after every n steps in order to prevent this? ### Steps to reproduce the bug ``` ds = load_dataset("parquet", data...
24
`map` with `num_proc` > 1 leads to OOM ### Describe the bug When running `map` on parquet dataset loaded from local machine, the RAM usage increases linearly eventually leading to OOM. I was wondering if I should I save the `cache_file` after every n steps in order to prevent this? ### Steps to reproduce the bug ...
https://github.com/huggingface/datasets/issues/6655
Cannot load the dataset go_emotions
Thanks for reporting, @arame. I guess you have an old version of `transformers` (that submodule is present in `transformers` since version 3.0.1, since nearly 4 years ago). If you update it, the error should disappear: ```shell pip install -U transformers ``` On the other hand, I am wondering: does it make sen...
### Describe the bug When I run the following code I get an exception; `go_emotions = load_dataset("go_emotions")` > AttributeError Traceback (most recent call last) Cell In[6], [line 1](vscode-notebook-cell:?execution_count=6&line=1) ----> [1](vscode-notebook-cell:?execution_count=6&l...
90
Cannot load the dataset go_emotions ### Describe the bug When I run the following code I get an exception; `go_emotions = load_dataset("go_emotions")` > AttributeError Traceback (most recent call last) Cell In[6], [line 1](vscode-notebook-cell:?execution_count=6&line=1) ----> [1](vscod...
https://github.com/huggingface/datasets/issues/6655
Cannot load the dataset go_emotions
The linked code lazily registers a custom reducer for `transformers.PreTrainedTokenizerBase` only if `transformers` have already been imported (imports are expensive, so we check `sys.modules`). However, the logic does not account for `transformers<3`, so we should add a version check to fix that.
### Describe the bug When I run the following code I get an exception; `go_emotions = load_dataset("go_emotions")` > AttributeError Traceback (most recent call last) Cell In[6], [line 1](vscode-notebook-cell:?execution_count=6&line=1) ----> [1](vscode-notebook-cell:?execution_count=6&l...
42
Cannot load the dataset go_emotions ### Describe the bug When I run the following code I get an exception; `go_emotions = load_dataset("go_emotions")` > AttributeError Traceback (most recent call last) Cell In[6], [line 1](vscode-notebook-cell:?execution_count=6&line=1) ----> [1](vscod...
https://github.com/huggingface/datasets/issues/6655
Cannot load the dataset go_emotions
> The linked code lazily registers a custom reducer for `transformers.PreTrainedTokenizerBase` only if `transformers` have already been imported (imports are expensive, so we check `sys.modules`). > > However, the logic does not account for `transformers<3`, so we should add a version check to fix that. Thank you...
### Describe the bug When I run the following code I get an exception; `go_emotions = load_dataset("go_emotions")` > AttributeError Traceback (most recent call last) Cell In[6], [line 1](vscode-notebook-cell:?execution_count=6&line=1) ----> [1](vscode-notebook-cell:?execution_count=6&l...
80
Cannot load the dataset go_emotions ### Describe the bug When I run the following code I get an exception; `go_emotions = load_dataset("go_emotions")` > AttributeError Traceback (most recent call last) Cell In[6], [line 1](vscode-notebook-cell:?execution_count=6&line=1) ----> [1](vscod...
https://github.com/huggingface/datasets/issues/6699
`Dataset` unexpected changed dict data and may cause error
If `test.jsonl` contains more lines like: ``` {"id": 0, "indexs": {"-1": [0, 10]}} {"id": 1, "indexs": {"-1": [0, 10]}} {"id": 2, "indexs": {"-2": [0, 10]}} ... {"id": n, "indexs": {"-9999": [0, 10]}} ``` `Dataset.from_json` will just raise an error: ``` An error occurred while generating the dataset TypeE...
### Describe the bug Will unexpected get keys with `None` value in the parsed json dict. ### Steps to reproduce the bug ```jsonl test.jsonl {"id": 0, "indexs": {"-1": [0, 10]}} {"id": 1, "indexs": {"-1": [0, 10]}} ``` ```python dataset = Dataset.from_json('.test.jsonl') print(dataset[0]) ``` Result: ```...
264
`Dataset` unexpected changed dict data and may cause error ### Describe the bug Will unexpected get keys with `None` value in the parsed json dict. ### Steps to reproduce the bug ```jsonl test.jsonl {"id": 0, "indexs": {"-1": [0, 10]}} {"id": 1, "indexs": {"-1": [0, 10]}} ``` ```python dataset = Dataset.from_...
https://github.com/huggingface/datasets/issues/6699
`Dataset` unexpected changed dict data and may cause error
Hi! Our JSON parser expects all examples/rows to share the same set of columns (applies to nested columns, too), hence the error. To read the `index` column, we would have to manually cast the input to PyArrow's `pa.map_` type, but this requires a more thorough investigation, as `pa.map_` has limited support in PyA...
### Describe the bug Will unexpected get keys with `None` value in the parsed json dict. ### Steps to reproduce the bug ```jsonl test.jsonl {"id": 0, "indexs": {"-1": [0, 10]}} {"id": 1, "indexs": {"-1": [0, 10]}} ``` ```python dataset = Dataset.from_json('.test.jsonl') print(dataset[0]) ``` Result: ```...
53
`Dataset` unexpected changed dict data and may cause error ### Describe the bug Will unexpected get keys with `None` value in the parsed json dict. ### Steps to reproduce the bug ```jsonl test.jsonl {"id": 0, "indexs": {"-1": [0, 10]}} {"id": 1, "indexs": {"-1": [0, 10]}} ``` ```python dataset = Dataset.from_...
https://github.com/huggingface/datasets/issues/3396
Install Audio dependencies to support audio decoding
https://huggingface.co/datasets/projecte-aina/parlament_parla -> works (but we still have to show an audio player) https://huggingface.co/datasets/openslr -> another issue: `Message: [Errno 2] No such file or directory: '/home/hf/datasets-preview-backend/zip:/asr_javanese/data/00/00004fe6aa.flac'`
## Dataset viewer issue for '*openslr*', '*projecte-aina/parlament_parla*' **Link:** *https://huggingface.co/datasets/openslr* **Link:** *https://huggingface.co/datasets/projecte-aina/parlament_parla* Error: ``` Status code: 400 Exception: ImportError Message: To support decoding audio files, ple...
25
Install Audio dependencies to support audio decoding ## Dataset viewer issue for '*openslr*', '*projecte-aina/parlament_parla*' **Link:** *https://huggingface.co/datasets/openslr* **Link:** *https://huggingface.co/datasets/projecte-aina/parlament_parla* Error: ``` Status code: 400 Exception: ImportError...
https://github.com/huggingface/datasets/issues/3396
Install Audio dependencies to support audio decoding
But https://huggingface.co/datasets/openslr/viewer does not work <img width="678" alt="Capture d’écran 2022-04-12 à 13 59 46" src="https://user-images.githubusercontent.com/1676121/162958013-e31ef2ae-f886-47b7-9f27-664ed3d4b5a1.png"> Same issue as #4126: ``` Status code: 400 Exception: TypeError Mes...
## Dataset viewer issue for '*openslr*', '*projecte-aina/parlament_parla*' **Link:** *https://huggingface.co/datasets/openslr* **Link:** *https://huggingface.co/datasets/projecte-aina/parlament_parla* Error: ``` Status code: 400 Exception: ImportError Message: To support decoding audio files, ple...
34
Install Audio dependencies to support audio decoding ## Dataset viewer issue for '*openslr*', '*projecte-aina/parlament_parla*' **Link:** *https://huggingface.co/datasets/openslr* **Link:** *https://huggingface.co/datasets/projecte-aina/parlament_parla* Error: ``` Status code: 400 Exception: ImportError...
https://github.com/huggingface/datasets/issues/6778
Dataset.to_csv() missing commas in columns with lists
Hello! This is due to how pandas write numpy arrays to csv. [Source](https://stackoverflow.com/questions/54753179/to-csv-saves-np-array-as-string-instead-of-as-a-list) To fix this, you can convert them to list yourselves. ```python df = ds.to_pandas() df['int'] = df['int'].apply(lambda arr: list(arr)) df.to_c...
### Describe the bug The `to_csv()` method does not output commas in lists. So when the Dataset is loaded back in the data structure of the column with a list is not correct. Here's an example: Obviously, it's not as trivial as inserting commas in the list, since its a comma-separated file. But hopefully there...
64
Dataset.to_csv() missing commas in columns with lists ### Describe the bug The `to_csv()` method does not output commas in lists. So when the Dataset is loaded back in the data structure of the column with a list is not correct. Here's an example: Obviously, it's not as trivial as inserting commas in the list, ...
https://github.com/huggingface/datasets/issues/5391
Whisper Event - RuntimeError: The size of tensor a (504) must match the size of tensor b (448) at non-singleton dimension 1 100% 1000/1000 [2:52:21<00:00, 10.34s/it]
Hey @catswithbats! Super sorry for the late reply! This is happening because there is data with label length (504) that exceeds the model's max length (448). There are two options here: 1. Increase the model's `max_length` parameter: ```python model.config.max_length = 512 ``` 2. Filter data with labels longe...
Done in a VM with a GPU (Ubuntu) following the [Whisper Event - PYTHON](https://github.com/huggingface/community-events/tree/main/whisper-fine-tuning-event#python-script) instructions. Attempted using [RuntimeError: he size of tensor a (504) must match the size of tensor b (448) at non-singleton dimension 1 100% 1...
108
Whisper Event - RuntimeError: The size of tensor a (504) must match the size of tensor b (448) at non-singleton dimension 1 100% 1000/1000 [2:52:21<00:00, 10.34s/it] Done in a VM with a GPU (Ubuntu) following the [Whisper Event - PYTHON](https://github.com/huggingface/community-events/tree/main/whisper-fine-tuning-even...
https://github.com/huggingface/datasets/issues/5391
Whisper Event - RuntimeError: The size of tensor a (504) must match the size of tensor b (448) at non-singleton dimension 1 100% 1000/1000 [2:52:21<00:00, 10.34s/it]
@sanchit-gandhi Thank you for all your work on this topic. I'm finding that changing the `max_length` value does not make this error go away.
Done in a VM with a GPU (Ubuntu) following the [Whisper Event - PYTHON](https://github.com/huggingface/community-events/tree/main/whisper-fine-tuning-event#python-script) instructions. Attempted using [RuntimeError: he size of tensor a (504) must match the size of tensor b (448) at non-singleton dimension 1 100% 1...
24
Whisper Event - RuntimeError: The size of tensor a (504) must match the size of tensor b (448) at non-singleton dimension 1 100% 1000/1000 [2:52:21<00:00, 10.34s/it] Done in a VM with a GPU (Ubuntu) following the [Whisper Event - PYTHON](https://github.com/huggingface/community-events/tree/main/whisper-fine-tuning-even...
https://github.com/huggingface/datasets/issues/4191
feat: create an `Array3D` column from a list of arrays of dimension 2
Hi @SaulLu, thanks for your proposal. Just I got a bit confused about the dimensions... - For the 2D case, you mention it is possible to create an `Array2D` from a list of arrays of dimension 1 - However, you give an example of creating an `Array2D` from arrays of dimension 2: - the values of `data_map` are arr...
**Is your feature request related to a problem? Please describe.** It is possible to create an `Array2D` column from a list of arrays of dimension 1. Similarly, I think it might be nice to be able to create a `Array3D` column from a list of lists of arrays of dimension 1. To illustrate my proposal, let's take the...
255
feat: create an `Array3D` column from a list of arrays of dimension 2 **Is your feature request related to a problem? Please describe.** It is possible to create an `Array2D` column from a list of arrays of dimension 1. Similarly, I think it might be nice to be able to create a `Array3D` column from a list of lists ...
https://github.com/huggingface/datasets/issues/4191
feat: create an `Array3D` column from a list of arrays of dimension 2
Hi @albertvillanova , Indeed my message was confusing and you guessed right :smile: : I think would be interesting to be able to create an Array3D from a list of an array of dimension 2. For the 2D case I should have given as a "similar" example: ```python data_map_1D = { 1: np.array([0.2, 0.4]), 2...
**Is your feature request related to a problem? Please describe.** It is possible to create an `Array2D` column from a list of arrays of dimension 1. Similarly, I think it might be nice to be able to create a `Array3D` column from a list of lists of arrays of dimension 1. To illustrate my proposal, let's take the...
81
feat: create an `Array3D` column from a list of arrays of dimension 2 **Is your feature request related to a problem? Please describe.** It is possible to create an `Array2D` column from a list of arrays of dimension 1. Similarly, I think it might be nice to be able to create a `Array3D` column from a list of lists ...
https://github.com/huggingface/datasets/issues/3625
Add a metadata field for when source data was produced
A question to the datasets maintainers: is there a policy about how the set of allowed metadata fields is maintained and expanded? Metadata are very important, but defining the standard is always a struggle between allowing exhaustivity without being too complex. Archivists have Dublin Core, open data has https://fr...
**Is your feature request related to a problem? Please describe.** The current problem is that information about when source data was produced is not easily visible. Though there are a variety of metadata fields available in the dataset viewer, time period information is not included. This feature request suggests mak...
87
Add a metadata field for when source data was produced **Is your feature request related to a problem? Please describe.** The current problem is that information about when source data was produced is not easily visible. Though there are a variety of metadata fields available in the dataset viewer, time period inform...
https://github.com/huggingface/datasets/issues/3625
Add a metadata field for when source data was produced
> Metadata are very important, but defining the standard is always a struggle between allowing exhaustivity without being too complex. Archivists have Dublin Core, open data has [frictionlessdata.io](https://frictionlessdata.io/), geo has ISO 19139 and INSPIRE, etc. and it's always a mess! I'm not sure we want to dig t...
**Is your feature request related to a problem? Please describe.** The current problem is that information about when source data was produced is not easily visible. Though there are a variety of metadata fields available in the dataset viewer, time period information is not included. This feature request suggests mak...
190
Add a metadata field for when source data was produced **Is your feature request related to a problem? Please describe.** The current problem is that information about when source data was produced is not easily visible. Though there are a variety of metadata fields available in the dataset viewer, time period inform...
https://github.com/huggingface/datasets/issues/3625
Add a metadata field for when source data was produced
Also related: the [Data Catalog Vocabulary - DCAT](https://www.w3.org/TR/vocab-dcat/) standard will be discussed in a new Working Group at the W3C: https://www.w3.org/2022/06/dx-wg-charter.html
**Is your feature request related to a problem? Please describe.** The current problem is that information about when source data was produced is not easily visible. Though there are a variety of metadata fields available in the dataset viewer, time period information is not included. This feature request suggests mak...
21
Add a metadata field for when source data was produced **Is your feature request related to a problem? Please describe.** The current problem is that information about when source data was produced is not easily visible. Though there are a variety of metadata fields available in the dataset viewer, time period inform...
https://github.com/huggingface/datasets/issues/5811
load_dataset: TypeError: 'NoneType' object is not callable, on local dataset filename changes
This error means a `DatasetBuilder` subclass that generates the dataset could not be found inside the script, so make sure `dushowxa-characters/dushowxa-characters.py `is a valid dataset script (assuming `path_or_dataset` is `dushowxa-characters`) Also, we should improve the error to make it more obvious what the pr...
### Describe the bug I've adapted Databrick's [train_dolly.py](/databrickslabs/dolly/blob/master/train_dolly.py) to train using a local dataset, which has been working. Upon changing the filenames of the `.json` & `.py` files in my local dataset directory, `dataset = load_dataset(path_or_dataset)["train"]` throws th...
45
load_dataset: TypeError: 'NoneType' object is not callable, on local dataset filename changes ### Describe the bug I've adapted Databrick's [train_dolly.py](/databrickslabs/dolly/blob/master/train_dolly.py) to train using a local dataset, which has been working. Upon changing the filenames of the `.json` & `.py` fil...
https://github.com/huggingface/datasets/issues/5811
load_dataset: TypeError: 'NoneType' object is not callable, on local dataset filename changes
from datasets import load_dataset lcb_codegen = load_dataset("livecodebench/code_generation_lite", version_tag="release_v2") or configs = get_dataset_config_names("livecodebench/code_generation_lite", trust_remote_code=True) **both error:** Traceback (most recent call last): File "<stdin>", line 1, in <module> ...
### Describe the bug I've adapted Databrick's [train_dolly.py](/databrickslabs/dolly/blob/master/train_dolly.py) to train using a local dataset, which has been working. Upon changing the filenames of the `.json` & `.py` files in my local dataset directory, `dataset = load_dataset(path_or_dataset)["train"]` throws th...
51
load_dataset: TypeError: 'NoneType' object is not callable, on local dataset filename changes ### Describe the bug I've adapted Databrick's [train_dolly.py](/databrickslabs/dolly/blob/master/train_dolly.py) to train using a local dataset, which has been working. Upon changing the filenames of the `.json` & `.py` fil...
https://github.com/huggingface/datasets/issues/6877
OSError: [Errno 24] Too many open files
> ulimit -n 8192 can solve this problem Would there be a systematic way to do this ? The data loading is part of the [MTEB](https://github.com/embeddings-benchmark/mteb) library
### Describe the bug I am trying to load the 'default' subset of the following dataset which contains lots of files (828 per split): [https://huggingface.co/datasets/mteb/biblenlp-corpus-mmteb](https://huggingface.co/datasets/mteb/biblenlp-corpus-mmteb) When trying to load it using the `load_dataset` function I get...
27
OSError: [Errno 24] Too many open files ### Describe the bug I am trying to load the 'default' subset of the following dataset which contains lots of files (828 per split): [https://huggingface.co/datasets/mteb/biblenlp-corpus-mmteb](https://huggingface.co/datasets/mteb/biblenlp-corpus-mmteb) When trying to load it...
https://github.com/huggingface/datasets/issues/6877
OSError: [Errno 24] Too many open files
> > ulimit -n 8192 can solve this problem > > Would there be a systematic way to do this ? The data loading is part of the [MTEB](https://github.com/embeddings-benchmark/mteb) library I think we could modify the _prepare_split_single function
### Describe the bug I am trying to load the 'default' subset of the following dataset which contains lots of files (828 per split): [https://huggingface.co/datasets/mteb/biblenlp-corpus-mmteb](https://huggingface.co/datasets/mteb/biblenlp-corpus-mmteb) When trying to load it using the `load_dataset` function I get...
38
OSError: [Errno 24] Too many open files ### Describe the bug I am trying to load the 'default' subset of the following dataset which contains lots of files (828 per split): [https://huggingface.co/datasets/mteb/biblenlp-corpus-mmteb](https://huggingface.co/datasets/mteb/biblenlp-corpus-mmteb) When trying to load it...
https://github.com/huggingface/datasets/issues/6877
OSError: [Errno 24] Too many open files
I fixed it with https://github.com/huggingface/datasets/pull/6893, feel free to re-open if you're still having the issue :)
### Describe the bug I am trying to load the 'default' subset of the following dataset which contains lots of files (828 per split): [https://huggingface.co/datasets/mteb/biblenlp-corpus-mmteb](https://huggingface.co/datasets/mteb/biblenlp-corpus-mmteb) When trying to load it using the `load_dataset` function I get...
16
OSError: [Errno 24] Too many open files ### Describe the bug I am trying to load the 'default' subset of the following dataset which contains lots of files (828 per split): [https://huggingface.co/datasets/mteb/biblenlp-corpus-mmteb](https://huggingface.co/datasets/mteb/biblenlp-corpus-mmteb) When trying to load it...
https://github.com/huggingface/datasets/issues/6877
OSError: [Errno 24] Too many open files
> I fixed it with #6893, feel free to re-open if you're still having the issue :) Thanks a lot!
### Describe the bug I am trying to load the 'default' subset of the following dataset which contains lots of files (828 per split): [https://huggingface.co/datasets/mteb/biblenlp-corpus-mmteb](https://huggingface.co/datasets/mteb/biblenlp-corpus-mmteb) When trying to load it using the `load_dataset` function I get...
20
OSError: [Errno 24] Too many open files ### Describe the bug I am trying to load the 'default' subset of the following dataset which contains lots of files (828 per split): [https://huggingface.co/datasets/mteb/biblenlp-corpus-mmteb](https://huggingface.co/datasets/mteb/biblenlp-corpus-mmteb) When trying to load it...
https://github.com/huggingface/datasets/issues/6124
Datasets crashing runs due to KeyError
i once had the same error and I could fix that by pushing a fake or a dummy commit on my hugging face dataset repo
### Describe the bug Hi all, I have been running into a pretty persistent issue recently when trying to load datasets. ```python train_dataset = load_dataset( 'llama-2-7b-tokenized', split = 'train' ) ``` I receive a KeyError which crashes the runs. ``` Traceback (most recent call...
25
Datasets crashing runs due to KeyError ### Describe the bug Hi all, I have been running into a pretty persistent issue recently when trying to load datasets. ```python train_dataset = load_dataset( 'llama-2-7b-tokenized', split = 'train' ) ``` I receive a KeyError which crashes the ...
https://github.com/huggingface/datasets/issues/6124
Datasets crashing runs due to KeyError
Hi! We need a reproducer to fix this. Can you provide a link to the dataset (if it's public)?
### Describe the bug Hi all, I have been running into a pretty persistent issue recently when trying to load datasets. ```python train_dataset = load_dataset( 'llama-2-7b-tokenized', split = 'train' ) ``` I receive a KeyError which crashes the runs. ``` Traceback (most recent call...
19
Datasets crashing runs due to KeyError ### Describe the bug Hi all, I have been running into a pretty persistent issue recently when trying to load datasets. ```python train_dataset = load_dataset( 'llama-2-7b-tokenized', split = 'train' ) ``` I receive a KeyError which crashes the ...
https://github.com/huggingface/datasets/issues/6124
Datasets crashing runs due to KeyError
> Hi! We need a reproducer to fix this. Can you provide a link to the dataset (if it's public)? Hi Mario, Unfortunately, the dataset in question is currently private until the model is trained and released. This is not happening with one dataset but numerous hosted private datasets. I am only loading the da...
### Describe the bug Hi all, I have been running into a pretty persistent issue recently when trying to load datasets. ```python train_dataset = load_dataset( 'llama-2-7b-tokenized', split = 'train' ) ``` I receive a KeyError which crashes the runs. ``` Traceback (most recent call...
69
Datasets crashing runs due to KeyError ### Describe the bug Hi all, I have been running into a pretty persistent issue recently when trying to load datasets. ```python train_dataset = load_dataset( 'llama-2-7b-tokenized', split = 'train' ) ``` I receive a KeyError which crashes the ...
https://github.com/huggingface/datasets/issues/6124
Datasets crashing runs due to KeyError
Hi, I have the same error in the dataset viewer with my dataset https://huggingface.co/datasets/elsaEU/ELSA10M_track1 Has anyone solved this issue? Edit: After a dummy commit the error changed in ConfigNamesError
### Describe the bug Hi all, I have been running into a pretty persistent issue recently when trying to load datasets. ```python train_dataset = load_dataset( 'llama-2-7b-tokenized', split = 'train' ) ``` I receive a KeyError which crashes the runs. ``` Traceback (most recent call...
29
Datasets crashing runs due to KeyError ### Describe the bug Hi all, I have been running into a pretty persistent issue recently when trying to load datasets. ```python train_dataset = load_dataset( 'llama-2-7b-tokenized', split = 'train' ) ``` I receive a KeyError which crashes the ...
https://github.com/huggingface/datasets/issues/6124
Datasets crashing runs due to KeyError
@rs9000 The problem seems to be the (large) number of commits, as explained in https://huggingface.co/docs/hub/repositories-recommendations. This can be fixed by running: ```python import huggingface_hub huggingface_hub.super_squash_history(repo_id="elsaEU/ELSA10M_track1") ``` The issue stems from `push_to_hub`...
### Describe the bug Hi all, I have been running into a pretty persistent issue recently when trying to load datasets. ```python train_dataset = load_dataset( 'llama-2-7b-tokenized', split = 'train' ) ``` I receive a KeyError which crashes the runs. ``` Traceback (most recent call...
68
Datasets crashing runs due to KeyError ### Describe the bug Hi all, I have been running into a pretty persistent issue recently when trying to load datasets. ```python train_dataset = load_dataset( 'llama-2-7b-tokenized', split = 'train' ) ``` I receive a KeyError which crashes the ...
https://github.com/huggingface/datasets/issues/3568
Downloading Hugging Face Medical Dialog Dataset NonMatchingSplitsSizesError
Hi @fabianslife, thanks for reporting. I think you were using an old version of `datasets` because this bug was already fixed in version `1.13.0` (13 Oct 2021): - Fix: 55fd140a63b8f03a0e72985647e498f1fc799d3f - PR: #3046 - Issue: #2969 Please, feel free to update the library: `pip install -U datasets`.
I wanted to download the Nedical Dialog Dataset from huggingface, using this github link: https://github.com/huggingface/datasets/tree/master/datasets/medical_dialog After downloading the raw datasets from google drive, i unpacked everything and put it in the same folder as the medical_dialog.py which is: ``` ...
47
Downloading Hugging Face Medical Dialog Dataset NonMatchingSplitsSizesError I wanted to download the Nedical Dialog Dataset from huggingface, using this github link: https://github.com/huggingface/datasets/tree/master/datasets/medical_dialog After downloading the raw datasets from google drive, i unpacked everyth...
https://github.com/huggingface/datasets/issues/6319
Datasets.map is severely broken
Hi! Instead of processing a single example at a time, you should use the batched `map` for the best performance (with `num_proc=1`) - the fast tokenizers can process a batch's samples in parallel in that scenario. E.g., the following code in Colab takes an hour to complete: ```python # !pip install datasets transf...
### Describe the bug Regardless of how many cores I used, I have 16 or 32 threads, map slows down to a crawl at around 80% done, lingers maybe until 97% extremely slowly and NEVER finishes the job. It just hangs. After watching this for 27 hours I control-C out of it. Until the end one process appears to be doing s...
73
Datasets.map is severely broken ### Describe the bug Regardless of how many cores I used, I have 16 or 32 threads, map slows down to a crawl at around 80% done, lingers maybe until 97% extremely slowly and NEVER finishes the job. It just hangs. After watching this for 27 hours I control-C out of it. Until the end o...
https://github.com/huggingface/datasets/issues/6319
Datasets.map is severely broken
Batched is far worse. A single batch of 1000 took hours and that was only 1% On Thu, Oct 19, 2023, 2:26 PM Mario Šaško ***@***.***> wrote: > Hi! You should use the batched map for the best performance (with > num_proc=1) - the fast tokenizers can process a batch's samples in > parallel. > > E.g., the follow...
### Describe the bug Regardless of how many cores I used, I have 16 or 32 threads, map slows down to a crawl at around 80% done, lingers maybe until 97% extremely slowly and NEVER finishes the job. It just hangs. After watching this for 27 hours I control-C out of it. Until the end one process appears to be doing s...
125
Datasets.map is severely broken ### Describe the bug Regardless of how many cores I used, I have 16 or 32 threads, map slows down to a crawl at around 80% done, lingers maybe until 97% extremely slowly and NEVER finishes the job. It just hangs. After watching this for 27 hours I control-C out of it. Until the end o...
https://github.com/huggingface/datasets/issues/6319
Datasets.map is severely broken
Which specific version of datasets are you using? What is the architecture of your colab setup? Ram? Cores? OS? On Thu, Oct 19, 2023, 2:27 PM pensive introvert ***@***.***> wrote: > Batched is far worse. A single batch of 1000 took hours and that was only > 1% > > > On Thu, Oct 19, 2023, 2:26 PM Mario Š...
### Describe the bug Regardless of how many cores I used, I have 16 or 32 threads, map slows down to a crawl at around 80% done, lingers maybe until 97% extremely slowly and NEVER finishes the job. It just hangs. After watching this for 27 hours I control-C out of it. Until the end one process appears to be doing s...
163
Datasets.map is severely broken ### Describe the bug Regardless of how many cores I used, I have 16 or 32 threads, map slows down to a crawl at around 80% done, lingers maybe until 97% extremely slowly and NEVER finishes the job. It just hangs. After watching this for 27 hours I control-C out of it. Until the end o...
https://github.com/huggingface/datasets/issues/6319
Datasets.map is severely broken
from functools import partial import transformers from datasets import load_dataset, concatenate_datasets, load_from_disk model_name_or_path="/opt/data/data/daryl149/llama-2-7b-chat-hf" output_dir="/opt/data/data/LongLoRA/checkpoints" cache_dir="/opt/data/data/LongLoRA/cache" model_max_length=16384 IGNORE_IN...
### Describe the bug Regardless of how many cores I used, I have 16 or 32 threads, map slows down to a crawl at around 80% done, lingers maybe until 97% extremely slowly and NEVER finishes the job. It just hangs. After watching this for 27 hours I control-C out of it. Until the end one process appears to be doing s...
170
Datasets.map is severely broken ### Describe the bug Regardless of how many cores I used, I have 16 or 32 threads, map slows down to a crawl at around 80% done, lingers maybe until 97% extremely slowly and NEVER finishes the job. It just hangs. After watching this for 27 hours I control-C out of it. Until the end o...
https://github.com/huggingface/datasets/issues/6319
Datasets.map is severely broken
I changed the tokenizer to one without "Fast suffix, and something changed. The fraction, although still slowed a lot at 80% was able to get over the finish line of 100% I have to do more testng, see if the whole set can be processed On Thu, Oct 19, 2023 at 3:03 PM pensive introvert < ***@***.***> wrote: ...
### Describe the bug Regardless of how many cores I used, I have 16 or 32 threads, map slows down to a crawl at around 80% done, lingers maybe until 97% extremely slowly and NEVER finishes the job. It just hangs. After watching this for 27 hours I control-C out of it. Until the end one process appears to be doing s...
290
Datasets.map is severely broken ### Describe the bug Regardless of how many cores I used, I have 16 or 32 threads, map slows down to a crawl at around 80% done, lingers maybe until 97% extremely slowly and NEVER finishes the job. It just hangs. After watching this for 27 hours I control-C out of it. Until the end o...
https://github.com/huggingface/datasets/issues/6319
Datasets.map is severely broken
So, using LlamaTokenizerFast was the problem. Changing it to LlamaTokenizer fixed things, On Thu, Oct 19, 2023 at 4:04 PM pensive introvert < ***@***.***> wrote: > I changed the tokenizer to one without "Fast suffix, and something > changed. The fraction, although still slowed a lot at 80% was able to get > o...
### Describe the bug Regardless of how many cores I used, I have 16 or 32 threads, map slows down to a crawl at around 80% done, lingers maybe until 97% extremely slowly and NEVER finishes the job. It just hangs. After watching this for 27 hours I control-C out of it. Until the end one process appears to be doing s...
327
Datasets.map is severely broken ### Describe the bug Regardless of how many cores I used, I have 16 or 32 threads, map slows down to a crawl at around 80% done, lingers maybe until 97% extremely slowly and NEVER finishes the job. It just hangs. After watching this for 27 hours I control-C out of it. Until the end o...
https://github.com/huggingface/datasets/issues/6319
Datasets.map is severely broken
Indeed, the tokenizer is super slow. Perhaps @ArthurZucker knows the reason why. ([This](https://colab.research.google.com/drive/1VgeurX-4Fl2X6aBQTwh_X4kuQKZ6K9L1?usp=sharing) simplified Colab can be used to reproduce the behavior)
### Describe the bug Regardless of how many cores I used, I have 16 or 32 threads, map slows down to a crawl at around 80% done, lingers maybe until 97% extremely slowly and NEVER finishes the job. It just hangs. After watching this for 27 hours I control-C out of it. Until the end one process appears to be doing s...
22
Datasets.map is severely broken ### Describe the bug Regardless of how many cores I used, I have 16 or 32 threads, map slows down to a crawl at around 80% done, lingers maybe until 97% extremely slowly and NEVER finishes the job. It just hangs. After watching this for 27 hours I control-C out of it. Until the end o...
https://github.com/huggingface/datasets/issues/6319
Datasets.map is severely broken
same issue here sample to reproduce: https://github.com/philschmid/document-ai-transformers/blob/main/training/donut_sroie.ipynb with following map line https://github.com/philschmid/document-ai-transformers/blob/main/training/donut_sroie.ipynb If I directly iterate over the dataset and call the mapping method, i...
### Describe the bug Regardless of how many cores I used, I have 16 or 32 threads, map slows down to a crawl at around 80% done, lingers maybe until 97% extremely slowly and NEVER finishes the job. It just hangs. After watching this for 27 hours I control-C out of it. Until the end one process appears to be doing s...
65
Datasets.map is severely broken ### Describe the bug Regardless of how many cores I used, I have 16 or 32 threads, map slows down to a crawl at around 80% done, lingers maybe until 97% extremely slowly and NEVER finishes the job. It just hangs. After watching this for 27 hours I control-C out of it. Until the end o...
https://github.com/huggingface/datasets/issues/6319
Datasets.map is severely broken
@ewfian > If I directly iterate over the dataset and call the mapping method, it is very fast `Dataset.map` must also convert the images into bytes to write them to an Arrow file (the write itself takes some time, too). You can make the `map` faster by manually converting the images into an "arrow-compatible...
### Describe the bug Regardless of how many cores I used, I have 16 or 32 threads, map slows down to a crawl at around 80% done, lingers maybe until 97% extremely slowly and NEVER finishes the job. It just hangs. After watching this for 27 hours I control-C out of it. Until the end one process appears to be doing s...
111
Datasets.map is severely broken ### Describe the bug Regardless of how many cores I used, I have 16 or 32 threads, map slows down to a crawl at around 80% done, lingers maybe until 97% extremely slowly and NEVER finishes the job. It just hangs. After watching this for 27 hours I control-C out of it. Until the end o...
https://github.com/huggingface/datasets/issues/6319
Datasets.map is severely broken
The problem I had was to do with map using fork and copying locks from the parent process in acquired state. I ended up changing the context to use forkserver instead. On Wed, Nov 29, 2023, 10:04 PM Mario Šaško ***@***.***> wrote: > @ewfian <https://github.com/ewfian> > > If I directly iterate over the data...
### Describe the bug Regardless of how many cores I used, I have 16 or 32 threads, map slows down to a crawl at around 80% done, lingers maybe until 97% extremely slowly and NEVER finishes the job. It just hangs. After watching this for 27 hours I control-C out of it. Until the end one process appears to be doing s...
208
Datasets.map is severely broken ### Describe the bug Regardless of how many cores I used, I have 16 or 32 threads, map slows down to a crawl at around 80% done, lingers maybe until 97% extremely slowly and NEVER finishes the job. It just hangs. After watching this for 27 hours I control-C out of it. Until the end o...
https://github.com/huggingface/datasets/issues/6319
Datasets.map is severely broken
I face the same issue many times. Not only when using the transformers' tokenizer, but also when applying nltk's [pos_tag](https://www.nltk.org/api/nltk.tag.pos_tag.html) to the entire English Wikipedia. So I suspect the cause is not in the tokenizer but in the Dataset.map My case: At the beginning of the run, t...
### Describe the bug Regardless of how many cores I used, I have 16 or 32 threads, map slows down to a crawl at around 80% done, lingers maybe until 97% extremely slowly and NEVER finishes the job. It just hangs. After watching this for 27 hours I control-C out of it. Until the end one process appears to be doing s...
91
Datasets.map is severely broken ### Describe the bug Regardless of how many cores I used, I have 16 or 32 threads, map slows down to a crawl at around 80% done, lingers maybe until 97% extremely slowly and NEVER finishes the job. It just hangs. After watching this for 27 hours I control-C out of it. Until the end o...
https://github.com/huggingface/datasets/issues/6319
Datasets.map is severely broken
It is the interaction of fork() inside the map and tokenizer mutexes/locks. You have to set up your own process pool and use fork server instead of fork. On Tue, Aug 6, 2024, 11:44 AM yuji96 ***@***.***> wrote: > I face the same issue many times. > > Not only when using the transformers' tokenizer, but al...
### Describe the bug Regardless of how many cores I used, I have 16 or 32 threads, map slows down to a crawl at around 80% done, lingers maybe until 97% extremely slowly and NEVER finishes the job. It just hangs. After watching this for 27 hours I control-C out of it. Until the end one process appears to be doing s...
235
Datasets.map is severely broken ### Describe the bug Regardless of how many cores I used, I have 16 or 32 threads, map slows down to a crawl at around 80% done, lingers maybe until 97% extremely slowly and NEVER finishes the job. It just hangs. After watching this for 27 hours I control-C out of it. Until the end o...
https://github.com/huggingface/datasets/issues/6319
Datasets.map is severely broken
Thank you for your advice! I added `multiprocess.set_start_method("forkserver")` but the result seemed to be the same. In my case, it may be due to the very simple fact that about 10% of the process, which includes long text, never ends. I'll try shard by data size. ![image](https://github.com/user-attachments/asse...
### Describe the bug Regardless of how many cores I used, I have 16 or 32 threads, map slows down to a crawl at around 80% done, lingers maybe until 97% extremely slowly and NEVER finishes the job. It just hangs. After watching this for 27 hours I control-C out of it. Until the end one process appears to be doing s...
47
Datasets.map is severely broken ### Describe the bug Regardless of how many cores I used, I have 16 or 32 threads, map slows down to a crawl at around 80% done, lingers maybe until 97% extremely slowly and NEVER finishes the job. It just hangs. After watching this for 27 hours I control-C out of it. Until the end o...
https://github.com/huggingface/datasets/issues/5762
Not able to load the pile
Thanks for reporting, @surya-narayanan. I see you already started a discussion about this on the Community tab of the corresponding dataset: https://huggingface.co/datasets/EleutherAI/the_pile/discussions/10 Let's continue the discussion there!
### Describe the bug Got this error when I am trying to load the pile dataset ``` TypeError: Couldn't cast array of type struct<file: string, id: string> to {'id': Value(dtype='string', id=None)} ``` ### Steps to reproduce the bug Please visit the following sample notebook https://colab.research.goo...
27
Not able to load the pile ### Describe the bug Got this error when I am trying to load the pile dataset ``` TypeError: Couldn't cast array of type struct<file: string, id: string> to {'id': Value(dtype='string', id=None)} ``` ### Steps to reproduce the bug Please visit the following sample notebook ...
https://github.com/huggingface/datasets/issues/6185
Error in saving the PIL image into *.arrow files using datasets.arrow_writer
You can cast the `input_image` column to the `Image` type to fix the issue: ```python ds.cast_column("input_image", datasets.Image()) ```
### Describe the bug I am using the ArrowWriter from datasets.arrow_writer to save a json-style file as arrow files. Within the dictionary, it contains a feature called "image" which is a list of PIL.Image objects. I am saving the json using the following script: ``` def save_to_arrow(path,temp): with ArrowWri...
18
Error in saving the PIL image into *.arrow files using datasets.arrow_writer ### Describe the bug I am using the ArrowWriter from datasets.arrow_writer to save a json-style file as arrow files. Within the dictionary, it contains a feature called "image" which is a list of PIL.Image objects. I am saving the json using...
https://github.com/huggingface/datasets/issues/5145
Dataset order is not deterministic with ZIP archives and `iter_files`
Thanks for reporting ! The issue doesn't come from shuffling, but from `beans` row order not being deterministic: https://huggingface.co/datasets/beans/blob/main/beans.py uses `dl_manager.iter_files` on ZIP archives and the file order doesn't seen to be deterministic and changes across machines
### Describe the bug For the `beans` dataset (did not try on other), the order of samples is not the same on different machines. Tested on my local laptop, github actions machine, and ec2 instance. The three yield a different order. ### Steps to reproduce the bug In a clean docker container or conda environmen...
37
Dataset order is not deterministic with ZIP archives and `iter_files` ### Describe the bug For the `beans` dataset (did not try on other), the order of samples is not the same on different machines. Tested on my local laptop, github actions machine, and ec2 instance. The three yield a different order. ### Steps t...
https://github.com/huggingface/datasets/issues/5145
Dataset order is not deterministic with ZIP archives and `iter_files`
This is still a bug, so I'd keep this one open if you don't mind ;)
### Describe the bug For the `beans` dataset (did not try on other), the order of samples is not the same on different machines. Tested on my local laptop, github actions machine, and ec2 instance. The three yield a different order. ### Steps to reproduce the bug In a clean docker container or conda environmen...
16
Dataset order is not deterministic with ZIP archives and `iter_files` ### Describe the bug For the `beans` dataset (did not try on other), the order of samples is not the same on different machines. Tested on my local laptop, github actions machine, and ec2 instance. The three yield a different order. ### Steps t...
https://github.com/huggingface/datasets/issues/5145
Dataset order is not deterministic with ZIP archives and `iter_files`
Besides the linked PR, to make the loading process fully deterministic, I believe we should also sort the data files [here](https://github.com/huggingface/datasets/blob/df4bdd365f2abb695f113cbf8856a925bc70901b/src/datasets/data_files.py#L276) and [here](https://github.com/huggingface/datasets/blob/df4bdd365f2abb695f113...
### Describe the bug For the `beans` dataset (did not try on other), the order of samples is not the same on different machines. Tested on my local laptop, github actions machine, and ec2 instance. The three yield a different order. ### Steps to reproduce the bug In a clean docker container or conda environmen...
68
Dataset order is not deterministic with ZIP archives and `iter_files` ### Describe the bug For the `beans` dataset (did not try on other), the order of samples is not the same on different machines. Tested on my local laptop, github actions machine, and ec2 instance. The three yield a different order. ### Steps t...
https://github.com/huggingface/datasets/issues/5145
Dataset order is not deterministic with ZIP archives and `iter_files`
We already return the result sorted at the end of `_resolve_single_pattern_locally` and `_resolve_single_pattern_in_dataset_repository` if I'm not mistaken
### Describe the bug For the `beans` dataset (did not try on other), the order of samples is not the same on different machines. Tested on my local laptop, github actions machine, and ec2 instance. The three yield a different order. ### Steps to reproduce the bug In a clean docker container or conda environmen...
17
Dataset order is not deterministic with ZIP archives and `iter_files` ### Describe the bug For the `beans` dataset (did not try on other), the order of samples is not the same on different machines. Tested on my local laptop, github actions machine, and ec2 instance. The three yield a different order. ### Steps t...
https://github.com/huggingface/datasets/issues/5982
404 on Datasets Documentation Page
This wasn’t working for me a bit earlier, but it looks to be back up now
### Describe the bug Getting a 404 from the Hugging Face Datasets docs page: https://huggingface.co/docs/datasets/index ### Steps to reproduce the bug 1. Go to URL https://huggingface.co/docs/datasets/index 2. Notice 404 not found ### Expected behavior URL should either show docs or redirect to new location #...
16
404 on Datasets Documentation Page ### Describe the bug Getting a 404 from the Hugging Face Datasets docs page: https://huggingface.co/docs/datasets/index ### Steps to reproduce the bug 1. Go to URL https://huggingface.co/docs/datasets/index 2. Notice 404 not found ### Expected behavior URL should either show ...
https://github.com/huggingface/datasets/issues/5982
404 on Datasets Documentation Page
We had a minor issue updating the docs after the latest release. It should work now :).
### Describe the bug Getting a 404 from the Hugging Face Datasets docs page: https://huggingface.co/docs/datasets/index ### Steps to reproduce the bug 1. Go to URL https://huggingface.co/docs/datasets/index 2. Notice 404 not found ### Expected behavior URL should either show docs or redirect to new location #...
17
404 on Datasets Documentation Page ### Describe the bug Getting a 404 from the Hugging Face Datasets docs page: https://huggingface.co/docs/datasets/index ### Steps to reproduce the bug 1. Go to URL https://huggingface.co/docs/datasets/index 2. Notice 404 not found ### Expected behavior URL should either show ...
https://github.com/huggingface/datasets/issues/4287
"NameError: name 'faiss' is not defined" on `.add_faiss_index` when `device` is not None
So I managed to solve this by adding a missing `import faiss` in the `@staticmethod` defined in https://github.com/huggingface/datasets/blob/f51b6994db27ea69261ef919fb7775928f9ec10b/src/datasets/search.py#L305, triggered from https://github.com/huggingface/datasets/blob/f51b6994db27ea69261ef919fb7775928f9ec10b/src/data...
## Describe the bug When using `datasets` to calculate the FAISS indices of a dataset, the exception `NameError: name 'faiss' is not defined` is triggered when trying to calculate those on a device (GPU), so `.add_faiss_index(..., device=0)` fails with that exception. All that assuming that `datasets` is properly...
102
"NameError: name 'faiss' is not defined" on `.add_faiss_index` when `device` is not None ## Describe the bug When using `datasets` to calculate the FAISS indices of a dataset, the exception `NameError: name 'faiss' is not defined` is triggered when trying to calculate those on a device (GPU), so `.add_faiss_index(.....
https://github.com/huggingface/datasets/issues/4287
"NameError: name 'faiss' is not defined" on `.add_faiss_index` when `device` is not None
Adding here the complete error traceback! ``` Traceback (most recent call last): File "/home/alvarobartt/lol.py", line 12, in <module> ds_with_embeddings.add_faiss_index(column='embeddings', device=0) # default `device=None` File "/home/alvarobartt/.local/lib/python3.9/site-packages/datasets/arrow_datase...
## Describe the bug When using `datasets` to calculate the FAISS indices of a dataset, the exception `NameError: name 'faiss' is not defined` is triggered when trying to calculate those on a device (GPU), so `.add_faiss_index(..., device=0)` fails with that exception. All that assuming that `datasets` is properly...
66
"NameError: name 'faiss' is not defined" on `.add_faiss_index` when `device` is not None ## Describe the bug When using `datasets` to calculate the FAISS indices of a dataset, the exception `NameError: name 'faiss' is not defined` is triggered when trying to calculate those on a device (GPU), so `.add_faiss_index(.....
https://github.com/huggingface/datasets/issues/6294
IndexError: Invalid key is out of bounds for size 0 despite having a populated dataset
It looks to be the same issue as the one reported in https://discuss.huggingface.co/t/indexerror-invalid-key-16-is-out-of-bounds-for-size-0. Can you check the length of `train_dataset` before the `train_sampler = self._get_train_sampler()` (and after `_remove_unused_columns`) line?
### Describe the bug I am encountering an `IndexError` when trying to access data from a DataLoader which wraps around a dataset I've loaded using the `datasets` library. The error suggests that the dataset size is `0`, but when I check the length and print the dataset, it's clear that it has `1166` entries. ### Step...
29
IndexError: Invalid key is out of bounds for size 0 despite having a populated dataset ### Describe the bug I am encountering an `IndexError` when trying to access data from a DataLoader which wraps around a dataset I've loaded using the `datasets` library. The error suggests that the dataset size is `0`, but when I c...
https://github.com/huggingface/datasets/issues/5834
Is uint8 supported?
Hi ! The numpy formatting detaults to int64 and float32 - but you can use uint8 using ```python ds = ds.with_format("numpy", dtype=np.uint8) ```
### Describe the bug I expect the dataset to store the data in the `uint8` data type, but it's returning `int64` instead. While I've found that `datasets` doesn't yet support float16 (https://github.com/huggingface/datasets/issues/4981), I'm wondering if this is the case for other data types as well. Is there a way ...
23
Is uint8 supported? ### Describe the bug I expect the dataset to store the data in the `uint8` data type, but it's returning `int64` instead. While I've found that `datasets` doesn't yet support float16 (https://github.com/huggingface/datasets/issues/4981), I'm wondering if this is the case for other data types as we...
https://github.com/huggingface/datasets/issues/5834
Is uint8 supported?
Thank you! By setting `ds.with_format("numpy", dtype=np.uint8)`, the dataset returns the data in `uint8`. However, `with_format` and `set_format` seem to cast the data on-the-fly. I want to reduce the dataset size by using `uint8` instead of `int64` and I observe no difference between using `int64` and `uint8` for...
### Describe the bug I expect the dataset to store the data in the `uint8` data type, but it's returning `int64` instead. While I've found that `datasets` doesn't yet support float16 (https://github.com/huggingface/datasets/issues/4981), I'm wondering if this is the case for other data types as well. Is there a way ...
74
Is uint8 supported? ### Describe the bug I expect the dataset to store the data in the `uint8` data type, but it's returning `int64` instead. While I've found that `datasets` doesn't yet support float16 (https://github.com/huggingface/datasets/issues/4981), I'm wondering if this is the case for other data types as we...
https://github.com/huggingface/datasets/issues/5834
Is uint8 supported?
If the feature type is `Value("uint8")` then it's written an uint8 on disk using the uint8 Arrow dtype. e.g. ```python ds = Dataset.from_dict({"a": range(10)}, features=Features({"a": Value("uint8")})) ds.data.nbytes # 10 ```
### Describe the bug I expect the dataset to store the data in the `uint8` data type, but it's returning `int64` instead. While I've found that `datasets` doesn't yet support float16 (https://github.com/huggingface/datasets/issues/4981), I'm wondering if this is the case for other data types as well. Is there a way ...
30
Is uint8 supported? ### Describe the bug I expect the dataset to store the data in the `uint8` data type, but it's returning `int64` instead. While I've found that `datasets` doesn't yet support float16 (https://github.com/huggingface/datasets/issues/4981), I'm wondering if this is the case for other data types as we...
https://github.com/huggingface/datasets/issues/5834
Is uint8 supported?
Oh, I understand now. The data was stored in `uint8` from the beginning (when the dataset returns `int64`). Thank you for your time! My question is fully resolved.
### Describe the bug I expect the dataset to store the data in the `uint8` data type, but it's returning `int64` instead. While I've found that `datasets` doesn't yet support float16 (https://github.com/huggingface/datasets/issues/4981), I'm wondering if this is the case for other data types as well. Is there a way ...
28
Is uint8 supported? ### Describe the bug I expect the dataset to store the data in the `uint8` data type, but it's returning `int64` instead. While I've found that `datasets` doesn't yet support float16 (https://github.com/huggingface/datasets/issues/4981), I'm wondering if this is the case for other data types as we...
https://github.com/huggingface/datasets/issues/7946
Question: Is there a faster way to push_to_hub for large image datasets?
This is a really interesting approach, especially combining parallel parquet conversion with upload_large_folder and hf_xet. One question / observation: The shard calculation currently uses max_shard_size_mb as a proxy for samples_per_shard. Since sample size can vary a lot across datasets, would it make sense to esti...
# Question: Is there a faster way to `push_to_hub` for large image datasets? Or could this approach be integrated? Hi! I frequently work with large image datasets (100k-300k+ samples) and found that `dataset.push_to_hub()` can be quite slow. cc @lhoestq - would love your thoughts on this! I experimented with an alte...
84
Question: Is there a faster way to push_to_hub for large image datasets? # Question: Is there a faster way to `push_to_hub` for large image datasets? Or could this approach be integrated? Hi! I frequently work with large image datasets (100k-300k+ samples) and found that `dataset.push_to_hub()` can be quite slow. cc ...
https://github.com/huggingface/datasets/issues/7946
Question: Is there a faster way to push_to_hub for large image datasets?
The approach makes a lot of sense :) * parallel parquet conversions with threads for speed * writing parquet files to disk prior to upload instead of in RAM to save some RAM * uploading in parallel with upload_large_folder for speed Note that there is a helper for estimating the size of the dataset: `ds._estimate_nb...
# Question: Is there a faster way to `push_to_hub` for large image datasets? Or could this approach be integrated? Hi! I frequently work with large image datasets (100k-300k+ samples) and found that `dataset.push_to_hub()` can be quite slow. cc @lhoestq - would love your thoughts on this! I experimented with an alte...
196
Question: Is there a faster way to push_to_hub for large image datasets? # Question: Is there a faster way to `push_to_hub` for large image datasets? Or could this approach be integrated? Hi! I frequently work with large image datasets (100k-300k+ samples) and found that `dataset.push_to_hub()` can be quite slow. cc ...
https://github.com/huggingface/datasets/issues/7946
Question: Is there a faster way to push_to_hub for large image datasets?
Thanks @lhoestq! Valid point about datasets larger than disk. Would you be open to adding `upload_large_folder` as an **opt-in** parameter? The key benefit is **resumability** - if an upload fails at 80%, it picks up where it left off. For multi-hour uploads of large image datasets, this is really valuable. ```python...
# Question: Is there a faster way to `push_to_hub` for large image datasets? Or could this approach be integrated? Hi! I frequently work with large image datasets (100k-300k+ samples) and found that `dataset.push_to_hub()` can be quite slow. cc @lhoestq - would love your thoughts on this! I experimented with an alte...
104
Question: Is there a faster way to push_to_hub for large image datasets? # Question: Is there a faster way to `push_to_hub` for large image datasets? Or could this approach be integrated? Hi! I frequently work with large image datasets (100k-300k+ samples) and found that `dataset.push_to_hub()` can be quite slow. cc ...
https://github.com/huggingface/datasets/issues/7946
Question: Is there a faster way to push_to_hub for large image datasets?
Great questions @k281484-ctrl! **Shard sizing**: You're right - the sample-based approach in my script was a quick hack. @lhoestq pointed out `ds._estimate_nbytes()` which is exactly what we need for proper byte-based shard calculation. Will use that in the implementation. **ThreadPoolExecutor**: Yes, intentional cho...
# Question: Is there a faster way to `push_to_hub` for large image datasets? Or could this approach be integrated? Hi! I frequently work with large image datasets (100k-300k+ samples) and found that `dataset.push_to_hub()` can be quite slow. cc @lhoestq - would love your thoughts on this! I experimented with an alte...
80
Question: Is there a faster way to push_to_hub for large image datasets? # Question: Is there a faster way to `push_to_hub` for large image datasets? Or could this approach be integrated? Hi! I frequently work with large image datasets (100k-300k+ samples) and found that `dataset.push_to_hub()` can be quite slow. cc ...
https://github.com/huggingface/datasets/issues/5097
Fatal error with pyarrow/libarrow.so
Thanks for reporting, @catalys1. This seems a duplicate of: - #3310 The source of the problem is in PyArrow: - [ARROW-15141: [C++] Fatal error condition occurred in aws_thread_launch](https://issues.apache.org/jira/browse/ARROW-15141) - [ARROW-17501: [C++] Fatal error condition occurred in aws_thread_launch](...
## Describe the bug When using datasets, at the very end of my jobs the program crashes (see trace below). It doesn't seem to affect anything, as it appears to happen as the program is closing down. Just importing `datasets` is enough to cause the error. ## Steps to reproduce the bug This is sufficient to reprodu...
91
Fatal error with pyarrow/libarrow.so ## Describe the bug When using datasets, at the very end of my jobs the program crashes (see trace below). It doesn't seem to affect anything, as it appears to happen as the program is closing down. Just importing `datasets` is enough to cause the error. ## Steps to reproduce t...
https://github.com/huggingface/datasets/issues/8149
[Optimization] Prevent per-thread instantiation of Cloud Storage FileSystem during Data loading initialization
I think arbitrary filesystems would be recreated in every thread in any case, unlike HfFileSystem which has custom code to handle this.
### Feature request Modify the dataset loading initialization, so that fsspec filesystem instances (like GCSFileSystem or S3FileSystem) are instantiated once in the main thread and explicitly passed down to the background threads. By pre-instantiating the fs object in the main thread (where the directory cache from g...
22
[Optimization] Prevent per-thread instantiation of Cloud Storage FileSystem during Data loading initialization ### Feature request Modify the dataset loading initialization, so that fsspec filesystem instances (like GCSFileSystem or S3FileSystem) are instantiated once in the main thread and explicitly passed down to t...
https://github.com/huggingface/datasets/issues/3385
None batched `with_transform`, `set_transform`
Hi ! Thanks for the suggestion :) It makes sense to me, and it can surely be implemented by wrapping the user's function to make it a batched function. However I'm not a big fan of the inconsistency it would create with `map`: `with_transform` is batched by default while `map` isn't. Is there something you would li...
**Is your feature request related to a problem? Please describe.** A `torch.utils.data.Dataset.__getitem__` operates on a single example. But 🤗 `Datasets.with_transform` doesn't seem to allow non-batched transform. **Describe the solution you'd like** Have a `batched=True` argument in `Datasets.with_transfor...
69
None batched `with_transform`, `set_transform` **Is your feature request related to a problem? Please describe.** A `torch.utils.data.Dataset.__getitem__` operates on a single example. But 🤗 `Datasets.with_transform` doesn't seem to allow non-batched transform. **Describe the solution you'd like** Have a `ba...
https://github.com/huggingface/datasets/issues/3385
None batched `with_transform`, `set_transform`
Hi @lhoestq , Sorry I missed your reply. I would love to contribute. But I don't know which solution would be the best for this repo. > However I'm not a big fan of the inconsistency it would create with map: with_transform is batched by default while map isn't. I agree. What do you think about the alternativ...
**Is your feature request related to a problem? Please describe.** A `torch.utils.data.Dataset.__getitem__` operates on a single example. But 🤗 `Datasets.with_transform` doesn't seem to allow non-batched transform. **Describe the solution you'd like** Have a `batched=True` argument in `Datasets.with_transfor...
315
None batched `with_transform`, `set_transform` **Is your feature request related to a problem? Please describe.** A `torch.utils.data.Dataset.__getitem__` operates on a single example. But 🤗 `Datasets.with_transform` doesn't seem to allow non-batched transform. **Describe the solution you'd like** Have a `ba...
https://github.com/huggingface/datasets/issues/3385
None batched `with_transform`, `set_transform`
I like the idea of lazy map. On the other hand we should only have either lazy map or `with_transform` (not both). That's why I'd rather stick with `with_transform` for now (but maybe we can consider it for later major releases like `datasets` v2). I understand the issue with `with_transform` and `with_format` being...
**Is your feature request related to a problem? Please describe.** A `torch.utils.data.Dataset.__getitem__` operates on a single example. But 🤗 `Datasets.with_transform` doesn't seem to allow non-batched transform. **Describe the solution you'd like** Have a `batched=True` argument in `Datasets.with_transfor...
83
None batched `with_transform`, `set_transform` **Is your feature request related to a problem? Please describe.** A `torch.utils.data.Dataset.__getitem__` operates on a single example. But 🤗 `Datasets.with_transform` doesn't seem to allow non-batched transform. **Describe the solution you'd like** Have a `ba...
https://github.com/huggingface/datasets/issues/7116
datasets cannot handle nested json if features is given.
Hi ! `Sequence` has a weird behavior for dictionaries (from tensorflow-datasets), use a regular list instead: ```python ds = datasets.load_dataset('json', data_files="./temp.json", features=datasets.Features({ 'ref1': datasets.Value('string'), 'ref2': datasets.Value('string'), 'cuts': [{ "cu...
### Describe the bug I have a json named temp.json. ```json {"ref1": "ABC", "ref2": "DEF", "cuts":[{"cut1": 3, "cut2": 5}]} ``` I want to load it. ```python ds = datasets.load_dataset('json', data_files="./temp.json", features=datasets.Features({ 'ref1': datasets.Value('string'), 'ref2': datasets.Value...
35
datasets cannot handle nested json if features is given. ### Describe the bug I have a json named temp.json. ```json {"ref1": "ABC", "ref2": "DEF", "cuts":[{"cut1": 3, "cut2": 5}]} ``` I want to load it. ```python ds = datasets.load_dataset('json', data_files="./temp.json", features=datasets.Features({ 'ref...
https://github.com/huggingface/datasets/issues/7116
datasets cannot handle nested json if features is given.
> Hi ! `Sequence` has a weird behavior for dictionaries (from tensorflow-datasets), use a regular list instead: > > ```python > ds = datasets.load_dataset('json', data_files="./temp.json", features=datasets.Features({ > 'ref1': datasets.Value('string'), > 'ref2': datasets.Value('string'), > 'cuts': [...
### Describe the bug I have a json named temp.json. ```json {"ref1": "ABC", "ref2": "DEF", "cuts":[{"cut1": 3, "cut2": 5}]} ``` I want to load it. ```python ds = datasets.load_dataset('json', data_files="./temp.json", features=datasets.Features({ 'ref1': datasets.Value('string'), 'ref2': datasets.Value...
49
datasets cannot handle nested json if features is given. ### Describe the bug I have a json named temp.json. ```json {"ref1": "ABC", "ref2": "DEF", "cuts":[{"cut1": 3, "cut2": 5}]} ``` I want to load it. ```python ds = datasets.load_dataset('json', data_files="./temp.json", features=datasets.Features({ 'ref...
https://github.com/huggingface/datasets/issues/4796
ArrowInvalid: Could not convert <PIL.Image.Image image mode=RGB when adding image to Dataset
@mariosasko I'm getting a similar issue when creating a Dataset from a Pandas dataframe, like so: ``` from datasets import Dataset, Features, Image, Value import pandas as pd import requests import PIL # we need to define the features ourselves features = Features({ 'a': Value(dtype='int32'), 'b': ...
## Describe the bug When adding a Pillow image to an existing Dataset on the hub, `add_item` fails due to the Pillow image not being automatically converted into the Image feature. ## Steps to reproduce the bug ```python from datasets import load_dataset from PIL import Image dataset = load_dataset("hf-inte...
113
ArrowInvalid: Could not convert <PIL.Image.Image image mode=RGB when adding image to Dataset ## Describe the bug When adding a Pillow image to an existing Dataset on the hub, `add_item` fails due to the Pillow image not being automatically converted into the Image feature. ## Steps to reproduce the bug ```python...
https://github.com/huggingface/datasets/issues/4796
ArrowInvalid: Could not convert <PIL.Image.Image image mode=RGB when adding image to Dataset
I would expect this to work, but it doesn't. Shouldn't be too hard to fix tho (in a subsequent PR).
## Describe the bug When adding a Pillow image to an existing Dataset on the hub, `add_item` fails due to the Pillow image not being automatically converted into the Image feature. ## Steps to reproduce the bug ```python from datasets import load_dataset from PIL import Image dataset = load_dataset("hf-inte...
20
ArrowInvalid: Could not convert <PIL.Image.Image image mode=RGB when adding image to Dataset ## Describe the bug When adding a Pillow image to an existing Dataset on the hub, `add_item` fails due to the Pillow image not being automatically converted into the Image feature. ## Steps to reproduce the bug ```python...
https://github.com/huggingface/datasets/issues/4796
ArrowInvalid: Could not convert <PIL.Image.Image image mode=RGB when adding image to Dataset
Hi @mariosasko just wanted to check in if there is a PR to follow for this. I was looking to create a demo app using this. If it's not working I can just use byte encoded images in the dataset which are not displayed.
## Describe the bug When adding a Pillow image to an existing Dataset on the hub, `add_item` fails due to the Pillow image not being automatically converted into the Image feature. ## Steps to reproduce the bug ```python from datasets import load_dataset from PIL import Image dataset = load_dataset("hf-inte...
44
ArrowInvalid: Could not convert <PIL.Image.Image image mode=RGB when adding image to Dataset ## Describe the bug When adding a Pillow image to an existing Dataset on the hub, `add_item` fails due to the Pillow image not being automatically converted into the Image feature. ## Steps to reproduce the bug ```python...
https://github.com/huggingface/datasets/issues/4796
ArrowInvalid: Could not convert <PIL.Image.Image image mode=RGB when adding image to Dataset
I was just pointed here by @mariosasko, meanwhile I found a workaround using `encode_example` like so: ``` from datasets import load_from_disk, Dataset DATASET_PATH = "/hf/m4-master/data/cm4/cm4-10000-v0.1" ds1 = load_from_disk(DATASET_PATH) ds2 = Dataset.from_dict(mapping={k: [] for k in ds1[99].keys()}, ...
## Describe the bug When adding a Pillow image to an existing Dataset on the hub, `add_item` fails due to the Pillow image not being automatically converted into the Image feature. ## Steps to reproduce the bug ```python from datasets import load_dataset from PIL import Image dataset = load_dataset("hf-inte...
59
ArrowInvalid: Could not convert <PIL.Image.Image image mode=RGB when adding image to Dataset ## Describe the bug When adding a Pillow image to an existing Dataset on the hub, `add_item` fails due to the Pillow image not being automatically converted into the Image feature. ## Steps to reproduce the bug ```python...
https://github.com/huggingface/datasets/issues/4796
ArrowInvalid: Could not convert <PIL.Image.Image image mode=RGB when adding image to Dataset
Hmm, interesting. If I create the dataset on the fly: ``` from datasets import load_from_disk, Dataset DATASET_PATH = "/hf/m4-master/data/cm4/cm4-10000-v0.1" ds1 = load_from_disk(DATASET_PATH) ds2 = Dataset.from_dict(mapping={k: [v]*2 for k, v in ds1[99].items()}, features=ds1.features) ...
## Describe the bug When adding a Pillow image to an existing Dataset on the hub, `add_item` fails due to the Pillow image not being automatically converted into the Image feature. ## Steps to reproduce the bug ```python from datasets import load_dataset from PIL import Image dataset = load_dataset("hf-inte...
264
ArrowInvalid: Could not convert <PIL.Image.Image image mode=RGB when adding image to Dataset ## Describe the bug When adding a Pillow image to an existing Dataset on the hub, `add_item` fails due to the Pillow image not being automatically converted into the Image feature. ## Steps to reproduce the bug ```python...
https://github.com/huggingface/datasets/issues/4796
ArrowInvalid: Could not convert <PIL.Image.Image image mode=RGB when adding image to Dataset
> @mariosasko I'm getting a similar issue when creating a Dataset from a Pandas dataframe, like so: > > ``` > from datasets import Dataset, Features, Image, Value > import pandas as pd > import requests > import PIL > > # we need to define the features ourselves > features = Features({ > 'a': Value(dtyp...
## Describe the bug When adding a Pillow image to an existing Dataset on the hub, `add_item` fails due to the Pillow image not being automatically converted into the Image feature. ## Steps to reproduce the bug ```python from datasets import load_dataset from PIL import Image dataset = load_dataset("hf-inte...
159
ArrowInvalid: Could not convert <PIL.Image.Image image mode=RGB when adding image to Dataset ## Describe the bug When adding a Pillow image to an existing Dataset on the hub, `add_item` fails due to the Pillow image not being automatically converted into the Image feature. ## Steps to reproduce the bug ```python...
https://github.com/huggingface/datasets/issues/4796
ArrowInvalid: Could not convert <PIL.Image.Image image mode=RGB when adding image to Dataset
There is a workaround: Create a loader python scrypt and upload the dataset to huggingface. Here is an example how to do that: https://huggingface.co/datasets/jamescalam/image-text-demo/tree/main and Here are videos with explanations: https://www.youtube.com/watch?v=lqK4ocAKveE and https://www.youtube.com...
## Describe the bug When adding a Pillow image to an existing Dataset on the hub, `add_item` fails due to the Pillow image not being automatically converted into the Image feature. ## Steps to reproduce the bug ```python from datasets import load_dataset from PIL import Image dataset = load_dataset("hf-inte...
33
ArrowInvalid: Could not convert <PIL.Image.Image image mode=RGB when adding image to Dataset ## Describe the bug When adding a Pillow image to an existing Dataset on the hub, `add_item` fails due to the Pillow image not being automatically converted into the Image feature. ## Steps to reproduce the bug ```python...
https://github.com/huggingface/datasets/issues/4796
ArrowInvalid: Could not convert <PIL.Image.Image image mode=RGB when adding image to Dataset
> Any update on this? I'm still facing this issure. Any workaround? I was able to resolve my issue with a quick workaround: ``` from collections import defaultdict from datasets import Dataset data = defaultdict(list) for idx in tqdm(range( len(dataloader)),desc="Captioning..."): img = dataloader[id...
## Describe the bug When adding a Pillow image to an existing Dataset on the hub, `add_item` fails due to the Pillow image not being automatically converted into the Image feature. ## Steps to reproduce the bug ```python from datasets import load_dataset from PIL import Image dataset = load_dataset("hf-inte...
72
ArrowInvalid: Could not convert <PIL.Image.Image image mode=RGB when adding image to Dataset ## Describe the bug When adding a Pillow image to an existing Dataset on the hub, `add_item` fails due to the Pillow image not being automatically converted into the Image feature. ## Steps to reproduce the bug ```python...
https://github.com/huggingface/datasets/issues/4796
ArrowInvalid: Could not convert <PIL.Image.Image image mode=RGB when adding image to Dataset
> > Any update on this? I'm still facing this issure. Any workaround? > > I was able to resolve my issue with a quick workaround: > > ``` > from collections import defaultdict > from datasets import Dataset > > data = defaultdict(list) > for idx in tqdm(range( len(dataloader)),desc="Captioning..."): > ...
## Describe the bug When adding a Pillow image to an existing Dataset on the hub, `add_item` fails due to the Pillow image not being automatically converted into the Image feature. ## Steps to reproduce the bug ```python from datasets import load_dataset from PIL import Image dataset = load_dataset("hf-inte...
96
ArrowInvalid: Could not convert <PIL.Image.Image image mode=RGB when adding image to Dataset ## Describe the bug When adding a Pillow image to an existing Dataset on the hub, `add_item` fails due to the Pillow image not being automatically converted into the Image feature. ## Steps to reproduce the bug ```python...
https://github.com/huggingface/datasets/issues/4796
ArrowInvalid: Could not convert <PIL.Image.Image image mode=RGB when adding image to Dataset
I had a similar issue to @NielsRogge where I was unable to create a dataset from a Pandas DataFrame containing PIL.Images. I found another workaround that works in this case which involves converting the DataFrame to a python dictionary, and then creating a dataset from said python dictionary. This is a generic e...
## Describe the bug When adding a Pillow image to an existing Dataset on the hub, `add_item` fails due to the Pillow image not being automatically converted into the Image feature. ## Steps to reproduce the bug ```python from datasets import load_dataset from PIL import Image dataset = load_dataset("hf-inte...
94
ArrowInvalid: Could not convert <PIL.Image.Image image mode=RGB when adding image to Dataset ## Describe the bug When adding a Pillow image to an existing Dataset on the hub, `add_item` fails due to the Pillow image not being automatically converted into the Image feature. ## Steps to reproduce the bug ```python...
https://github.com/huggingface/datasets/issues/4796
ArrowInvalid: Could not convert <PIL.Image.Image image mode=RGB when adding image to Dataset
cc @mariosasko this issue has been open for 2 years, would be great to resolve it :)
## Describe the bug When adding a Pillow image to an existing Dataset on the hub, `add_item` fails due to the Pillow image not being automatically converted into the Image feature. ## Steps to reproduce the bug ```python from datasets import load_dataset from PIL import Image dataset = load_dataset("hf-inte...
17
ArrowInvalid: Could not convert <PIL.Image.Image image mode=RGB when adding image to Dataset ## Describe the bug When adding a Pillow image to an existing Dataset on the hub, `add_item` fails due to the Pillow image not being automatically converted into the Image feature. ## Steps to reproduce the bug ```python...
https://github.com/huggingface/datasets/issues/4796
ArrowInvalid: Could not convert <PIL.Image.Image image mode=RGB when adding image to Dataset
I have the same issue, my current workaround is saving the dataframe to a csv and then loading the dataset from the csv. Would also appreciate it a fix :)
## Describe the bug When adding a Pillow image to an existing Dataset on the hub, `add_item` fails due to the Pillow image not being automatically converted into the Image feature. ## Steps to reproduce the bug ```python from datasets import load_dataset from PIL import Image dataset = load_dataset("hf-inte...
30
ArrowInvalid: Could not convert <PIL.Image.Image image mode=RGB when adding image to Dataset ## Describe the bug When adding a Pillow image to an existing Dataset on the hub, `add_item` fails due to the Pillow image not being automatically converted into the Image feature. ## Steps to reproduce the bug ```python...
https://github.com/huggingface/datasets/issues/4796
ArrowInvalid: Could not convert <PIL.Image.Image image mode=RGB when adding image to Dataset
I found something that can be used as solution. I have the same problem when I've try to load the images from a pamdas dataset If you have all on a pandas dataset try Dataset.from_dict( your_df.reset_index(drop=True).to_dict(orient='list'), split=set_your_split) And this avoid the error
## Describe the bug When adding a Pillow image to an existing Dataset on the hub, `add_item` fails due to the Pillow image not being automatically converted into the Image feature. ## Steps to reproduce the bug ```python from datasets import load_dataset from PIL import Image dataset = load_dataset("hf-inte...
42
ArrowInvalid: Could not convert <PIL.Image.Image image mode=RGB when adding image to Dataset ## Describe the bug When adding a Pillow image to an existing Dataset on the hub, `add_item` fails due to the Pillow image not being automatically converted into the Image feature. ## Steps to reproduce the bug ```python...
https://github.com/huggingface/datasets/issues/5513
Some functions use a param named `type` shouldn't that be avoided since it's a Python reserved name?
Hi! Let's not do this - renaming it would be a breaking change, and going through the deprecation cycle is only worth it if it improves user experience.
Hi @mariosasko, @lhoestq, or whoever reads this! :) After going through `ArrowDataset.set_format` I found out that the `type` param is actually named `type` which is a Python reserved name as you may already know, shouldn't that be renamed to `format_type` before the 3.0.0 is released? Just wanted to get your inp...
28
Some functions use a param named `type` shouldn't that be avoided since it's a Python reserved name? Hi @mariosasko, @lhoestq, or whoever reads this! :) After going through `ArrowDataset.set_format` I found out that the `type` param is actually named `type` which is a Python reserved name as you may already know, sh...
https://github.com/huggingface/datasets/issues/5513
Some functions use a param named `type` shouldn't that be avoided since it's a Python reserved name?
Hi @mariosasko, ok it makes sense. Anyway, don't you think it's worth it at some point to start a deprecation cycle e.g. `fs` in `load_from_disk`? It doesn't affect user experience but it's for sure a bad practice IMO, but's up to you 😄 Feel free to close this issue otherwise!
Hi @mariosasko, @lhoestq, or whoever reads this! :) After going through `ArrowDataset.set_format` I found out that the `type` param is actually named `type` which is a Python reserved name as you may already know, shouldn't that be renamed to `format_type` before the 3.0.0 is released? Just wanted to get your inp...
50
Some functions use a param named `type` shouldn't that be avoided since it's a Python reserved name? Hi @mariosasko, @lhoestq, or whoever reads this! :) After going through `ArrowDataset.set_format` I found out that the `type` param is actually named `type` which is a Python reserved name as you may already know, sh...
https://github.com/huggingface/datasets/issues/5513
Some functions use a param named `type` shouldn't that be avoided since it's a Python reserved name?
I don't think deprecating a param name in this particular instance is worth the hassle, so I'm closing the issue 🙂.
Hi @mariosasko, @lhoestq, or whoever reads this! :) After going through `ArrowDataset.set_format` I found out that the `type` param is actually named `type` which is a Python reserved name as you may already know, shouldn't that be renamed to `format_type` before the 3.0.0 is released? Just wanted to get your inp...
21
Some functions use a param named `type` shouldn't that be avoided since it's a Python reserved name? Hi @mariosasko, @lhoestq, or whoever reads this! :) After going through `ArrowDataset.set_format` I found out that the `type` param is actually named `type` which is a Python reserved name as you may already know, sh...