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/6073 | version2.3.2 load_dataset()data_files can't include .xxxx in path | Version 2.3.2 is over one year old, so please use the latest release (2.14.0) to get the expected behavior. Version 2.3.2 does not contain some fixes we made to fix resolving hidden files/directories (starting with a dot). | ### Describe the bug
First, I cd workdir.
Then, I just use load_dataset("json", data_file={"train":"/a/b/c/.d/train/train.json", "test":"/a/b/c/.d/train/test.json"})
that couldn't work and
<FileNotFoundError: Unable to find
'/a/b/c/.d/train/train.jsonl' at
/a/b/c/.d/>
And I debug, it is fine in version2.1.2... | 37 | version2.3.2 load_dataset()data_files can't include .xxxx in path
### Describe the bug
First, I cd workdir.
Then, I just use load_dataset("json", data_file={"train":"/a/b/c/.d/train/train.json", "test":"/a/b/c/.d/train/test.json"})
that couldn't work and
<FileNotFoundError: Unable to find
'/a/b/c/.d/train/trai... |
https://github.com/huggingface/datasets/issues/7041 | `sort` after `filter` unreasonably slow | `filter` add an indices mapping on top of the dataset, so `sort` has to gather all the rows that are kept to form a new Arrow table and sort the table. Gathering all the rows can take some time, but is a necessary step. You can try calling `ds = ds.flatten_indices()` before sorting to remove the indices mapping. | ### Describe the bug
as the tittle says ...
### Steps to reproduce the bug
`sort` seems to be normal.
```python
from datasets import Dataset
import random
nums = [{"k":random.choice(range(0,1000))} for _ in range(100000)]
ds = Dataset.from_list(nums)
print("start sort")
ds = ds.sort("k")
print("f... | 58 | `sort` after `filter` unreasonably slow
### Describe the bug
as the tittle says ...
### Steps to reproduce the bug
`sort` seems to be normal.
```python
from datasets import Dataset
import random
nums = [{"k":random.choice(range(0,1000))} for _ in range(100000)]
ds = Dataset.from_list(nums)
print("star... |
https://github.com/huggingface/datasets/issues/7041 | `sort` after `filter` unreasonably slow | > `filter` add an indices mapping on top of the dataset, so `sort` has to gather all the rows that are kept to form a new Arrow table and sort the table. Gathering all the rows can take some time, but is a necessary step. You can try calling `ds = ds.flatten_indices()` before sorting to remove the indices mapping.
Thi... | ### Describe the bug
as the tittle says ...
### Steps to reproduce the bug
`sort` seems to be normal.
```python
from datasets import Dataset
import random
nums = [{"k":random.choice(range(0,1000))} for _ in range(100000)]
ds = Dataset.from_list(nums)
print("start sort")
ds = ds.sort("k")
print("f... | 65 | `sort` after `filter` unreasonably slow
### Describe the bug
as the tittle says ...
### Steps to reproduce the bug
`sort` seems to be normal.
```python
from datasets import Dataset
import random
nums = [{"k":random.choice(range(0,1000))} for _ in range(100000)]
ds = Dataset.from_list(nums)
print("star... |
https://github.com/huggingface/datasets/issues/5625 | Allow "jsonl" data type signifier | You can use "json" instead. It doesn't work by extension names, but rather by dataset builder names, e.g. "text", "imagefolder", etc. I don't think the example in `transformers` is correct because of that | ### Feature request
`load_dataset` currently does not accept `jsonl` as type but only `json`.
### Motivation
I was working with one of the `run_translation` scripts and used my own datasets (`.jsonl`) as train_dataset. But the default code did not work because
```
FileNotFoundError: Couldn't find a dataset scri... | 33 | Allow "jsonl" data type signifier
### Feature request
`load_dataset` currently does not accept `jsonl` as type but only `json`.
### Motivation
I was working with one of the `run_translation` scripts and used my own datasets (`.jsonl`) as train_dataset. But the default code did not work because
```
FileNotFoundE... |
https://github.com/huggingface/datasets/issues/5625 | Allow "jsonl" data type signifier | Yes, I understand the reasoning but this issue is to propose that the example in transformers (while incorrect) "makes sense" in terms of user expectation. So the question is whether it would be possible to add "aliases" for common types (like "json" and "text") based on common extensions (like jsonl and txt)? | ### Feature request
`load_dataset` currently does not accept `jsonl` as type but only `json`.
### Motivation
I was working with one of the `run_translation` scripts and used my own datasets (`.jsonl`) as train_dataset. But the default code did not work because
```
FileNotFoundError: Couldn't find a dataset scri... | 52 | Allow "jsonl" data type signifier
### Feature request
`load_dataset` currently does not accept `jsonl` as type but only `json`.
### Motivation
I was working with one of the `run_translation` scripts and used my own datasets (`.jsonl`) as train_dataset. But the default code did not work because
```
FileNotFoundE... |
https://github.com/huggingface/datasets/issues/6333 | Support fsspec 2023.10.0 | Hi @albertvillanova @lhoestq
I believe the pull request that pins the fsspec version (https://github.com/huggingface/datasets/pull/6331) was merged by mistake. Another fix for the issue was merged on the same day an hour apart. See https://github.com/huggingface/datasets/pull/6334
I'm now having an issue in my p... | Once root issue is fixed, remove temporary pin of fsspec < 2023.10.0 introduced by:
- #6331
Related to issue:
- #6330
As @ZachNagengast suggested, the issue might be related to:
- https://github.com/fsspec/filesystem_spec/pull/1381 | 60 | Support fsspec 2023.10.0
Once root issue is fixed, remove temporary pin of fsspec < 2023.10.0 introduced by:
- #6331
Related to issue:
- #6330
As @ZachNagengast suggested, the issue might be related to:
- https://github.com/fsspec/filesystem_spec/pull/1381
Hi @albertvillanova @lhoestq
I believe the pull re... |
https://github.com/huggingface/datasets/issues/6333 | Support fsspec 2023.10.0 | Hi @tomscholz,
Thanks for pointing this out. I think you are right.
I am doing some cross-checks and fixing it. | Once root issue is fixed, remove temporary pin of fsspec < 2023.10.0 introduced by:
- #6331
Related to issue:
- #6330
As @ZachNagengast suggested, the issue might be related to:
- https://github.com/fsspec/filesystem_spec/pull/1381 | 20 | Support fsspec 2023.10.0
Once root issue is fixed, remove temporary pin of fsspec < 2023.10.0 introduced by:
- #6331
Related to issue:
- #6330
As @ZachNagengast suggested, the issue might be related to:
- https://github.com/fsspec/filesystem_spec/pull/1381
Hi @tomscholz,
Thanks for pointing this out. I thin... |
https://github.com/huggingface/datasets/issues/6333 | Support fsspec 2023.10.0 | Hi again, @tomscholz.
After a more cautious investigation, I think the pin is OK because there are other reasons for it. Chronologically:
- #6331
- #6334
- #6336
- #6337
The reason is that after version 2023.10.0, they changed again the behavior of their `glob` function. See: https://github.com/huggingface... | Once root issue is fixed, remove temporary pin of fsspec < 2023.10.0 introduced by:
- #6331
Related to issue:
- #6330
As @ZachNagengast suggested, the issue might be related to:
- https://github.com/fsspec/filesystem_spec/pull/1381 | 75 | Support fsspec 2023.10.0
Once root issue is fixed, remove temporary pin of fsspec < 2023.10.0 introduced by:
- #6331
Related to issue:
- #6330
As @ZachNagengast suggested, the issue might be related to:
- https://github.com/fsspec/filesystem_spec/pull/1381
Hi again, @tomscholz.
After a more cautious investi... |
https://github.com/huggingface/datasets/issues/6858 | Segmentation fault | I downloaded the jsonl file and extract it manually.
The issue seems to be related to pyarrow.json
python3 -q -X faulthandler -c "from datasets import load_dataset; load_dataset('json', data_files='/Users/scampion/Downloads/1998-09.jsonl')"
Generating train split: 0 examples [00:00, ? examples/s]Fatal Pytho... | ### Describe the bug
Using various version for datasets, I'm no more longer able to load that dataset without a segmentation fault.
Several others files are also concerned.
### Steps to reproduce the bug
# Create a new venv
python3 -m venv venv_test
source venv_test/bin/activate
# Install the latest versio... | 242 | Segmentation fault
### Describe the bug
Using various version for datasets, I'm no more longer able to load that dataset without a segmentation fault.
Several others files are also concerned.
### Steps to reproduce the bug
# Create a new venv
python3 -m venv venv_test
source venv_test/bin/activate
# Instal... |
https://github.com/huggingface/datasets/issues/7040 | load `streaming=True` dataset with downloaded cache | When you pass `streaming=True`, the cache is ignored. The remote data URL is used instead and the data is streamed from the remote server. | ### Describe the bug
We build a dataset which contains several hdf5 files and write a script using `h5py` to generate the dataset. The hdf5 files are large and the processed dataset cache takes more disk space. So we hope to try streaming iterable dataset. Unfortunately, `h5py` can't convert a remote URL into a hdf5 f... | 24 | load `streaming=True` dataset with downloaded cache
### Describe the bug
We build a dataset which contains several hdf5 files and write a script using `h5py` to generate the dataset. The hdf5 files are large and the processed dataset cache takes more disk space. So we hope to try streaming iterable dataset. Unfortunat... |
https://github.com/huggingface/datasets/issues/7040 | load `streaming=True` dataset with downloaded cache | Thanks for your reply! So is there any solution to get my expected behavior besides clone the whole repo ? Or could I adjust my script to load the downloaded arrow files and generate the dataset streamingly? | ### Describe the bug
We build a dataset which contains several hdf5 files and write a script using `h5py` to generate the dataset. The hdf5 files are large and the processed dataset cache takes more disk space. So we hope to try streaming iterable dataset. Unfortunately, `h5py` can't convert a remote URL into a hdf5 f... | 37 | load `streaming=True` dataset with downloaded cache
### Describe the bug
We build a dataset which contains several hdf5 files and write a script using `h5py` to generate the dataset. The hdf5 files are large and the processed dataset cache takes more disk space. So we hope to try streaming iterable dataset. Unfortunat... |
https://github.com/huggingface/datasets/issues/5761 | One or several metadata.jsonl were found, but not in the same directory or in a parent directory | Also, when generated from a zip archive, the dataset contains only a few images. In my case, 20 versus 2000+ contained in the archive. The generation from folders works as expected. | ### Describe the bug
An attempt to generate a dataset from a zip archive using imagefolder and metadata.jsonl does not lead to the expected result. Tried all possible locations of the json file: the file in the archive is ignored (generated dataset contains only images), the file next to the archive like [here](http... | 31 | One or several metadata.jsonl were found, but not in the same directory or in a parent directory
### Describe the bug
An attempt to generate a dataset from a zip archive using imagefolder and metadata.jsonl does not lead to the expected result. Tried all possible locations of the json file: the file in the archive i... |
https://github.com/huggingface/datasets/issues/5761 | One or several metadata.jsonl were found, but not in the same directory or in a parent directory | Thanks for reporting, @blghtr.
You should include the `metadata.jsonl` in your ZIP archives, at the root level directory.
I agree that our documentation is not clear enough. Maybe we could improve it. | ### Describe the bug
An attempt to generate a dataset from a zip archive using imagefolder and metadata.jsonl does not lead to the expected result. Tried all possible locations of the json file: the file in the archive is ignored (generated dataset contains only images), the file next to the archive like [here](http... | 32 | One or several metadata.jsonl were found, but not in the same directory or in a parent directory
### Describe the bug
An attempt to generate a dataset from a zip archive using imagefolder and metadata.jsonl does not lead to the expected result. Tried all possible locations of the json file: the file in the archive i... |
https://github.com/huggingface/datasets/issues/5761 | One or several metadata.jsonl were found, but not in the same directory or in a parent directory | You can find a dummy dataset example here: https://huggingface.co/datasets/albertvillanova/tmp-imagefolder-metadata
```
tmp-imagefolder-metadata/
βββ data/
βββ train.zip
βββ valid.zip
```
where, the directory structure within the `train.zip` archive is:
```
metadata.jsonl
train/
βββ bharatanaty... | ### Describe the bug
An attempt to generate a dataset from a zip archive using imagefolder and metadata.jsonl does not lead to the expected result. Tried all possible locations of the json file: the file in the archive is ignored (generated dataset contains only images), the file next to the archive like [here](http... | 54 | One or several metadata.jsonl were found, but not in the same directory or in a parent directory
### Describe the bug
An attempt to generate a dataset from a zip archive using imagefolder and metadata.jsonl does not lead to the expected result. Tried all possible locations of the json file: the file in the archive i... |
https://github.com/huggingface/datasets/issues/4061 | Loading cnn_dailymail dataset failed | Hi @Arij-Aladel, thanks for reporting.
This issue was already reported
- #3784
and its root cause is a change in the Google Drive service. See:
- #3786
We have already fixed it in our 2.0.0 release. See:
- #3787
Please, update your `datasets` version:
```
pip install -U datasets
```
and retry load... | ## Describe the bug
I wanted to load cnn_dailymail dataset from huggingface datasets on jupyter lab, but I am getting an error ` NotADirectoryError:[Errno20] Not a directory ` while loading it.
## Steps to reproduce the bug
```python
from datasets import load_dataset
dataset = load_dataset('cnn_dailymail', '3.0.... | 66 | Loading cnn_dailymail dataset failed
## Describe the bug
I wanted to load cnn_dailymail dataset from huggingface datasets on jupyter lab, but I am getting an error ` NotADirectoryError:[Errno20] Not a directory ` while loading it.
## Steps to reproduce the bug
```python
from datasets import load_dataset
dataset ... |
https://github.com/huggingface/datasets/issues/7686 | load_dataset does not check .no_exist files in the hub cache | It turns out the `.no_exist` entries *are* being written (they have been since huggingface_hub 0.25 β `.no_exist` is a dot-directory so plain `ls` hides it); only the read side was missing in `datasets`. Fix in PR: `cached_path` now checks `try_to_load_from_cache` before hitting the Hub for commit-hash-pinned files.
| ### Describe the bug
I'm not entirely sure if this should be submitted as a bug in the `datasets` library or the `huggingface_hub` library, given it could be fixed at different levels of the stack.
The fundamental issue is that the `load_datasets` api doesn't use the `.no_exist` files in the hub cache unlike other wr... | 47 | load_dataset does not check .no_exist files in the hub cache
### Describe the bug
I'm not entirely sure if this should be submitted as a bug in the `datasets` library or the `huggingface_hub` library, given it could be fixed at different levels of the stack.
The fundamental issue is that the `load_datasets` api doesn... |
https://github.com/huggingface/datasets/issues/7607 | Video and audio decoding with torchcodec | Good idea ! let me know if you have any question or if I can help | ### Feature request
Pytorch is migrating video processing to torchcodec and it's pretty cool. It would be nice to migrate both the audio and video features to use torchcodec instead of torchaudio/video.
### Motivation
My use case is I'm working on a multimodal AV model, and what's nice about torchcodec is I can extr... | 16 | Video and audio decoding with torchcodec
### Feature request
Pytorch is migrating video processing to torchcodec and it's pretty cool. It would be nice to migrate both the audio and video features to use torchcodec instead of torchaudio/video.
### Motivation
My use case is I'm working on a multimodal AV model, and w... |
https://github.com/huggingface/datasets/issues/7607 | Video and audio decoding with torchcodec | @lhoestq Almost finished, but I'm having trouble understanding this test case.
This is how it looks originally. The `map` function is called, and then `with_format` is called. According to the test case example["video"] is supposed to be a VideoReader. However, according to the [docs](https://huggingface.co/docs/datase... | ### Feature request
Pytorch is migrating video processing to torchcodec and it's pretty cool. It would be nice to migrate both the audio and video features to use torchcodec instead of torchaudio/video.
### Motivation
My use case is I'm working on a multimodal AV model, and what's nice about torchcodec is I can extr... | 148 | Video and audio decoding with torchcodec
### Feature request
Pytorch is migrating video processing to torchcodec and it's pretty cool. It would be nice to migrate both the audio and video features to use torchcodec instead of torchaudio/video.
### Motivation
My use case is I'm working on a multimodal AV model, and w... |
https://github.com/huggingface/datasets/issues/7607 | Video and audio decoding with torchcodec | Hi ! It's maybe more convenient for users to always have a VideoDecoder, since they might only access a few frames and not the full video. So IMO it's fine to always return a VideoDecoder (maybe later we can extend the VideoDecoder to return other types of tensors than numpy arrays though ? π it's not crucial for now ... | ### Feature request
Pytorch is migrating video processing to torchcodec and it's pretty cool. It would be nice to migrate both the audio and video features to use torchcodec instead of torchaudio/video.
### Motivation
My use case is I'm working on a multimodal AV model, and what's nice about torchcodec is I can extr... | 60 | Video and audio decoding with torchcodec
### Feature request
Pytorch is migrating video processing to torchcodec and it's pretty cool. It would be nice to migrate both the audio and video features to use torchcodec instead of torchaudio/video.
### Motivation
My use case is I'm working on a multimodal AV model, and w... |
https://github.com/huggingface/datasets/issues/7607 | Video and audio decoding with torchcodec | @lhoestq ya that makes sense, looks like this functionality lives in `src/datasets/formatting`, where an exception is made for VideoReader objects to remain as themselves when being formatted. I'll make the necessary changes. | ### Feature request
Pytorch is migrating video processing to torchcodec and it's pretty cool. It would be nice to migrate both the audio and video features to use torchcodec instead of torchaudio/video.
### Motivation
My use case is I'm working on a multimodal AV model, and what's nice about torchcodec is I can extr... | 32 | Video and audio decoding with torchcodec
### Feature request
Pytorch is migrating video processing to torchcodec and it's pretty cool. It would be nice to migrate both the audio and video features to use torchcodec instead of torchaudio/video.
### Motivation
My use case is I'm working on a multimodal AV model, and w... |
https://github.com/huggingface/datasets/issues/7607 | Video and audio decoding with torchcodec | We're not using torchaudio but soundfile. But anyway we unfortunately decode full audio files instead of returning a Reader and it can be interesting to fix this. Currently it always returns a dict {"array": np.array(...), "sampling_rate": int(...)}, while it would be cool to return a reader with seek() and read() - li... | ### Feature request
Pytorch is migrating video processing to torchcodec and it's pretty cool. It would be nice to migrate both the audio and video features to use torchcodec instead of torchaudio/video.
### Motivation
My use case is I'm working on a multimodal AV model, and what's nice about torchcodec is I can extr... | 76 | Video and audio decoding with torchcodec
### Feature request
Pytorch is migrating video processing to torchcodec and it's pretty cool. It would be nice to migrate both the audio and video features to use torchcodec instead of torchaudio/video.
### Motivation
My use case is I'm working on a multimodal AV model, and w... |
https://github.com/huggingface/datasets/issues/7607 | Video and audio decoding with torchcodec | @lhoestq (sorry for the spam btw)
Looks like there's a # TODO to have these returned as np.arrays instead. I'm curious why the authors didn't do it initially. Maybe a performance thing?
This is from `/src/datasets/formatting/np_formatter.py` line 70
```
if config.TORCHVISION_AVAILABLE and "torchvision" in sys.modules:
... | ### Feature request
Pytorch is migrating video processing to torchcodec and it's pretty cool. It would be nice to migrate both the audio and video features to use torchcodec instead of torchaudio/video.
### Motivation
My use case is I'm working on a multimodal AV model, and what's nice about torchcodec is I can extr... | 63 | Video and audio decoding with torchcodec
### Feature request
Pytorch is migrating video processing to torchcodec and it's pretty cool. It would be nice to migrate both the audio and video features to use torchcodec instead of torchaudio/video.
### Motivation
My use case is I'm working on a multimodal AV model, and w... |
https://github.com/huggingface/datasets/issues/7607 | Video and audio decoding with torchcodec | Oh cool ya this is something that I could implement with torchcodec. I can add that to the PR as well. | ### Feature request
Pytorch is migrating video processing to torchcodec and it's pretty cool. It would be nice to migrate both the audio and video features to use torchcodec instead of torchaudio/video.
### Motivation
My use case is I'm working on a multimodal AV model, and what's nice about torchcodec is I can extr... | 21 | Video and audio decoding with torchcodec
### Feature request
Pytorch is migrating video processing to torchcodec and it's pretty cool. It would be nice to migrate both the audio and video features to use torchcodec instead of torchaudio/video.
### Motivation
My use case is I'm working on a multimodal AV model, and w... |
https://github.com/huggingface/datasets/issues/7607 | Video and audio decoding with torchcodec | > Looks like there's a # TODO to have these returned as np.arrays instead. I'm curious why the authors didn't do it initially. Maybe a performance thing?
yea that was me, I focused on a simple logic to start with, since I knew there was torchcodec coming and maybe wasn't worth it at the time ^^
but anyway it's fine t... | ### Feature request
Pytorch is migrating video processing to torchcodec and it's pretty cool. It would be nice to migrate both the audio and video features to use torchcodec instead of torchaudio/video.
### Motivation
My use case is I'm working on a multimodal AV model, and what's nice about torchcodec is I can extr... | 73 | Video and audio decoding with torchcodec
### Feature request
Pytorch is migrating video processing to torchcodec and it's pretty cool. It would be nice to migrate both the audio and video features to use torchcodec instead of torchaudio/video.
### Motivation
My use case is I'm working on a multimodal AV model, and w... |
https://github.com/huggingface/datasets/issues/7607 | Video and audio decoding with torchcodec | Hey @lhoestq I ran into an error with this test case for the Audio feature
```
@require_sndfile
@require_torchcodec
def test_dataset_with_audio_feature_map_is_decoded(shared_datadir):
audio_path = str(shared_datadir / "test_audio_44100.wav")
data = {"audio": [audio_path], "text": ["Hello"]}
features = Feat... | ### Feature request
Pytorch is migrating video processing to torchcodec and it's pretty cool. It would be nice to migrate both the audio and video features to use torchcodec instead of torchaudio/video.
### Motivation
My use case is I'm working on a multimodal AV model, and what's nice about torchcodec is I can extr... | 393 | Video and audio decoding with torchcodec
### Feature request
Pytorch is migrating video processing to torchcodec and it's pretty cool. It would be nice to migrate both the audio and video features to use torchcodec instead of torchaudio/video.
### Motivation
My use case is I'm working on a multimodal AV model, and w... |
https://github.com/huggingface/datasets/issues/7607 | Video and audio decoding with torchcodec | Btw I just remembered that we were using soundfile because it can support a wide range of audio formats, is it also the case for torchcodec ? including ogg, opus for example | ### Feature request
Pytorch is migrating video processing to torchcodec and it's pretty cool. It would be nice to migrate both the audio and video features to use torchcodec instead of torchaudio/video.
### Motivation
My use case is I'm working on a multimodal AV model, and what's nice about torchcodec is I can extr... | 32 | Video and audio decoding with torchcodec
### Feature request
Pytorch is migrating video processing to torchcodec and it's pretty cool. It would be nice to migrate both the audio and video features to use torchcodec instead of torchaudio/video.
### Motivation
My use case is I'm working on a multimodal AV model, and w... |
https://github.com/huggingface/datasets/issues/7607 | Video and audio decoding with torchcodec | Okay just finished. However, I wasn't able to pass this test case:
```python
@require_torchcodec
@require_sndfile
@pytest.mark.parametrize("streaming", [False, True])
def test_load_dataset_with_audio_feature(streaming, jsonl_audio_dataset_path, shared_datadir):
from torchcodec.decoders import AudioDecoder
audio... | ### Feature request
Pytorch is migrating video processing to torchcodec and it's pretty cool. It would be nice to migrate both the audio and video features to use torchcodec instead of torchaudio/video.
### Motivation
My use case is I'm working on a multimodal AV model, and what's nice about torchcodec is I can extr... | 424 | Video and audio decoding with torchcodec
### Feature request
Pytorch is migrating video processing to torchcodec and it's pretty cool. It would be nice to migrate both the audio and video features to use torchcodec instead of torchaudio/video.
### Motivation
My use case is I'm working on a multimodal AV model, and w... |
https://github.com/huggingface/datasets/issues/7607 | Video and audio decoding with torchcodec | Awesome ! yes feel free to submit the PR, I can see what I can do for the remaining tests | ### Feature request
Pytorch is migrating video processing to torchcodec and it's pretty cool. It would be nice to migrate both the audio and video features to use torchcodec instead of torchaudio/video.
### Motivation
My use case is I'm working on a multimodal AV model, and what's nice about torchcodec is I can extr... | 20 | Video and audio decoding with torchcodec
### Feature request
Pytorch is migrating video processing to torchcodec and it's pretty cool. It would be nice to migrate both the audio and video features to use torchcodec instead of torchaudio/video.
### Motivation
My use case is I'm working on a multimodal AV model, and w... |
https://github.com/huggingface/datasets/issues/5536 | Failure to hash function when using .map() | Hi ! `enc` is not hashable:
```python
import tiktoken
from datasets.fingerprint import Hasher
enc = tiktoken.get_encoding("gpt2")
Hasher.hash(enc)
# raises TypeError: cannot pickle 'builtins.CoreBPE' object
```
It happens because it's not picklable, and because of that it's not possible to cache the result of... | ### Describe the bug
_Parameter 'function'=<function process at 0x7f1ec4388af0> of the transform datasets.arrow_dataset.Dataset.\_map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and ca... | 83 | Failure to hash function when using .map()
### Describe the bug
_Parameter 'function'=<function process at 0x7f1ec4388af0> of the transform datasets.arrow_dataset.Dataset.\_map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle o... |
https://github.com/huggingface/datasets/issues/5536 | Failure to hash function when using .map() | @lhoestq Thank you for the explanation and advice. Will relay all of this to the repo where this (non)issue arose.
Great job with huggingface! | ### Describe the bug
_Parameter 'function'=<function process at 0x7f1ec4388af0> of the transform datasets.arrow_dataset.Dataset.\_map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and ca... | 24 | Failure to hash function when using .map()
### Describe the bug
_Parameter 'function'=<function process at 0x7f1ec4388af0> of the transform datasets.arrow_dataset.Dataset.\_map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle o... |
https://github.com/huggingface/datasets/issues/5536 | Failure to hash function when using .map() | Just a heads up that when I'm trying to use TikToken along with the a given Dataset `.map()` method, I am still met with the following error :
```
File "/opt/conda/lib/python3.8/site-packages/dill/_dill.py", line 388, in save
StockPickler.save(self, obj, save_persistent_id)
File "/opt/conda/lib/python3.8/... | ### Describe the bug
_Parameter 'function'=<function process at 0x7f1ec4388af0> of the transform datasets.arrow_dataset.Dataset.\_map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and ca... | 60 | Failure to hash function when using .map()
### Describe the bug
_Parameter 'function'=<function process at 0x7f1ec4388af0> of the transform datasets.arrow_dataset.Dataset.\_map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle o... |
https://github.com/huggingface/datasets/issues/5536 | Failure to hash function when using .map() | @lhoestq @edhenry I am on datasets version `'2.12.0'. I see the same `TypeError: cannot pickle 'builtins.CoreBPE' object` that others are seeing. | ### Describe the bug
_Parameter 'function'=<function process at 0x7f1ec4388af0> of the transform datasets.arrow_dataset.Dataset.\_map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and ca... | 21 | Failure to hash function when using .map()
### Describe the bug
_Parameter 'function'=<function process at 0x7f1ec4388af0> of the transform datasets.arrow_dataset.Dataset.\_map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle o... |
https://github.com/huggingface/datasets/issues/5536 | Failure to hash function when using .map() | I am able to reproduce this on datasets 2.14.2. The `datasets.disable_caching()` doesn't work around it.
@lhoestq - you might want to reopen this issue. Because of this issue folks won't be able run Karpathy's NanoGPT :(. | ### Describe the bug
_Parameter 'function'=<function process at 0x7f1ec4388af0> of the transform datasets.arrow_dataset.Dataset.\_map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and ca... | 36 | Failure to hash function when using .map()
### Describe the bug
_Parameter 'function'=<function process at 0x7f1ec4388af0> of the transform datasets.arrow_dataset.Dataset.\_map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle o... |
https://github.com/huggingface/datasets/issues/5536 | Failure to hash function when using .map() | updateοΌ temporarily solved the problem by setting
```
--preprocess_num_workers 1
```
-------------
I have met the same problem, here is my env:
```
datasets 2.14.4
transformers 4.31.0
tiktoken 0.4.0
torch 1.13.1
``` | ### Describe the bug
_Parameter 'function'=<function process at 0x7f1ec4388af0> of the transform datasets.arrow_dataset.Dataset.\_map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and ca... | 32 | Failure to hash function when using .map()
### Describe the bug
_Parameter 'function'=<function process at 0x7f1ec4388af0> of the transform datasets.arrow_dataset.Dataset.\_map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle o... |
https://github.com/huggingface/datasets/issues/5536 | Failure to hash function when using .map() | @mengban I cannot reproduce the issue even with these versions installed. It would help if you could provide info about your system and the `pip list` output. | ### Describe the bug
_Parameter 'function'=<function process at 0x7f1ec4388af0> of the transform datasets.arrow_dataset.Dataset.\_map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and ca... | 27 | Failure to hash function when using .map()
### Describe the bug
_Parameter 'function'=<function process at 0x7f1ec4388af0> of the transform datasets.arrow_dataset.Dataset.\_map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle o... |
https://github.com/huggingface/datasets/issues/5536 | Failure to hash function when using .map() | @mariosasko Please take a look at this
```python
from typing import Any
from datasets import Dataset
import tiktoken
dataset = Dataset.from_list([{"n": str(i)} for i in range(20)])
enc = tiktoken.get_encoding("gpt2")
class A:
tokenizer = enc #tiktoken.get_encoding("gpt2")
def __call__(self, exa... | ### Describe the bug
_Parameter 'function'=<function process at 0x7f1ec4388af0> of the transform datasets.arrow_dataset.Dataset.\_map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and ca... | 89 | Failure to hash function when using .map()
### Describe the bug
_Parameter 'function'=<function process at 0x7f1ec4388af0> of the transform datasets.arrow_dataset.Dataset.\_map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle o... |
https://github.com/huggingface/datasets/issues/5536 | Failure to hash function when using .map() | Thanks @maxwellzh! Our `Hasher` works with this snippet, but the problem is running multiprocessing with a non-serializable `tiktoken.Encoding` object.
Inserting the following code before the `map` should fix this:
```python
import copyreg
def pickle_Encoding(enc):
return (functools.partial(tiktoken.core.Enc... | ### Describe the bug
_Parameter 'function'=<function process at 0x7f1ec4388af0> of the transform datasets.arrow_dataset.Dataset.\_map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and ca... | 69 | Failure to hash function when using .map()
### Describe the bug
_Parameter 'function'=<function process at 0x7f1ec4388af0> of the transform datasets.arrow_dataset.Dataset.\_map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle o... |
https://github.com/huggingface/datasets/issues/5536 | Failure to hash function when using .map() | I think the right way to fix this would be to have new tokenizer instance for each process. This applies to many other tokenizers that don't support multi-process or have bugs. To do this, first define tokenizer factory class like this:
```
class TikTokenFactory:
def __init__(self):
self._... | ### Describe the bug
_Parameter 'function'=<function process at 0x7f1ec4388af0> of the transform datasets.arrow_dataset.Dataset.\_map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and ca... | 100 | Failure to hash function when using .map()
### Describe the bug
_Parameter 'function'=<function process at 0x7f1ec4388af0> of the transform datasets.arrow_dataset.Dataset.\_map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle o... |
https://github.com/huggingface/datasets/issues/6612 | cnn_dailymail repeats itself | Hi ! We recently updated `cnn_dailymail` and now `datasets>=2.14` is needed to load it.
You can update `datasets` with
```
pip install -U datasets
``` | ### Describe the bug
When I try to load `cnn_dailymail` dataset, it takes longer than usual and when I checked the dataset it's 3x bigger than it's supposed to be.
Check https://huggingface.co/datasets/cnn_dailymail: it says 287k rows for train. But when I check length of train split it says 861339.
Also I che... | 25 | cnn_dailymail repeats itself
### Describe the bug
When I try to load `cnn_dailymail` dataset, it takes longer than usual and when I checked the dataset it's 3x bigger than it's supposed to be.
Check https://huggingface.co/datasets/cnn_dailymail: it says 287k rows for train. But when I check length of train split ... |
https://github.com/huggingface/datasets/issues/5228 | Loading a dataset from the hub fails if you happen to have a folder of the same name | `load_dataset` first checks for a local directory before checking for the Hub.
To make it explicit that it has to fetch the Hub, we could support the `hffs` syntax:
```python
load_dataset("hf://datasets/glue")
```
would that work for you ? Also cc @mariosasko who's leading the `hffs` project | ### Describe the bug
I'm not 100% sure this should be considered a bug, but it was certainly annoying to figure out the cause of. And perhaps I am just missing a specific argument needed to avoid this conflict. Basically I had a situation where multiple workers were downloading different parts of the glue dataset and ... | 46 | Loading a dataset from the hub fails if you happen to have a folder of the same name
### Describe the bug
I'm not 100% sure this should be considered a bug, but it was certainly annoying to figure out the cause of. And perhaps I am just missing a specific argument needed to avoid this conflict. Basically I had a situa... |
https://github.com/huggingface/datasets/issues/5228 | Loading a dataset from the hub fails if you happen to have a folder of the same name | This still has no proper solution in 2.11
perhaps have a `download_config="force_remote"` or just backtrack once you reach `EmptyDatasetError` locally and then try to load it from the hub (or a local cache, as that only gets checked if there is no local folder...?) | ### Describe the bug
I'm not 100% sure this should be considered a bug, but it was certainly annoying to figure out the cause of. And perhaps I am just missing a specific argument needed to avoid this conflict. Basically I had a situation where multiple workers were downloading different parts of the glue dataset and ... | 44 | Loading a dataset from the hub fails if you happen to have a folder of the same name
### Describe the bug
I'm not 100% sure this should be considered a bug, but it was certainly annoying to figure out the cause of. And perhaps I am just missing a specific argument needed to avoid this conflict. Basically I had a situa... |
https://github.com/huggingface/datasets/issues/7900 | `Permission denied` when sharing cache between users | I remember a fix from last year to usr the current umask for filelock 3.10.0, which filelock version are you using ? can you try another version ? | ### Describe the bug
We want to use `datasets` and `transformers` on a shared machine. Right now, each user has a separate HF_HOME in their home directory. To reduce duplicates of the datasets, we want to share that cache. While experimenting, we are running into `Permission denied` errors.
It looks like this was sup... | 28 | `Permission denied` when sharing cache between users
### Describe the bug
We want to use `datasets` and `transformers` on a shared machine. Right now, each user has a separate HF_HOME in their home directory. To reduce duplicates of the datasets, we want to share that cache. While experimenting, we are running into `P... |
https://github.com/huggingface/datasets/issues/7900 | `Permission denied` when sharing cache between users | Our test suite has been testing all versions over time for years now, including 3.19.1. And we didn't get failures for our tests.
I'm not sure but this could be an actual permission error unrelated to filelock then | ### Describe the bug
We want to use `datasets` and `transformers` on a shared machine. Right now, each user has a separate HF_HOME in their home directory. To reduce duplicates of the datasets, we want to share that cache. While experimenting, we are running into `Permission denied` errors.
It looks like this was sup... | 38 | `Permission denied` when sharing cache between users
### Describe the bug
We want to use `datasets` and `transformers` on a shared machine. Right now, each user has a separate HF_HOME in their home directory. To reduce duplicates of the datasets, we want to share that cache. While experimenting, we are running into `P... |
https://github.com/huggingface/datasets/issues/8256 | Dataset Viewer fails on TSFile datasets | Thanks for reporting ! I'm working on it :)
The viewer doesn't use `datasets` V5 yet, I have to do some minor adjustments first | ### Describe the bug
## Description
The Dataset Viewer fails when trying to display a dataset stored in TSFile format.
The error shown by the viewer is:
```python
ModuleNotFoundError: No module named 'tsfile'
### Steps to reproduce the bug
# Dataset Viewer fails to load TSFile dataset due to missing `tsfile` depe... | 24 | Dataset Viewer fails on TSFile datasets
### Describe the bug
## Description
The Dataset Viewer fails when trying to display a dataset stored in TSFile format.
The error shown by the viewer is:
```python
ModuleNotFoundError: No module named 'tsfile'
### Steps to reproduce the bug
# Dataset Viewer fails to load TSF... |
https://github.com/huggingface/datasets/issues/6856 | CI fails on Windows for test_delete_from_hub and test_xgetsize_private due to new-line character | After investigation, I have found that when a local file is uploaded to the Hub, the new line character is no longer transformed to "\n": on Windows machine now it is kept as "\r\n".
Any idea why this changed?
CC: @lhoestq | CI fails on Windows for test_delete_from_hub after the merge of:
- #6820
This is weird because the CI was green in the PR branch before merging to main.
```
FAILED tests/test_hub.py::test_delete_from_hub - AssertionError: assert [CommitOperat...\r\n---\r\n')] == [CommitOperat...in/*\n---\n')]
At index 1 ... | 41 | CI fails on Windows for test_delete_from_hub and test_xgetsize_private due to new-line character
CI fails on Windows for test_delete_from_hub after the merge of:
- #6820
This is weird because the CI was green in the PR branch before merging to main.
```
FAILED tests/test_hub.py::test_delete_from_hub - Assertion... |
https://github.com/huggingface/datasets/issues/7441 | `drop_last_batch` does not drop the last batch using IterableDataset + interleave_datasets + multi_worker | Hi @memray, Iβd like to help fix the issue with `drop_last_batch` not working when `num_workers > 1`. Iβll investigate and propose a solution. Thanks!
| ### Describe the bug
See the script below
`drop_last_batch=True` is defined using map() for each dataset.
The last batch for each dataset is expected to be dropped, id 21-25.
The code behaves as expected when num_workers=0 or 1.
When using num_workers>1, 'a-11', 'b-11', 'a-12', 'b-12' are gone and instead 21 and 22 a... | 24 | `drop_last_batch` does not drop the last batch using IterableDataset + interleave_datasets + multi_worker
### Describe the bug
See the script below
`drop_last_batch=True` is defined using map() for each dataset.
The last batch for each dataset is expected to be dropped, id 21-25.
The code behaves as expected when num... |
https://github.com/huggingface/datasets/issues/7441 | `drop_last_batch` does not drop the last batch using IterableDataset + interleave_datasets + multi_worker | Thank you very much for offering to help! I also noticed a problem related to a previous issue and left a comment [here](https://github.com/huggingface/datasets/issues/6565#issuecomment-2708169303) (the code checks the validity before certain columns removed). Can you take a look as well? | ### Describe the bug
See the script below
`drop_last_batch=True` is defined using map() for each dataset.
The last batch for each dataset is expected to be dropped, id 21-25.
The code behaves as expected when num_workers=0 or 1.
When using num_workers>1, 'a-11', 'b-11', 'a-12', 'b-12' are gone and instead 21 and 22 a... | 39 | `drop_last_batch` does not drop the last batch using IterableDataset + interleave_datasets + multi_worker
### Describe the bug
See the script below
`drop_last_batch=True` is defined using map() for each dataset.
The last batch for each dataset is expected to be dropped, id 21-25.
The code behaves as expected when num... |
https://github.com/huggingface/datasets/issues/7441 | `drop_last_batch` does not drop the last batch using IterableDataset + interleave_datasets + multi_worker | I looked into this and the problem here seems to be the order of sharding and batching/or how `drop_last_batch` is done (see the potential solutions below if unclear). Since we have 2 workers and 2 shards the data is split into 1-12 on worker 1 and 13-24 on worker 2. Now each of those workers iterates in batches of 10 ... | ### Describe the bug
See the script below
`drop_last_batch=True` is defined using map() for each dataset.
The last batch for each dataset is expected to be dropped, id 21-25.
The code behaves as expected when num_workers=0 or 1.
When using num_workers>1, 'a-11', 'b-11', 'a-12', 'b-12' are gone and instead 21 and 22 a... | 435 | `drop_last_batch` does not drop the last batch using IterableDataset + interleave_datasets + multi_worker
### Describe the bug
See the script below
`drop_last_batch=True` is defined using map() for each dataset.
The last batch for each dataset is expected to be dropped, id 21-25.
The code behaves as expected when num... |
https://github.com/huggingface/datasets/issues/5585 | Cache is not transportable | Hi ! No the cache is not transportable in general. It will work on a shared filesystem if you use the same python environment, but not across machines/os/environments.
In particular, reloading cached datasets does work, but reloading cached processed datasets (e.g. from `map`) may not work. This is because some hash... | ### Describe the bug
I would like to share cache between two machines (a Windows host machine and a WSL instance).
I run most my code in WSL. I have just run out of space in the virtual drive. Rather than expand the drive size, I plan to move to cache to the host Windows machine, thereby sharing the downloads.
I... | 85 | Cache is not transportable
### Describe the bug
I would like to share cache between two machines (a Windows host machine and a WSL instance).
I run most my code in WSL. I have just run out of space in the virtual drive. Rather than expand the drive size, I plan to move to cache to the host Windows machine, thereby ... |
https://github.com/huggingface/datasets/issues/3720 | Builder Configuration Update Required on Common Voice Dataset | Hi @aasem, thanks for reporting.
Please note that currently Commom Voice is hosted on our Hub as a community dataset by the Mozilla Foundation. See all Common Voice versions here: https://huggingface.co/mozilla-foundation
Maybe we should add an explaining note in our "legacy" Common Voice canonical script? What d... | Missing language in Common Voice dataset
**Link:** https://huggingface.co/datasets/common_voice
I tried to call the Urdu dataset using `load_dataset("common_voice", "ur", split="train+validation")` but couldn't due to builder configuration not found. I checked the source file here for the languages support:
ht... | 52 | Builder Configuration Update Required on Common Voice Dataset
Missing language in Common Voice dataset
**Link:** https://huggingface.co/datasets/common_voice
I tried to call the Urdu dataset using `load_dataset("common_voice", "ur", split="train+validation")` but couldn't due to builder configuration not found. I... |
https://github.com/huggingface/datasets/issues/3720 | Builder Configuration Update Required on Common Voice Dataset | Thank you, @albertvillanova, for the quick response. I am not sure about the exact flow but I guess adding the following lines under the `_Languages` dictionary definition in [common_voice.py](https://github.com/huggingface/datasets/blob/master/datasets/common_voice/common_voice.py) might resolve the issue. I guess the... | Missing language in Common Voice dataset
**Link:** https://huggingface.co/datasets/common_voice
I tried to call the Urdu dataset using `load_dataset("common_voice", "ur", split="train+validation")` but couldn't due to builder configuration not found. I checked the source file here for the languages support:
ht... | 66 | Builder Configuration Update Required on Common Voice Dataset
Missing language in Common Voice dataset
**Link:** https://huggingface.co/datasets/common_voice
I tried to call the Urdu dataset using `load_dataset("common_voice", "ur", split="train+validation")` but couldn't due to builder configuration not found. I... |
https://github.com/huggingface/datasets/issues/3720 | Builder Configuration Update Required on Common Voice Dataset | @aasem for compliance reasons, we are no longer updating the `common_voice.py` script.
We agreed with Mozilla Foundation to use their community datasets instead, which will ask you to accept their terms of use:
```
You need to share your contact information to access this dataset.
This repository is publicly ac... | Missing language in Common Voice dataset
**Link:** https://huggingface.co/datasets/common_voice
I tried to call the Urdu dataset using `load_dataset("common_voice", "ur", split="train+validation")` but couldn't due to builder configuration not found. I checked the source file here for the languages support:
ht... | 192 | Builder Configuration Update Required on Common Voice Dataset
Missing language in Common Voice dataset
**Link:** https://huggingface.co/datasets/common_voice
I tried to call the Urdu dataset using `load_dataset("common_voice", "ur", split="train+validation")` but couldn't due to builder configuration not found. I... |
https://github.com/huggingface/datasets/issues/3720 | Builder Configuration Update Required on Common Voice Dataset | @albertvillanova
>Maybe we should add an explaining note in our "legacy" Common Voice canonical script?
Yes, I agree we should have a deprecation notice in the canonical script to redirect users to the new script. | Missing language in Common Voice dataset
**Link:** https://huggingface.co/datasets/common_voice
I tried to call the Urdu dataset using `load_dataset("common_voice", "ur", split="train+validation")` but couldn't due to builder configuration not found. I checked the source file here for the languages support:
ht... | 35 | Builder Configuration Update Required on Common Voice Dataset
Missing language in Common Voice dataset
**Link:** https://huggingface.co/datasets/common_voice
I tried to call the Urdu dataset using `load_dataset("common_voice", "ur", split="train+validation")` but couldn't due to builder configuration not found. I... |
https://github.com/huggingface/datasets/issues/3720 | Builder Configuration Update Required on Common Voice Dataset | @albertvillanova,
I now get the following error after downloading my access token from the huggingface and passing it to `load_dataset` call:
`AttributeError: 'DownloadManager' object has no attribute 'download_config'`
Any quick pointer on how it might be resolved? | Missing language in Common Voice dataset
**Link:** https://huggingface.co/datasets/common_voice
I tried to call the Urdu dataset using `load_dataset("common_voice", "ur", split="train+validation")` but couldn't due to builder configuration not found. I checked the source file here for the languages support:
ht... | 37 | Builder Configuration Update Required on Common Voice Dataset
Missing language in Common Voice dataset
**Link:** https://huggingface.co/datasets/common_voice
I tried to call the Urdu dataset using `load_dataset("common_voice", "ur", split="train+validation")` but couldn't due to builder configuration not found. I... |
https://github.com/huggingface/datasets/issues/3720 | Builder Configuration Update Required on Common Voice Dataset | @aasem What version of `datasets` are you using? We renamed that attribute from `_download_config` to `download_conig` fairly recently, so updating to the newest version should resolve the issue:
```
pip install -U datasets
``` | Missing language in Common Voice dataset
**Link:** https://huggingface.co/datasets/common_voice
I tried to call the Urdu dataset using `load_dataset("common_voice", "ur", split="train+validation")` but couldn't due to builder configuration not found. I checked the source file here for the languages support:
ht... | 34 | Builder Configuration Update Required on Common Voice Dataset
Missing language in Common Voice dataset
**Link:** https://huggingface.co/datasets/common_voice
I tried to call the Urdu dataset using `load_dataset("common_voice", "ur", split="train+validation")` but couldn't due to builder configuration not found. I... |
https://github.com/huggingface/datasets/issues/7513 | MemoryError while creating dataset from generator | Hi ! We need to take the generator into account for the cache. The generator is hashed to make the dataset fingerprint used by the cache. This way you can reload the Dataset from the cache without regenerating in subsequent `from_generator` calls.
Maybe instead of removing generator from the hasher input, we can let u... | ### Describe the bug
# TL:DR
`Dataset.from_generator` function passes all of its arguments to `BuilderConfig.create_config_id`, including `generator` function itself. `BuilderConfig.create_config_id` function tries to hash all the args, which can take a large amount of time or even cause MemoryError if the dataset pr... | 72 | MemoryError while creating dataset from generator
### Describe the bug
# TL:DR
`Dataset.from_generator` function passes all of its arguments to `BuilderConfig.create_config_id`, including `generator` function itself. `BuilderConfig.create_config_id` function tries to hash all the args, which can take a large amount o... |
https://github.com/huggingface/datasets/issues/7513 | MemoryError while creating dataset from generator | Upd: I successfully generated a dataset from my large geospatial data with `generator` excluded from hashing and saved it to disk without running into memory errors. So, it looks like there are no other bottlenecks in dataset generation in my case
Maybe letting users pass their own fingerprint to skip hashing can be a... | ### Describe the bug
# TL:DR
`Dataset.from_generator` function passes all of its arguments to `BuilderConfig.create_config_id`, including `generator` function itself. `BuilderConfig.create_config_id` function tries to hash all the args, which can take a large amount of time or even cause MemoryError if the dataset pr... | 59 | MemoryError while creating dataset from generator
### Describe the bug
# TL:DR
`Dataset.from_generator` function passes all of its arguments to `BuilderConfig.create_config_id`, including `generator` function itself. `BuilderConfig.create_config_id` function tries to hash all the args, which can take a large amount o... |
https://github.com/huggingface/datasets/issues/7513 | MemoryError while creating dataset from generator | @lhoestq I tried to implement user-defined dataset fingerprint in #7533 . Am I doing it right? | ### Describe the bug
# TL:DR
`Dataset.from_generator` function passes all of its arguments to `BuilderConfig.create_config_id`, including `generator` function itself. `BuilderConfig.create_config_id` function tries to hash all the args, which can take a large amount of time or even cause MemoryError if the dataset pr... | 16 | MemoryError while creating dataset from generator
### Describe the bug
# TL:DR
`Dataset.from_generator` function passes all of its arguments to `BuilderConfig.create_config_id`, including `generator` function itself. `BuilderConfig.create_config_id` function tries to hash all the args, which can take a large amount o... |
https://github.com/huggingface/datasets/issues/6306 | pyinstaller : OSError: could not get source code | more informationοΌ
```
File "text2vec\__init__.py", line 8, in <module>
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "PyInstaller\loader\pyimod02... | ### Describe the bug
I ran a package with pyinstaller and got the following errorοΌ
### Steps to reproduce the bug
```
...
File "datasets\__init__.py", line 52, in <module>
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_an... | 232 | pyinstaller : OSError: could not get source code
### Describe the bug
I ran a package with pyinstaller and got the following errorοΌ
### Steps to reproduce the bug
```
...
File "datasets\__init__.py", line 52, in <module>
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<froz... |
https://github.com/huggingface/datasets/issues/6306 | pyinstaller : OSError: could not get source code | > > '
>
> thanks,I solve it.it's about pyinstaller.
I encountered the same error, how to solve it? | ### Describe the bug
I ran a package with pyinstaller and got the following errorοΌ
### Steps to reproduce the bug
```
...
File "datasets\__init__.py", line 52, in <module>
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_an... | 19 | pyinstaller : OSError: could not get source code
### Describe the bug
I ran a package with pyinstaller and got the following errorοΌ
### Steps to reproduce the bug
```
...
File "datasets\__init__.py", line 52, in <module>
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<froz... |
https://github.com/huggingface/datasets/issues/3686 | `Translation` features cannot be `flatten`ed | Thanks for reporting, @SBrandeis! Some additional feature types that don't behave as expected when flattened: `Audio`, `Image` and `TranslationVariableLanguages` | ## Describe the bug
(`Dataset.flatten`)[https://github.com/huggingface/datasets/blob/master/src/datasets/arrow_dataset.py#L1265] fails for columns with feature (`Translation`)[https://github.com/huggingface/datasets/blob/3edbeb0ec6519b79f1119adc251a1a6b379a2c12/src/datasets/features/translation.py#L8]
## Steps to... | 19 | `Translation` features cannot be `flatten`ed
## Describe the bug
(`Dataset.flatten`)[https://github.com/huggingface/datasets/blob/master/src/datasets/arrow_dataset.py#L1265] fails for columns with feature (`Translation`)[https://github.com/huggingface/datasets/blob/3edbeb0ec6519b79f1119adc251a1a6b379a2c12/src/datase... |
https://github.com/huggingface/datasets/issues/5147 | Allow ignoring kwargs inside fn_kwargs during dataset.map's fingerprinting | Hi ! In the `transformers` issue the object to not hash is a `Pool` - I think you can instantiate it inside your function instead of passing it as a parameter. It's good practice that your function and all its fn_kwargs are picklable, in case you want to parallelize `map` using `num_proc>1`
For the other case `def f... | ### Feature request
`dataset.map` accepts a `fn_kwargs` that is passed to `fn`. Currently, the whole `fn_kwargs` is used by `fingerprint_transform` to calculate the new fingerprint.
I'd like to be able to inform `fingerprint_transform` which `fn_kwargs` shoud/shouldn't be taken into account during hashing.
Of co... | 94 | Allow ignoring kwargs inside fn_kwargs during dataset.map's fingerprinting
### Feature request
`dataset.map` accepts a `fn_kwargs` that is passed to `fn`. Currently, the whole `fn_kwargs` is used by `fingerprint_transform` to calculate the new fingerprint.
I'd like to be able to inform `fingerprint_transform` which... |
https://github.com/huggingface/datasets/issues/5147 | Allow ignoring kwargs inside fn_kwargs during dataset.map's fingerprinting | Hi @lhoestq! Thanks for your response.
A `Pool` shouldn't be instantiated within the function, because there's a huge overhead in doing so. The main idea is that the same `Pool` should be used across all function calls. Parallel `map` is not helpful/desired in that specific scenario, because the heavy parallel compu... | ### Feature request
`dataset.map` accepts a `fn_kwargs` that is passed to `fn`. Currently, the whole `fn_kwargs` is used by `fingerprint_transform` to calculate the new fingerprint.
I'd like to be able to inform `fingerprint_transform` which `fn_kwargs` shoud/shouldn't be taken into account during hashing.
Of co... | 144 | Allow ignoring kwargs inside fn_kwargs during dataset.map's fingerprinting
### Feature request
`dataset.map` accepts a `fn_kwargs` that is passed to `fn`. Currently, the whole `fn_kwargs` is used by `fingerprint_transform` to calculate the new fingerprint.
I'd like to be able to inform `fingerprint_transform` which... |
https://github.com/huggingface/datasets/issues/5147 | Allow ignoring kwargs inside fn_kwargs during dataset.map's fingerprinting | > Would it be created for this specific purpose? Any downsides in just using datasets.fingerprint?
This can also go in datasets.fingerprint indeed - but maybe datasets.hashing tells more about what the register function does (i.e. register this function to have a custom hashing) ?
> And would datasets.hashing.reg... | ### Feature request
`dataset.map` accepts a `fn_kwargs` that is passed to `fn`. Currently, the whole `fn_kwargs` is used by `fingerprint_transform` to calculate the new fingerprint.
I'd like to be able to inform `fingerprint_transform` which `fn_kwargs` shoud/shouldn't be taken into account during hashing.
Of co... | 120 | Allow ignoring kwargs inside fn_kwargs during dataset.map's fingerprinting
### Feature request
`dataset.map` accepts a `fn_kwargs` that is passed to `fn`. Currently, the whole `fn_kwargs` is used by `fingerprint_transform` to calculate the new fingerprint.
I'd like to be able to inform `fingerprint_transform` which... |
https://github.com/huggingface/datasets/issues/5147 | Allow ignoring kwargs inside fn_kwargs during dataset.map's fingerprinting | > This can also go in datasets.fingerprint indeed - but maybe datasets.hashing tells more about what the register function does (i.e. register this function to have a custom hashing) ?
Sure, it makes sense.
---
I don't plan to work on it right now, so I'll let it unassigned in case somebody wants to join. I'll... | ### Feature request
`dataset.map` accepts a `fn_kwargs` that is passed to `fn`. Currently, the whole `fn_kwargs` is used by `fingerprint_transform` to calculate the new fingerprint.
I'd like to be able to inform `fingerprint_transform` which `fn_kwargs` shoud/shouldn't be taken into account during hashing.
Of co... | 65 | Allow ignoring kwargs inside fn_kwargs during dataset.map's fingerprinting
### Feature request
`dataset.map` accepts a `fn_kwargs` that is passed to `fn`. Currently, the whole `fn_kwargs` is used by `fingerprint_transform` to calculate the new fingerprint.
I'd like to be able to inform `fingerprint_transform` which... |
https://github.com/huggingface/datasets/issues/6396 | Issue with pyarrow 14.0.1 | https://github.com/huggingface/datasets-server/pull/2089#pullrequestreview-1724449532
> Yes, I understand now: they have disabled their `PyExtensionType` and we use it in `datasets` for arrays... | See https://github.com/huggingface/datasets-server/pull/2089 for reference
```
from datasets import (Array2D, Dataset, Features)
feature_type = Array2D(shape=(2, 2), dtype="float32")
content = [[0.0, 0.0], [0.0, 0.0]]
features = Features({"col": feature_type})
dataset = Dataset.from_dict({"col": [content]}, fea... | 19 | Issue with pyarrow 14.0.1
See https://github.com/huggingface/datasets-server/pull/2089 for reference
```
from datasets import (Array2D, Dataset, Features)
feature_type = Array2D(shape=(2, 2), dtype="float32")
content = [[0.0, 0.0], [0.0, 0.0]]
features = Features({"col": feature_type})
dataset = Dataset.from_di... |
https://github.com/huggingface/datasets/issues/6396 | Issue with pyarrow 14.0.1 | Running the following is a workaround for `pyarrow <= 20.0.0` :
```
import pyarrow
pyarrow.PyExtensionType.set_auto_load(True)
``` | See https://github.com/huggingface/datasets-server/pull/2089 for reference
```
from datasets import (Array2D, Dataset, Features)
feature_type = Array2D(shape=(2, 2), dtype="float32")
content = [[0.0, 0.0], [0.0, 0.0]]
features = Features({"col": feature_type})
dataset = Dataset.from_dict({"col": [content]}, fea... | 16 | Issue with pyarrow 14.0.1
See https://github.com/huggingface/datasets-server/pull/2089 for reference
```
from datasets import (Array2D, Dataset, Features)
feature_type = Array2D(shape=(2, 2), dtype="float32")
content = [[0.0, 0.0], [0.0, 0.0]]
features = Features({"col": feature_type})
dataset = Dataset.from_di... |
https://github.com/huggingface/datasets/issues/4071 | Loading issue for xuyeliu/notebookCDG dataset | Hi @Jun-jie-Huang,
As the error message says, ".pkl" data files are not supported.
If you would like to share your dataset on the Hub, you would need:
- either to create a Python loading script, that loads the data in any format
- or to transform your data files to one of the supported formats (listed in the er... | ## Dataset viewer issue for '*xuyeliu/notebookCDG*'
**Link:** *[link to the dataset viewer page](https://huggingface.co/datasets/xuyeliu/notebookCDG)*
*Couldn't load the xuyeliu/notebookCDG with provided scripts: *
```
from datasets import load_dataset
dataset = load_dataset("xuyeliu/notebookCDG/dataset_note... | 103 | Loading issue for xuyeliu/notebookCDG dataset
## Dataset viewer issue for '*xuyeliu/notebookCDG*'
**Link:** *[link to the dataset viewer page](https://huggingface.co/datasets/xuyeliu/notebookCDG)*
*Couldn't load the xuyeliu/notebookCDG with provided scripts: *
```
from datasets import load_dataset
dataset = ... |
https://github.com/huggingface/datasets/issues/5912 | Missing elements in `map` a batched dataset | Hi ! in your code batching is **only used within** `map`, to process examples in batch. The dataset itself however is not batched and returns elements one by one.
To iterate on batches, you can do
```python
for batch in dataset.iter(batch_size=8):
...
``` | ### Describe the bug
As outlined [here](https://discuss.huggingface.co/t/length-error-using-map-with-datasets/40969/3?u=sachin), the following collate function drops 5 out of possible 6 elements in the batch (it is 6 because out of the eight, two are bad links in laion). A reproducible [kaggle kernel ](https://www.kag... | 43 | Missing elements in `map` a batched dataset
### Describe the bug
As outlined [here](https://discuss.huggingface.co/t/length-error-using-map-with-datasets/40969/3?u=sachin), the following collate function drops 5 out of possible 6 elements in the batch (it is 6 because out of the eight, two are bad links in laion). A r... |
https://github.com/huggingface/datasets/issues/7477 | What is the canonical way to compress a Dataset? | I saw this post by @lhoestq: https://discuss.huggingface.co/t/increased-arrow-table-size-by-factor-of-2/26561/4 suggesting that there is at least some internal code for writing sharded parquet datasets non-concurrently. This appears to be that code: https://github.com/huggingface/datasets/blob/94ccd1b4fada8a92cea96dc8... | Given that Arrow is the preferred backend for a Dataset, what is a user supposed to do if they want concurrent reads, concurrent writes AND on-disk compression for a larger dataset?
Parquet would be the obvious answer except that there is no native support for writing sharded, parquet datasets concurrently [[1](https:... | 67 | What is the canonical way to compress a Dataset?
Given that Arrow is the preferred backend for a Dataset, what is a user supposed to do if they want concurrent reads, concurrent writes AND on-disk compression for a larger dataset?
Parquet would be the obvious answer except that there is no native support for writing s... |
https://github.com/huggingface/datasets/issues/7477 | What is the canonical way to compress a Dataset? | We simply haven't implemented a method to save as sharded parquet locally yet ^^'
Right now the only sharded parquet export method is `push_to_hub()` which writes to HF. But we can have a local one as well.
In the meantime the easiest way to export as sharded parquet locally is to `.shard()` and `.to_parquet()` (see... | Given that Arrow is the preferred backend for a Dataset, what is a user supposed to do if they want concurrent reads, concurrent writes AND on-disk compression for a larger dataset?
Parquet would be the obvious answer except that there is no native support for writing sharded, parquet datasets concurrently [[1](https:... | 60 | What is the canonical way to compress a Dataset?
Given that Arrow is the preferred backend for a Dataset, what is a user supposed to do if they want concurrent reads, concurrent writes AND on-disk compression for a larger dataset?
Parquet would be the obvious answer except that there is no native support for writing s... |
https://github.com/huggingface/datasets/issues/7477 | What is the canonical way to compress a Dataset? | > In the meantime the easiest way to export as sharded parquet locally is to .shard() and .to_parquet()
Makes sense, BUT how can it be done concurrently? I could of course use multiprocessing myself or a dozen other libraries for parallelizing single-node/local operations like that.
What I'm asking though is, what i... | Given that Arrow is the preferred backend for a Dataset, what is a user supposed to do if they want concurrent reads, concurrent writes AND on-disk compression for a larger dataset?
Parquet would be the obvious answer except that there is no native support for writing sharded, parquet datasets concurrently [[1](https:... | 93 | What is the canonical way to compress a Dataset?
Given that Arrow is the preferred backend for a Dataset, what is a user supposed to do if they want concurrent reads, concurrent writes AND on-disk compression for a larger dataset?
Parquet would be the obvious answer except that there is no native support for writing s... |
https://github.com/huggingface/datasets/issues/7477 | What is the canonical way to compress a Dataset? | Everything in `datasets` is picklable :) and even better: since the data are memory mapped from disk, pickling in one process and unpickling in another doesn't do any copy - it instantaneously reloads the memory map.
So feel free to use the library you prefer to parallelize your operations.
(it's another story in dis... | Given that Arrow is the preferred backend for a Dataset, what is a user supposed to do if they want concurrent reads, concurrent writes AND on-disk compression for a larger dataset?
Parquet would be the obvious answer except that there is no native support for writing sharded, parquet datasets concurrently [[1](https:... | 74 | What is the canonical way to compress a Dataset?
Given that Arrow is the preferred backend for a Dataset, what is a user supposed to do if they want concurrent reads, concurrent writes AND on-disk compression for a larger dataset?
Parquet would be the obvious answer except that there is no native support for writing s... |
https://github.com/huggingface/datasets/issues/3447 | HF_DATASETS_OFFLINE=1 didn't stop datasets.builder from downloading | Hi ! Indeed it says "downloading and preparing" but in your case it didn't need to download anything since you used local files (it would have thrown an error otherwise). I think we can improve the logging to make it clearer in this case | ## Describe the bug
According to https://huggingface.co/docs/datasets/loading_datasets.html#loading-a-dataset-builder, setting HF_DATASETS_OFFLINE to 1 should make datasets to "run in full offline mode". It didn't work for me. At the very beginning, datasets still tried to download "custom data configuration" for JSON... | 44 | HF_DATASETS_OFFLINE=1 didn't stop datasets.builder from downloading
## Describe the bug
According to https://huggingface.co/docs/datasets/loading_datasets.html#loading-a-dataset-builder, setting HF_DATASETS_OFFLINE to 1 should make datasets to "run in full offline mode". It didn't work for me. At the very beginning, ... |
https://github.com/huggingface/datasets/issues/3447 | HF_DATASETS_OFFLINE=1 didn't stop datasets.builder from downloading | @lhoestq Thank you for explaining. I am sorry but I was not clear about my intention. I didn't want to kill internet traffic; I wanted to kill all write activity. In other words, you can imagine that my storage has only read access but crashes on write.
When run_clm.py is invoked with the same parameters, the hash i... | ## Describe the bug
According to https://huggingface.co/docs/datasets/loading_datasets.html#loading-a-dataset-builder, setting HF_DATASETS_OFFLINE to 1 should make datasets to "run in full offline mode". It didn't work for me. At the very beginning, datasets still tried to download "custom data configuration" for JSON... | 201 | HF_DATASETS_OFFLINE=1 didn't stop datasets.builder from downloading
## Describe the bug
According to https://huggingface.co/docs/datasets/loading_datasets.html#loading-a-dataset-builder, setting HF_DATASETS_OFFLINE to 1 should make datasets to "run in full offline mode". It didn't work for me. At the very beginning, ... |
https://github.com/huggingface/datasets/issues/3447 | HF_DATASETS_OFFLINE=1 didn't stop datasets.builder from downloading | Hi ! `load_dataset` may re-generate your dataset if some parameters changed indeed. If you want to freeze a dataset loaded with `load_dataset`, I think the best solution is just to save it somewhere on your disk with `.save_to_disk(my_dataset_dir)` and reload it with `load_from_disk(my_dataset_dir)`. This way you will ... | ## Describe the bug
According to https://huggingface.co/docs/datasets/loading_datasets.html#loading-a-dataset-builder, setting HF_DATASETS_OFFLINE to 1 should make datasets to "run in full offline mode". It didn't work for me. At the very beginning, datasets still tried to download "custom data configuration" for JSON... | 58 | HF_DATASETS_OFFLINE=1 didn't stop datasets.builder from downloading
## Describe the bug
According to https://huggingface.co/docs/datasets/loading_datasets.html#loading-a-dataset-builder, setting HF_DATASETS_OFFLINE to 1 should make datasets to "run in full offline mode". It didn't work for me. At the very beginning, ... |
https://github.com/huggingface/datasets/issues/5028 | passing parameters to the method passed to Dataset.from_generator() | Hi! Yes, you can either use the `gen_kwargs` param in `Dataset.from_generator` (`ds = Dataset.from_generator(gen, gen_kwargs={"param1": val})`) or wrap the generator function with `functools.partial`
(`ds = Dataset.from_generator(functools.partial(gen, param1="val"))`) to pass custom parameters to it.
| Big thanks for providing dataset creation via a generator.
I want to ask whether there is any way that parameters can be passed to the method Dataset.from_generator() method, like as follows.
```
from datasets import Dataset
def gen(param1):
for idx in len(custom_dataset):
yield custom_dataset[id... | 33 | passing parameters to the method passed to Dataset.from_generator()
Big thanks for providing dataset creation via a generator.
I want to ask whether there is any way that parameters can be passed to the method Dataset.from_generator() method, like as follows.
```
from datasets import Dataset
def gen(param1):
... |
https://github.com/huggingface/datasets/issues/7137 | [BUG] dataset_info sequence unexpected behavior in README.md YAML | The non-sequence case works well (`dict[str, str]` instead of `list[dict[str, str]]`), which makes me believe it shall be a bug for `sequence` and my proposed behavior shall be expected.
```
dataset_info:
- config_name: default
features:
- name: answers
dtype:
- name: text
dtype: string
-... | ### Describe the bug
When working on `dataset_info` yaml, I find my data column with format `list[dict[str, str]]` cannot be coded correctly.
My data looks like
```
{"answers":[{"text": "ADDRESS", "label": "abc"}]}
```
My `dataset_info` in README.md is:
```
dataset_info:
- config_name: default
feature... | 57 | [BUG] dataset_info sequence unexpected behavior in README.md YAML
### Describe the bug
When working on `dataset_info` yaml, I find my data column with format `list[dict[str, str]]` cannot be coded correctly.
My data looks like
```
{"answers":[{"text": "ADDRESS", "label": "abc"}]}
```
My `dataset_info` in RE... |
https://github.com/huggingface/datasets/issues/7137 | [BUG] dataset_info sequence unexpected behavior in README.md YAML | According to https://github.com/huggingface/datasets/issues/7590#issuecomment-3035647354
replacing `sequence` to `list` will solve this issue.
```
dataset_info:
- config_name: default
features:
- name: answers
list:
- name: text
sequence: string
- name: label
sequence: string
``` | ### Describe the bug
When working on `dataset_info` yaml, I find my data column with format `list[dict[str, str]]` cannot be coded correctly.
My data looks like
```
{"answers":[{"text": "ADDRESS", "label": "abc"}]}
```
My `dataset_info` in README.md is:
```
dataset_info:
- config_name: default
feature... | 32 | [BUG] dataset_info sequence unexpected behavior in README.md YAML
### Describe the bug
When working on `dataset_info` yaml, I find my data column with format `list[dict[str, str]]` cannot be coded correctly.
My data looks like
```
{"answers":[{"text": "ADDRESS", "label": "abc"}]}
```
My `dataset_info` in RE... |
https://github.com/huggingface/datasets/issues/7137 | [BUG] dataset_info sequence unexpected behavior in README.md YAML | Btw you can use `list` instead of `sequence` everywhere for consistency:
```
dataset_info:
- config_name: default
features:
- name: answers
list:
- name: text
list: string
- name: label
list: string
``` | ### Describe the bug
When working on `dataset_info` yaml, I find my data column with format `list[dict[str, str]]` cannot be coded correctly.
My data looks like
```
{"answers":[{"text": "ADDRESS", "label": "abc"}]}
```
My `dataset_info` in README.md is:
```
dataset_info:
- config_name: default
feature... | 32 | [BUG] dataset_info sequence unexpected behavior in README.md YAML
### Describe the bug
When working on `dataset_info` yaml, I find my data column with format `list[dict[str, str]]` cannot be coded correctly.
My data looks like
```
{"answers":[{"text": "ADDRESS", "label": "abc"}]}
```
My `dataset_info` in RE... |
https://github.com/huggingface/datasets/issues/6118 | IterableDataset.from_generator() fails with pickle error when provided a generator or iterator | Hi! `IterableDataset.from_generator` expects a generator function, not the object (to be consistent with `Dataset.from_generator`).
You can fix the above snippet as follows:
```python
train_dataset = IterableDataset.from_generator(line_generator, fn_kwargs={"files": model_training_files})
``` | ### Describe the bug
**Description**
Providing a generator in an instantiation of IterableDataset.from_generator() fails with `TypeError: cannot pickle 'generator' object` when the generator argument is supplied with a generator.
**Code example**
```
def line_generator(files: List[Path]):
if isinstance(f... | 29 | IterableDataset.from_generator() fails with pickle error when provided a generator or iterator
### Describe the bug
**Description**
Providing a generator in an instantiation of IterableDataset.from_generator() fails with `TypeError: cannot pickle 'generator' object` when the generator argument is supplied with a gene... |
https://github.com/huggingface/datasets/issues/6118 | IterableDataset.from_generator() fails with pickle error when provided a generator or iterator | to anyone reaching this issue, the argument is `gen_kwargs`:
```py
train_dataset = IterableDataset.from_generator(line_generator, gen_kwargs={"files": model_training_files})
``` | ### Describe the bug
**Description**
Providing a generator in an instantiation of IterableDataset.from_generator() fails with `TypeError: cannot pickle 'generator' object` when the generator argument is supplied with a generator.
**Code example**
```
def line_generator(files: List[Path]):
if isinstance(f... | 16 | IterableDataset.from_generator() fails with pickle error when provided a generator or iterator
### Describe the bug
**Description**
Providing a generator in an instantiation of IterableDataset.from_generator() fails with `TypeError: cannot pickle 'generator' object` when the generator argument is supplied with a gene... |
https://github.com/huggingface/datasets/issues/6118 | IterableDataset.from_generator() fails with pickle error when provided a generator or iterator | This still fails, for both Dataset and IterableDataset
```python
records = [1, 2, 3]
gen = ({"row": str(x)} for x in records)
dataset = IterableDataset.from_generator(generator=gen)
```
Edit: gen_kwargs must be picklable, it can't be an iterator even if you are not doing multiprocessing, the same... | ### Describe the bug
**Description**
Providing a generator in an instantiation of IterableDataset.from_generator() fails with `TypeError: cannot pickle 'generator' object` when the generator argument is supplied with a generator.
**Code example**
```
def line_generator(files: List[Path]):
if isinstance(f... | 50 | IterableDataset.from_generator() fails with pickle error when provided a generator or iterator
### Describe the bug
**Description**
Providing a generator in an instantiation of IterableDataset.from_generator() fails with `TypeError: cannot pickle 'generator' object` when the generator argument is supplied with a gene... |
https://github.com/huggingface/datasets/issues/6118 | IterableDataset.from_generator() fails with pickle error when provided a generator or iterator | > This still fails, for both Dataset and IterableDataset
>
> records = [1, 2, 3]
>
> gen = ({"row": str(x)} for x in records)
>
> dataset = IterableDataset.from_generator(generator=gen)
> Edit: gen_kwargs must be picklable, it can't be an iterator even if you are not doing multiprocessing, the same goes for i... | ### Describe the bug
**Description**
Providing a generator in an instantiation of IterableDataset.from_generator() fails with `TypeError: cannot pickle 'generator' object` when the generator argument is supplied with a generator.
**Code example**
```
def line_generator(files: List[Path]):
if isinstance(f... | 150 | IterableDataset.from_generator() fails with pickle error when provided a generator or iterator
### Describe the bug
**Description**
Providing a generator in an instantiation of IterableDataset.from_generator() fails with `TypeError: cannot pickle 'generator' object` when the generator argument is supplied with a gene... |
https://github.com/huggingface/datasets/issues/4405 | [TypeError: Couldn't cast array of type] Cannot process dataset in v2.2.2 | And if the problem is that the way I am to construct the {Entity Type: list of spans} makes entity types without any spans hard to handle, is there a better way to meet the demand? Although I have verified that to make entity types without any spans to behave like `entity_chunk[label] = [[""]]` can perform normally, I ... | ## Describe the bug
I am trying to process the [conll2012_ontonotesv5](https://huggingface.co/datasets/conll2012_ontonotesv5) dataset in `datasets` v2.2.2 and am running into a type error when casting the features.
## Steps to reproduce the bug
```python
import os
from typing import (
List,
Dict,
)
f... | 67 | [TypeError: Couldn't cast array of type] Cannot process dataset in v2.2.2
## Describe the bug
I am trying to process the [conll2012_ontonotesv5](https://huggingface.co/datasets/conll2012_ontonotesv5) dataset in `datasets` v2.2.2 and am running into a type error when casting the features.
## Steps to reproduce the b... |
https://github.com/huggingface/datasets/issues/5251 | Docs are not generated after latest release | After a discussion with @mishig25:
- He said that this action should be triggered if we call our release branch according to the regex `v*-release`, as transformers does
- I said that our procedure is different: our release branch is *temporary* and it is deleted just after the release PR is merged to main
- Indee... | After the latest `datasets` release version 0.7.0, the docs were not generated.
As we have changed the release procedure (so that now we do not push directly to main branch), maybe we should also change the corresponding GitHub action:
https://github.com/huggingface/datasets/blob/edf1902f954c5568daadebcd8754bdad4... | 105 | Docs are not generated after latest release
After the latest `datasets` release version 0.7.0, the docs were not generated.
As we have changed the release procedure (so that now we do not push directly to main branch), maybe we should also change the corresponding GitHub action:
https://github.com/huggingface/dat... |
https://github.com/huggingface/datasets/issues/5251 | Docs are not generated after latest release | He says not; but the branch has no tag yet; does the doc building require the tag? Or just the version number in `__init__.py` or setup.py? | After the latest `datasets` release version 0.7.0, the docs were not generated.
As we have changed the release procedure (so that now we do not push directly to main branch), maybe we should also change the corresponding GitHub action:
https://github.com/huggingface/datasets/blob/edf1902f954c5568daadebcd8754bdad4... | 26 | Docs are not generated after latest release
After the latest `datasets` release version 0.7.0, the docs were not generated.
As we have changed the release procedure (so that now we do not push directly to main branch), maybe we should also change the corresponding GitHub action:
https://github.com/huggingface/dat... |
https://github.com/huggingface/datasets/issues/5251 | Docs are not generated after latest release | It uses `module.__version__` (i.e. the one defined in `__init__.py`) - no need to have a tag
https://github.com/huggingface/doc-builder/blob/81575cf081964c30ea5fd39450f4820db963f18e/src/doc_builder/commands/build.py#L69 | After the latest `datasets` release version 0.7.0, the docs were not generated.
As we have changed the release procedure (so that now we do not push directly to main branch), maybe we should also change the corresponding GitHub action:
https://github.com/huggingface/datasets/blob/edf1902f954c5568daadebcd8754bdad4... | 17 | Docs are not generated after latest release
After the latest `datasets` release version 0.7.0, the docs were not generated.
As we have changed the release procedure (so that now we do not push directly to main branch), maybe we should also change the corresponding GitHub action:
https://github.com/huggingface/dat... |
https://github.com/huggingface/datasets/issues/5251 | Docs are not generated after latest release | Thanks, @lhoestq.
@mishig25 has manually forced the generation of the docs, that are live for 2.7.0 version: https://huggingface.co/docs/datasets/v2.7.0/en/index | After the latest `datasets` release version 0.7.0, the docs were not generated.
As we have changed the release procedure (so that now we do not push directly to main branch), maybe we should also change the corresponding GitHub action:
https://github.com/huggingface/datasets/blob/edf1902f954c5568daadebcd8754bdad4... | 18 | Docs are not generated after latest release
After the latest `datasets` release version 0.7.0, the docs were not generated.
As we have changed the release procedure (so that now we do not push directly to main branch), maybe we should also change the corresponding GitHub action:
https://github.com/huggingface/dat... |
https://github.com/huggingface/datasets/issues/5251 | Docs are not generated after latest release | just to confirm, is there anything I need to do from my side ? Or is everything good here ? | After the latest `datasets` release version 0.7.0, the docs were not generated.
As we have changed the release procedure (so that now we do not push directly to main branch), maybe we should also change the corresponding GitHub action:
https://github.com/huggingface/datasets/blob/edf1902f954c5568daadebcd8754bdad4... | 20 | Docs are not generated after latest release
After the latest `datasets` release version 0.7.0, the docs were not generated.
As we have changed the release procedure (so that now we do not push directly to main branch), maybe we should also change the corresponding GitHub action:
https://github.com/huggingface/dat... |
https://github.com/huggingface/datasets/issues/4540 | Avoid splitting by` .py` for the file. | Hi @espoirMur, thanks for reporting.
You are right: that code line could be improved and made more generically valid.
On the other hand, I would suggest using `os.path.splitext` instead.
Are you willing to open a PR? :) | https://github.com/huggingface/datasets/blob/90b3a98065556fc66380cafd780af9b1814b9426/src/datasets/load.py#L272
Hello,
Thanks you for this library .
I was using it and I had one edge case. my home folder name ends with `.py` it is `/home/espoir.py` so anytime I am running the code to load a local module thi... | 37 | Avoid splitting by` .py` for the file.
https://github.com/huggingface/datasets/blob/90b3a98065556fc66380cafd780af9b1814b9426/src/datasets/load.py#L272
Hello,
Thanks you for this library .
I was using it and I had one edge case. my home folder name ends with `.py` it is `/home/espoir.py` so anytime I am runn... |
https://github.com/huggingface/datasets/issues/5650 | load_dataset can't work correct with my image data | > Can you post a reproducible code snippet of what you tried to do?
>
>
```python
from datasets import load_dataset
dataset = load_dataset("my_folder_name", split="train")
``` | I have about 20000 images in my folder which divided into 4 folders with class names.
When i use load_dataset("my_folder_name", split="train") this function create dataset in which there are only 4 images, the remaining 19000 images were not added there. What is the problem and did not understand. Tried converting imag... | 26 | load_dataset can't work correct with my image data
I have about 20000 images in my folder which divided into 4 folders with class names.
When i use load_dataset("my_folder_name", split="train") this function create dataset in which there are only 4 images, the remaining 19000 images were not added there. What is the p... |
https://github.com/huggingface/datasets/issues/5650 | load_dataset can't work correct with my image data | hi @WiNE-iNEFF ! can you please also tell a bit more about how your data is structured (directory structure and filenames patterns)? | I have about 20000 images in my folder which divided into 4 folders with class names.
When i use load_dataset("my_folder_name", split="train") this function create dataset in which there are only 4 images, the remaining 19000 images were not added there. What is the problem and did not understand. Tried converting imag... | 22 | load_dataset can't work correct with my image data
I have about 20000 images in my folder which divided into 4 folders with class names.
When i use load_dataset("my_folder_name", split="train") this function create dataset in which there are only 4 images, the remaining 19000 images were not added there. What is the p... |
https://github.com/huggingface/datasets/issues/5650 | load_dataset can't work correct with my image data | > hi @WiNE-iNEFF ! can you please also tell a bit more about how your data is structured (directory structure and filenames patterns)?
All file have format .png converted in RGBA.
In main folder "MyData" contain 4 folder with images. In function load_dataset i use folder "MyData" | I have about 20000 images in my folder which divided into 4 folders with class names.
When i use load_dataset("my_folder_name", split="train") this function create dataset in which there are only 4 images, the remaining 19000 images were not added there. What is the problem and did not understand. Tried converting imag... | 47 | load_dataset can't work correct with my image data
I have about 20000 images in my folder which divided into 4 folders with class names.
When i use load_dataset("my_folder_name", split="train") this function create dataset in which there are only 4 images, the remaining 19000 images were not added there. What is the p... |
https://github.com/huggingface/datasets/issues/5650 | load_dataset can't work correct with my image data | @WiNE-iNEFF I'm sorry there is still not enough information to answer your question :( For now I can only assume that your [filenames contain split names](https://huggingface.co/docs/datasets/repository_structure#splits-and-file-names) which are somehow incorrectly parsed.
What would be the output if you omit `split`... | I have about 20000 images in my folder which divided into 4 folders with class names.
When i use load_dataset("my_folder_name", split="train") this function create dataset in which there are only 4 images, the remaining 19000 images were not added there. What is the problem and did not understand. Tried converting imag... | 50 | load_dataset can't work correct with my image data
I have about 20000 images in my folder which divided into 4 folders with class names.
When i use load_dataset("my_folder_name", split="train") this function create dataset in which there are only 4 images, the remaining 19000 images were not added there. What is the p... |
https://github.com/huggingface/datasets/issues/5650 | load_dataset can't work correct with my image data | > @WiNE-iNEFF I'm sorry there is still not enough information to answer your question :( For now I can only assume that your [filenames contain split names](https://huggingface.co/docs/datasets/repository_structure#splits-and-file-names) which are somehow incorrectly parsed.
> What would be the output if you omit `spl... | I have about 20000 images in my folder which divided into 4 folders with class names.
When i use load_dataset("my_folder_name", split="train") this function create dataset in which there are only 4 images, the remaining 19000 images were not added there. What is the problem and did not understand. Tried converting imag... | 67 | load_dataset can't work correct with my image data
I have about 20000 images in my folder which divided into 4 folders with class names.
When i use load_dataset("my_folder_name", split="train") this function create dataset in which there are only 4 images, the remaining 19000 images were not added there. What is the p... |
https://github.com/huggingface/datasets/issues/5650 | load_dataset can't work correct with my image data | @WiNE-iNEFF My only guess is that 4 images in your data have `"train"` string in their names (something like `"train_image_0.png"`) and others do not and the loader ignores all the files that do not contain split name in filename. If it's true, please try to remove "train" from filenames. Or maybe they are inside a di... | I have about 20000 images in my folder which divided into 4 folders with class names.
When i use load_dataset("my_folder_name", split="train") this function create dataset in which there are only 4 images, the remaining 19000 images were not added there. What is the problem and did not understand. Tried converting imag... | 102 | load_dataset can't work correct with my image data
I have about 20000 images in my folder which divided into 4 folders with class names.
When i use load_dataset("my_folder_name", split="train") this function create dataset in which there are only 4 images, the remaining 19000 images were not added there. What is the p... |
https://github.com/huggingface/datasets/issues/5650 | load_dataset can't work correct with my image data | > @WiNE-iNEFF My only guess is that 4 images in your data have `"train"` string in their names (something like `"train_image_0.png"`) and others do not and the loader ignores all the files that do not contain split name in filename. If it's true, please try to remove "train" from filenames. Or maybe they are inside a ... | I have about 20000 images in my folder which divided into 4 folders with class names.
When i use load_dataset("my_folder_name", split="train") this function create dataset in which there are only 4 images, the remaining 19000 images were not added there. What is the problem and did not understand. Tried converting imag... | 136 | load_dataset can't work correct with my image data
I have about 20000 images in my folder which divided into 4 folders with class names.
When i use load_dataset("my_folder_name", split="train") this function create dataset in which there are only 4 images, the remaining 19000 images were not added there. What is the p... |
https://github.com/huggingface/datasets/issues/5650 | load_dataset can't work correct with my image data | @WiNE-iNEFF Probably they are named inconsistently so that the correct pattern for which files should correspond to which split cannot be inferred. You can make it clearer to the loader by removing split names from filenames and putting files in separate folder for each split (you can take a look at the [documentation ... | I have about 20000 images in my folder which divided into 4 folders with class names.
When i use load_dataset("my_folder_name", split="train") this function create dataset in which there are only 4 images, the remaining 19000 images were not added there. What is the problem and did not understand. Tried converting imag... | 145 | load_dataset can't work correct with my image data
I have about 20000 images in my folder which divided into 4 folders with class names.
When i use load_dataset("my_folder_name", split="train") this function create dataset in which there are only 4 images, the remaining 19000 images were not added there. What is the p... |
https://github.com/huggingface/datasets/issues/5650 | load_dataset can't work correct with my image data | > @WiNE-iNEFF Probably they are named inconsistently so that the correct pattern for which files should correspond to which split cannot be inferred. You can make it clearer to the loader by removing split names from filenames and putting files in separate folder for each split (you can take a look at the [documentatio... | I have about 20000 images in my folder which divided into 4 folders with class names.
When i use load_dataset("my_folder_name", split="train") this function create dataset in which there are only 4 images, the remaining 19000 images were not added there. What is the problem and did not understand. Tried converting imag... | 192 | load_dataset can't work correct with my image data
I have about 20000 images in my folder which divided into 4 folders with class names.
When i use load_dataset("my_folder_name", split="train") this function create dataset in which there are only 4 images, the remaining 19000 images were not added there. What is the p... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.