html_url stringlengths 48 51 | title stringlengths 5 280 | comments stringlengths 63 51.8k | body stringlengths 0 36.2k ⌀ | comment_length int64 16 1.52k | text stringlengths 159 54.1k | embeddings listlengths 768 768 |
|---|---|---|---|---|---|---|
https://github.com/huggingface/datasets/issues/6276 | I'm trying to fine tune the openai/whisper model from huggingface using jupyter notebook and i keep getting this error | Firstly, you didn't define feature_extractor variable. Secondly, it is large nlp model. Hence you should use proper gpu, otherwise your machine's cpu will be overclock and you can do nothing. | ### Describe the bug
I'm trying to fine tune the openai/whisper model from huggingface using jupyter notebook and i keep getting this error, i'm following the steps in this blog post
https://huggingface.co/blog/fine-tune-whisper
I tried google collab and it works but because I'm on the free version the training ... | 30 | I'm trying to fine tune the openai/whisper model from huggingface using jupyter notebook and i keep getting this error
### Describe the bug
I'm trying to fine tune the openai/whisper model from huggingface using jupyter notebook and i keep getting this error, i'm following the steps in this blog post
https://hugg... | [
-0.051130261272192,
-0.2417573183774948,
0.10620422661304474,
0.22932501137256622,
0.3709268569946289,
0.16901478171348572,
0.17301952838897705,
0.3357461094856262,
0.06762860715389252,
0.22165203094482422,
-0.40414491295814514,
0.15247990190982819,
-0.10573375225067139,
0.2656455636024475... |
https://github.com/huggingface/datasets/issues/6275 | Would like to Contribute a dataset | Hi! The process of contributing a dataset is explained here: https://huggingface.co/docs/datasets/upload_dataset. Also, check https://huggingface.co/docs/datasets/image_dataset for a more detailed explanation of how to share an image dataset. | I have a dataset of 2500 images that can be used for color-blind machine-learning algorithms. Since , there was no dataset available online , I made this dataset myself and would like to contribute this now to community | 26 | Would like to Contribute a dataset
I have a dataset of 2500 images that can be used for color-blind machine-learning algorithms. Since , there was no dataset available online , I made this dataset myself and would like to contribute this now to community
Hi! The process of contributing a dataset is explained here: ... | [
-0.34682056307792664,
0.11698651313781738,
-0.24077323079109192,
0.06491406261920929,
0.09206829965114594,
0.06356487423181534,
0.23023569583892822,
-0.0070397742092609406,
-0.09269683063030243,
0.06761811673641205,
-0.03846834599971771,
-0.10947450995445251,
-0.2411767989397049,
0.2810862... |
https://github.com/huggingface/datasets/issues/6274 | FileNotFoundError for dataset with multiple builder config | Please tell me if the above info is not enough for solving the problem. I will then make my dataset public temporarily so that you can really reproduce the bug. | ### Describe the bug
When there is only one config and only the dataset name is entered when using datasets.load_dataset(), it works fine. But if I create a second builder_config for my dataset and enter the config name when using datasets.load_dataset(), the following error will happen.
FileNotFoundError: [Errno 2... | 30 | FileNotFoundError for dataset with multiple builder config
### Describe the bug
When there is only one config and only the dataset name is entered when using datasets.load_dataset(), it works fine. But if I create a second builder_config for my dataset and enter the config name when using datasets.load_dataset(), th... | [
-0.40907081961631775,
0.1441015601158142,
0.05630079284310341,
0.7185940742492676,
0.18037882447242737,
0.22419926524162292,
0.27290454506874084,
0.1374785453081131,
-0.1943499594926834,
0.2882702648639679,
0.07692188024520874,
0.031066350638866425,
-0.15260206162929535,
-0.207740500569343... |
https://github.com/huggingface/datasets/issues/6273 | Broken Link to PubMed Abstracts dataset . | @lhoestq @albertvillanova @lewtun I don't think we are allowed to host these data files on the Hub (due to DMCA), which means the only option is to use a different dataset in the course (and to re-record the video 🙂), no? | ### Describe the bug
The link provided for the dataset is broken,
data_files =
[https://the-eye.eu/public/AI/pile_preliminary_components/PUBMED_title_abstracts_2019_baseline.jsonl.zst](url)
The
### Steps to reproduce the bug
Steps to reproduce:
1) Head over to [https://huggingface.co/learn/nlp-course/chapt... | 41 | Broken Link to PubMed Abstracts dataset .
### Describe the bug
The link provided for the dataset is broken,
data_files =
[https://the-eye.eu/public/AI/pile_preliminary_components/PUBMED_title_abstracts_2019_baseline.jsonl.zst](url)
The
### Steps to reproduce the bug
Steps to reproduce:
1) Head over to [h... | [
-0.13592661917209625,
0.2072868049144745,
0.0204014889895916,
0.061550021171569824,
-0.18008001148700714,
0.10274600237607956,
0.3578172028064728,
0.40044814348220825,
-0.03925163298845291,
-0.14947383105754852,
0.1537395417690277,
0.28599753975868225,
0.00019700545817613602,
0.12664273381... |
https://github.com/huggingface/datasets/issues/6273 | Broken Link to PubMed Abstracts dataset . | Keeping the video is maybe fine, we can add a note on youtube to suggest to load a dataset with a different name. Maybe C4 ? And update the code snippets on the website ? | ### Describe the bug
The link provided for the dataset is broken,
data_files =
[https://the-eye.eu/public/AI/pile_preliminary_components/PUBMED_title_abstracts_2019_baseline.jsonl.zst](url)
The
### Steps to reproduce the bug
Steps to reproduce:
1) Head over to [https://huggingface.co/learn/nlp-course/chapt... | 35 | Broken Link to PubMed Abstracts dataset .
### Describe the bug
The link provided for the dataset is broken,
data_files =
[https://the-eye.eu/public/AI/pile_preliminary_components/PUBMED_title_abstracts_2019_baseline.jsonl.zst](url)
The
### Steps to reproduce the bug
Steps to reproduce:
1) Head over to [h... | [
-0.04150279611349106,
0.31607985496520996,
-0.021375160664319992,
-0.0327802374958992,
-0.08579710870981216,
0.02659527212381363,
0.3341982364654541,
0.43594881892204285,
-0.18444591760635376,
-0.18530996143817902,
0.19457325339317322,
0.27567392587661743,
0.03499675169587135,
0.1650615632... |
https://github.com/huggingface/datasets/issues/6273 | Broken Link to PubMed Abstracts dataset . | Maybe you want to try it with the PUBMED dataset that I reproduced based on the The [PubMed Abstract GitHub Site](http://github.com/thoppe/The-Pile-PubMed) and uploaded on the HuggingFace:
```
from datasets import load_dataset
pubmed_dataset = load_dataset("hwang2006/PUBMED_title_abstracts_2020_baseline")
pubmed_... | ### Describe the bug
The link provided for the dataset is broken,
data_files =
[https://the-eye.eu/public/AI/pile_preliminary_components/PUBMED_title_abstracts_2019_baseline.jsonl.zst](url)
The
### Steps to reproduce the bug
Steps to reproduce:
1) Head over to [https://huggingface.co/learn/nlp-course/chapt... | 63 | Broken Link to PubMed Abstracts dataset .
### Describe the bug
The link provided for the dataset is broken,
data_files =
[https://the-eye.eu/public/AI/pile_preliminary_components/PUBMED_title_abstracts_2019_baseline.jsonl.zst](url)
The
### Steps to reproduce the bug
Steps to reproduce:
1) Head over to [h... | [
0.05318957939743996,
0.24003782868385315,
0.017897870391607285,
-0.11713282763957977,
0.03730646148324013,
0.059827469289302826,
0.26702994108200073,
0.40822604298591614,
-0.0903172492980957,
-0.08971919119358063,
0.06688164919614792,
0.34286871552467346,
0.02864331193268299,
0.05629614740... |
https://github.com/huggingface/datasets/issues/6272 | Duplicate `data_files` when named `<split>/<split>.parquet` | I think it's best to drop duplicates with a `set` (as a temporary fix) and improve the patterns when/if https://github.com/fsspec/filesystem_spec/pull/1382 gets merged. @lhoestq Do you have some other ideas? | e.g. with `u23429/stock_1_minute_ticker`
```ipython
In [1]: from datasets import *
In [2]: b = load_dataset_builder("u23429/stock_1_minute_ticker")
Downloading readme: 100%|██████████████████████████| 627/627 [00:00<00:00, 246kB/s]
In [3]: b.config.data_files
Out[3]:
{NamedSplit('train'): ['hf://datasets/... | 29 | Duplicate `data_files` when named `<split>/<split>.parquet`
e.g. with `u23429/stock_1_minute_ticker`
```ipython
In [1]: from datasets import *
In [2]: b = load_dataset_builder("u23429/stock_1_minute_ticker")
Downloading readme: 100%|██████████████████████████| 627/627 [00:00<00:00, 246kB/s]
In [3]: b.confi... | [
-0.309086412191391,
-0.11631899327039719,
-0.11791300773620605,
0.39790868759155273,
0.3023475408554077,
0.11119731515645981,
0.3349864184856415,
0.4634611904621124,
0.019552156329154968,
0.3075330853462219,
-0.10650806874036789,
0.32441312074661255,
-0.08251968771219254,
0.258166432380676... |
https://github.com/huggingface/datasets/issues/6272 | Duplicate `data_files` when named `<split>/<split>.parquet` | Alternatively we could just use this no ?
```python
if config.FSSPEC_VERSION < version.parse("2023.9.0"):
KEYWORDS_IN_PATH_NAME_BASE_PATTERNS = [
"{keyword}[{sep}/]**",
"**[{sep}]{keyword}[{sep}/]**",
"**/{keyword}[{sep}/]**",
]
else:
KEYWORDS_IN_PATH_NAME_BASE_PATTERNS = ... | e.g. with `u23429/stock_1_minute_ticker`
```ipython
In [1]: from datasets import *
In [2]: b = load_dataset_builder("u23429/stock_1_minute_ticker")
Downloading readme: 100%|██████████████████████████| 627/627 [00:00<00:00, 246kB/s]
In [3]: b.config.data_files
Out[3]:
{NamedSplit('train'): ['hf://datasets/... | 66 | Duplicate `data_files` when named `<split>/<split>.parquet`
e.g. with `u23429/stock_1_minute_ticker`
```ipython
In [1]: from datasets import *
In [2]: b = load_dataset_builder("u23429/stock_1_minute_ticker")
Downloading readme: 100%|██████████████████████████| 627/627 [00:00<00:00, 246kB/s]
In [3]: b.confi... | [
-0.309086412191391,
-0.11631899327039719,
-0.11791300773620605,
0.39790868759155273,
0.3023475408554077,
0.11119731515645981,
0.3349864184856415,
0.4634611904621124,
0.019552156329154968,
0.3075330853462219,
-0.10650806874036789,
0.32441312074661255,
-0.08251968771219254,
0.258166432380676... |
https://github.com/huggingface/datasets/issues/6272 | Duplicate `data_files` when named `<split>/<split>.parquet` | Arf `"**/*/{keyword}[{sep}/]**"` does return `data/keyword.txt` in latest `fsspec` but not in `glob.glob`
EDIT: actually forgot to set `recursive=True` | e.g. with `u23429/stock_1_minute_ticker`
```ipython
In [1]: from datasets import *
In [2]: b = load_dataset_builder("u23429/stock_1_minute_ticker")
Downloading readme: 100%|██████████████████████████| 627/627 [00:00<00:00, 246kB/s]
In [3]: b.config.data_files
Out[3]:
{NamedSplit('train'): ['hf://datasets/... | 18 | Duplicate `data_files` when named `<split>/<split>.parquet`
e.g. with `u23429/stock_1_minute_ticker`
```ipython
In [1]: from datasets import *
In [2]: b = load_dataset_builder("u23429/stock_1_minute_ticker")
Downloading readme: 100%|██████████████████████████| 627/627 [00:00<00:00, 246kB/s]
In [3]: b.confi... | [
-0.309086412191391,
-0.11631899327039719,
-0.11791300773620605,
0.39790868759155273,
0.3023475408554077,
0.11119731515645981,
0.3349864184856415,
0.4634611904621124,
0.019552156329154968,
0.3075330853462219,
-0.10650806874036789,
0.32441312074661255,
-0.08251968771219254,
0.258166432380676... |
https://github.com/huggingface/datasets/issues/6272 | Duplicate `data_files` when named `<split>/<split>.parquet` | > I think it's best to drop duplicates with a set (as a temporary fix)
I started https://github.com/huggingface/datasets/pull/6278 to use DataFilesSet objects instead of DataFilesList | e.g. with `u23429/stock_1_minute_ticker`
```ipython
In [1]: from datasets import *
In [2]: b = load_dataset_builder("u23429/stock_1_minute_ticker")
Downloading readme: 100%|██████████████████████████| 627/627 [00:00<00:00, 246kB/s]
In [3]: b.config.data_files
Out[3]:
{NamedSplit('train'): ['hf://datasets/... | 25 | Duplicate `data_files` when named `<split>/<split>.parquet`
e.g. with `u23429/stock_1_minute_ticker`
```ipython
In [1]: from datasets import *
In [2]: b = load_dataset_builder("u23429/stock_1_minute_ticker")
Downloading readme: 100%|██████████████████████████| 627/627 [00:00<00:00, 246kB/s]
In [3]: b.confi... | [
-0.309086412191391,
-0.11631899327039719,
-0.11791300773620605,
0.39790868759155273,
0.3023475408554077,
0.11119731515645981,
0.3349864184856415,
0.4634611904621124,
0.019552156329154968,
0.3075330853462219,
-0.10650806874036789,
0.32441312074661255,
-0.08251968771219254,
0.258166432380676... |
https://github.com/huggingface/datasets/issues/6270 | Dataset.from_generator raises with sharded gen_args | `gen_kwargs` should be a `dict`, as stated in the docstring, but you are passing a `list`.
So, to fix the error, replace the list of dicts with a dict of lists (and slightly modify the generator function):
```python
from pathlib import Path
import datasets
def process_yaml(files):
for f in files:
... | ### Describe the bug
According to the docs of Datasets.from_generator:
```
gen_kwargs(`dict`, *optional*):
Keyword arguments to be passed to the `generator` callable.
You can define a sharded dataset by passing the list of shards in `gen_kwargs`.
```
So I'd expect that if gen_kwar... | 74 | Dataset.from_generator raises with sharded gen_args
### Describe the bug
According to the docs of Datasets.from_generator:
```
gen_kwargs(`dict`, *optional*):
Keyword arguments to be passed to the `generator` callable.
You can define a sharded dataset by passing the list of shards... | [
-0.15784311294555664,
-0.1098087802529335,
-0.02373431995511055,
0.2680385708808899,
0.47300106287002563,
-0.03375441953539848,
0.5496038198471069,
0.19784046709537506,
-0.1852409392595291,
0.12854906916618347,
0.3643649220466614,
0.38225698471069336,
-0.16803915798664093,
0.01155261881649... |
https://github.com/huggingface/datasets/issues/6270 | Dataset.from_generator raises with sharded gen_args | That runs, and because my dataset is small, it's what I did to get past the problem.
However, it does not produce a sharded dataset. From the doc string I expect there ought to be a way to call from_generator such that num_shards in the resulting data set is equal to the number of items in the list.
The part of the ... | ### Describe the bug
According to the docs of Datasets.from_generator:
```
gen_kwargs(`dict`, *optional*):
Keyword arguments to be passed to the `generator` callable.
You can define a sharded dataset by passing the list of shards in `gen_kwargs`.
```
So I'd expect that if gen_kwar... | 108 | Dataset.from_generator raises with sharded gen_args
### Describe the bug
According to the docs of Datasets.from_generator:
```
gen_kwargs(`dict`, *optional*):
Keyword arguments to be passed to the `generator` callable.
You can define a sharded dataset by passing the list of shards... | [
-0.15784311294555664,
-0.1098087802529335,
-0.02373431995511055,
0.2680385708808899,
0.47300106287002563,
-0.03375441953539848,
0.5496038198471069,
0.19784046709537506,
-0.1852409392595291,
0.12854906916618347,
0.3643649220466614,
0.38225698471069336,
-0.16803915798664093,
0.01155261881649... |
https://github.com/huggingface/datasets/issues/6270 | Dataset.from_generator raises with sharded gen_args | The sharding mentioned here refers to using this function with `num_proc` (multiprocessing splits the `kwargs` into shards and passes them to the generator function)
> That runs, and because my dataset is small, it's what I did to get past the problem.
`from_generator` generates a memory-mapped dataset (can be la... | ### Describe the bug
According to the docs of Datasets.from_generator:
```
gen_kwargs(`dict`, *optional*):
Keyword arguments to be passed to the `generator` callable.
You can define a sharded dataset by passing the list of shards in `gen_kwargs`.
```
So I'd expect that if gen_kwar... | 72 | Dataset.from_generator raises with sharded gen_args
### Describe the bug
According to the docs of Datasets.from_generator:
```
gen_kwargs(`dict`, *optional*):
Keyword arguments to be passed to the `generator` callable.
You can define a sharded dataset by passing the list of shards... | [
-0.15784311294555664,
-0.1098087802529335,
-0.02373431995511055,
0.2680385708808899,
0.47300106287002563,
-0.03375441953539848,
0.5496038198471069,
0.19784046709537506,
-0.1852409392595291,
0.12854906916618347,
0.3643649220466614,
0.38225698471069336,
-0.16803915798664093,
0.01155261881649... |
https://github.com/huggingface/datasets/issues/6270 | Dataset.from_generator raises with sharded gen_args | It sounds like you are saying that num_proc affects the form of gen_kwargs.
Are you saying that for non-zero num_proc gen_kwargs should be a list whose length is the same as num_proc?
Or are you saying that for non-zero num_proc, gen_kwargs should be a dict whose elements are lists the length of num_proc?
| ### Describe the bug
According to the docs of Datasets.from_generator:
```
gen_kwargs(`dict`, *optional*):
Keyword arguments to be passed to the `generator` callable.
You can define a sharded dataset by passing the list of shards in `gen_kwargs`.
```
So I'd expect that if gen_kwar... | 53 | Dataset.from_generator raises with sharded gen_args
### Describe the bug
According to the docs of Datasets.from_generator:
```
gen_kwargs(`dict`, *optional*):
Keyword arguments to be passed to the `generator` callable.
You can define a sharded dataset by passing the list of shards... | [
-0.15784311294555664,
-0.1098087802529335,
-0.02373431995511055,
0.2680385708808899,
0.47300106287002563,
-0.03375441953539848,
0.5496038198471069,
0.19784046709537506,
-0.1852409392595291,
0.12854906916618347,
0.3643649220466614,
0.38225698471069336,
-0.16803915798664093,
0.01155261881649... |
https://github.com/huggingface/datasets/issues/6270 | Dataset.from_generator raises with sharded gen_args | I ran some tests. So, it looks like with num_proc greater than 1, gen_kwargs is expected to be a dict of lists. It calls the generator also with a dict of lists, but the lists are split.
I.E. if my original has `gen_kwargs=dict(a=[0,1,2])`, then my generator might get called with `gen_kwalrgs=dict([0])`.
That all m... | ### Describe the bug
According to the docs of Datasets.from_generator:
```
gen_kwargs(`dict`, *optional*):
Keyword arguments to be passed to the `generator` callable.
You can define a sharded dataset by passing the list of shards in `gen_kwargs`.
```
So I'd expect that if gen_kwar... | 139 | Dataset.from_generator raises with sharded gen_args
### Describe the bug
According to the docs of Datasets.from_generator:
```
gen_kwargs(`dict`, *optional*):
Keyword arguments to be passed to the `generator` callable.
You can define a sharded dataset by passing the list of shards... | [
-0.15784311294555664,
-0.1098087802529335,
-0.02373431995511055,
0.2680385708808899,
0.47300106287002563,
-0.03375441953539848,
0.5496038198471069,
0.19784046709537506,
-0.1852409392595291,
0.12854906916618347,
0.3643649220466614,
0.38225698471069336,
-0.16803915798664093,
0.01155261881649... |
https://github.com/huggingface/datasets/issues/6270 | Dataset.from_generator raises with sharded gen_args | Okay, that was fun; I took a dive through the dataset code and feel like I have a much better understanding.
Here is my understanding of the behavior:
* max_proc is an upper limit on the number of shards that `from_generator` produces
* If `max_proc` is greater than 1, then all lists in *gen_kwargs* must be the same... | ### Describe the bug
According to the docs of Datasets.from_generator:
```
gen_kwargs(`dict`, *optional*):
Keyword arguments to be passed to the `generator` callable.
You can define a sharded dataset by passing the list of shards in `gen_kwargs`.
```
So I'd expect that if gen_kwar... | 161 | Dataset.from_generator raises with sharded gen_args
### Describe the bug
According to the docs of Datasets.from_generator:
```
gen_kwargs(`dict`, *optional*):
Keyword arguments to be passed to the `generator` callable.
You can define a sharded dataset by passing the list of shards... | [
-0.15784311294555664,
-0.1098087802529335,
-0.02373431995511055,
0.2680385708808899,
0.47300106287002563,
-0.03375441953539848,
0.5496038198471069,
0.19784046709537506,
-0.1852409392595291,
0.12854906916618347,
0.3643649220466614,
0.38225698471069336,
-0.16803915798664093,
0.01155261881649... |
https://github.com/huggingface/datasets/issues/6267 | Multi label class encoding | You can use a `Sequence(ClassLabel(...))` feature type to represent a list of labels, and `cast_column`/`cast` to perform the "string to label" conversion (`class_encode_column` does support nested fields), e.g., in your case:
```python
from datasets import Dataset, Sequence, ClassLabel
data = {
'text': ['one'... | ### Feature request
I have a multi label dataset and I'd like to be able to class encode the column and store the mapping directly in the features just as I can with a single label column. `class_encode_column` currently does not support multi labels.
Here's an example of what I'd like to encode:
```
data = {
... | 66 | Multi label class encoding
### Feature request
I have a multi label dataset and I'd like to be able to class encode the column and store the mapping directly in the features just as I can with a single label column. `class_encode_column` currently does not support multi labels.
Here's an example of what I'd like... | [
0.1340273916721344,
0.16598349809646606,
0.07211379706859589,
0.26355433464050293,
0.3448140025138855,
0.13794729113578796,
0.7133157849311829,
-0.18815456330776215,
0.04596034064888954,
-0.022461578249931335,
0.12441246211528778,
0.4255562424659729,
-0.2518537938594818,
0.5587884187698364... |
https://github.com/huggingface/datasets/issues/6267 | Multi label class encoding | Great! Can you elaborate on "class_encode_column does support nested fields"? Do you mean that there is a way to `class_encode_column` on a Sequence? | ### Feature request
I have a multi label dataset and I'd like to be able to class encode the column and store the mapping directly in the features just as I can with a single label column. `class_encode_column` currently does not support multi labels.
Here's an example of what I'd like to encode:
```
data = {
... | 23 | Multi label class encoding
### Feature request
I have a multi label dataset and I'd like to be able to class encode the column and store the mapping directly in the features just as I can with a single label column. `class_encode_column` currently does not support multi labels.
Here's an example of what I'd like... | [
0.1340273916721344,
0.16598349809646606,
0.07211379706859589,
0.26355433464050293,
0.3448140025138855,
0.13794729113578796,
0.7133157849311829,
-0.18815456330776215,
0.04596034064888954,
-0.022461578249931335,
0.12441246211528778,
0.4255562424659729,
-0.2518537938594818,
0.5587884187698364... |
https://github.com/huggingface/datasets/issues/6267 | Multi label class encoding | Sorry, I'm still not following. Are you saying that there currently exists a way to call `class_encode_column` on a `Sequence(ClassLabel)` type? Or that the underlying data structures support it and a contribution of a method to do that would be welcome? | ### Feature request
I have a multi label dataset and I'd like to be able to class encode the column and store the mapping directly in the features just as I can with a single label column. `class_encode_column` currently does not support multi labels.
Here's an example of what I'd like to encode:
```
data = {
... | 41 | Multi label class encoding
### Feature request
I have a multi label dataset and I'd like to be able to class encode the column and store the mapping directly in the features just as I can with a single label column. `class_encode_column` currently does not support multi labels.
Here's an example of what I'd like... | [
0.1340273916721344,
0.16598349809646606,
0.07211379706859589,
0.26355433464050293,
0.3448140025138855,
0.13794729113578796,
0.7133157849311829,
-0.18815456330776215,
0.04596034064888954,
-0.022461578249931335,
0.12441246211528778,
0.4255562424659729,
-0.2518537938594818,
0.5587884187698364... |
https://github.com/huggingface/datasets/issues/6267 | Multi label class encoding | `class_encode_column ` currently does not support `Sequence(ClassLabel)`. Implementing support for this would be a nice contribution.
In the meantime, this limitation can be circumvented by fetching (unique) labels and calling `.cast_column(col, Sequence(ClassLabel(names=labels)))`. | ### Feature request
I have a multi label dataset and I'd like to be able to class encode the column and store the mapping directly in the features just as I can with a single label column. `class_encode_column` currently does not support multi labels.
Here's an example of what I'd like to encode:
```
data = {
... | 32 | Multi label class encoding
### Feature request
I have a multi label dataset and I'd like to be able to class encode the column and store the mapping directly in the features just as I can with a single label column. `class_encode_column` currently does not support multi labels.
Here's an example of what I'd like... | [
0.1340273916721344,
0.16598349809646606,
0.07211379706859589,
0.26355433464050293,
0.3448140025138855,
0.13794729113578796,
0.7133157849311829,
-0.18815456330776215,
0.04596034064888954,
-0.022461578249931335,
0.12441246211528778,
0.4255562424659729,
-0.2518537938594818,
0.5587884187698364... |
https://github.com/huggingface/datasets/issues/6267 | Multi label class encoding | Ok makes sense, can you take a look at the POC implementation I did [here](https://github.com/huggingface/datasets/commit/15443098e9ce053943172f7ec6fce3769d7dff6e)? Happy to take another pass / submit as a PR but would be helpful if I got a thumbs up that this was directionally correct with respect to implementation /... | ### Feature request
I have a multi label dataset and I'd like to be able to class encode the column and store the mapping directly in the features just as I can with a single label column. `class_encode_column` currently does not support multi labels.
Here's an example of what I'd like to encode:
```
data = {
... | 46 | Multi label class encoding
### Feature request
I have a multi label dataset and I'd like to be able to class encode the column and store the mapping directly in the features just as I can with a single label column. `class_encode_column` currently does not support multi labels.
Here's an example of what I'd like... | [
0.1340273916721344,
0.16598349809646606,
0.07211379706859589,
0.26355433464050293,
0.3448140025138855,
0.13794729113578796,
0.7133157849311829,
-0.18815456330776215,
0.04596034064888954,
-0.022461578249931335,
0.12441246211528778,
0.4255562424659729,
-0.2518537938594818,
0.5587884187698364... |
https://github.com/huggingface/datasets/issues/6267 | Multi label class encoding | There is no need to introduce a new type (`MultiLabel`) for this feature. Also, I think we can keep the logic inside a single method instead of separating the two cases.
Maybe https://github.com/huggingface/datasets/pull/4277 can help with the implementation. We extended `align_labels_with_mapping` to support `Seque... | ### Feature request
I have a multi label dataset and I'd like to be able to class encode the column and store the mapping directly in the features just as I can with a single label column. `class_encode_column` currently does not support multi labels.
Here's an example of what I'd like to encode:
```
data = {
... | 53 | Multi label class encoding
### Feature request
I have a multi label dataset and I'd like to be able to class encode the column and store the mapping directly in the features just as I can with a single label column. `class_encode_column` currently does not support multi labels.
Here's an example of what I'd like... | [
0.1340273916721344,
0.16598349809646606,
0.07211379706859589,
0.26355433464050293,
0.3448140025138855,
0.13794729113578796,
0.7133157849311829,
-0.18815456330776215,
0.04596034064888954,
-0.022461578249931335,
0.12441246211528778,
0.4255562424659729,
-0.2518537938594818,
0.5587884187698364... |
https://github.com/huggingface/datasets/issues/6261 | Can't load a dataset | `JourneyDB/JourneyDB` is a gated dataset, so this error means you are not authenticated to access it, either by using an invalid token or by not agreeing to the terms in the dialog on the dataset page.
> I believe is due to the fact that doesn't work with .tgz files.
Indeed, the dataset's data files structure is ... | ### Describe the bug
Can't seem to load the JourneyDB dataset.
It throws the following error:
```
---------------------------------------------------------------------------
FileNotFoundError Traceback (most recent call last)
Cell In[15], line 2
1 # If the dataset is gated/priv... | 84 | Can't load a dataset
### Describe the bug
Can't seem to load the JourneyDB dataset.
It throws the following error:
```
---------------------------------------------------------------------------
FileNotFoundError Traceback (most recent call last)
Cell In[15], line 2
1 # If th... | [
-0.406331330537796,
-0.12175320833921432,
-0.026935040950775146,
0.4848683476448059,
0.4381573796272278,
0.12115108221769333,
0.2517051100730896,
0.23180155456066132,
-0.0708722248673439,
-0.11361229419708252,
-0.18910178542137146,
0.07305017858743668,
-0.13830873370170593,
0.3248364925384... |
https://github.com/huggingface/datasets/issues/6261 | Can't load a dataset | > JourneyDB/JourneyDB is a gated dataset, so this error means you are not authenticated to access it, either by using an invalid token or by not agreeing to the terms in the dialog on the dataset page.´
I did authentication with:
```
from huggingface_hub import notebook_login
notebook_login()
```
Isn't that... | ### Describe the bug
Can't seem to load the JourneyDB dataset.
It throws the following error:
```
---------------------------------------------------------------------------
FileNotFoundError Traceback (most recent call last)
Cell In[15], line 2
1 # If the dataset is gated/priv... | 99 | Can't load a dataset
### Describe the bug
Can't seem to load the JourneyDB dataset.
It throws the following error:
```
---------------------------------------------------------------------------
FileNotFoundError Traceback (most recent call last)
Cell In[15], line 2
1 # If th... | [
-0.406331330537796,
-0.12175320833921432,
-0.026935040950775146,
0.4848683476448059,
0.4381573796272278,
0.12115108221769333,
0.2517051100730896,
0.23180155456066132,
-0.0708722248673439,
-0.11361229419708252,
-0.18910178542137146,
0.07305017858743668,
-0.13830873370170593,
0.3248364925384... |
https://github.com/huggingface/datasets/issues/6261 | Can't load a dataset | Have you accepted the terms in the dialog [here](https://huggingface.co/datasets/JourneyDB/JourneyDB)?
IIRC Kaggle preinstalls an outdated `datasets` version, so it's also a good idea to update it before importing `datasets` (and do the same for `huggingface_hub`) | ### Describe the bug
Can't seem to load the JourneyDB dataset.
It throws the following error:
```
---------------------------------------------------------------------------
FileNotFoundError Traceback (most recent call last)
Cell In[15], line 2
1 # If the dataset is gated/priv... | 34 | Can't load a dataset
### Describe the bug
Can't seem to load the JourneyDB dataset.
It throws the following error:
```
---------------------------------------------------------------------------
FileNotFoundError Traceback (most recent call last)
Cell In[15], line 2
1 # If th... | [
-0.406331330537796,
-0.12175320833921432,
-0.026935040950775146,
0.4848683476448059,
0.4381573796272278,
0.12115108221769333,
0.2517051100730896,
0.23180155456066132,
-0.0708722248673439,
-0.11361229419708252,
-0.18910178542137146,
0.07305017858743668,
-0.13830873370170593,
0.3248364925384... |
https://github.com/huggingface/datasets/issues/6260 | REUSE_DATASET_IF_EXISTS don't work | Hi! Unfortunately, the current behavior is to delete the downloaded data when this error happens. So, I've opened a PR that removes the problematic import to avoid losing data due to `apache_beam` not being installed (we host the preprocessed version of `natual_questions` on the HF GCS, so requiring `apache_beam` in th... | ### Describe the bug
I use the following code to download natural_question dataset. Even though I have completely download it, the next time I run this code, the new download procedure will start and cover the original /data/lxy/NQ
config=datasets.DownloadConfig(resume_download=True,max_retries=100,cache_dir=r'/da... | 55 | REUSE_DATASET_IF_EXISTS don't work
### Describe the bug
I use the following code to download natural_question dataset. Even though I have completely download it, the next time I run this code, the new download procedure will start and cover the original /data/lxy/NQ
config=datasets.DownloadConfig(resume_downloa... | [
-0.12890714406967163,
-0.11947350949048996,
0.0724111795425415,
0.5413783192634583,
0.2988254427909851,
-0.18821412324905396,
0.042946696281433105,
0.15610693395137787,
0.19228479266166687,
-0.13517235219478607,
-0.047027893364429474,
0.22609218955039978,
-0.1140718087553978,
0.19778555631... |
https://github.com/huggingface/datasets/issues/6260 | REUSE_DATASET_IF_EXISTS don't work | Thanks for your reply. I met another question that I set `export HF_DATASETS_CACHE=/data/lxy/.cache` , but each time I run load_datasets, the datasets module still looking for NQ in the wrong default cache dir '/home/lxy/.cache' 。How to avoid this incorrect behavior. I am sure HF_DATASETS_CACHE was set correctly since ... | ### Describe the bug
I use the following code to download natural_question dataset. Even though I have completely download it, the next time I run this code, the new download procedure will start and cover the original /data/lxy/NQ
config=datasets.DownloadConfig(resume_download=True,max_retries=100,cache_dir=r'/da... | 76 | REUSE_DATASET_IF_EXISTS don't work
### Describe the bug
I use the following code to download natural_question dataset. Even though I have completely download it, the next time I run this code, the new download procedure will start and cover the original /data/lxy/NQ
config=datasets.DownloadConfig(resume_downloa... | [
-0.13406971096992493,
-0.13712149858474731,
0.07219873368740082,
0.5493248701095581,
0.2913302183151245,
-0.1846710741519928,
0.04954869672656059,
0.15654057264328003,
0.19434690475463867,
-0.13616584241390228,
-0.04950086772441864,
0.22159215807914734,
-0.10119229555130005,
0.204726070165... |
https://github.com/huggingface/datasets/issues/6260 | REUSE_DATASET_IF_EXISTS don't work | You need to set this variable before the `datasets` import. Then, you can use `import datasets; datasets.config.HF_DATASETS_CACHE` to verify the cache location. | ### Describe the bug
I use the following code to download natural_question dataset. Even though I have completely download it, the next time I run this code, the new download procedure will start and cover the original /data/lxy/NQ
config=datasets.DownloadConfig(resume_download=True,max_retries=100,cache_dir=r'/da... | 22 | REUSE_DATASET_IF_EXISTS don't work
### Describe the bug
I use the following code to download natural_question dataset. Even though I have completely download it, the next time I run this code, the new download procedure will start and cover the original /data/lxy/NQ
config=datasets.DownloadConfig(resume_downloa... | [
-0.14463169872760773,
-0.13387537002563477,
0.07233321666717529,
0.5405827164649963,
0.2837721109390259,
-0.18812689185142517,
0.038858119398355484,
0.16199450194835663,
0.19530391693115234,
-0.12886932492256165,
-0.048923082649707794,
0.21878160536289215,
-0.10770018398761749,
0.198762029... |
https://github.com/huggingface/datasets/issues/6259 | Duplicated Rows When Loading Parquet Files from Root Directory with Subdirectories | Thanks for reporting this issue! We should be able to avoid this by making our `glob` patterns more precise. In the meantime, you can load the dataset by directly assigning splits to the data files:
```python
from datasets import load_dataset
ds = load_dataset("parquet", data_files={"train": "testing123/train/outpu... | ### Describe the bug
When parquet files are saved in "train" and "val" subdirectories under a root directory, and datasets are then loaded using `load_dataset("parquet", data_dir="root_directory")`, the resulting dataset has duplicated rows for both the training and validation sets.
### Steps to reproduce the bug... | 48 | Duplicated Rows When Loading Parquet Files from Root Directory with Subdirectories
### Describe the bug
When parquet files are saved in "train" and "val" subdirectories under a root directory, and datasets are then loaded using `load_dataset("parquet", data_dir="root_directory")`, the resulting dataset has duplica... | [
0.07662568986415863,
-0.08359377086162567,
0.09032255411148071,
0.7221015095710754,
0.19889099895954132,
0.2233143448829651,
0.2155974954366684,
0.19770042598247528,
-0.14783166348934174,
0.04660548269748688,
0.019547155126929283,
0.2700919806957245,
-0.02123107761144638,
0.186010971665382... |
https://github.com/huggingface/datasets/issues/6257 | HfHubHTTPError - exceeded our hourly quotas for action: commit | how is your dataset structured? (file types, how many commits and files are you trying to push, etc) | ### Describe the bug
I try to upload a very large dataset of images, and get the following error:
```
File /fsx-multigen/yuvalkirstain/miniconda/envs/pickapic/lib/python3.10/site-packages/huggingface_hub/hf_api.py:2712, in HfApi.create_commit(self, repo_id, operations, commit_message, commit_description, token, repo... | 18 | HfHubHTTPError - exceeded our hourly quotas for action: commit
### Describe the bug
I try to upload a very large dataset of images, and get the following error:
```
File /fsx-multigen/yuvalkirstain/miniconda/envs/pickapic/lib/python3.10/site-packages/huggingface_hub/hf_api.py:2712, in HfApi.create_commit(self, rep... | [
-0.0392259880900383,
-0.22926294803619385,
-0.018464550375938416,
0.09591208398342133,
0.08189218491315842,
-0.2063775658607483,
-0.14135728776454926,
0.3770289719104767,
0.12479214370250702,
0.24446259438991547,
-0.03737182170152664,
-0.3624630868434906,
-0.036295536905527115,
0.372870802... |
https://github.com/huggingface/datasets/issues/6257 | HfHubHTTPError - exceeded our hourly quotas for action: commit | I succeeded in uploading it after several attempts with an hour gap between each attempt (inconvenient but worked). The final dataset is [here](https://huggingface.co/datasets/yuvalkirstain/pickapic_v2), code and context to the dataset can be found [here](https://github.com/yuvalkirstain/PickScore/).
I can close the i... | ### Describe the bug
I try to upload a very large dataset of images, and get the following error:
```
File /fsx-multigen/yuvalkirstain/miniconda/envs/pickapic/lib/python3.10/site-packages/huggingface_hub/hf_api.py:2712, in HfApi.create_commit(self, repo_id, operations, commit_message, commit_description, token, repo... | 54 | HfHubHTTPError - exceeded our hourly quotas for action: commit
### Describe the bug
I try to upload a very large dataset of images, and get the following error:
```
File /fsx-multigen/yuvalkirstain/miniconda/envs/pickapic/lib/python3.10/site-packages/huggingface_hub/hf_api.py:2712, in HfApi.create_commit(self, rep... | [
-0.0392259880900383,
-0.22926294803619385,
-0.018464550375938416,
0.09591208398342133,
0.08189218491315842,
-0.2063775658607483,
-0.14135728776454926,
0.3770289719104767,
0.12479214370250702,
0.24446259438991547,
-0.03737182170152664,
-0.3624630868434906,
-0.036295536905527115,
0.372870802... |
https://github.com/huggingface/datasets/issues/6257 | HfHubHTTPError - exceeded our hourly quotas for action: commit | We could fix this by creating a single commit for all the (Parquet) shards in `push_to_hub` instead of one commit per shard, as we currently do.
@Wauplin Any updates on the 2-step commit process suggested by you that we need to implement this? | ### Describe the bug
I try to upload a very large dataset of images, and get the following error:
```
File /fsx-multigen/yuvalkirstain/miniconda/envs/pickapic/lib/python3.10/site-packages/huggingface_hub/hf_api.py:2712, in HfApi.create_commit(self, repo_id, operations, commit_message, commit_description, token, repo... | 43 | HfHubHTTPError - exceeded our hourly quotas for action: commit
### Describe the bug
I try to upload a very large dataset of images, and get the following error:
```
File /fsx-multigen/yuvalkirstain/miniconda/envs/pickapic/lib/python3.10/site-packages/huggingface_hub/hf_api.py:2712, in HfApi.create_commit(self, rep... | [
-0.0392259880900383,
-0.22926294803619385,
-0.018464550375938416,
0.09591208398342133,
0.08189218491315842,
-0.2063775658607483,
-0.14135728776454926,
0.3770289719104767,
0.12479214370250702,
0.24446259438991547,
-0.03737182170152664,
-0.3624630868434906,
-0.036295536905527115,
0.372870802... |
https://github.com/huggingface/datasets/issues/6257 | HfHubHTTPError - exceeded our hourly quotas for action: commit | > Any updates on the 2-step commit process suggested by you that we need to implement this?
Re-prioritizing this, sorry. Will let you know but probably can be done this week. | ### Describe the bug
I try to upload a very large dataset of images, and get the following error:
```
File /fsx-multigen/yuvalkirstain/miniconda/envs/pickapic/lib/python3.10/site-packages/huggingface_hub/hf_api.py:2712, in HfApi.create_commit(self, repo_id, operations, commit_message, commit_description, token, repo... | 31 | HfHubHTTPError - exceeded our hourly quotas for action: commit
### Describe the bug
I try to upload a very large dataset of images, and get the following error:
```
File /fsx-multigen/yuvalkirstain/miniconda/envs/pickapic/lib/python3.10/site-packages/huggingface_hub/hf_api.py:2712, in HfApi.create_commit(self, rep... | [
-0.0392259880900383,
-0.22926294803619385,
-0.018464550375938416,
0.09591208398342133,
0.08189218491315842,
-0.2063775658607483,
-0.14135728776454926,
0.3770289719104767,
0.12479214370250702,
0.24446259438991547,
-0.03737182170152664,
-0.3624630868434906,
-0.036295536905527115,
0.372870802... |
https://github.com/huggingface/datasets/issues/6256 | load_dataset() function's cache_dir does not seems to work | Can you share the error message?
Also, it would help if you could check whether `huggingface_hub`'s download behaves the same:
```python
from huggingface_hub import snapshot_download
snapshot_download("trec", repo_type="dataset", cache_dir='/path/to/my/dir)
```
In the next major release, we aim to switch to `... | ### Describe the bug
datasets version: 2.14.5
when trying to run the following command
trec = load_dataset('trec', split='train[:1000]', cache_dir='/path/to/my/dir')
I keep getting error saying the command does not have permission to the default cache directory on my macbook pro machine.
It seems the cache_... | 62 | load_dataset() function's cache_dir does not seems to work
### Describe the bug
datasets version: 2.14.5
when trying to run the following command
trec = load_dataset('trec', split='train[:1000]', cache_dir='/path/to/my/dir')
I keep getting error saying the command does not have permission to the default cache... | [
-0.25810468196868896,
-0.31126832962036133,
0.07444940507411957,
0.3523426055908203,
0.2933737635612488,
0.11308472603559494,
0.23795561492443085,
0.0190462376922369,
0.2098361849784851,
0.013005025684833527,
-0.34500208497047424,
0.17233607172966003,
0.01865694299340248,
0.042719975113868... |
https://github.com/huggingface/datasets/issues/6252 | exif_transpose not done to Image (PIL problem) | Indeed, it makes sense to do this by default.
In the meantime, you can use `.with_transform` to transpose the images when accessing them:
```python
import PIL.ImageOps
def exif_transpose_transform(batch):
batch["image"] = [PIL.ImageOps.exif_transpose(image) for image in batch["image"]]
return batch
... | ### Feature request
I noticed that some of my images loaded using PIL have some metadata related to exif that can rotate them when loading.
Since the dataset.features.Image uses PIL for loading, the loaded image may be rotated (width and height will be inverted) thus for tasks as object detection and layoutLM this ca... | 41 | exif_transpose not done to Image (PIL problem)
### Feature request
I noticed that some of my images loaded using PIL have some metadata related to exif that can rotate them when loading.
Since the dataset.features.Image uses PIL for loading, the loaded image may be rotated (width and height will be inverted) thus f... | [
-0.20519563555717468,
-0.5333440899848938,
-0.02346685342490673,
-0.15881074965000153,
0.04967738315463066,
-0.08434946835041046,
0.4778323173522949,
-0.11946074664592743,
-0.10909044742584229,
0.2361840307712555,
0.2511252164840698,
0.2896172106266022,
0.05245713144540787,
0.3568757474422... |
https://github.com/huggingface/datasets/issues/6252 | exif_transpose not done to Image (PIL problem) | This operation sets some `Image` attributes to `None` (`.format`, `.filename`, etc.), causing our tests to fail, so I think we should wait for Datasets 3.0 to make this change. In version 3.0, storing image paths will be replaced by embedding image bytes, so there will be fewer instances where we use the `.filename` at... | ### Feature request
I noticed that some of my images loaded using PIL have some metadata related to exif that can rotate them when loading.
Since the dataset.features.Image uses PIL for loading, the loaded image may be rotated (width and height will be inverted) thus for tasks as object detection and layoutLM this ca... | 54 | exif_transpose not done to Image (PIL problem)
### Feature request
I noticed that some of my images loaded using PIL have some metadata related to exif that can rotate them when loading.
Since the dataset.features.Image uses PIL for loading, the loaded image may be rotated (width and height will be inverted) thus f... | [
-0.23128990828990936,
-0.43240949511528015,
-0.013056067749857903,
-0.13802646100521088,
0.027488715946674347,
-0.08289054036140442,
0.43932148814201355,
-0.12239629030227661,
-0.1861497163772583,
0.24336236715316772,
0.2979506254196167,
0.3136778771877289,
-0.007348162122070789,
0.4450428... |
https://github.com/huggingface/datasets/issues/6246 | Add new column to dataset | I think it's an issue with the code.
Specifically:
```python
dataset = dataset['train'].add_column("/workspace/data", new_column)
```
Now `dataset` is the train set with a new column.
To fix this, you can do:
```python
dataset['train'] = dataset['train'].add_column("/workspace/data", new_column)
``` | ### Describe the bug
```
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
[<ipython-input-9-bd197b36b6a0>](https://localhost:8080/#) in <cell line: 1>()
----> 1 dataset['train']['/workspace/data']
3 frames
[/... | 37 | Add new column to dataset
### Describe the bug
```
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
[<ipython-input-9-bd197b36b6a0>](https://localhost:8080/#) in <cell line: 1>()
----> 1 dataset['train']['/work... | [
-0.052788686007261276,
-0.019654691219329834,
0.05094659700989723,
0.018657416105270386,
0.3131663203239441,
0.21047767996788025,
0.6760565638542175,
0.4645122289657593,
0.15509799122810364,
0.10611620545387268,
0.08632193505764008,
0.49228280782699585,
-0.183009073138237,
0.18226632475852... |
https://github.com/huggingface/datasets/issues/6246 | Add new column to dataset | > I think it's an issue with the code.
>
> Specifically:
>
> ```python
> dataset = dataset['train'].add_column("/workspace/data", new_column)
> ```
>
> Now `dataset` is the train set with a new column. To fix this, you can do:
>
> ```python
> dataset['train'] = dataset['train'].add_column("/workspace/dat... | ### Describe the bug
```
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
[<ipython-input-9-bd197b36b6a0>](https://localhost:8080/#) in <cell line: 1>()
----> 1 dataset['train']['/workspace/data']
3 frames
[/... | 77 | Add new column to dataset
### Describe the bug
```
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
[<ipython-input-9-bd197b36b6a0>](https://localhost:8080/#) in <cell line: 1>()
----> 1 dataset['train']['/work... | [
-0.06994615495204926,
-0.016980953514575958,
0.051687564700841904,
0.024547085165977478,
0.3096669316291809,
0.2068055272102356,
0.6639562249183655,
0.4755825996398926,
0.14351153373718262,
0.09803616255521774,
0.0901748463511467,
0.5036664009094238,
-0.20435065031051636,
0.188844859600067... |
https://github.com/huggingface/datasets/issues/6246 | Add new column to dataset | I think there is a slight misunderstanding.
```python
new_column = ["mask"] * len(dataset["train"])
dataset['train'] = dataset['train'].add_column("/workspace/data", new_column)
```
adds a column with the string `mask` to your dataset.
If you're trying to load the images `"mask_{idx}.png"` in your dataset, you ... | ### Describe the bug
```
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
[<ipython-input-9-bd197b36b6a0>](https://localhost:8080/#) in <cell line: 1>()
----> 1 dataset['train']['/workspace/data']
3 frames
[/... | 96 | Add new column to dataset
### Describe the bug
```
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
[<ipython-input-9-bd197b36b6a0>](https://localhost:8080/#) in <cell line: 1>()
----> 1 dataset['train']['/work... | [
-0.09843666851520538,
-0.02786986529827118,
0.0237896665930748,
0.10551728308200836,
0.2503960132598877,
0.15773159265518188,
0.7520946860313416,
0.3964084982872009,
0.21604479849338531,
0.17301031947135925,
-0.00021364004351198673,
0.3614156246185303,
-0.12750867009162903,
0.1966310888528... |
https://github.com/huggingface/datasets/issues/6246 | Add new column to dataset | > I think there is a slight misunderstanding.
>
> ```python
> new_column = ["mask"] * len(dataset["train"])
> dataset['train'] = dataset['train'].add_column("/workspace/data", new_column)
> ```
>
> adds a column with the string `mask` to your dataset. If you're trying to load the images `"mask_{idx}.png"` in y... | ### Describe the bug
```
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
[<ipython-input-9-bd197b36b6a0>](https://localhost:8080/#) in <cell line: 1>()
----> 1 dataset['train']['/workspace/data']
3 frames
[/... | 146 | Add new column to dataset
### Describe the bug
```
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
[<ipython-input-9-bd197b36b6a0>](https://localhost:8080/#) in <cell line: 1>()
----> 1 dataset['train']['/work... | [
-0.09255671501159668,
-0.02848672866821289,
0.03623883053660393,
0.01101122796535492,
0.20684026181697845,
0.16335943341255188,
0.7571380734443665,
0.4250285029411316,
0.1550682932138443,
0.17447194457054138,
0.06612680852413177,
0.39078542590141296,
-0.12782660126686096,
0.232063099741935... |
https://github.com/huggingface/datasets/issues/6242 | Data alteration when loading dataset with unspecified inner sequence length | While this issue may seem specific, it led to a silent problem in my workflow that took days to diagnose. If this feature is not intended to be supported, an error should be raised when encountering this configuration to prevent such issues. | ### Describe the bug
When a dataset saved with a specified inner sequence length is loaded without specifying that length, the original data is altered and becomes inconsistent.
### Steps to reproduce the bug
```python
from datasets import Dataset, Features, Value, Sequence, load_dataset
# Repository ID
repo_id... | 42 | Data alteration when loading dataset with unspecified inner sequence length
### Describe the bug
When a dataset saved with a specified inner sequence length is loaded without specifying that length, the original data is altered and becomes inconsistent.
### Steps to reproduce the bug
```python
from datasets impor... | [
-0.037623822689056396,
-0.21157655119895935,
-0.1005135327577591,
0.3131210207939148,
0.24509631097316742,
-0.1111016571521759,
0.2989059090614319,
0.12334603071212769,
-0.002564791589975357,
0.2683869004249573,
-0.00887564942240715,
0.3487034738063812,
0.08487313985824585,
0.1627753227949... |
https://github.com/huggingface/datasets/issues/6242 | Data alteration when loading dataset with unspecified inner sequence length | Thanks for reporting! This is a MRE:
```python
import pyarrow as pa
from datasets.table import cast_array_to_feature
from datasets import Sequence, Value
data = [
[[1.0, 2.0, 3.0], [4.0, 5.0, 6.0]],
[[7.0, 8.0, 9.0], [10.0, 11.0, 12.0]],
]
arr = pa.array(data, pa.list_(pa.list_(pa.float32(), 3)))
ca... | ### Describe the bug
When a dataset saved with a specified inner sequence length is loaded without specifying that length, the original data is altered and becomes inconsistent.
### Steps to reproduce the bug
```python
from datasets import Dataset, Features, Value, Sequence, load_dataset
# Repository ID
repo_id... | 52 | Data alteration when loading dataset with unspecified inner sequence length
### Describe the bug
When a dataset saved with a specified inner sequence length is loaded without specifying that length, the original data is altered and becomes inconsistent.
### Steps to reproduce the bug
```python
from datasets impor... | [
-0.037623822689056396,
-0.21157655119895935,
-0.1005135327577591,
0.3131210207939148,
0.24509631097316742,
-0.1111016571521759,
0.2989059090614319,
0.12334603071212769,
-0.002564791589975357,
0.2683869004249573,
-0.00887564942240715,
0.3487034738063812,
0.08487313985824585,
0.1627753227949... |
https://github.com/huggingface/datasets/issues/6240 | Dataloader stuck on multiple GPUs | What type of dataset are you using in this script? `torch.utils.data.Dataset` or `datasets.Dataset`? Please share the `datasets` package version if it's the latter. Otherwise, it's better to move this issue to the `accelerate` repo. | ### Describe the bug
I am trying to get CLIP to fine-tuning with my code.
When I tried to run it on multiple GPUs using accelerate, I encountered the following phenomenon.
- Validation dataloader stuck in 2nd epoch only on multi-GPU
Specifically, when the "for inputs in valid_loader:" process is finished, it does... | 34 | Dataloader stuck on multiple GPUs
### Describe the bug
I am trying to get CLIP to fine-tuning with my code.
When I tried to run it on multiple GPUs using accelerate, I encountered the following phenomenon.
- Validation dataloader stuck in 2nd epoch only on multi-GPU
Specifically, when the "for inputs in valid_l... | [
-0.166738361120224,
-0.19584006071090698,
0.012823902070522308,
0.016720756888389587,
0.094904825091362,
-0.1398051381111145,
0.6904861927032471,
0.17139509320259094,
-0.051287759095430374,
0.23313266038894653,
0.16659113764762878,
0.34536072611808777,
0.22014622390270233,
0.24625815451145... |
https://github.com/huggingface/datasets/issues/6240 | Dataloader stuck on multiple GPUs | Very sorry, I thought I had a repo in `accelerate!`
I will close this issue and repo the issue in the appropriate place. | ### Describe the bug
I am trying to get CLIP to fine-tuning with my code.
When I tried to run it on multiple GPUs using accelerate, I encountered the following phenomenon.
- Validation dataloader stuck in 2nd epoch only on multi-GPU
Specifically, when the "for inputs in valid_loader:" process is finished, it does... | 23 | Dataloader stuck on multiple GPUs
### Describe the bug
I am trying to get CLIP to fine-tuning with my code.
When I tried to run it on multiple GPUs using accelerate, I encountered the following phenomenon.
- Validation dataloader stuck in 2nd epoch only on multi-GPU
Specifically, when the "for inputs in valid_l... | [
-0.11724363267421722,
-0.1557532101869583,
0.005002398043870926,
0.020393550395965576,
0.10015539079904556,
-0.15935386717319489,
0.6699701547622681,
0.13958655297756195,
-0.054594069719314575,
0.247582346200943,
0.1519870012998581,
0.32506680488586426,
0.23784741759300232,
0.2625866234302... |
https://github.com/huggingface/datasets/issues/6239 | Load local audio data doesn't work | I think this is the same issue as https://github.com/huggingface/datasets/issues/4776. Maybe installing `ffmpeg` can fix it:
```python
add-apt-repository -y ppa:savoury1/ffmpeg4
apt-get -qq install -y ffmpeg
```
However, the best solution is to use a newer version of `datasets`. In the recent releases, we've rep... | ### Describe the bug
I get a RuntimeError from the following code:
```python
audio_dataset = Dataset.from_dict({"audio": ["/kaggle/input/bengaliai-speech/train_mp3s/000005f3362c.mp3"]}).cast_column("audio", Audio())
audio_dataset[0]
```
### Traceback
<details>
```python
RuntimeError ... | 53 | Load local audio data doesn't work
### Describe the bug
I get a RuntimeError from the following code:
```python
audio_dataset = Dataset.from_dict({"audio": ["/kaggle/input/bengaliai-speech/train_mp3s/000005f3362c.mp3"]}).cast_column("audio", Audio())
audio_dataset[0]
```
### Traceback
<details>
`... | [
-0.43105608224868774,
-0.0462140291929245,
-0.007269911468029022,
0.41765397787094116,
0.44881993532180786,
-0.1828867495059967,
0.4197089970111847,
0.24208572506904602,
-0.027075814083218575,
0.2821231186389923,
-0.3670516908168793,
0.6166729927062988,
-0.25378960371017456,
-0.06415048986... |
https://github.com/huggingface/datasets/issues/6238 | `dataset.filter` ALWAYS removes the first item from the dataset when using batched=True | `filter` treats the function's output as a (selection) mask - `True` keeps the sample, and `False` drops it. In your case, `bool(0)` evaluates to `False`, so dropping the first sample is the correct behavior. | ### Describe the bug
If you call batched=True when calling `filter`, the first item is _always_ filtered out, regardless of the filter condition.
### Steps to reproduce the bug
Here's a minimal example:
```python
def filter_batch_always_true(batch, indices):
print("First index being passed into this filte... | 34 | `dataset.filter` ALWAYS removes the first item from the dataset when using batched=True
### Describe the bug
If you call batched=True when calling `filter`, the first item is _always_ filtered out, regardless of the filter condition.
### Steps to reproduce the bug
Here's a minimal example:
```python
def filt... | [
-0.24889416992664337,
-0.23401892185211182,
-0.17137552797794342,
-0.16107825934886932,
-0.19181138277053833,
-0.058566004037857056,
0.37126749753952026,
0.14128737151622772,
0.08033004403114319,
0.09808747470378876,
0.05338031053543091,
0.3734637498855591,
0.03651513531804085,
0.276138007... |
https://github.com/huggingface/datasets/issues/6237 | Tokenization with multiple workers is too slow | [This](https://huggingface.co/docs/datasets/nlp_process#map) is the most performant way to tokenize a dataset (`batched=True, num_proc=None, return_tensors="np"`)
If`tokenizer.is_fast` returns `True`, `num_proc` must be `None/1` to benefit from the fast tokenizers' parallelism (the fast tokenizers are implemented i... | I am trying to tokenize a few million documents with multiple workers but the tokenization process is taking forever.
Code snippet:
```
raw_datasets.map(
encode_function,
batched=False,
num_proc=args.preprocessing_num_workers,
load_from_cache_file=not args.ove... | 43 | Tokenization with multiple workers is too slow
I am trying to tokenize a few million documents with multiple workers but the tokenization process is taking forever.
Code snippet:
```
raw_datasets.map(
encode_function,
batched=False,
num_proc=args.preprocessing_num_worker... | [
-0.2808168828487396,
0.08872605860233307,
-0.14150403439998627,
-0.0760219395160675,
-0.20636051893234253,
-0.18386688828468323,
0.5079358816146851,
0.3603228032588959,
-0.09700511395931244,
0.15296435356140137,
0.1711219847202301,
0.19517140090465546,
-0.03924180939793587,
-0.249726802110... |
https://github.com/huggingface/datasets/issues/6236 | Support buffer shuffle for to_tf_dataset | Hey! You can implement this yourself, just:
1) Create the dataset with `to_tf_dataset()` with `shuffle=False`
2) Add an `unbatch()` at the end (or use batch_size=1)
3) Add a `shuffle()` to the resulting dataset with your desired buffer size
4) Add a `batch()` at the end again to re-batch your dataset.
Note tha... | ### Feature request
I'm using to_tf_dataset to convert a large dataset to tf.data.Dataset and use Keras fit to train model.
Currently, to_tf_dataset only supports full size shuffle, which can be very slow on large dataset.
tf.data.Dataset support buffer shuffle by default.
shuffle(
buffer_size, seed=None, r... | 118 | Support buffer shuffle for to_tf_dataset
### Feature request
I'm using to_tf_dataset to convert a large dataset to tf.data.Dataset and use Keras fit to train model.
Currently, to_tf_dataset only supports full size shuffle, which can be very slow on large dataset.
tf.data.Dataset support buffer shuffle by default... | [
-0.3778424561023712,
-0.26851537823677063,
-0.005736609920859337,
-0.11381520330905914,
0.3517451882362366,
0.32343271374702454,
0.061275433748960495,
0.4983135163784027,
-0.07992981374263763,
0.4037872552871704,
-0.3511706590652466,
0.30224889516830444,
-0.475032776594162,
0.2378539592027... |
https://github.com/huggingface/datasets/issues/6236 | Support buffer shuffle for to_tf_dataset | Thanks for your reply! @Rocketknight1
"We don't actually shuffle the entire dataset in-memory, using tf.data.Dataset.shuffle()! Instead, we shuffle an index array and then load from the dataset with that."
In such case, there will be random access to dataset data during shuffling. When the dataset is large, the perf... | ### Feature request
I'm using to_tf_dataset to convert a large dataset to tf.data.Dataset and use Keras fit to train model.
Currently, to_tf_dataset only supports full size shuffle, which can be very slow on large dataset.
tf.data.Dataset support buffer shuffle by default.
shuffle(
buffer_size, seed=None, r... | 76 | Support buffer shuffle for to_tf_dataset
### Feature request
I'm using to_tf_dataset to convert a large dataset to tf.data.Dataset and use Keras fit to train model.
Currently, to_tf_dataset only supports full size shuffle, which can be very slow on large dataset.
tf.data.Dataset support buffer shuffle by default... | [
-0.3856084942817688,
-0.2946019768714905,
0.0037970617413520813,
-0.04990144073963165,
0.33073657751083374,
0.36358869075775146,
0.05948570370674133,
0.5427851676940918,
-0.11980417370796204,
0.35618138313293457,
-0.34272801876068115,
0.3405895531177521,
-0.4256582260131836,
0.193689882755... |
https://github.com/huggingface/datasets/issues/6229 | Apply inference on all images in the dataset | From what I see, `MMSegInferencer` supports NumPy arrays, so replace the line `image_path = example['image']` with `image_path = np.array(example['image'])` to fix the issue (`example["image"]` is a `PIL.Image` object). | ### Describe the bug
```
---------------------------------------------------------------------------
NotImplementedError Traceback (most recent call last)
Cell In[14], line 11
9 for idx, example in enumerate(dataset['train']):
10 image_path = example['image']
---> 11 mask... | 28 | Apply inference on all images in the dataset
### Describe the bug
```
---------------------------------------------------------------------------
NotImplementedError Traceback (most recent call last)
Cell In[14], line 11
9 for idx, example in enumerate(dataset['train']):
10 ... | [
-0.16085350513458252,
-0.25083816051483154,
-0.1263801008462906,
0.062368083745241165,
0.1779986470937729,
-0.13726943731307983,
0.46878406405448914,
0.28578367829322815,
-0.1683649867773056,
0.47970670461654663,
0.05943527817726135,
0.3093043267726898,
-0.18697945773601532,
-0.23190510272... |
https://github.com/huggingface/datasets/issues/6229 | Apply inference on all images in the dataset | > From what I see, `MMSegInferencer` supports NumPy arrays, so replace the line `image_path = example['image']` with `image_path = np.array(example['image'])` to fix the issue (`example["image"]` is a `PIL.Image` object).
Thanks @mariosasko for your reply...
i tried :
```
# Define a function to apply the code to ... | ### Describe the bug
```
---------------------------------------------------------------------------
NotImplementedError Traceback (most recent call last)
Cell In[14], line 11
9 for idx, example in enumerate(dataset['train']):
10 image_path = example['image']
---> 11 mask... | 638 | Apply inference on all images in the dataset
### Describe the bug
```
---------------------------------------------------------------------------
NotImplementedError Traceback (most recent call last)
Cell In[14], line 11
9 for idx, example in enumerate(dataset['train']):
10 ... | [
-0.16085350513458252,
-0.25083816051483154,
-0.1263801008462906,
0.062368083745241165,
0.1779986470937729,
-0.13726943731307983,
0.46878406405448914,
0.28578367829322815,
-0.1683649867773056,
0.47970670461654663,
0.05943527817726135,
0.3093043267726898,
-0.18697945773601532,
-0.23190510272... |
https://github.com/huggingface/datasets/issues/6221 | Support saving datasets with custom formatting | Not a fan of pickling this sort of stuff either.
Note that users can also share the code in their dataset documentation. | Requested in https://discuss.huggingface.co/t/using-set-transform-on-a-dataset-leads-to-an-exception/53036.
I am not sure if supporting this is the best idea for the following reasons:
>For this to work, we would have to pickle a custom transform, which means the transform and the objects it references need to be... | 22 | Support saving datasets with custom formatting
Requested in https://discuss.huggingface.co/t/using-set-transform-on-a-dataset-leads-to-an-exception/53036.
I am not sure if supporting this is the best idea for the following reasons:
>For this to work, we would have to pickle a custom transform, which means the t... | [
-0.23778589069843292,
-0.09020712971687317,
0.000660894438624382,
0.07739189267158508,
0.36724525690078735,
0.1147279366850853,
0.3002288043498993,
0.09567223489284515,
-0.20880556106567383,
0.014439865946769714,
-0.138302743434906,
0.07821657508611679,
-0.34521061182022095,
0.469913750886... |
https://github.com/huggingface/datasets/issues/6217 | `Dataset.to_dict()` ignore `decode=True` with Image feature | We need to implement the `Image` type as a PyArrow extension type (to allow us to override the Python conversion) for this to work as expected. For now, it's best to use your approach indeed. | ### Describe the bug
`Dataset.to_dict` seems to ignore the decoding instruction passed in features.
### Steps to reproduce the bug
```python
import datasets
import numpy as np
from PIL import Image
img = np.random.randint(0, 256, (5, 5, 3), dtype=np.uint8)
img = Image.fromarray(img)
features = datasets.Fea... | 35 | `Dataset.to_dict()` ignore `decode=True` with Image feature
### Describe the bug
`Dataset.to_dict` seems to ignore the decoding instruction passed in features.
### Steps to reproduce the bug
```python
import datasets
import numpy as np
from PIL import Image
img = np.random.randint(0, 256, (5, 5, 3), dtype=np... | [
0.03489673510193825,
-0.20412714779376984,
-0.11633126437664032,
0.20876897871494293,
0.27176451683044434,
0.20352870225906372,
0.19232048094272614,
0.39373594522476196,
-0.03279552981257439,
0.1958097219467163,
0.15691183507442474,
0.6271663904190063,
0.053413134068250656,
0.2822778522968... |
https://github.com/huggingface/datasets/issues/6212 | Tilde (~) is not supported for data_files | Hi @exs-avianello, is it really needed? Note you can alternatively use `pathlib.Path` among others as it follows:
```python
import datasets
from pathlib import Path
# save a parquet file at ~/path/to/data.parquet
data_files = Path.home() / "path/to/data.parquet"
dataset = datasets.load_dataset("parquet", da... | ### Describe the bug
Attempting to `load_dataset` from a path starting with `~` (as a shorthand for the user's home directory) seems not to be fully working - at least as far as the `parquet` dataset builder is concerned.
(the same file can be loaded correctly if providing its absolute path instead)
I think that... | 41 | Tilde (~) is not supported for data_files
### Describe the bug
Attempting to `load_dataset` from a path starting with `~` (as a shorthand for the user's home directory) seems not to be fully working - at least as far as the `parquet` dataset builder is concerned.
(the same file can be loaded correctly if providin... | [
-0.40940308570861816,
0.052280351519584656,
0.030013136565685272,
0.432647705078125,
0.4441779851913452,
-0.08656130731105804,
0.15651243925094604,
0.17398963868618011,
0.1268569976091385,
0.09496279060840607,
0.10140738636255264,
0.266104131937027,
-0.2220901995897293,
0.22296945750713348... |
https://github.com/huggingface/datasets/issues/6212 | Tilde (~) is not supported for data_files | Hi @alvarobartt !
This is definitely just a "nice to have" and I am personally more than happy to just use absolute paths client-side. I just wanted to flag it up in case it can help improve the package even more 🙌 It might not be immediately obvious from the stack trace that the error is triggered by the `~` in t... | ### Describe the bug
Attempting to `load_dataset` from a path starting with `~` (as a shorthand for the user's home directory) seems not to be fully working - at least as far as the `parquet` dataset builder is concerned.
(the same file can be loaded correctly if providing its absolute path instead)
I think that... | 63 | Tilde (~) is not supported for data_files
### Describe the bug
Attempting to `load_dataset` from a path starting with `~` (as a shorthand for the user's home directory) seems not to be fully working - at least as far as the `parquet` dataset builder is concerned.
(the same file can be loaded correctly if providin... | [
-0.40940308570861816,
0.052280351519584656,
0.030013136565685272,
0.432647705078125,
0.4441779851913452,
-0.08656130731105804,
0.15651243925094604,
0.17398963868618011,
0.1268569976091385,
0.09496279060840607,
0.10140738636255264,
0.266104131937027,
-0.2220901995897293,
0.22296945750713348... |
https://github.com/huggingface/datasets/issues/6206 | When calling load_dataset, raise error: pyarrow.lib.ArrowInvalid: offset overflow while concatenating arrays | I solved the problem by modifying the "self DEFAULT_WRITER_BATCH_SIZE" in "class MyDataset (datasets. GeneratorBasedBuilder) : __init__" | ### Describe the bug
When calling load_dataset, raise error
```
Traceback (most recent call last):
File "/home/aihao/miniconda3/envs/torch/lib/python3.11/site-packages/datasets/builder.py", line 1694, in _pre
pare_split_single ... | 16 | When calling load_dataset, raise error: pyarrow.lib.ArrowInvalid: offset overflow while concatenating arrays
### Describe the bug
When calling load_dataset, raise error
```
Traceback (most recent call last):
File "/home/aihao/minico... | [
-0.4871366024017334,
-0.07129302620887756,
-0.06189591810107231,
0.5471633672714233,
0.14621883630752563,
-0.060504935681819916,
0.38587552309036255,
0.27676987648010254,
-0.5083076357841492,
0.20288684964179993,
0.12906506657600403,
0.4395866394042969,
0.10653235763311386,
-0.039909042418... |
https://github.com/huggingface/datasets/issues/6206 | When calling load_dataset, raise error: pyarrow.lib.ArrowInvalid: offset overflow while concatenating arrays | same problem, and this solution worked me also - you can set this var by setting the keyword argument `writer_batch_size=...` in `load_dataset(...,writer_batch_size=...)` | ### Describe the bug
When calling load_dataset, raise error
```
Traceback (most recent call last):
File "/home/aihao/miniconda3/envs/torch/lib/python3.11/site-packages/datasets/builder.py", line 1694, in _pre
pare_split_single ... | 22 | When calling load_dataset, raise error: pyarrow.lib.ArrowInvalid: offset overflow while concatenating arrays
### Describe the bug
When calling load_dataset, raise error
```
Traceback (most recent call last):
File "/home/aihao/minico... | [
-0.4871366024017334,
-0.07129302620887756,
-0.06189591810107231,
0.5471633672714233,
0.14621883630752563,
-0.060504935681819916,
0.38587552309036255,
0.27676987648010254,
-0.5083076357841492,
0.20288684964179993,
0.12906506657600403,
0.4395866394042969,
0.10653235763311386,
-0.039909042418... |
https://github.com/huggingface/datasets/issues/6203 | Support loading from a DVC remote repository | (cross-posting from the linked DVC issue)
I think this should already work out of the box with the current `datasets` and `dvc.api` releases by passing the correct `storage_options` into the datasets calls. `storage_options` is essentially just the kwargs dict that gets passed to the fsspec fs constructor.
The ma... | ### Feature request
Adding support for loading a file from a DVC repository, tracked remotely on a SCM.
### Motivation
DVC is a popular version control system to version and manage datasets. The files are stored on a remote object storage platform, but they are tracked using Git. Integration with DVC is possible thr... | 175 | Support loading from a DVC remote repository
### Feature request
Adding support for loading a file from a DVC repository, tracked remotely on a SCM.
### Motivation
DVC is a popular version control system to version and manage datasets. The files are stored on a remote object storage platform, but they are tracked ... | [
-0.17393465340137482,
0.18651393055915833,
0.04655930772423744,
-0.03338189423084259,
0.2707483172416687,
-0.36072152853012085,
0.23541989922523499,
0.03569570556282997,
0.10046932101249695,
-0.09577038884162903,
0.07728302478790283,
0.404733806848526,
-0.1599387228488922,
0.41130480170249... |
https://github.com/huggingface/datasets/issues/6203 | Support loading from a DVC remote repository | Hi @pmrowla Thank you for your help, that's very helpful, I was indeed using `fsspec` incorrectly here. There is still an issue with `datasets`:
```python
import datasets
dataset = datasets.load_dataset("json", data_files="dvc://folder/file.jsonl", storage_options={"url": "https://gitlab.com/repo/folder/"})
```
... | ### Feature request
Adding support for loading a file from a DVC repository, tracked remotely on a SCM.
### Motivation
DVC is a popular version control system to version and manage datasets. The files are stored on a remote object storage platform, but they are tracked using Git. Integration with DVC is possible thr... | 327 | Support loading from a DVC remote repository
### Feature request
Adding support for loading a file from a DVC repository, tracked remotely on a SCM.
### Motivation
DVC is a popular version control system to version and manage datasets. The files are stored on a remote object storage platform, but they are tracked ... | [
-0.14952698349952698,
0.13017410039901733,
0.03631480410695076,
-0.03125666081905365,
0.2512751817703247,
-0.36142200231552124,
0.25599151849746704,
0.041659191250801086,
0.1136186271905899,
-0.09889499843120575,
0.10567518323659897,
0.3526548147201538,
-0.1708972305059433,
0.3965216279029... |
https://github.com/huggingface/datasets/issues/6203 | Support loading from a DVC remote repository | For the record, there was a `dvc.api.DVCFileSystem` bug which is fixed in DVC `main` and will be available in the next DVC release.
To use DVC with `datasets` you just need to pass the Git/DVC repo `url` in `storage_options` as discussed above.
(note that this requires having both `datasets` and `dvc` installed i... | ### Feature request
Adding support for loading a file from a DVC repository, tracked remotely on a SCM.
### Motivation
DVC is a popular version control system to version and manage datasets. The files are stored on a remote object storage platform, but they are tracked using Git. Integration with DVC is possible thr... | 130 | Support loading from a DVC remote repository
### Feature request
Adding support for loading a file from a DVC repository, tracked remotely on a SCM.
### Motivation
DVC is a popular version control system to version and manage datasets. The files are stored on a remote object storage platform, but they are tracked ... | [
-0.1739376336336136,
0.17896324396133423,
0.03721879795193672,
-0.04128975421190262,
0.23959389328956604,
-0.31320124864578247,
0.2638845145702362,
0.054811619222164154,
0.09661710262298584,
-0.07596738636493683,
0.07595189660787582,
0.3949263095855713,
-0.17496787011623383,
0.354342877864... |
https://github.com/huggingface/datasets/issues/6202 | avoid downgrading jax version | https://github.com/huggingface/datasets/blob/main/setup.py#L236
Currently has the highest version at 0.3.25; Not sure if there is any reason for this, other than that was the tested version? | ### Feature request
Whenever I `pip install datasets[jax]` it downgrades jax to version 0.3.25. I seem to be able to install this library first then upgrade jax back to version 0.4.13.
### Motivation
It would be nice to not overwrite currently installed version of jax if possible.
### Your contribution
I... | 24 | avoid downgrading jax version
### Feature request
Whenever I `pip install datasets[jax]` it downgrades jax to version 0.3.25. I seem to be able to install this library first then upgrade jax back to version 0.4.13.
### Motivation
It would be nice to not overwrite currently installed version of jax if possibl... | [
0.038342807441949844,
-0.03251975029706955,
-0.01834837533533573,
-0.11743246018886566,
0.2698764503002167,
0.15883409976959229,
-0.02546069398522377,
0.6368865370750427,
0.027017924934625626,
0.12465303391218185,
0.15229028463363647,
0.279801607131958,
-0.06330277770757675,
0.471864581108... |
https://github.com/huggingface/datasets/issues/6199 | Use load_dataset for local json files, but it not works | Hugging Face's datasets library may prioritize remote configurations. Make sure there are no conflicting configurations causing the library to prefer downloading data
May be try debugging
raw_datasets = load_dataset('json', data_files=data_files)
print(raw_datasets)
| ### Describe the bug
when I use load_dataset to load my local datasets,it always goes to Hugging Face to download the data instead of loading the local dataset.
### Steps to reproduce the bug
`raw_datasets = load_dataset(
‘json’,
data_files=data_files)`
### Expected behavior
`
### Expected behavior
` fails with a `ValueError` since the latest `pandas` [release](https://pandas.pydata.org/docs/dev/whatsnew/v2.1.0.html) (`2.1.0`)
In their latest release we have:
> Improved error handling when using [DataFrame.to_json()](https://pandas.pydata.org/docs/dev/refere... | 20 | ValueError: 'index=True' is only valid when 'orient' is 'split', 'table', 'index', or 'columns'
### Describe the bug
Saving a dataset `.to_json()` fails with a `ValueError` since the latest `pandas` [release](https://pandas.pydata.org/docs/dev/whatsnew/v2.1.0.html) (`2.1.0`)
In their latest release we have:
> ... | [
0.054365042597055435,
0.21008336544036865,
-0.012207669205963612,
0.1430051326751709,
0.22878776490688324,
0.21489077806472778,
0.5008205771446228,
0.5437048077583313,
-0.07517039775848389,
0.08667103946208954,
-0.20408561825752258,
0.5609630346298218,
0.0017829537391662598,
-0.05196493119... |
https://github.com/huggingface/datasets/issues/6195 | Force to reuse cache at given path | realized that need to pass the path at `cache_file_name` like
```python
tokenized_datasets = raw_datasets["train"].map(
tokenize_function,
batched=True,
num_proc=data_args.preprocessing_num_workers,
remove_columns=[text_column_name],
... | ### Describe the bug
I have run the official example of MLM like:
```bash
python run_mlm.py \
--model_name_or_path roberta-base \
--dataset_name togethercomputer/RedPajama-Data-1T \
--dataset_config_name arxiv \
--per_device_train_batch_size 10 \
--preprocessing_num_workers 20 ... | 32 | Force to reuse cache at given path
### Describe the bug
I have run the official example of MLM like:
```bash
python run_mlm.py \
--model_name_or_path roberta-base \
--dataset_name togethercomputer/RedPajama-Data-1T \
--dataset_config_name arxiv \
--per_device_train_batch_size 10 \
... | [
-0.0019593127071857452,
0.21225899457931519,
0.11871497333049774,
0.13832391798496246,
0.15499284863471985,
-0.021354909986257553,
0.4301425814628601,
0.1511983424425125,
0.028692688792943954,
-0.08496595919132233,
-0.05548153817653656,
0.5933550000190735,
-0.19288866221904755,
-0.14744815... |
https://github.com/huggingface/datasets/issues/6195 | Force to reuse cache at given path | Thank you so much! I went through a lot of issues before finding similar experiences here. I have to say that the [docs](https://huggingface.co/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Dataset.map) of `.map()` is really misleading, probably making people think that just assigning the file name t... | ### Describe the bug
I have run the official example of MLM like:
```bash
python run_mlm.py \
--model_name_or_path roberta-base \
--dataset_name togethercomputer/RedPajama-Data-1T \
--dataset_config_name arxiv \
--per_device_train_batch_size 10 \
--preprocessing_num_workers 20 ... | 42 | Force to reuse cache at given path
### Describe the bug
I have run the official example of MLM like:
```bash
python run_mlm.py \
--model_name_or_path roberta-base \
--dataset_name togethercomputer/RedPajama-Data-1T \
--dataset_config_name arxiv \
--per_device_train_batch_size 10 \
... | [
-0.0019593127071857452,
0.21225899457931519,
0.11871497333049774,
0.13832391798496246,
0.15499284863471985,
-0.021354909986257553,
0.4301425814628601,
0.1511983424425125,
0.028692688792943954,
-0.08496595919132233,
-0.05548153817653656,
0.5933550000190735,
-0.19288866221904755,
-0.14744815... |
https://github.com/huggingface/datasets/issues/6194 | Support custom fingerprinting with `Dataset.from_generator` | The `fingerprint` parameter serves a slightly different purpose - we use it to inject a new fingerprint after transforming a `Dataset` (computed from the previous fingerprint + transform + transform args), e.g., to be able to compute the cache file for a transform. There is no concept of `fingerprint` before a `Dataset... | ### Feature request
When using `Dataset.from_generator`, the generator is hashed when building the fingerprint. Similar to `.map`, it would be interesting to let the user bypass this hashing by accepting a `fingerprint` argument to `.from_generator`.
### Motivation
Using the `.from_generator` constructor with ... | 119 | Support custom fingerprinting with `Dataset.from_generator`
### Feature request
When using `Dataset.from_generator`, the generator is hashed when building the fingerprint. Similar to `.map`, it would be interesting to let the user bypass this hashing by accepting a `fingerprint` argument to `.from_generator`.
#... | [
-0.37626776099205017,
0.12814950942993164,
0.0722452849149704,
0.08254827558994293,
0.030976038426160812,
0.04896964132785797,
0.4635082483291626,
0.19914032518863678,
0.04077380523085594,
0.30235472321510315,
0.10347191244363785,
0.35996007919311523,
-0.31509456038475037,
0.39351299405097... |
https://github.com/huggingface/datasets/issues/6194 | Support custom fingerprinting with `Dataset.from_generator` | Adding +1 here:
If the generator needs to access some external resources or state, then it's not always straightforward to make it pickle-able. So I'd like to be able to override how the default cache key derivation needs to pickle the generator (and of course, I'd accept responsibility for that part of cache consis... | ### Feature request
When using `Dataset.from_generator`, the generator is hashed when building the fingerprint. Similar to `.map`, it would be interesting to let the user bypass this hashing by accepting a `fingerprint` argument to `.from_generator`.
### Motivation
Using the `.from_generator` constructor with ... | 65 | Support custom fingerprinting with `Dataset.from_generator`
### Feature request
When using `Dataset.from_generator`, the generator is hashed when building the fingerprint. Similar to `.map`, it would be interesting to let the user bypass this hashing by accepting a `fingerprint` argument to `.from_generator`.
#... | [
-0.20553231239318848,
0.26435989141464233,
0.09052123129367828,
0.10795523971319199,
-0.10179509222507477,
-0.04261642321944237,
0.43080443143844604,
0.2865423560142517,
0.10000427067279816,
0.2210119664669037,
0.34422603249549866,
0.5742273330688477,
-0.22861889004707336,
0.23749361932277... |
https://github.com/huggingface/datasets/issues/6194 | Support custom fingerprinting with `Dataset.from_generator` | Silly hack incoming:
```python
import uuid
class _DatasetGeneratorPickleHack:
def __init__(self, generator, generator_id=None):
self.generator = generator
self.generator_id = (
generator_id if generator_id is not None else str(uuid.uuid4())
)
def __call__(self,... | ### Feature request
When using `Dataset.from_generator`, the generator is hashed when building the fingerprint. Similar to `.map`, it would be interesting to let the user bypass this hashing by accepting a `fingerprint` argument to `.from_generator`.
### Motivation
Using the `.from_generator` constructor with ... | 82 | Support custom fingerprinting with `Dataset.from_generator`
### Feature request
When using `Dataset.from_generator`, the generator is hashed when building the fingerprint. Similar to `.map`, it would be interesting to let the user bypass this hashing by accepting a `fingerprint` argument to `.from_generator`.
#... | [
-0.36780843138694763,
0.21587926149368286,
0.038053255528211594,
0.02745172753930092,
0.016834335401654243,
-0.03290647640824318,
0.5063587427139282,
0.18545588850975037,
0.13440260291099548,
0.3427475392818451,
0.11656126379966736,
0.5043581128120422,
-0.3798724114894867,
0.27856093645095... |
https://github.com/huggingface/datasets/issues/6194 | Support custom fingerprinting with `Dataset.from_generator` | I'd like some way to do this too. I find that sometimes the hash doesn't cover enough, and that the dataset is not regenerated even when underlying data has changed, and by supplying a custom fingerprint I could do a better job of controlling when my dataset is regenerated. | ### Feature request
When using `Dataset.from_generator`, the generator is hashed when building the fingerprint. Similar to `.map`, it would be interesting to let the user bypass this hashing by accepting a `fingerprint` argument to `.from_generator`.
### Motivation
Using the `.from_generator` constructor with ... | 49 | Support custom fingerprinting with `Dataset.from_generator`
### Feature request
When using `Dataset.from_generator`, the generator is hashed when building the fingerprint. Similar to `.map`, it would be interesting to let the user bypass this hashing by accepting a `fingerprint` argument to `.from_generator`.
#... | [
-0.30125513672828674,
0.2775112986564636,
0.066647008061409,
0.023241203278303146,
-0.1204923689365387,
0.032037265598773956,
0.5140145421028137,
0.18703509867191315,
0.022674839943647385,
0.28860098123550415,
0.3510574996471405,
0.36760586500167847,
-0.34136611223220825,
0.364436060190200... |
https://github.com/huggingface/datasets/issues/6193 | Dataset loading script method does not work with .pyc file | Before dynamically loading `.py` scripts with `importlib.import_module`, we also parse their contents to check imports, which is tricky to implement for binary `.pyc` files (requires parsing bytecode), so I don't think this is something we want to support (unless more users request it ofc) as this use case is a bit too... | ### Describe the bug
The huggingface dataset library specifically looks for ‘.py’ file while loading the dataset using loading script approach and it does not work with ‘.pyc’ file.
While deploying in production, it becomes an issue when we are restricted to use only .pyc files. Is there any work around for this ?
#... | 59 | Dataset loading script method does not work with .pyc file
### Describe the bug
The huggingface dataset library specifically looks for ‘.py’ file while loading the dataset using loading script approach and it does not work with ‘.pyc’ file.
While deploying in production, it becomes an issue when we are restricted t... | [
0.13531804084777832,
-0.09920483827590942,
0.06262581050395966,
0.16297554969787598,
0.23983484506607056,
-0.053802795708179474,
0.5892162322998047,
0.12035016715526581,
0.27410346269607544,
-0.0842929482460022,
0.09421031177043915,
0.22653917968273163,
-0.12507174909114838,
0.558040022850... |
https://github.com/huggingface/datasets/issues/6193 | Dataset loading script method does not work with .pyc file | > Before dynamically loading .py scripts with importlib.import_module, we also parse their contents to check imports, which is tricky to implement for binary .pyc files (requires parsing bytecode), so I don't think this is something we want to support (unless more users request it ofc) as this use case is a bit too spe... | ### Describe the bug
The huggingface dataset library specifically looks for ‘.py’ file while loading the dataset using loading script approach and it does not work with ‘.pyc’ file.
While deploying in production, it becomes an issue when we are restricted to use only .pyc files. Is there any work around for this ?
#... | 76 | Dataset loading script method does not work with .pyc file
### Describe the bug
The huggingface dataset library specifically looks for ‘.py’ file while loading the dataset using loading script approach and it does not work with ‘.pyc’ file.
While deploying in production, it becomes an issue when we are restricted t... | [
0.07976481318473816,
-0.07390366494655609,
0.06754833459854126,
0.1540302038192749,
0.24028244614601135,
-0.05787702649831772,
0.5375263690948486,
0.13719820976257324,
0.2799835503101349,
-0.08522729575634003,
0.08983796089887619,
0.2465866357088089,
-0.141922265291214,
0.5773558616638184,... |
https://github.com/huggingface/datasets/issues/6193 | Dataset loading script method does not work with .pyc file | Hi @lhoestq ,
Could you share some example code related to the approach that you are suggesting? | ### Describe the bug
The huggingface dataset library specifically looks for ‘.py’ file while loading the dataset using loading script approach and it does not work with ‘.pyc’ file.
While deploying in production, it becomes an issue when we are restricted to use only .pyc files. Is there any work around for this ?
#... | 17 | Dataset loading script method does not work with .pyc file
### Describe the bug
The huggingface dataset library specifically looks for ‘.py’ file while loading the dataset using loading script approach and it does not work with ‘.pyc’ file.
While deploying in production, it becomes an issue when we are restricted t... | [
0.10208320617675781,
-0.17134982347488403,
0.05191471800208092,
0.20252326130867004,
0.17857591807842255,
-0.06164487451314926,
0.5064952969551086,
0.1208190768957138,
0.2920164167881012,
-0.028900429606437683,
0.08277801424264908,
0.2429039478302002,
-0.10555316507816315,
0.58483713865280... |
https://github.com/huggingface/datasets/issues/6188 | [Feature Request] Check the length of batch before writing so that empty batch is allowed | I think this error means you filter all examples within an (input) batch by deleting its columns. In that case, to avoid the error, you can set the column value to an empty list (`input_batch["col"] = []`) instead. | ### Use Case
I use `dataset.map(process_fn, batched=True)` to process the dataset, with data **augmentations or filtering**. However, when all examples within a batch is filtered out, i.e. **an empty batch is returned**, the following error will be thrown:
```
ValueError: Schema and number of arrays unequal
`... | 38 | [Feature Request] Check the length of batch before writing so that empty batch is allowed
### Use Case
I use `dataset.map(process_fn, batched=True)` to process the dataset, with data **augmentations or filtering**. However, when all examples within a batch is filtered out, i.e. **an empty batch is returned**, the fo... | [
-0.390543133020401,
-0.1144765242934227,
-0.1267145574092865,
0.06956245750188828,
0.1172381266951561,
-0.03960467129945755,
0.3428270220756531,
0.17094168066978455,
0.31443092226982117,
0.3454688787460327,
0.2737777531147003,
0.036286212503910065,
-0.18616048991680145,
0.37929660081863403... |
https://github.com/huggingface/datasets/issues/6187 | Couldn't find a dataset script at /content/tsv/tsv.py or any data file in the same directory | Hi! You can load this dataset with:
```python
data_files = {
"train": "/content/PUBHEALTH/train.tsv",
"validation": "/content/PUBHEALTH/dev.tsv",
"test": "/content/PUBHEALTH/test.tsv",
}
tsv_datasets_reloaded = load_dataset("csv", data_files=data_files, sep="\t")
```
To support your `load_datas... | ### Describe the bug
```
---------------------------------------------------------------------------
FileNotFoundError Traceback (most recent call last)
[<ipython-input-48-6a7b3e847019>](https://localhost:8080/#) in <cell line: 7>()
5 }
6
----> 7 csv_datasets_reloaded = load_... | 59 | Couldn't find a dataset script at /content/tsv/tsv.py or any data file in the same directory
### Describe the bug
```
---------------------------------------------------------------------------
FileNotFoundError Traceback (most recent call last)
[<ipython-input-48-6a7b3e847019>](https://lo... | [
-0.32915177941322327,
-0.35123318433761597,
-0.09159648418426514,
0.17967189848423004,
0.42302924394607544,
0.047539569437503815,
0.4764000475406647,
0.49330934882164,
0.18158359825611115,
0.12043001502752304,
0.050472237169742584,
0.2881435751914978,
-0.20857131481170654,
0.14873223006725... |
https://github.com/huggingface/datasets/issues/6186 | Feature request: add code example of multi-GPU processing | That'd be a great idea! @mariosasko or @lhoestq, would it be possible to fix the code snippet or do you have another suggested way for doing this? | ### Feature request
Would be great to add a code example of how to do multi-GPU processing with 🤗 Datasets in the documentation. cc @stevhliu
Currently the docs has a small [section](https://huggingface.co/docs/datasets/v2.3.2/en/process#map) on this saying "your big GPU call goes here", however it didn't work f... | 27 | Feature request: add code example of multi-GPU processing
### Feature request
Would be great to add a code example of how to do multi-GPU processing with 🤗 Datasets in the documentation. cc @stevhliu
Currently the docs has a small [section](https://huggingface.co/docs/datasets/v2.3.2/en/process#map) on this sa... | [
-0.13726480305194855,
-0.43240559101104736,
-0.0019795354455709457,
0.09065312892198563,
-0.10275644063949585,
0.04838532209396362,
0.39975789189338684,
0.0033100303262472153,
0.1566067337989807,
0.22367176413536072,
0.18687133491039276,
0.2376289665699005,
0.19287066161632538,
0.512840807... |
https://github.com/huggingface/datasets/issues/6186 | Feature request: add code example of multi-GPU processing | Indeed `if __name__ == "__main__"` is important in this case.
Not sure about the imbalanced GPU usage though, but maybe you can try using the `torch.cuda.device` context manager ?
> also, should I do it like this or use nn.DataParallel?
In this case you wouldn't need a multiprocessed map no ? Since nn.DataPara... | ### Feature request
Would be great to add a code example of how to do multi-GPU processing with 🤗 Datasets in the documentation. cc @stevhliu
Currently the docs has a small [section](https://huggingface.co/docs/datasets/v2.3.2/en/process#map) on this saying "your big GPU call goes here", however it didn't work f... | 58 | Feature request: add code example of multi-GPU processing
### Feature request
Would be great to add a code example of how to do multi-GPU processing with 🤗 Datasets in the documentation. cc @stevhliu
Currently the docs has a small [section](https://huggingface.co/docs/datasets/v2.3.2/en/process#map) on this sa... | [
-0.13726480305194855,
-0.43240559101104736,
-0.0019795354455709457,
0.09065312892198563,
-0.10275644063949585,
0.04838532209396362,
0.39975789189338684,
0.0033100303262472153,
0.1566067337989807,
0.22367176413536072,
0.18687133491039276,
0.2376289665699005,
0.19287066161632538,
0.512840807... |
https://github.com/huggingface/datasets/issues/6186 | Feature request: add code example of multi-GPU processing | I think the issue is that we set `CUDA_VISIBLE_DEVICES` after pytorch is imported ?
We should use `torch.cuda.set_device(...)` instead | ### Feature request
Would be great to add a code example of how to do multi-GPU processing with 🤗 Datasets in the documentation. cc @stevhliu
Currently the docs has a small [section](https://huggingface.co/docs/datasets/v2.3.2/en/process#map) on this saying "your big GPU call goes here", however it didn't work f... | 19 | Feature request: add code example of multi-GPU processing
### Feature request
Would be great to add a code example of how to do multi-GPU processing with 🤗 Datasets in the documentation. cc @stevhliu
Currently the docs has a small [section](https://huggingface.co/docs/datasets/v2.3.2/en/process#map) on this sa... | [
-0.13726480305194855,
-0.43240559101104736,
-0.0019795354455709457,
0.09065312892198563,
-0.10275644063949585,
0.04838532209396362,
0.39975789189338684,
0.0033100303262472153,
0.1566067337989807,
0.22367176413536072,
0.18687133491039276,
0.2376289665699005,
0.19287066161632538,
0.512840807... |
https://github.com/huggingface/datasets/issues/6186 | Feature request: add code example of multi-GPU processing | @lhoestq
> In this case you wouldn't need a multiprocessed map no ?
Yes. But how to load a model to 2 GPU simultaneously without something like accelerate? | ### Feature request
Would be great to add a code example of how to do multi-GPU processing with 🤗 Datasets in the documentation. cc @stevhliu
Currently the docs has a small [section](https://huggingface.co/docs/datasets/v2.3.2/en/process#map) on this saying "your big GPU call goes here", however it didn't work f... | 28 | Feature request: add code example of multi-GPU processing
### Feature request
Would be great to add a code example of how to do multi-GPU processing with 🤗 Datasets in the documentation. cc @stevhliu
Currently the docs has a small [section](https://huggingface.co/docs/datasets/v2.3.2/en/process#map) on this sa... | [
-0.13726480305194855,
-0.43240559101104736,
-0.0019795354455709457,
0.09065312892198563,
-0.10275644063949585,
0.04838532209396362,
0.39975789189338684,
0.0033100303262472153,
0.1566067337989807,
0.22367176413536072,
0.18687133491039276,
0.2376289665699005,
0.19287066161632538,
0.512840807... |
https://github.com/huggingface/datasets/issues/6186 | Feature request: add code example of multi-GPU processing | > @lhoestq
>
> > In this case you wouldn't need a multiprocessed map no ?
>
> Yes. But how to load a model to 2 GPU simultaneously without something like accelerate?
Take a look at this fix #6550 . Basically, you move the model to each GPU inside of the function to be mapped.
| ### Feature request
Would be great to add a code example of how to do multi-GPU processing with 🤗 Datasets in the documentation. cc @stevhliu
Currently the docs has a small [section](https://huggingface.co/docs/datasets/v2.3.2/en/process#map) on this saying "your big GPU call goes here", however it didn't work f... | 56 | Feature request: add code example of multi-GPU processing
### Feature request
Would be great to add a code example of how to do multi-GPU processing with 🤗 Datasets in the documentation. cc @stevhliu
Currently the docs has a small [section](https://huggingface.co/docs/datasets/v2.3.2/en/process#map) on this sa... | [
-0.13726480305194855,
-0.43240559101104736,
-0.0019795354455709457,
0.09065312892198563,
-0.10275644063949585,
0.04838532209396362,
0.39975789189338684,
0.0033100303262472153,
0.1566067337989807,
0.22367176413536072,
0.18687133491039276,
0.2376289665699005,
0.19287066161632538,
0.512840807... |
https://github.com/huggingface/datasets/issues/6186 | Feature request: add code example of multi-GPU processing | In case someone also runs into this issue, I wrote a [blog post](https://forrestbao.github.io/2024/01/30/datasets_map_with_rank_multiple_GPUs.html) with a complete working example by compiling information from several PRs and issues here. Hope it can help. This issue cost me a few hours. I hope my blog post can save yo... | ### Feature request
Would be great to add a code example of how to do multi-GPU processing with 🤗 Datasets in the documentation. cc @stevhliu
Currently the docs has a small [section](https://huggingface.co/docs/datasets/v2.3.2/en/process#map) on this saying "your big GPU call goes here", however it didn't work f... | 53 | Feature request: add code example of multi-GPU processing
### Feature request
Would be great to add a code example of how to do multi-GPU processing with 🤗 Datasets in the documentation. cc @stevhliu
Currently the docs has a small [section](https://huggingface.co/docs/datasets/v2.3.2/en/process#map) on this sa... | [
-0.13726480305194855,
-0.43240559101104736,
-0.0019795354455709457,
0.09065312892198563,
-0.10275644063949585,
0.04838532209396362,
0.39975789189338684,
0.0033100303262472153,
0.1566067337989807,
0.22367176413536072,
0.18687133491039276,
0.2376289665699005,
0.19287066161632538,
0.512840807... |
https://github.com/huggingface/datasets/issues/6186 | Feature request: add code example of multi-GPU processing | hey @forrestbao , i was too struggling with the same issue for weeks hence i checked out your blog. great work on the blog.
however i wanted to ask you could we scale up the process by reinitializing the same model on the same GPU multiple times for even more speedups ?
i mean to say given that on a multi GPU set... | ### Feature request
Would be great to add a code example of how to do multi-GPU processing with 🤗 Datasets in the documentation. cc @stevhliu
Currently the docs has a small [section](https://huggingface.co/docs/datasets/v2.3.2/en/process#map) on this saying "your big GPU call goes here", however it didn't work f... | 110 | Feature request: add code example of multi-GPU processing
### Feature request
Would be great to add a code example of how to do multi-GPU processing with 🤗 Datasets in the documentation. cc @stevhliu
Currently the docs has a small [section](https://huggingface.co/docs/datasets/v2.3.2/en/process#map) on this sa... | [
-0.13726480305194855,
-0.43240559101104736,
-0.0019795354455709457,
0.09065312892198563,
-0.10275644063949585,
0.04838532209396362,
0.39975789189338684,
0.0033100303262472153,
0.1566067337989807,
0.22367176413536072,
0.18687133491039276,
0.2376289665699005,
0.19287066161632538,
0.512840807... |
https://github.com/huggingface/datasets/issues/6186 | Feature request: add code example of multi-GPU processing | You can use one single instance on your GPU and increase the batch size until you fill the VRAM | ### Feature request
Would be great to add a code example of how to do multi-GPU processing with 🤗 Datasets in the documentation. cc @stevhliu
Currently the docs has a small [section](https://huggingface.co/docs/datasets/v2.3.2/en/process#map) on this saying "your big GPU call goes here", however it didn't work f... | 19 | Feature request: add code example of multi-GPU processing
### Feature request
Would be great to add a code example of how to do multi-GPU processing with 🤗 Datasets in the documentation. cc @stevhliu
Currently the docs has a small [section](https://huggingface.co/docs/datasets/v2.3.2/en/process#map) on this sa... | [
-0.13726480305194855,
-0.43240559101104736,
-0.0019795354455709457,
0.09065312892198563,
-0.10275644063949585,
0.04838532209396362,
0.39975789189338684,
0.0033100303262472153,
0.1566067337989807,
0.22367176413536072,
0.18687133491039276,
0.2376289665699005,
0.19287066161632538,
0.512840807... |
https://github.com/huggingface/datasets/issues/6186 | Feature request: add code example of multi-GPU processing | @lhoestq i tried that, but i noticed that after a certain number of batch_size, using a larger batch_size makes the overall process really slow than using a lower batch_size. | ### Feature request
Would be great to add a code example of how to do multi-GPU processing with 🤗 Datasets in the documentation. cc @stevhliu
Currently the docs has a small [section](https://huggingface.co/docs/datasets/v2.3.2/en/process#map) on this saying "your big GPU call goes here", however it didn't work f... | 29 | Feature request: add code example of multi-GPU processing
### Feature request
Would be great to add a code example of how to do multi-GPU processing with 🤗 Datasets in the documentation. cc @stevhliu
Currently the docs has a small [section](https://huggingface.co/docs/datasets/v2.3.2/en/process#map) on this sa... | [
-0.13726480305194855,
-0.43240559101104736,
-0.0019795354455709457,
0.09065312892198563,
-0.10275644063949585,
0.04838532209396362,
0.39975789189338684,
0.0033100303262472153,
0.1566067337989807,
0.22367176413536072,
0.18687133491039276,
0.2376289665699005,
0.19287066161632538,
0.512840807... |
https://github.com/huggingface/datasets/issues/6186 | Feature request: add code example of multi-GPU processing | Hi @lhoestq , could you help with my two questions:
1. You mentioned `if __name__ == "__main__"`, why is that? I tried with a toy dataset and didn't put this line, my two GPU usage looks balanced.
2. Is there any difference between
`from multiprocess import set_start_method` and `from multiprocessing import set_s... | ### Feature request
Would be great to add a code example of how to do multi-GPU processing with 🤗 Datasets in the documentation. cc @stevhliu
Currently the docs has a small [section](https://huggingface.co/docs/datasets/v2.3.2/en/process#map) on this saying "your big GPU call goes here", however it didn't work f... | 255 | Feature request: add code example of multi-GPU processing
### Feature request
Would be great to add a code example of how to do multi-GPU processing with 🤗 Datasets in the documentation. cc @stevhliu
Currently the docs has a small [section](https://huggingface.co/docs/datasets/v2.3.2/en/process#map) on this sa... | [
-0.13726480305194855,
-0.43240559101104736,
-0.0019795354455709457,
0.09065312892198563,
-0.10275644063949585,
0.04838532209396362,
0.39975789189338684,
0.0033100303262472153,
0.1566067337989807,
0.22367176413536072,
0.18687133491039276,
0.2376289665699005,
0.19287066161632538,
0.512840807... |
https://github.com/huggingface/datasets/issues/6186 | Feature request: add code example of multi-GPU processing | Hi !
> You mentioned if __name__ == "__main__", why is that? I tried with a toy dataset and didn't put this line, my two GPU usage looks balanced.
It's a good practice when doing multiprocessing in python. Depending on the multiprocessing method and your python version, python could re-run the code in your main.... | ### Feature request
Would be great to add a code example of how to do multi-GPU processing with 🤗 Datasets in the documentation. cc @stevhliu
Currently the docs has a small [section](https://huggingface.co/docs/datasets/v2.3.2/en/process#map) on this saying "your big GPU call goes here", however it didn't work f... | 150 | Feature request: add code example of multi-GPU processing
### Feature request
Would be great to add a code example of how to do multi-GPU processing with 🤗 Datasets in the documentation. cc @stevhliu
Currently the docs has a small [section](https://huggingface.co/docs/datasets/v2.3.2/en/process#map) on this sa... | [
-0.13726480305194855,
-0.43240559101104736,
-0.0019795354455709457,
0.09065312892198563,
-0.10275644063949585,
0.04838532209396362,
0.39975789189338684,
0.0033100303262472153,
0.1566067337989807,
0.22367176413536072,
0.18687133491039276,
0.2376289665699005,
0.19287066161632538,
0.512840807... |
https://github.com/huggingface/datasets/issues/6186 | Feature request: add code example of multi-GPU processing | Thanks @lhoestq for explanation. Is it okay we use `multiprocessing` for set_start_method given the above-mentioned issue for multiprocess? From my run with toy example, it's fine. Just want to check if you foresee any problems. | ### Feature request
Would be great to add a code example of how to do multi-GPU processing with 🤗 Datasets in the documentation. cc @stevhliu
Currently the docs has a small [section](https://huggingface.co/docs/datasets/v2.3.2/en/process#map) on this saying "your big GPU call goes here", however it didn't work f... | 35 | Feature request: add code example of multi-GPU processing
### Feature request
Would be great to add a code example of how to do multi-GPU processing with 🤗 Datasets in the documentation. cc @stevhliu
Currently the docs has a small [section](https://huggingface.co/docs/datasets/v2.3.2/en/process#map) on this sa... | [
-0.13726480305194855,
-0.43240559101104736,
-0.0019795354455709457,
0.09065312892198563,
-0.10275644063949585,
0.04838532209396362,
0.39975789189338684,
0.0033100303262472153,
0.1566067337989807,
0.22367176413536072,
0.18687133491039276,
0.2376289665699005,
0.19287066161632538,
0.512840807... |
https://github.com/huggingface/datasets/issues/6186 | Feature request: add code example of multi-GPU processing | I'm running the [code example of multi-GPU processing](https://huggingface.co/docs/datasets/en/process#multiprocessing) on a Linux 8x A100 instance. The entire python code run time is 30 seconds faster if I add one line to set torch number of threads immediately after the `import torch` statement. It loads faster to ... | ### Feature request
Would be great to add a code example of how to do multi-GPU processing with 🤗 Datasets in the documentation. cc @stevhliu
Currently the docs has a small [section](https://huggingface.co/docs/datasets/v2.3.2/en/process#map) on this saying "your big GPU call goes here", however it didn't work f... | 98 | Feature request: add code example of multi-GPU processing
### Feature request
Would be great to add a code example of how to do multi-GPU processing with 🤗 Datasets in the documentation. cc @stevhliu
Currently the docs has a small [section](https://huggingface.co/docs/datasets/v2.3.2/en/process#map) on this sa... | [
-0.13726480305194855,
-0.43240559101104736,
-0.0019795354455709457,
0.09065312892198563,
-0.10275644063949585,
0.04838532209396362,
0.39975789189338684,
0.0033100303262472153,
0.1566067337989807,
0.22367176413536072,
0.18687133491039276,
0.2376289665699005,
0.19287066161632538,
0.512840807... |
https://github.com/huggingface/datasets/issues/6185 | Error in saving the PIL image into *.arrow files using datasets.arrow_writer | You can cast the `input_image` column to the `Image` type to fix the issue:
```python
ds.cast_column("input_image", datasets.Image())
``` | ### Describe the bug
I am using the ArrowWriter from datasets.arrow_writer to save a json-style file as arrow files. Within the dictionary, it contains a feature called "image" which is a list of PIL.Image objects.
I am saving the json using the following script:
```
def save_to_arrow(path,temp):
with ArrowWri... | 18 | Error in saving the PIL image into *.arrow files using datasets.arrow_writer
### Describe the bug
I am using the ArrowWriter from datasets.arrow_writer to save a json-style file as arrow files. Within the dictionary, it contains a feature called "image" which is a list of PIL.Image objects.
I am saving the json usi... | [
-0.19886617362499237,
0.19410374760627747,
0.05354224517941475,
0.4502629041671753,
0.24698959290981293,
0.06560947746038437,
0.23730698227882385,
0.09777459502220154,
-0.01420736126601696,
-0.18521498143672943,
0.04238235205411911,
0.43131983280181885,
-0.16450288891792297,
0.044934779405... |
https://github.com/huggingface/datasets/issues/6184 | Map cache does not detect function changes in another module | This issue is a duplicate of https://github.com/huggingface/datasets/issues/3297. This is a limitation of `dill`, a package we use for caching (non-`__main__` module objects are serialized by reference). You can find more info about it here: https://github.com/uqfoundation/dill/issues/424.
In your case, moving
``... | ```python
# dataset.py
import os
import datasets
if not os.path.exists('/tmp/test.json'):
with open('/tmp/test.json', 'w') as file:
file.write('[{"text": "hello"}]')
def transform(example):
text = example['text']
# text += ' world'
return {'text': text}
data = datasets.load_dataset('json', ... | 65 | Map cache does not detect function changes in another module
```python
# dataset.py
import os
import datasets
if not os.path.exists('/tmp/test.json'):
with open('/tmp/test.json', 'w') as file:
file.write('[{"text": "hello"}]')
def transform(example):
text = example['text']
# text += ' world'
... | [
0.002216324210166931,
-0.06392225623130798,
-0.010190283879637718,
0.14867998659610748,
0.18692590296268463,
-0.03552602604031563,
0.3413916230201721,
0.41103440523147583,
0.21901746094226837,
0.06012752279639244,
-0.2603936195373535,
0.38653337955474854,
0.03615834191441536,
-0.2821803689... |
https://github.com/huggingface/datasets/issues/6184 | Map cache does not detect function changes in another module | I understand this may be a limitation of an upstream tool, but for a user for datasets this is very annoying, as when you have dozens of different datasets with different preprocessing functions you can't really move them all into the same file. It may be worth seeing if there is a way to specialize the dependency (eg.... | ```python
# dataset.py
import os
import datasets
if not os.path.exists('/tmp/test.json'):
with open('/tmp/test.json', 'w') as file:
file.write('[{"text": "hello"}]')
def transform(example):
text = example['text']
# text += ' world'
return {'text': text}
data = datasets.load_dataset('json', ... | 130 | Map cache does not detect function changes in another module
```python
# dataset.py
import os
import datasets
if not os.path.exists('/tmp/test.json'):
with open('/tmp/test.json', 'w') as file:
file.write('[{"text": "hello"}]')
def transform(example):
text = example['text']
# text += ' world'
... | [
-0.054619673639535904,
0.08799293637275696,
-0.10253705084323883,
0.09561485052108765,
0.23779302835464478,
-0.07245749980211258,
0.30146023631095886,
0.3623441457748413,
0.3108985722064972,
-0.09996519982814789,
-0.018670139834284782,
0.34021443128585815,
0.06084813177585602,
-0.124109245... |
https://github.com/huggingface/datasets/issues/6183 | Load dataset with non-existent file | This was fixed in https://github.com/huggingface/datasets/pull/6155, which will be included in the next release (or you can install `datasets` from source to use it immediately). | ### Describe the bug
When load a dataset from datasets and pass a wrong path to json with the data, error message does not contain something abount "wrong path" or "file do not exist" -
```SchemaInferenceError: Please pass `features` or at least one example when writing data```
### Steps to reproduce the bug
... | 24 | Load dataset with non-existent file
### Describe the bug
When load a dataset from datasets and pass a wrong path to json with the data, error message does not contain something abount "wrong path" or "file do not exist" -
```SchemaInferenceError: Please pass `features` or at least one example when writing data... | [
-0.06370437145233154,
-0.07461202144622803,
-0.047087885439395905,
0.4017665386199951,
0.1504824161529541,
-0.04745364189147949,
0.26163744926452637,
0.3800358176231384,
0.1398516148328781,
0.016334019601345062,
0.2836116850376129,
0.4935133159160614,
-0.12176742404699326,
0.15939386188983... |
https://github.com/huggingface/datasets/issues/6182 | Loading Meteor metric in HF evaluate module crashes due to datasets import issue | Our minimal Python version requirement is 3.8, so we dropped `importlib_metadata`.
Feel free to open a PR in the `evaluate` repo to replace the problematic import with
```python
if PY_VERSION < version.parse("3.8"):
import importlib_metadata
else:
import importlib.metadata as importlib_metadata
``` | ### Describe the bug
When using python3.9 and ```evaluate``` module loading Meteor metric crashes at a non-existent import from ```datasets.config``` in ```datasets v2.14```
### Steps to reproduce the bug
```
from evaluate import load
meteor = load("meteor")
```
produces the following error:
```
from d... | 40 | Loading Meteor metric in HF evaluate module crashes due to datasets import issue
### Describe the bug
When using python3.9 and ```evaluate``` module loading Meteor metric crashes at a non-existent import from ```datasets.config``` in ```datasets v2.14```
### Steps to reproduce the bug
```
from evaluate import lo... | [
-0.5889158844947815,
0.2253132164478302,
0.0810803472995758,
0.40998244285583496,
0.4313853979110718,
0.07639364153146744,
0.15470707416534424,
0.44682830572128296,
0.04427206143736839,
-0.06482052803039551,
-0.24996739625930786,
0.3103255033493042,
-0.17195403575897217,
-0.119854085147380... |
https://github.com/huggingface/datasets/issues/6182 | Loading Meteor metric in HF evaluate module crashes due to datasets import issue | Any idea when you guys will release the next version which deals with this problem?
I'm still having the same issue with py 3.10 when I install the lib with pip.
I'm assuming that it has not yet been updated since the merge was 3 days ago. | ### Describe the bug
When using python3.9 and ```evaluate``` module loading Meteor metric crashes at a non-existent import from ```datasets.config``` in ```datasets v2.14```
### Steps to reproduce the bug
```
from evaluate import load
meteor = load("meteor")
```
produces the following error:
```
from d... | 47 | Loading Meteor metric in HF evaluate module crashes due to datasets import issue
### Describe the bug
When using python3.9 and ```evaluate``` module loading Meteor metric crashes at a non-existent import from ```datasets.config``` in ```datasets v2.14```
### Steps to reproduce the bug
```
from evaluate import lo... | [
-0.5422056913375854,
0.20275959372520447,
0.053000327199697495,
0.3606693744659424,
0.31523454189300537,
0.06459354609251022,
0.15986216068267822,
0.4550831615924835,
-0.005709588527679443,
-0.11670228838920593,
-0.17437198758125305,
0.2949333190917969,
-0.19172918796539307,
-0.16749043762... |
https://github.com/huggingface/datasets/issues/6182 | Loading Meteor metric in HF evaluate module crashes due to datasets import issue | Yes, this requires a new `evaluate` release (cc @lvwerra for this).
In the meantime, you can get the fixed version by installing `evaluate` from `main`: `pip install git+https://github.com/huggingface/evaluate.git` | ### Describe the bug
When using python3.9 and ```evaluate``` module loading Meteor metric crashes at a non-existent import from ```datasets.config``` in ```datasets v2.14```
### Steps to reproduce the bug
```
from evaluate import load
meteor = load("meteor")
```
produces the following error:
```
from d... | 28 | Loading Meteor metric in HF evaluate module crashes due to datasets import issue
### Describe the bug
When using python3.9 and ```evaluate``` module loading Meteor metric crashes at a non-existent import from ```datasets.config``` in ```datasets v2.14```
### Steps to reproduce the bug
```
from evaluate import lo... | [
-0.5894218683242798,
0.1493089497089386,
0.0553257055580616,
0.38285452127456665,
0.442327082157135,
0.03887409716844559,
0.1406095027923584,
0.4376010298728943,
0.08918391168117523,
0.013810038566589355,
-0.32333695888519287,
0.29419973492622375,
-0.0965651199221611,
-0.039303284138441086... |
https://github.com/huggingface/datasets/issues/6179 | Map cache with tokenizer | https://github.com/huggingface/datasets/issues/5147 may be a solution, by passing in the tokenizer in a fn_kwargs and ignoring it in the fingerprint calculations | Similar issue to https://github.com/huggingface/datasets/issues/5985, but across different sessions rather than two calls in the same session.
Unlike that issue, explicitly calling tokenizer(my_args) before the map() doesn't help, because the tokenizer was created with a different hash to begin with...
setup
```... | 20 | Map cache with tokenizer
Similar issue to https://github.com/huggingface/datasets/issues/5985, but across different sessions rather than two calls in the same session.
Unlike that issue, explicitly calling tokenizer(my_args) before the map() doesn't help, because the tokenizer was created with a different hash to ... | [
-0.141288623213768,
-0.28767910599708557,
0.07151877880096436,
0.16040772199630737,
0.26335811614990234,
-0.13286006450653076,
0.4389728009700775,
0.19649039208889008,
0.12755270302295685,
0.1276402473449707,
-0.16962258517742157,
0.17197628319263458,
0.03746848925948143,
-0.14160464704036... |
https://github.com/huggingface/datasets/issues/6179 | Map cache with tokenizer | I have a similar issue. I was using a Jupyter Notebook and every time I call the map function it performs tokenization from scratch again although the cache files of last run still exists.
I ran with 20 processes and now in the cache folder there are two groups of cached results of tokenized dataset:
```
.rw-r-... | Similar issue to https://github.com/huggingface/datasets/issues/5985, but across different sessions rather than two calls in the same session.
Unlike that issue, explicitly calling tokenizer(my_args) before the map() doesn't help, because the tokenizer was created with a different hash to begin with...
setup
```... | 457 | Map cache with tokenizer
Similar issue to https://github.com/huggingface/datasets/issues/5985, but across different sessions rather than two calls in the same session.
Unlike that issue, explicitly calling tokenizer(my_args) before the map() doesn't help, because the tokenizer was created with a different hash to ... | [
-0.1501493602991104,
-0.19050325453281403,
0.10702463984489441,
0.3571503758430481,
0.2963958978652954,
-0.21825239062309265,
0.374315470457077,
0.18274909257888794,
0.06256523728370667,
-0.07695959508419037,
-0.2592703402042389,
0.3096645772457123,
0.060592032968997955,
-0.290297418832778... |
https://github.com/huggingface/datasets/issues/6179 | Map cache with tokenizer | @Luosuu [map](https://huggingface.co/docs/datasets/v2.14.4/en/package_reference/main_classes#datasets.Dataset.map) has cache_file_name parameter
In my case, I do want the cache to detect when the map function changes, so I can't pass a constant cache file name. | Similar issue to https://github.com/huggingface/datasets/issues/5985, but across different sessions rather than two calls in the same session.
Unlike that issue, explicitly calling tokenizer(my_args) before the map() doesn't help, because the tokenizer was created with a different hash to begin with...
setup
```... | 29 | Map cache with tokenizer
Similar issue to https://github.com/huggingface/datasets/issues/5985, but across different sessions rather than two calls in the same session.
Unlike that issue, explicitly calling tokenizer(my_args) before the map() doesn't help, because the tokenizer was created with a different hash to ... | [
-0.33305415511131287,
-0.2571268081665039,
0.1011258065700531,
0.2790035009384155,
0.32102853059768677,
-0.15958060324192047,
0.24012653529644012,
0.1805238574743271,
0.12876072525978088,
0.062470223754644394,
-0.2221798598766327,
0.26421934366226196,
-0.08900030702352524,
-0.2387704104185... |
https://github.com/huggingface/datasets/issues/6179 | Map cache with tokenizer | Implementing a proper hashing function for the (fast) tokenizers is currently impossible for the reasons mentioned in the referenced issues. So the only alternative to the `cache_file_name` (or `new_fingerprint`) parameter is a custom serializer (e.g., that deserializes the tokenizer from a local save path) defined usi... | Similar issue to https://github.com/huggingface/datasets/issues/5985, but across different sessions rather than two calls in the same session.
Unlike that issue, explicitly calling tokenizer(my_args) before the map() doesn't help, because the tokenizer was created with a different hash to begin with...
setup
```... | 58 | Map cache with tokenizer
Similar issue to https://github.com/huggingface/datasets/issues/5985, but across different sessions rather than two calls in the same session.
Unlike that issue, explicitly calling tokenizer(my_args) before the map() doesn't help, because the tokenizer was created with a different hash to ... | [
-0.27431756258010864,
-0.10780023038387299,
0.09937015175819397,
0.08261232078075409,
0.26991528272628784,
-0.004245683550834656,
0.4050785005092621,
0.36958038806915283,
0.18029356002807617,
0.13507971167564392,
-0.20782360434532166,
0.22882668673992157,
-0.14012378454208374,
-0.212534531... |
https://github.com/huggingface/datasets/issues/6178 | 'import datasets' throws "invalid syntax error" | This seems to be related to your environment and not the `datasets` code (e.g., this could happen when exposing the Python 3.9 site packages to a lower Python version (interpreter)) | ### Describe the bug
Hi,
I have been trying to import the datasets library but I keep gtting this error.
`Traceback (most recent call last):
File /opt/local/jupyterhub/lib64/python3.9/site-packages/IPython/core/interactiveshell.py:3508 in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
... | 30 | 'import datasets' throws "invalid syntax error"
### Describe the bug
Hi,
I have been trying to import the datasets library but I keep gtting this error.
`Traceback (most recent call last):
File /opt/local/jupyterhub/lib64/python3.9/site-packages/IPython/core/interactiveshell.py:3508 in run_code
exe... | [
-0.3067608177661896,
0.12475277483463287,
-0.08762528747320175,
-0.003112226724624634,
0.2103727161884308,
0.024818487465381622,
0.2833891808986664,
0.350334107875824,
0.03719159960746765,
-0.2335188239812851,
-0.2605622112751007,
0.29846063256263733,
-0.008802914060652256,
0.2504249215126... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.