html_url
stringlengths
51
51
title
stringlengths
9
280
comments
stringlengths
63
24.7k
body
stringlengths
51
58.6k
comments length
int64
16
1.45k
text
stringlengths
186
59.1k
https://github.com/huggingface/datasets/issues/6012
[FR] Transform Chaining, Lazy Mapping
You can use `with_transform` to get a new dataset object. Support for lazy `map` has already been discussed [here](https://github.com/huggingface/datasets/issues/3385) a little bit. Personally, I'm not a fan, as this would make `map` even more complex.
### Feature request Currently using a `map` call processes and duplicates the whole dataset, which takes both time and disk space. The solution is to allow lazy mapping, which is essentially a saved chain of transforms that are applied on the fly whenever a slice of the dataset is requested. The API should look ...
35
[FR] Transform Chaining, Lazy Mapping ### Feature request Currently using a `map` call processes and duplicates the whole dataset, which takes both time and disk space. The solution is to allow lazy mapping, which is essentially a saved chain of transforms that are applied on the fly whenever a slice of the dataset...
https://github.com/huggingface/datasets/issues/6012
[FR] Transform Chaining, Lazy Mapping
> You can use `with_transform` to get a new dataset object. > > Support for lazy `map` has already been discussed [here](https://github.com/huggingface/datasets/issues/3385) a little bit. Personally, I'm not a fan, as this would make `map` even more complex. I read about IterableDataset, and it seems to have lazy...
### Feature request Currently using a `map` call processes and duplicates the whole dataset, which takes both time and disk space. The solution is to allow lazy mapping, which is essentially a saved chain of transforms that are applied on the fly whenever a slice of the dataset is requested. The API should look ...
71
[FR] Transform Chaining, Lazy Mapping ### Feature request Currently using a `map` call processes and duplicates the whole dataset, which takes both time and disk space. The solution is to allow lazy mapping, which is essentially a saved chain of transforms that are applied on the fly whenever a slice of the dataset...
https://github.com/huggingface/datasets/issues/6012
[FR] Transform Chaining, Lazy Mapping
> I read about IterableDataset, and it seems to have lazy mapping. But I can't figure out how to convert an IterableDataset into a normal one when needed. You must cache an `IterableDataset` to disk to load it as a `Dataset`. One way to do this is with `Dataset.from_generator`: ```python from functools import part...
### Feature request Currently using a `map` call processes and duplicates the whole dataset, which takes both time and disk space. The solution is to allow lazy mapping, which is essentially a saved chain of transforms that are applied on the fly whenever a slice of the dataset is requested. The API should look ...
92
[FR] Transform Chaining, Lazy Mapping ### Feature request Currently using a `map` call processes and duplicates the whole dataset, which takes both time and disk space. The solution is to allow lazy mapping, which is essentially a saved chain of transforms that are applied on the fly whenever a slice of the dataset...
https://github.com/huggingface/datasets/issues/6012
[FR] Transform Chaining, Lazy Mapping
I wonder if it would be beneficial to have a dedicated method to do that ? Maybe a `.save_to_disk()` so that the user can reload the resulting dataset later ?
### Feature request Currently using a `map` call processes and duplicates the whole dataset, which takes both time and disk space. The solution is to allow lazy mapping, which is essentially a saved chain of transforms that are applied on the fly whenever a slice of the dataset is requested. The API should look ...
30
[FR] Transform Chaining, Lazy Mapping ### Feature request Currently using a `map` call processes and duplicates the whole dataset, which takes both time and disk space. The solution is to allow lazy mapping, which is essentially a saved chain of transforms that are applied on the fly whenever a slice of the dataset...
https://github.com/huggingface/datasets/issues/6012
[FR] Transform Chaining, Lazy Mapping
> ```python > from functools import partial > from datasets import Dataset > > def gen_from_iterable_dataset(iterable_ds) > yield from iterable_ds > > ds = Dataset.from_generator(partial(gen_from_iterable_dataset, iterable_ds), features=iterable_ds.features}) > ``` @mariosasko With these complex mappin...
### Feature request Currently using a `map` call processes and duplicates the whole dataset, which takes both time and disk space. The solution is to allow lazy mapping, which is essentially a saved chain of transforms that are applied on the fly whenever a slice of the dataset is requested. The API should look ...
44
[FR] Transform Chaining, Lazy Mapping ### Feature request Currently using a `map` call processes and duplicates the whole dataset, which takes both time and disk space. The solution is to allow lazy mapping, which is essentially a saved chain of transforms that are applied on the fly whenever a slice of the dataset...
https://github.com/huggingface/datasets/issues/6012
[FR] Transform Chaining, Lazy Mapping
The params passed to `Dataset.from_generator` will be used to compute the hash (`partial` encapsulates the `iterable_ds` value, so changing it will also change the hash)
### Feature request Currently using a `map` call processes and duplicates the whole dataset, which takes both time and disk space. The solution is to allow lazy mapping, which is essentially a saved chain of transforms that are applied on the fly whenever a slice of the dataset is requested. The API should look ...
25
[FR] Transform Chaining, Lazy Mapping ### Feature request Currently using a `map` call processes and duplicates the whole dataset, which takes both time and disk space. The solution is to allow lazy mapping, which is essentially a saved chain of transforms that are applied on the fly whenever a slice of the dataset...
https://github.com/huggingface/datasets/issues/6012
[FR] Transform Chaining, Lazy Mapping
Hi, I think this feature would be very useful. I want to concatenate large datasets with heterogeneous columns. I dislike `map` since I don't want multiple copy of that datasets locally. I tried to use "set_transform" on each dataset to convert it to a standard features format, but `datasets.concatenate_datasets` ignor...
### Feature request Currently using a `map` call processes and duplicates the whole dataset, which takes both time and disk space. The solution is to allow lazy mapping, which is essentially a saved chain of transforms that are applied on the fly whenever a slice of the dataset is requested. The API should look ...
74
[FR] Transform Chaining, Lazy Mapping ### Feature request Currently using a `map` call processes and duplicates the whole dataset, which takes both time and disk space. The solution is to allow lazy mapping, which is essentially a saved chain of transforms that are applied on the fly whenever a slice of the dataset...
https://github.com/huggingface/datasets/issues/6012
[FR] Transform Chaining, Lazy Mapping
@mariosasko These features would be handy for large datasets. A typical use case is video datasets: We have millions of videos, each stored in some OSS so they require some custom loading logic. 1) Due to the memory limit, loading the videos a priori into the memory is infeasible. But we can postpone video loading unt...
### Feature request Currently using a `map` call processes and duplicates the whole dataset, which takes both time and disk space. The solution is to allow lazy mapping, which is essentially a saved chain of transforms that are applied on the fly whenever a slice of the dataset is requested. The API should look ...
85
[FR] Transform Chaining, Lazy Mapping ### Feature request Currently using a `map` call processes and duplicates the whole dataset, which takes both time and disk space. The solution is to allow lazy mapping, which is essentially a saved chain of transforms that are applied on the fly whenever a slice of the dataset...
https://github.com/huggingface/datasets/issues/6012
[FR] Transform Chaining, Lazy Mapping
FYI lazy map is available for `IterableDataset`(map is applied on-the-fly when iterating on the dataset): ```python ds = load_dataset(...streaming=True) # or ds = Dataset.from_list(...).to_iterable_dataset() # or ds = IterableDataset.from_generator(...) # Then you can chain many map/filter/shuffle/etc. ds = ds.map(.....
### Feature request Currently using a `map` call processes and duplicates the whole dataset, which takes both time and disk space. The solution is to allow lazy mapping, which is essentially a saved chain of transforms that are applied on the fly whenever a slice of the dataset is requested. The API should look ...
56
[FR] Transform Chaining, Lazy Mapping ### Feature request Currently using a `map` call processes and duplicates the whole dataset, which takes both time and disk space. The solution is to allow lazy mapping, which is essentially a saved chain of transforms that are applied on the fly whenever a slice of the dataset...
https://github.com/huggingface/datasets/issues/3901
Dataset viewer issue for IndicParaphrase- the preview doesn't show
It seems to have been fixed: <img width="1534" alt="Capture d’écran 2022-04-12 à 14 10 07" src="https://user-images.githubusercontent.com/1676121/162959599-6b7fef7c-8411-4e03-8f00-90040a658079.png">
## Dataset viewer issue for '*IndicParaphrase*' **Link:** *[IndicParaphrase](https://huggingface.co/datasets/ai4bharat/IndicParaphrase/viewer/hi/validation)* *The preview of the dataset doesn't come up. The error on the console is: Status code: 400 Exception: FileNotFoundError Message: [Errno 2] ...
16
Dataset viewer issue for IndicParaphrase- the preview doesn't show ## Dataset viewer issue for '*IndicParaphrase*' **Link:** *[IndicParaphrase](https://huggingface.co/datasets/ai4bharat/IndicParaphrase/viewer/hi/validation)* *The preview of the dataset doesn't come up. The error on the console is: Status code:...
https://github.com/huggingface/datasets/issues/6691
load_dataset() does not support tsv
Hi @dipsivenkatesh, Please note that this functionality is already implemented. Our CSV builder uses `pandas.read_csv` under the hood, and you can pass the parameter `delimiter="\t"` to read TSV files. See the list of CSV config parameters in our docs: https://huggingface.co/docs/datasets/package_reference/loadin...
### Feature request the load_dataset() for local functions support file types like csv, json etc but not of type tsv (tab separated values). ### Motivation cant easily load files of type tsv, have to convert them to another type like csv then load ### Your contribution Can try by raising a PR with a little help, c...
40
load_dataset() does not support tsv ### Feature request the load_dataset() for local functions support file types like csv, json etc but not of type tsv (tab separated values). ### Motivation cant easily load files of type tsv, have to convert them to another type like csv then load ### Your contribution Can try b...
https://github.com/huggingface/datasets/issues/4261
data leakage in `webis/conclugen` dataset
Hi @xflashxx, thanks for reporting. Please note that this dataset was generated and shared by Webis Group: https://huggingface.co/webis We are contacting the dataset owners to inform them about the issue you found. We'll keep you updated of their reply.
## Describe the bug Some samples (argument-conclusion pairs) in the *training* split of the `webis/conclugen` dataset are present in both the *validation* and *test* splits, creating data leakage and distorting model results. Furthermore, all splits contain duplicate samples. ## Steps to reproduce the bug ```pyth...
39
data leakage in `webis/conclugen` dataset ## Describe the bug Some samples (argument-conclusion pairs) in the *training* split of the `webis/conclugen` dataset are present in both the *validation* and *test* splits, creating data leakage and distorting model results. Furthermore, all splits contain duplicate samples....
https://github.com/huggingface/datasets/issues/4261
data leakage in `webis/conclugen` dataset
Thanks for reporting this @xflashxx. I'll have a look and get back to you on this.
## Describe the bug Some samples (argument-conclusion pairs) in the *training* split of the `webis/conclugen` dataset are present in both the *validation* and *test* splits, creating data leakage and distorting model results. Furthermore, all splits contain duplicate samples. ## Steps to reproduce the bug ```pyth...
16
data leakage in `webis/conclugen` dataset ## Describe the bug Some samples (argument-conclusion pairs) in the *training* split of the `webis/conclugen` dataset are present in both the *validation* and *test* splits, creating data leakage and distorting model results. Furthermore, all splits contain duplicate samples....
https://github.com/huggingface/datasets/issues/4261
data leakage in `webis/conclugen` dataset
Hi @xflashxx and @albertvillanova, I have updated the files with de-duplicated splits. Apparently the debate portals from which part of the examples were sourced had unique timestamps for some examples (up to 6%; updated counts in the README) without any actual content updated that lead to "new" items. The length of...
## Describe the bug Some samples (argument-conclusion pairs) in the *training* split of the `webis/conclugen` dataset are present in both the *validation* and *test* splits, creating data leakage and distorting model results. Furthermore, all splits contain duplicate samples. ## Steps to reproduce the bug ```pyth...
164
data leakage in `webis/conclugen` dataset ## Describe the bug Some samples (argument-conclusion pairs) in the *training* split of the `webis/conclugen` dataset are present in both the *validation* and *test* splits, creating data leakage and distorting model results. Furthermore, all splits contain duplicate samples....
https://github.com/huggingface/datasets/issues/4261
data leakage in `webis/conclugen` dataset
Thanks @shahbazsyed for your fast fix. As a side note: - Your email appearing as Point of Contact in the dataset README has a typo: @uni.leipzig.de instead of @uni-leipzig.de - Your commits on the Hub are not linked to your profile on the Hub: this is because we use the email address to make this link; the email a...
## Describe the bug Some samples (argument-conclusion pairs) in the *training* split of the `webis/conclugen` dataset are present in both the *validation* and *test* splits, creating data leakage and distorting model results. Furthermore, all splits contain duplicate samples. ## Steps to reproduce the bug ```pyth...
74
data leakage in `webis/conclugen` dataset ## Describe the bug Some samples (argument-conclusion pairs) in the *training* split of the `webis/conclugen` dataset are present in both the *validation* and *test* splits, creating data leakage and distorting model results. Furthermore, all splits contain duplicate samples....
https://github.com/huggingface/datasets/issues/7344
HfHubHTTPError: 429 Client Error: Too Many Requests for URL when trying to access SlimPajama-627B or c4 on TPUs
Hi ! This is due to your old version of `datasets` which calls HF with `expand=True`, an option that is strongly rate limited. Recent versions of `datasets` don't rely on this anymore, you can fix your issue by upgrading `datasets` :) ``` pip install -U datasets ``` You can also get maximum HF availability o...
### Describe the bug I am trying to run some trainings on Google's TPUs using Huggingface's DataLoader on [SlimPajama-627B](https://huggingface.co/datasets/cerebras/SlimPajama-627B) and [c4](https://huggingface.co/datasets/allenai/c4), but I end up running into `429 Client Error: Too Many Requests for URL` error when ...
65
HfHubHTTPError: 429 Client Error: Too Many Requests for URL when trying to access SlimPajama-627B or c4 on TPUs ### Describe the bug I am trying to run some trainings on Google's TPUs using Huggingface's DataLoader on [SlimPajama-627B](https://huggingface.co/datasets/cerebras/SlimPajama-627B) and [c4](https://huggingf...
https://github.com/huggingface/datasets/issues/5338
`map()` stops every 1000 steps
Hi ! > It starts using all the cores (I am not sure why because I did not pass num_proc) The tokenizer uses Rust code that is multithreaded. And maybe the `feature_extractor` might run some things in parallel as well - but I'm not super familiar with its internals. > then progress bar stops at every 1k steps. ...
### Describe the bug I am passing the following `prepare_dataset` function to `Dataset.map` (code is inspired from [here](https://github.com/huggingface/community-events/blob/main/whisper-fine-tuning-event/run_speech_recognition_seq2seq_streaming.py#L454)) ```python3 def prepare_dataset(batch): # load and res...
108
`map()` stops every 1000 steps ### Describe the bug I am passing the following `prepare_dataset` function to `Dataset.map` (code is inspired from [here](https://github.com/huggingface/community-events/blob/main/whisper-fine-tuning-event/run_speech_recognition_seq2seq_streaming.py#L454)) ```python3 def prepare_data...
https://github.com/huggingface/datasets/issues/5338
`map()` stops every 1000 steps
Hi @lhoestq Thanks for the explanation! it was so helpful! Let me check why `feature_extractor` is running on multiple cpus.
### Describe the bug I am passing the following `prepare_dataset` function to `Dataset.map` (code is inspired from [here](https://github.com/huggingface/community-events/blob/main/whisper-fine-tuning-event/run_speech_recognition_seq2seq_streaming.py#L454)) ```python3 def prepare_dataset(batch): # load and res...
20
`map()` stops every 1000 steps ### Describe the bug I am passing the following `prepare_dataset` function to `Dataset.map` (code is inspired from [here](https://github.com/huggingface/community-events/blob/main/whisper-fine-tuning-event/run_speech_recognition_seq2seq_streaming.py#L454)) ```python3 def prepare_data...
https://github.com/huggingface/datasets/issues/5338
`map()` stops every 1000 steps
Hey @lhoestq, any news about this flush operation ? This really really slow down most of my .map and .filter operation. I'm sometime taking 10x more time waiting for the flush than actually processing the 1k items. My current workarround is to set `writer_batch_size=len(dataset)`.
### Describe the bug I am passing the following `prepare_dataset` function to `Dataset.map` (code is inspired from [here](https://github.com/huggingface/community-events/blob/main/whisper-fine-tuning-event/run_speech_recognition_seq2seq_streaming.py#L454)) ```python3 def prepare_dataset(batch): # load and res...
44
`map()` stops every 1000 steps ### Describe the bug I am passing the following `prepare_dataset` function to `Dataset.map` (code is inspired from [here](https://github.com/huggingface/community-events/blob/main/whisper-fine-tuning-event/run_speech_recognition_seq2seq_streaming.py#L454)) ```python3 def prepare_data...
https://github.com/huggingface/datasets/issues/6537
Adding support for netCDF (*.nc) files
Conceptually, we can use xarray to load the netCDF file, then xarray -> pandas -> pyarrow.
### Feature request netCDF (*.nc) is a file format for storing multidimensional scientific data, which is used by packages like `xarray` (labelled multi-dimensional arrays in Python). It would be nice to have native support for netCDF in `datasets`. ### Motivation When uploading *.nc files onto Huggingface Hub throu...
16
Adding support for netCDF (*.nc) files ### Feature request netCDF (*.nc) is a file format for storing multidimensional scientific data, which is used by packages like `xarray` (labelled multi-dimensional arrays in Python). It would be nice to have native support for netCDF in `datasets`. ### Motivation When uploadin...
https://github.com/huggingface/datasets/issues/6537
Adding support for netCDF (*.nc) files
I'd still need to verify that such a conversion would be lossless, especially for multi-dimensional data.
### Feature request netCDF (*.nc) is a file format for storing multidimensional scientific data, which is used by packages like `xarray` (labelled multi-dimensional arrays in Python). It would be nice to have native support for netCDF in `datasets`. ### Motivation When uploading *.nc files onto Huggingface Hub throu...
16
Adding support for netCDF (*.nc) files ### Feature request netCDF (*.nc) is a file format for storing multidimensional scientific data, which is used by packages like `xarray` (labelled multi-dimensional arrays in Python). It would be nice to have native support for netCDF in `datasets`. ### Motivation When uploadin...
https://github.com/huggingface/datasets/issues/7475
IterableDataset's state_dict shard_example_idx is always equal to the number of samples in a shard
Hey, I’d love to work on this issue but I am a beginner, can I work it with you?
### Describe the bug I've noticed a strange behaviour with Iterable state_dict: the value of shard_example_idx is always equal to the amount of samples in a shard. ### Steps to reproduce the bug I am reusing the example from the doc ```python from datasets import Dataset ds = Dataset.from_dict({"a": range(6)}).to_...
19
IterableDataset's state_dict shard_example_idx is always equal to the number of samples in a shard ### Describe the bug I've noticed a strange behaviour with Iterable state_dict: the value of shard_example_idx is always equal to the amount of samples in a shard. ### Steps to reproduce the bug I am reusing the examp...
https://github.com/huggingface/datasets/issues/7475
IterableDataset's state_dict shard_example_idx is always equal to the number of samples in a shard
Hello. I'm sorry but I don't have much time to get in the details for now. Have you managed to reproduce the issue with the code provided ? If you want to work on it, you can self-assign and ask @lhoestq for directions
### Describe the bug I've noticed a strange behaviour with Iterable state_dict: the value of shard_example_idx is always equal to the amount of samples in a shard. ### Steps to reproduce the bug I am reusing the example from the doc ```python from datasets import Dataset ds = Dataset.from_dict({"a": range(6)}).to_...
43
IterableDataset's state_dict shard_example_idx is always equal to the number of samples in a shard ### Describe the bug I've noticed a strange behaviour with Iterable state_dict: the value of shard_example_idx is always equal to the amount of samples in a shard. ### Steps to reproduce the bug I am reusing the examp...
https://github.com/huggingface/datasets/issues/7475
IterableDataset's state_dict shard_example_idx is always equal to the number of samples in a shard
Hi Bruno, I am trying to reproduce it this later in this week and let you know what I found.
### Describe the bug I've noticed a strange behaviour with Iterable state_dict: the value of shard_example_idx is always equal to the amount of samples in a shard. ### Steps to reproduce the bug I am reusing the example from the doc ```python from datasets import Dataset ds = Dataset.from_dict({"a": range(6)}).to_...
20
IterableDataset's state_dict shard_example_idx is always equal to the number of samples in a shard ### Describe the bug I've noticed a strange behaviour with Iterable state_dict: the value of shard_example_idx is always equal to the amount of samples in a shard. ### Steps to reproduce the bug I am reusing the examp...
https://github.com/huggingface/datasets/issues/7475
IterableDataset's state_dict shard_example_idx is always equal to the number of samples in a shard
Good catch, I tried and if the dataset is bigger (e.g. `range(9999)`) it returns `"shard_example_idx": 1000` with is the `config.DEFAULT_MAX_BATCH_SIZE` https://github.com/huggingface/datasets/blob/94ccd1b4fada8a92cea96dc8df4e915041d695b6/src/datasets/arrow_dataset.py#L5313-L5317 It looks like the state_dict is incor...
### Describe the bug I've noticed a strange behaviour with Iterable state_dict: the value of shard_example_idx is always equal to the amount of samples in a shard. ### Steps to reproduce the bug I am reusing the example from the doc ```python from datasets import Dataset ds = Dataset.from_dict({"a": range(6)}).to_...
57
IterableDataset's state_dict shard_example_idx is always equal to the number of samples in a shard ### Describe the bug I've noticed a strange behaviour with Iterable state_dict: the value of shard_example_idx is always equal to the amount of samples in a shard. ### Steps to reproduce the bug I am reusing the examp...
https://github.com/huggingface/datasets/issues/7475
IterableDataset's state_dict shard_example_idx is always equal to the number of samples in a shard
Hello @lhoestq, I’ve been debugging the `IterableDataset.state_dict()` behavior and applied a patch to `ArrowExamplesIterable._iter_arrow()` in an attempt to fix the issue described in #7475—specifically, that `shard_example_idx` always equals the number of samples in the shard, even if only a few examples have been ...
### Describe the bug I've noticed a strange behaviour with Iterable state_dict: the value of shard_example_idx is always equal to the amount of samples in a shard. ### Steps to reproduce the bug I am reusing the example from the doc ```python from datasets import Dataset ds = Dataset.from_dict({"a": range(6)}).to_...
325
IterableDataset's state_dict shard_example_idx is always equal to the number of samples in a shard ### Describe the bug I've noticed a strange behaviour with Iterable state_dict: the value of shard_example_idx is always equal to the amount of samples in a shard. ### Steps to reproduce the bug I am reusing the examp...
https://github.com/huggingface/datasets/issues/7475
IterableDataset's state_dict shard_example_idx is always equal to the number of samples in a shard
I found a fix using RebatchedArrowExamplesIterable, let me know if it's all good for you now
### Describe the bug I've noticed a strange behaviour with Iterable state_dict: the value of shard_example_idx is always equal to the amount of samples in a shard. ### Steps to reproduce the bug I am reusing the example from the doc ```python from datasets import Dataset ds = Dataset.from_dict({"a": range(6)}).to_...
16
IterableDataset's state_dict shard_example_idx is always equal to the number of samples in a shard ### Describe the bug I've noticed a strange behaviour with Iterable state_dict: the value of shard_example_idx is always equal to the amount of samples in a shard. ### Steps to reproduce the bug I am reusing the examp...
https://github.com/huggingface/datasets/issues/7475
IterableDataset's state_dict shard_example_idx is always equal to the number of samples in a shard
Hi @lhoestq, thanks for the quick fix and for referencing RebatchedArrowExamplesIterable! 🙌 I just tested your patch locally and can confirm that shard_example_idx is now tracking correctly when only a subset of examples is consumed. This resolves the issue I was seeing in #7475. Really appreciate the guidance earli...
### Describe the bug I've noticed a strange behaviour with Iterable state_dict: the value of shard_example_idx is always equal to the amount of samples in a shard. ### Steps to reproduce the bug I am reusing the example from the doc ```python from datasets import Dataset ds = Dataset.from_dict({"a": range(6)}).to_...
78
IterableDataset's state_dict shard_example_idx is always equal to the number of samples in a shard ### Describe the bug I've noticed a strange behaviour with Iterable state_dict: the value of shard_example_idx is always equal to the amount of samples in a shard. ### Steps to reproduce the bug I am reusing the examp...
https://github.com/huggingface/datasets/issues/7475
IterableDataset's state_dict shard_example_idx is always equal to the number of samples in a shard
It appears that shard_example_idx is still incorrect in the latest datasets version. 1. The reproducible code is as follows: ``` from datasets import Dataset, concatenate_datasets, interleave_datasets ds = Dataset.from_dict({"a": range(6)}).to_iterable_dataset(num_shards=1) for idx, example in enumerate(ds): print...
### Describe the bug I've noticed a strange behaviour with Iterable state_dict: the value of shard_example_idx is always equal to the amount of samples in a shard. ### Steps to reproduce the bug I am reusing the example from the doc ```python from datasets import Dataset ds = Dataset.from_dict({"a": range(6)}).to_...
111
IterableDataset's state_dict shard_example_idx is always equal to the number of samples in a shard ### Describe the bug I've noticed a strange behaviour with Iterable state_dict: the value of shard_example_idx is always equal to the amount of samples in a shard. ### Steps to reproduce the bug I am reusing the examp...
https://github.com/huggingface/datasets/issues/7475
IterableDataset's state_dict shard_example_idx is always equal to the number of samples in a shard
It's actually correct: there is examples_iterabe["shard_example_idx"] that shows 6 because internally it buffered up to the 6th element, but the previous_state["shard_example_idx"] and num_chunks_since_previous_state show that the buffer comes from the 0th element + 3 chunks of 1 elements = 3rd element (maybe we can i...
### Describe the bug I've noticed a strange behaviour with Iterable state_dict: the value of shard_example_idx is always equal to the amount of samples in a shard. ### Steps to reproduce the bug I am reusing the example from the doc ```python from datasets import Dataset ds = Dataset.from_dict({"a": range(6)}).to_...
63
IterableDataset's state_dict shard_example_idx is always equal to the number of samples in a shard ### Describe the bug I've noticed a strange behaviour with Iterable state_dict: the value of shard_example_idx is always equal to the amount of samples in a shard. ### Steps to reproduce the bug I am reusing the examp...
https://github.com/huggingface/datasets/issues/5571
load_dataset fails for JSON in windows
Hi! You need to pass an input json file explicitly as `data_files` to `load_dataset` to avoid this error: ```python ds = load_dataset("json", data_files=args.input_json) ```
### Describe the bug Steps: 1. Created a dataset in a Linux VM and created a small sample using dataset.to_json() method. 2. Downloaded the JSON file to my local Windows machine for working and saved in say - r"C:\Users\name\file.json" 3. I am reading the file in my local PyCharm - the location of python file is di...
24
load_dataset fails for JSON in windows ### Describe the bug Steps: 1. Created a dataset in a Linux VM and created a small sample using dataset.to_json() method. 2. Downloaded the JSON file to my local Windows machine for working and saved in say - r"C:\Users\name\file.json" 3. I am reading the file in my local PyCh...
https://github.com/huggingface/datasets/issues/6637
'with_format' is extremely slow when used together with 'interleave_datasets' or 'shuffle' on IterableDatasets
The "torch" formatting is usually fast because we do zero-copy conversion from the Arrow data on your disk to Torch tensors. However IterableDataset shuffling seems to do data copies that slow down the pipeline, and it shuffles python objects instead of Arrow data. To fix this we need to implement `BufferShuffledExa...
### Describe the bug If you: 1. Interleave two iterable datasets together with the interleave_datasets function, or shuffle an iterable dataset 2. Set the output format to torch tensors with .with_format('torch') Then iterating through the dataset becomes over 100x slower than it is if you don't apply the torch...
60
'with_format' is extremely slow when used together with 'interleave_datasets' or 'shuffle' on IterableDatasets ### Describe the bug If you: 1. Interleave two iterable datasets together with the interleave_datasets function, or shuffle an iterable dataset 2. Set the output format to torch tensors with .with_format(...
https://github.com/huggingface/datasets/issues/6637
'with_format' is extremely slow when used together with 'interleave_datasets' or 'shuffle' on IterableDatasets
@lhoestq So I see the following. ``` ds_interleave = datasets.interleave_datasets( [ds_a, ds_b], probabilities=[0.999, 0.001], stopping_strategy="first_exhausted", ) ds_fast = ds_fast.with_format("torch") ``` With above code the ex_iterable becomes `RandomlyCyclingMultiSourcesExamplesIterable` which also...
### Describe the bug If you: 1. Interleave two iterable datasets together with the interleave_datasets function, or shuffle an iterable dataset 2. Set the output format to torch tensors with .with_format('torch') Then iterating through the dataset becomes over 100x slower than it is if you don't apply the torch...
421
'with_format' is extremely slow when used together with 'interleave_datasets' or 'shuffle' on IterableDatasets ### Describe the bug If you: 1. Interleave two iterable datasets together with the interleave_datasets function, or shuffle an iterable dataset 2. Set the output format to torch tensors with .with_format(...
https://github.com/huggingface/datasets/issues/6637
'with_format' is extremely slow when used together with 'interleave_datasets' or 'shuffle' on IterableDatasets
It looks like a good start ! Btw you can move the function from RandomlyCyclingMultiSourcesExamplesIterable to CyclingMultiSourcesExamplesIterable I believe CyclingMultiSourcesExamplesIterable can iterate on arrow data only if all the sources can iterate on arrow data: ```diff @property def iter_arrow(self): - ...
### Describe the bug If you: 1. Interleave two iterable datasets together with the interleave_datasets function, or shuffle an iterable dataset 2. Set the output format to torch tensors with .with_format('torch') Then iterating through the dataset becomes over 100x slower than it is if you don't apply the torch...
161
'with_format' is extremely slow when used together with 'interleave_datasets' or 'shuffle' on IterableDatasets ### Describe the bug If you: 1. Interleave two iterable datasets together with the interleave_datasets function, or shuffle an iterable dataset 2. Set the output format to torch tensors with .with_format(...
https://github.com/huggingface/datasets/issues/5487
Incorrect filepath for dill module
Hi! The correct path is still `dill._dill.XXXX` in the latest release. What do you get when you run `python -c "import dill; print(dill.__version__)"` in your environment?
### Describe the bug I installed the `datasets` package and when I try to `import` it, I get the following error: ``` Traceback (most recent call last): File "/var/folders/jt/zw5g74ln6tqfdzsl8tx378j00000gn/T/ipykernel_3805/3458380017.py", line 1, in <module> import datasets File "/Users/avivbrokman/...
26
Incorrect filepath for dill module ### Describe the bug I installed the `datasets` package and when I try to `import` it, I get the following error: ``` Traceback (most recent call last): File "/var/folders/jt/zw5g74ln6tqfdzsl8tx378j00000gn/T/ipykernel_3805/3458380017.py", line 1, in <module> import data...
https://github.com/huggingface/datasets/issues/5487
Incorrect filepath for dill module
`0.3.6` I feel like that's bad news, because it's probably not the issue. My mistake, about the wrong path guess. I think I didn't notice that the first `dill` in the path isn't supposed to be included in the path specification in python. <img width="146" alt="Screen Shot 2023-01-31 at 12 58 32 PM" src="https://us...
### Describe the bug I installed the `datasets` package and when I try to `import` it, I get the following error: ``` Traceback (most recent call last): File "/var/folders/jt/zw5g74ln6tqfdzsl8tx378j00000gn/T/ipykernel_3805/3458380017.py", line 1, in <module> import datasets File "/Users/avivbrokman/...
54
Incorrect filepath for dill module ### Describe the bug I installed the `datasets` package and when I try to `import` it, I get the following error: ``` Traceback (most recent call last): File "/var/folders/jt/zw5g74ln6tqfdzsl8tx378j00000gn/T/ipykernel_3805/3458380017.py", line 1, in <module> import data...
https://github.com/huggingface/datasets/issues/5487
Incorrect filepath for dill module
Hi, @avivbrokman, this issue you report appeared only with old versions of dill. See: - #288 Are you sure you are in the right Python environment? - Please note that Jupyter (where I guess you get the error) may have multiple execution backends (IPython kernels) that might be different from the Python environment ...
### Describe the bug I installed the `datasets` package and when I try to `import` it, I get the following error: ``` Traceback (most recent call last): File "/var/folders/jt/zw5g74ln6tqfdzsl8tx378j00000gn/T/ipykernel_3805/3458380017.py", line 1, in <module> import datasets File "/Users/avivbrokman/...
85
Incorrect filepath for dill module ### Describe the bug I installed the `datasets` package and when I try to `import` it, I get the following error: ``` Traceback (most recent call last): File "/var/folders/jt/zw5g74ln6tqfdzsl8tx378j00000gn/T/ipykernel_3805/3458380017.py", line 1, in <module> import data...
https://github.com/huggingface/datasets/issues/5487
Incorrect filepath for dill module
I'm using spyder, and I am still getting `0.3.6` for `dill`, so unfortunately #288 isn't applicable, I think. However, I found something odd that I believe is a clue: ``` import inspect import dill inspect.getfile(dill) >>> '/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/dill/__init__.py' ``` ...
### Describe the bug I installed the `datasets` package and when I try to `import` it, I get the following error: ``` Traceback (most recent call last): File "/var/folders/jt/zw5g74ln6tqfdzsl8tx378j00000gn/T/ipykernel_3805/3458380017.py", line 1, in <module> import datasets File "/Users/avivbrokman/...
152
Incorrect filepath for dill module ### Describe the bug I installed the `datasets` package and when I try to `import` it, I get the following error: ``` Traceback (most recent call last): File "/var/folders/jt/zw5g74ln6tqfdzsl8tx378j00000gn/T/ipykernel_3805/3458380017.py", line 1, in <module> import data...
https://github.com/huggingface/datasets/issues/5487
Incorrect filepath for dill module
As I said above, I guess this is not a problem with `datasets`. I think you have different Python environments: one with the new dill version (the one you get while using pip) and other with the old dill version (the one where you get the AttributeError). You should update `dill` in the Python environment you are us...
### Describe the bug I installed the `datasets` package and when I try to `import` it, I get the following error: ``` Traceback (most recent call last): File "/var/folders/jt/zw5g74ln6tqfdzsl8tx378j00000gn/T/ipykernel_3805/3458380017.py", line 1, in <module> import datasets File "/Users/avivbrokman/...
76
Incorrect filepath for dill module ### Describe the bug I installed the `datasets` package and when I try to `import` it, I get the following error: ``` Traceback (most recent call last): File "/var/folders/jt/zw5g74ln6tqfdzsl8tx378j00000gn/T/ipykernel_3805/3458380017.py", line 1, in <module> import data...
https://github.com/huggingface/datasets/issues/3297
.map() cache is wrongfully reused - only happens when the mapping function is imported
Hi ! Thanks for reporting. Indeed this is a current limitation of the usage we have of `dill` in `datasets`. I'd suggest you use your workaround for now until we find a way to fix this. Maybe functions that are not coming from a module not installed with pip should be dumped completely, rather than only taking their lo...
## Describe the bug When `.map` is used with a mapping function that is imported, the cache is reused even if the mapping function has been modified. The reason for this is that `dill` that is used for creating the fingerprint [pickles imported functions by reference](https://stackoverflow.com/a/67851411). I guess...
61
.map() cache is wrongfully reused - only happens when the mapping function is imported ## Describe the bug When `.map` is used with a mapping function that is imported, the cache is reused even if the mapping function has been modified. The reason for this is that `dill` that is used for creating the fingerprint [pic...
https://github.com/huggingface/datasets/issues/3297
.map() cache is wrongfully reused - only happens when the mapping function is imported
I agree. Sounds like a solution for it would be pretty dirty, even [cloudpickle](https://stackoverflow.com/a/16891169) doesn't help in this case. In the meanwhile I think that adding a warning and the workaround somewhere in the documentation can be helpful.
## Describe the bug When `.map` is used with a mapping function that is imported, the cache is reused even if the mapping function has been modified. The reason for this is that `dill` that is used for creating the fingerprint [pickles imported functions by reference](https://stackoverflow.com/a/67851411). I guess...
38
.map() cache is wrongfully reused - only happens when the mapping function is imported ## Describe the bug When `.map` is used with a mapping function that is imported, the cache is reused even if the mapping function has been modified. The reason for this is that `dill` that is used for creating the fingerprint [pic...
https://github.com/huggingface/datasets/issues/3297
.map() cache is wrongfully reused - only happens when the mapping function is imported
For anyone interested, I see that with `dill==0.3.6` the workaround I suggested doesn't work anymore. I opened an issue about it: https://github.com/uqfoundation/dill/issues/572.
## Describe the bug When `.map` is used with a mapping function that is imported, the cache is reused even if the mapping function has been modified. The reason for this is that `dill` that is used for creating the fingerprint [pickles imported functions by reference](https://stackoverflow.com/a/67851411). I guess...
22
.map() cache is wrongfully reused - only happens when the mapping function is imported ## Describe the bug When `.map` is used with a mapping function that is imported, the cache is reused even if the mapping function has been modified. The reason for this is that `dill` that is used for creating the fingerprint [pic...
https://github.com/huggingface/datasets/issues/3297
.map() cache is wrongfully reused - only happens when the mapping function is imported
Is there a plan for this issue or some progress made on this issue? Having tons of transformations on a dataset doesn't allow to place it in the same file as loading it.. Also, currently there is no workaround available
## Describe the bug When `.map` is used with a mapping function that is imported, the cache is reused even if the mapping function has been modified. The reason for this is that `dill` that is used for creating the fingerprint [pickles imported functions by reference](https://stackoverflow.com/a/67851411). I guess...
40
.map() cache is wrongfully reused - only happens when the mapping function is imported ## Describe the bug When `.map` is used with a mapping function that is imported, the cache is reused even if the mapping function has been modified. The reason for this is that `dill` that is used for creating the fingerprint [pic...
https://github.com/huggingface/datasets/issues/3297
.map() cache is wrongfully reused - only happens when the mapping function is imported
Hi ! a workaround is to define the `fingerprint` uses to locate the cache file manually: ```python ds = ds.map(..., new_fingerprint=new_fingerprint) ``` **PS: make sure to update `new_fingerprint` every time you change your map() function or it will reload previous results from the cache**
## Describe the bug When `.map` is used with a mapping function that is imported, the cache is reused even if the mapping function has been modified. The reason for this is that `dill` that is used for creating the fingerprint [pickles imported functions by reference](https://stackoverflow.com/a/67851411). I guess...
44
.map() cache is wrongfully reused - only happens when the mapping function is imported ## Describe the bug When `.map` is used with a mapping function that is imported, the cache is reused even if the mapping function has been modified. The reason for this is that `dill` that is used for creating the fingerprint [pic...
https://github.com/huggingface/datasets/issues/3297
.map() cache is wrongfully reused - only happens when the mapping function is imported
@lhoestq - Doing it manually opens room for bugs. How would you suggest to detect code changes automatically in this case?
## Describe the bug When `.map` is used with a mapping function that is imported, the cache is reused even if the mapping function has been modified. The reason for this is that `dill` that is used for creating the fingerprint [pickles imported functions by reference](https://stackoverflow.com/a/67851411). I guess...
21
.map() cache is wrongfully reused - only happens when the mapping function is imported ## Describe the bug When `.map` is used with a mapping function that is imported, the cache is reused even if the mapping function has been modified. The reason for this is that `dill` that is used for creating the fingerprint [pic...
https://github.com/huggingface/datasets/issues/3297
.map() cache is wrongfully reused - only happens when the mapping function is imported
You could use the `Hasher` to hash the main variables of your functions that are subject to change and use this hash as fingerprint ```python from datasets.fingerprint import Hasher new_fingerprint = Hasher().hash(my_list_of_variables) ```
## Describe the bug When `.map` is used with a mapping function that is imported, the cache is reused even if the mapping function has been modified. The reason for this is that `dill` that is used for creating the fingerprint [pickles imported functions by reference](https://stackoverflow.com/a/67851411). I guess...
33
.map() cache is wrongfully reused - only happens when the mapping function is imported ## Describe the bug When `.map` is used with a mapping function that is imported, the cache is reused even if the mapping function has been modified. The reason for this is that `dill` that is used for creating the fingerprint [pic...
https://github.com/huggingface/datasets/issues/7394
Using load_dataset with data_files and split arguments yields an error
Hi, I want to work on this issue involving adding a verification test for the **`HuggingFaceM4/InterleavedWebDocuments`** dataset. This will be my first contribution to `datasets`, I plan to add a simple loading and basic structure verification test like other recent dataset tests. You can expect a PR in the ne...
### Describe the bug It seems the list of valid splits recorded by the package becomes incorrectly overwritten when using the `data_files` argument. If I run ```python from datasets import load_dataset load_dataset("allenai/super", split="all_examples", data_files="tasks/expert.jsonl") ``` then I get the error ``` Va...
60
Using load_dataset with data_files and split arguments yields an error ### Describe the bug It seems the list of valid splits recorded by the package becomes incorrectly overwritten when using the `data_files` argument. If I run ```python from datasets import load_dataset load_dataset("allenai/super", split="all_exam...
https://github.com/huggingface/datasets/issues/7680
Question about iterable dataset and streaming
> If we have already loaded the dataset, why doing to_iterable_dataset? Does it go through the dataset faster than map-style dataset? yes, it makes a faster DataLoader for example (otherwise DataLoader uses `__getitem__` which is slower than iterating) > load_dataset(streaming=True) is useful for huge dataset, but th...
In the doc, I found the following example: https://github.com/huggingface/datasets/blob/611f5a592359ebac6f858f515c776aa7d99838b2/docs/source/stream.mdx?plain=1#L65-L78 I am confused, 1. If we have already loaded the dataset, why doing `to_iterable_dataset`? Does it go through the dataset faster than map-style datase...
98
Question about iterable dataset and streaming In the doc, I found the following example: https://github.com/huggingface/datasets/blob/611f5a592359ebac6f858f515c776aa7d99838b2/docs/source/stream.mdx?plain=1#L65-L78 I am confused, 1. If we have already loaded the dataset, why doing `to_iterable_dataset`? Does it go th...
https://github.com/huggingface/datasets/issues/7680
Question about iterable dataset and streaming
> > If we have already loaded the dataset, why doing to_iterable_dataset? Does it go through the dataset faster than map-style dataset? > > yes, it makes a faster DataLoader for example (otherwise DataLoader uses `__getitem__` which is slower than iterating) Okay, but `__getitem__` seems suitable for distributed sett...
In the doc, I found the following example: https://github.com/huggingface/datasets/blob/611f5a592359ebac6f858f515c776aa7d99838b2/docs/source/stream.mdx?plain=1#L65-L78 I am confused, 1. If we have already loaded the dataset, why doing `to_iterable_dataset`? Does it go through the dataset faster than map-style datase...
94
Question about iterable dataset and streaming In the doc, I found the following example: https://github.com/huggingface/datasets/blob/611f5a592359ebac6f858f515c776aa7d99838b2/docs/source/stream.mdx?plain=1#L65-L78 I am confused, 1. If we have already loaded the dataset, why doing `to_iterable_dataset`? Does it go th...
https://github.com/huggingface/datasets/issues/7680
Question about iterable dataset and streaming
> however, if we make it to_iterable_dataset, then each rank needs to iterate all the samples, making it slower (i,e, rank1 got 0,1,2,3, rank2 got 0,1,2,3,(4,5,6,7)) Actually if you specify `to_iterable_dataset(num_shards=world_size)` (or a factor of world_size) and use a `torch.utils.data.DataLoader` then each rank w...
In the doc, I found the following example: https://github.com/huggingface/datasets/blob/611f5a592359ebac6f858f515c776aa7d99838b2/docs/source/stream.mdx?plain=1#L65-L78 I am confused, 1. If we have already loaded the dataset, why doing `to_iterable_dataset`? Does it go through the dataset faster than map-style datase...
75
Question about iterable dataset and streaming In the doc, I found the following example: https://github.com/huggingface/datasets/blob/611f5a592359ebac6f858f515c776aa7d99838b2/docs/source/stream.mdx?plain=1#L65-L78 I am confused, 1. If we have already loaded the dataset, why doing `to_iterable_dataset`? Does it go th...
https://github.com/huggingface/datasets/issues/7680
Question about iterable dataset and streaming
Got it, very nice features `num_shards` 👍🏻 I would benchmark `to_iterable_dataset(num_shards=world_size)` against traditional map-style one in distributed settings in the near future.
In the doc, I found the following example: https://github.com/huggingface/datasets/blob/611f5a592359ebac6f858f515c776aa7d99838b2/docs/source/stream.mdx?plain=1#L65-L78 I am confused, 1. If we have already loaded the dataset, why doing `to_iterable_dataset`? Does it go through the dataset faster than map-style datase...
22
Question about iterable dataset and streaming In the doc, I found the following example: https://github.com/huggingface/datasets/blob/611f5a592359ebac6f858f515c776aa7d99838b2/docs/source/stream.mdx?plain=1#L65-L78 I am confused, 1. If we have already loaded the dataset, why doing `to_iterable_dataset`? Does it go th...
https://github.com/huggingface/datasets/issues/7680
Question about iterable dataset and streaming
Hi @lhoestq , I run a test for the speed in single node. Things are not expected as you mentioned before. ```python import time import datasets from torch.utils.data import DataLoader def time_decorator(func): def wrapper(*args, **kwargs): start_time = time.time() result = func(*args, **kwargs) ...
In the doc, I found the following example: https://github.com/huggingface/datasets/blob/611f5a592359ebac6f858f515c776aa7d99838b2/docs/source/stream.mdx?plain=1#L65-L78 I am confused, 1. If we have already loaded the dataset, why doing `to_iterable_dataset`? Does it go through the dataset faster than map-style datase...
153
Question about iterable dataset and streaming In the doc, I found the following example: https://github.com/huggingface/datasets/blob/611f5a592359ebac6f858f515c776aa7d99838b2/docs/source/stream.mdx?plain=1#L65-L78 I am confused, 1. If we have already loaded the dataset, why doing `to_iterable_dataset`? Does it go th...
https://github.com/huggingface/datasets/issues/7680
Question about iterable dataset and streaming
Loading in batches is faster than one example at a time. In your test the dataset is loaded in batches while the iterable_dataset is loaded one example at a time and the dataloader has a buffer to turn the examples to batches. can you try this ? ``` batched_dataset = dataset.batch(100, num_proc=5) @time_decorator de...
In the doc, I found the following example: https://github.com/huggingface/datasets/blob/611f5a592359ebac6f858f515c776aa7d99838b2/docs/source/stream.mdx?plain=1#L65-L78 I am confused, 1. If we have already loaded the dataset, why doing `to_iterable_dataset`? Does it go through the dataset faster than map-style datase...
63
Question about iterable dataset and streaming In the doc, I found the following example: https://github.com/huggingface/datasets/blob/611f5a592359ebac6f858f515c776aa7d99838b2/docs/source/stream.mdx?plain=1#L65-L78 I am confused, 1. If we have already loaded the dataset, why doing `to_iterable_dataset`? Does it go th...
https://github.com/huggingface/datasets/issues/7680
Question about iterable dataset and streaming
To be fair, I test the time including batching: ```python @time_decorator def load_dataloader3(): for _ in DataLoader(dataset.batch(100, num_proc=5).to_iterable_dataset(num_shards=5), batch_size=None, num_workers=5): pass ``` ```bash Time taken: 49.722447633743286 seconds ```
In the doc, I found the following example: https://github.com/huggingface/datasets/blob/611f5a592359ebac6f858f515c776aa7d99838b2/docs/source/stream.mdx?plain=1#L65-L78 I am confused, 1. If we have already loaded the dataset, why doing `to_iterable_dataset`? Does it go through the dataset faster than map-style datase...
28
Question about iterable dataset and streaming In the doc, I found the following example: https://github.com/huggingface/datasets/blob/611f5a592359ebac6f858f515c776aa7d99838b2/docs/source/stream.mdx?plain=1#L65-L78 I am confused, 1. If we have already loaded the dataset, why doing `to_iterable_dataset`? Does it go th...
https://github.com/huggingface/datasets/issues/7680
Question about iterable dataset and streaming
I run another test about shuffling. ```python @time_decorator def load_map_dataloader1(): for _ in DataLoader(dataset, batch_size=100, num_workers=5, shuffle=True): pass @time_decorator def load_map_dataloader2(): for _ in DataLoader(dataset.batch(100, num_proc=5), batch_size=None, num_workers=5, shuf...
In the doc, I found the following example: https://github.com/huggingface/datasets/blob/611f5a592359ebac6f858f515c776aa7d99838b2/docs/source/stream.mdx?plain=1#L65-L78 I am confused, 1. If we have already loaded the dataset, why doing `to_iterable_dataset`? Does it go through the dataset faster than map-style datase...
95
Question about iterable dataset and streaming In the doc, I found the following example: https://github.com/huggingface/datasets/blob/611f5a592359ebac6f858f515c776aa7d99838b2/docs/source/stream.mdx?plain=1#L65-L78 I am confused, 1. If we have already loaded the dataset, why doing `to_iterable_dataset`? Does it go th...
https://github.com/huggingface/datasets/issues/3956
TypeError: __init__() missing 1 required positional argument: 'scheme'
Hi @amirj, thanks for reporting. At first sight, your issue seems a version incompatibility between your Elasticsearch client and your Elasticsearch server. Feel free to have a look at Elasticsearch client docs: https://www.elastic.co/guide/en/elasticsearch/client/python-api/current/overview.html#_compatibility ...
## Describe the bug Based on [this tutorial](https://huggingface.co/docs/datasets/faiss_es#elasticsearch) the provided code should add Elasticsearch index but raised the following error, probably the new Elasticsearch version is not compatible though the tutorial doesn't provide any information about the supporting El...
66
TypeError: __init__() missing 1 required positional argument: 'scheme' ## Describe the bug Based on [this tutorial](https://huggingface.co/docs/datasets/faiss_es#elasticsearch) the provided code should add Elasticsearch index but raised the following error, probably the new Elasticsearch version is not compatible thou...
https://github.com/huggingface/datasets/issues/3956
TypeError: __init__() missing 1 required positional argument: 'scheme'
@albertvillanova It doesn't seem a version incompatibility between the client and server, since the following code is working: ``` from elasticsearch import Elasticsearch es_client = Elasticsearch("http://localhost:9200") dataset.add_elasticsearch_index(column="e1", es_client=es_client, es_index_name="e1_index") ...
## Describe the bug Based on [this tutorial](https://huggingface.co/docs/datasets/faiss_es#elasticsearch) the provided code should add Elasticsearch index but raised the following error, probably the new Elasticsearch version is not compatible though the tutorial doesn't provide any information about the supporting El...
30
TypeError: __init__() missing 1 required positional argument: 'scheme' ## Describe the bug Based on [this tutorial](https://huggingface.co/docs/datasets/faiss_es#elasticsearch) the provided code should add Elasticsearch index but raised the following error, probably the new Elasticsearch version is not compatible thou...
https://github.com/huggingface/datasets/issues/3956
TypeError: __init__() missing 1 required positional argument: 'scheme'
Hi @amirj, I really think it is a version incompatibility issue between your Elasticsearch client and server: - Your Elasticsearch server NodeConfig expects a positional argument named 'scheme' - Whereas your Elasticsearch client passes only keyword arguments: `NodeConfig(**options)` Moreover: - Looking at yo...
## Describe the bug Based on [this tutorial](https://huggingface.co/docs/datasets/faiss_es#elasticsearch) the provided code should add Elasticsearch index but raised the following error, probably the new Elasticsearch version is not compatible though the tutorial doesn't provide any information about the supporting El...
125
TypeError: __init__() missing 1 required positional argument: 'scheme' ## Describe the bug Based on [this tutorial](https://huggingface.co/docs/datasets/faiss_es#elasticsearch) the provided code should add Elasticsearch index but raised the following error, probably the new Elasticsearch version is not compatible thou...
https://github.com/huggingface/datasets/issues/3956
TypeError: __init__() missing 1 required positional argument: 'scheme'
``` from elasticsearch import Elasticsearch es = Elasticsearch([{'host': 'localhost', 'port': 9200}]) ``` ``` TypeError Traceback (most recent call last) <ipython-input-8-675c6ffe5293> in <module> 1 #es = Elasticsearch([{'host':'localhost', 'port':9200}]) 2 from elast...
## Describe the bug Based on [this tutorial](https://huggingface.co/docs/datasets/faiss_es#elasticsearch) the provided code should add Elasticsearch index but raised the following error, probably the new Elasticsearch version is not compatible though the tutorial doesn't provide any information about the supporting El...
179
TypeError: __init__() missing 1 required positional argument: 'scheme' ## Describe the bug Based on [this tutorial](https://huggingface.co/docs/datasets/faiss_es#elasticsearch) the provided code should add Elasticsearch index but raised the following error, probably the new Elasticsearch version is not compatible thou...
https://github.com/huggingface/datasets/issues/3956
TypeError: __init__() missing 1 required positional argument: 'scheme'
@raj713335, thanks for reporting. Please note that in your code example, you are not using our `datasets` library. Thus, I think you should report that issue to `elasticsearch` library: https://github.com/elastic/elasticsearch-py
## Describe the bug Based on [this tutorial](https://huggingface.co/docs/datasets/faiss_es#elasticsearch) the provided code should add Elasticsearch index but raised the following error, probably the new Elasticsearch version is not compatible though the tutorial doesn't provide any information about the supporting El...
30
TypeError: __init__() missing 1 required positional argument: 'scheme' ## Describe the bug Based on [this tutorial](https://huggingface.co/docs/datasets/faiss_es#elasticsearch) the provided code should add Elasticsearch index but raised the following error, probably the new Elasticsearch version is not compatible thou...
https://github.com/huggingface/datasets/issues/3956
TypeError: __init__() missing 1 required positional argument: 'scheme'
it is simple hack which shock you just replace https to http in scheme **In My Case:** -> `es = Elasticsearch([{'host': 'localhost', 'port': 9200, "scheme": "http"}]) if es.ping(): print('Connected to ES!') else: print('Could not connect!') sys.exit()`
## Describe the bug Based on [this tutorial](https://huggingface.co/docs/datasets/faiss_es#elasticsearch) the provided code should add Elasticsearch index but raised the following error, probably the new Elasticsearch version is not compatible though the tutorial doesn't provide any information about the supporting El...
36
TypeError: __init__() missing 1 required positional argument: 'scheme' ## Describe the bug Based on [this tutorial](https://huggingface.co/docs/datasets/faiss_es#elasticsearch) the provided code should add Elasticsearch index but raised the following error, probably the new Elasticsearch version is not compatible thou...
https://github.com/huggingface/datasets/issues/4211
DatasetDict containing Datasets with different features when pushed to hub gets remapped features
Hi @pietrolesci, thanks for reporting. Please note that this is a design purpose: a `DatasetDict` has the same features for all its datasets. Normally, a `DatasetDict` is composed of several sub-datasets each corresponding to a different **split**. To handle sub-datasets with different features, we use another ap...
Hi there, I am trying to load a dataset to the Hub. This dataset is a `DatasetDict` composed of various splits. Some splits have a different `Feature` mapping. Locally, the DatasetDict preserves the individual features but if I `push_to_hub` and then `load_dataset`, the features are all the same. Dataset and code...
69
DatasetDict containing Datasets with different features when pushed to hub gets remapped features Hi there, I am trying to load a dataset to the Hub. This dataset is a `DatasetDict` composed of various splits. Some splits have a different `Feature` mapping. Locally, the DatasetDict preserves the individual features ...
https://github.com/huggingface/datasets/issues/4211
DatasetDict containing Datasets with different features when pushed to hub gets remapped features
Hi @albertvillanova, Thanks a lot for your reply! I got it now. The strange thing for me was to have it correctly working (i.e., DatasetDict with different features in some datasets) locally and not on the Hub. It would be great to have configuration supported by `push_to_hub`. Personally, this latter functionality ...
Hi there, I am trying to load a dataset to the Hub. This dataset is a `DatasetDict` composed of various splits. Some splits have a different `Feature` mapping. Locally, the DatasetDict preserves the individual features but if I `push_to_hub` and then `load_dataset`, the features are all the same. Dataset and code...
68
DatasetDict containing Datasets with different features when pushed to hub gets remapped features Hi there, I am trying to load a dataset to the Hub. This dataset is a `DatasetDict` composed of various splits. Some splits have a different `Feature` mapping. Locally, the DatasetDict preserves the individual features ...
https://github.com/huggingface/datasets/issues/4211
DatasetDict containing Datasets with different features when pushed to hub gets remapped features
Hi! Yes, we should override `DatasetDict.__setitem__` and throw an error if features dictionaries are different. `DatasetDict` is a subclass of `dict`, so `DatasetDict.{update/setdefault}` need to be overridden as well. We could avoid this by subclassing `UserDict`, but then we would get the name collision - `DatasetDi...
Hi there, I am trying to load a dataset to the Hub. This dataset is a `DatasetDict` composed of various splits. Some splits have a different `Feature` mapping. Locally, the DatasetDict preserves the individual features but if I `push_to_hub` and then `load_dataset`, the features are all the same. Dataset and code...
102
DatasetDict containing Datasets with different features when pushed to hub gets remapped features Hi there, I am trying to load a dataset to the Hub. This dataset is a `DatasetDict` composed of various splits. Some splits have a different `Feature` mapping. Locally, the DatasetDict preserves the individual features ...
https://github.com/huggingface/datasets/issues/4211
DatasetDict containing Datasets with different features when pushed to hub gets remapped features
I would keep things simple and keep subclassing dict. Regarding the features check, I guess this can be done only for `push_to_hub` right ? It is the only function right now that requires the underlying datasets to be splits (e.g. train/test) and have the same features. Note that later you will be able to push datas...
Hi there, I am trying to load a dataset to the Hub. This dataset is a `DatasetDict` composed of various splits. Some splits have a different `Feature` mapping. Locally, the DatasetDict preserves the individual features but if I `push_to_hub` and then `load_dataset`, the features are all the same. Dataset and code...
76
DatasetDict containing Datasets with different features when pushed to hub gets remapped features Hi there, I am trying to load a dataset to the Hub. This dataset is a `DatasetDict` composed of various splits. Some splits have a different `Feature` mapping. Locally, the DatasetDict preserves the individual features ...
https://github.com/huggingface/datasets/issues/4211
DatasetDict containing Datasets with different features when pushed to hub gets remapped features
Hi @lhoestq, Returning to this thread to ask whether the possibility to create `DatasetDict` with different configurations will be supported in the future. Best, Pietro
Hi there, I am trying to load a dataset to the Hub. This dataset is a `DatasetDict` composed of various splits. Some splits have a different `Feature` mapping. Locally, the DatasetDict preserves the individual features but if I `push_to_hub` and then `load_dataset`, the features are all the same. Dataset and code...
25
DatasetDict containing Datasets with different features when pushed to hub gets remapped features Hi there, I am trying to load a dataset to the Hub. This dataset is a `DatasetDict` composed of various splits. Some splits have a different `Feature` mapping. Locally, the DatasetDict preserves the individual features ...
https://github.com/huggingface/datasets/issues/4211
DatasetDict containing Datasets with different features when pushed to hub gets remapped features
DatasetDict is likely to always require the datasets to have the same columns and types, while different configurations may have different columns and types. Why would you like to see that ? If it's related to push_to_hub, we plan to allow pushing several configs, but not using DatasetDict
Hi there, I am trying to load a dataset to the Hub. This dataset is a `DatasetDict` composed of various splits. Some splits have a different `Feature` mapping. Locally, the DatasetDict preserves the individual features but if I `push_to_hub` and then `load_dataset`, the features are all the same. Dataset and code...
48
DatasetDict containing Datasets with different features when pushed to hub gets remapped features Hi there, I am trying to load a dataset to the Hub. This dataset is a `DatasetDict` composed of various splits. Some splits have a different `Feature` mapping. Locally, the DatasetDict preserves the individual features ...
https://github.com/huggingface/datasets/issues/4211
DatasetDict containing Datasets with different features when pushed to hub gets remapped features
Hi @lhoestq and @pietrolesci, I have been curious about this question as well. I don't have experience working with different configurations, but I can give a bit more detail on the work flow that I have been using with `Dataset_dict`. As @pietrolesci mentions, I have been using `push_to_hub` to quickly iterate o...
Hi there, I am trying to load a dataset to the Hub. This dataset is a `DatasetDict` composed of various splits. Some splits have a different `Feature` mapping. Locally, the DatasetDict preserves the individual features but if I `push_to_hub` and then `load_dataset`, the features are all the same. Dataset and code...
217
DatasetDict containing Datasets with different features when pushed to hub gets remapped features Hi there, I am trying to load a dataset to the Hub. This dataset is a `DatasetDict` composed of various splits. Some splits have a different `Feature` mapping. Locally, the DatasetDict preserves the individual features ...
https://github.com/huggingface/datasets/issues/4211
DatasetDict containing Datasets with different features when pushed to hub gets remapped features
> I am curious why DatasetDict will likely not support this functionality? There's a possibility we may merge the Dataset and DatasetDict classes. The DatasetDict purpose was to define a way to get the train/test splits of a dataset. see the discussions at https://github.com/huggingface/datasets/issues/5189 > ...
Hi there, I am trying to load a dataset to the Hub. This dataset is a `DatasetDict` composed of various splits. Some splits have a different `Feature` mapping. Locally, the DatasetDict preserves the individual features but if I `push_to_hub` and then `load_dataset`, the features are all the same. Dataset and code...
93
DatasetDict containing Datasets with different features when pushed to hub gets remapped features Hi there, I am trying to load a dataset to the Hub. This dataset is a `DatasetDict` composed of various splits. Some splits have a different `Feature` mapping. Locally, the DatasetDict preserves the individual features ...
https://github.com/huggingface/datasets/issues/4211
DatasetDict containing Datasets with different features when pushed to hub gets remapped features
Hi, regarding the following information: > Please note that this is a design purpose: a `DatasetDict` has the same features for all its datasets. Normally, a `DatasetDict` is composed of several sub-datasets each corresponding to a different **split**. > > To handle sub-datasets with different features, we use an...
Hi there, I am trying to load a dataset to the Hub. This dataset is a `DatasetDict` composed of various splits. Some splits have a different `Feature` mapping. Locally, the DatasetDict preserves the individual features but if I `push_to_hub` and then `load_dataset`, the features are all the same. Dataset and code...
180
DatasetDict containing Datasets with different features when pushed to hub gets remapped features Hi there, I am trying to load a dataset to the Hub. This dataset is a `DatasetDict` composed of various splits. Some splits have a different `Feature` mapping. Locally, the DatasetDict preserves the individual features ...
https://github.com/huggingface/datasets/issues/4618
contribute data loading for object detection datasets with yolo data format
Hi! The `imagefolder` script is already quite complex, so a standalone script sounds better. Also, I suggest we create an org on the Hub (e.g. `hf-loaders`) and store such scripts there for easier maintenance rather than having them as packaged modules (IMO only very generic loaders should be packaged). WDYT @lhoestq @...
**Is your feature request related to a problem? Please describe.** At the moment, HF datasets loads [image classification datasets](https://huggingface.co/docs/datasets/image_process) out-of-the-box. There could be a data loader for loading standard object detection datasets ([original discussion here](https://hugging...
53
contribute data loading for object detection datasets with yolo data format **Is your feature request related to a problem? Please describe.** At the moment, HF datasets loads [image classification datasets](https://huggingface.co/docs/datasets/image_process) out-of-the-box. There could be a data loader for loading st...
https://github.com/huggingface/datasets/issues/4618
contribute data loading for object detection datasets with yolo data format
Thank you for the suggestion @mariosasko . I agree with the point, but I have a few doubts 1. How would the user access the script if it's not a part of the core codebase? 2. Could you direct me as to what will be the tasks I have to do to contribute to the code? As per my understanding, it would be like 1. Cr...
**Is your feature request related to a problem? Please describe.** At the moment, HF datasets loads [image classification datasets](https://huggingface.co/docs/datasets/image_process) out-of-the-box. There could be a data loader for loading standard object detection datasets ([original discussion here](https://hugging...
135
contribute data loading for object detection datasets with yolo data format **Is your feature request related to a problem? Please describe.** At the moment, HF datasets loads [image classification datasets](https://huggingface.co/docs/datasets/image_process) out-of-the-box. There could be a data loader for loading st...
https://github.com/huggingface/datasets/issues/4618
contribute data loading for object detection datasets with yolo data format
1. Like this: `load_dataset("hf-loaders/yolo", data_files=...)` 2. The steps would be: 1. Create a new org `hf-community-loaders` (IMO a better name than "hf-loaders") and add me (as an admin) 2. Create a new dataset repo `yolo` and add the loading script to it (`yolo.py`) 3. Open a discussion to reques...
**Is your feature request related to a problem? Please describe.** At the moment, HF datasets loads [image classification datasets](https://huggingface.co/docs/datasets/image_process) out-of-the-box. There could be a data loader for loading standard object detection datasets ([original discussion here](https://hugging...
73
contribute data loading for object detection datasets with yolo data format **Is your feature request related to a problem? Please describe.** At the moment, HF datasets loads [image classification datasets](https://huggingface.co/docs/datasets/image_process) out-of-the-box. There could be a data loader for loading st...
https://github.com/huggingface/datasets/issues/7363
ImportError: To support decoding images, please install 'Pillow'.
same issue.. my pip show Pillow output as below: ``` Name: pillow Version: 11.1.0 Summary: Python Imaging Library (Fork) Home-page: https://python-pillow.github.io/ Author: Author-email: "Jeffrey A. Clark" <aclark@aclark.net> License: MIT-CMU Location: [/opt/homebrew/lib/python3.10/site-packages](https://file+.vscode...
### Describe the bug Following this tutorial locally using a macboko and VSCode: https://huggingface.co/docs/diffusers/en/tutorials/basic_training This line of code: for i, image in enumerate(dataset[:4]["image"]): throws: ImportError: To support decoding images, please install 'Pillow'. Pillow is installed. ###...
34
ImportError: To support decoding images, please install 'Pillow'. ### Describe the bug Following this tutorial locally using a macboko and VSCode: https://huggingface.co/docs/diffusers/en/tutorials/basic_training This line of code: for i, image in enumerate(dataset[:4]["image"]): throws: ImportError: To support deco...
https://github.com/huggingface/datasets/issues/7363
ImportError: To support decoding images, please install 'Pillow'.
I encountered the same problem on Ubuntu system, my pip show Pillow output as below: ``` Name: pillow Version: 10.4.0 Summary: Python Imaging Library (Fork) Home-page: https://python-pillow.org/ Author: Author-email: "Jeffrey A. Clark" <[aclark@aclark.net](mailto:aclark@aclark.net)> License: HPND Location: /home/shun...
### Describe the bug Following this tutorial locally using a macboko and VSCode: https://huggingface.co/docs/diffusers/en/tutorials/basic_training This line of code: for i, image in enumerate(dataset[:4]["image"]): throws: ImportError: To support decoding images, please install 'Pillow'. Pillow is installed. ###...
54
ImportError: To support decoding images, please install 'Pillow'. ### Describe the bug Following this tutorial locally using a macboko and VSCode: https://huggingface.co/docs/diffusers/en/tutorials/basic_training This line of code: for i, image in enumerate(dataset[:4]["image"]): throws: ImportError: To support deco...
https://github.com/huggingface/datasets/issues/7363
ImportError: To support decoding images, please install 'Pillow'.
I have also encountered this. It's a strange thing that's happening. Checking the code `datasets` it uses `importlib.util.find_spec("PIL")` to verify if `PIL` is installed. While both `pip show` and `importlib` work correctly, I still got the error. In my case, restarting and redoing the `datasets` import helped. See...
### Describe the bug Following this tutorial locally using a macboko and VSCode: https://huggingface.co/docs/diffusers/en/tutorials/basic_training This line of code: for i, image in enumerate(dataset[:4]["image"]): throws: ImportError: To support decoding images, please install 'Pillow'. Pillow is installed. ###...
51
ImportError: To support decoding images, please install 'Pillow'. ### Describe the bug Following this tutorial locally using a macboko and VSCode: https://huggingface.co/docs/diffusers/en/tutorials/basic_training This line of code: for i, image in enumerate(dataset[:4]["image"]): throws: ImportError: To support deco...
https://github.com/huggingface/datasets/issues/7313
Cannot create a dataset with relative audio path
Hello ! when you `cast_column` you need the paths to be absolute paths or relative paths to your working directory, not the original dataset directory. Though I'd recommend structuring your dataset as an AudioFolder which automatically links a metadata.jsonl or csv to the audio files via relative paths **within** th...
### Describe the bug Hello! I want to create a dataset of parquet files, with audios stored as separate .mp3 files. However, it says "No such file or directory" (see the reproducing code). ### Steps to reproduce the bug Creating a dataset ``` from pathlib import Path from datasets import Dataset, load_datas...
53
Cannot create a dataset with relative audio path ### Describe the bug Hello! I want to create a dataset of parquet files, with audios stored as separate .mp3 files. However, it says "No such file or directory" (see the reproducing code). ### Steps to reproduce the bug Creating a dataset ``` from pathlib impo...
https://github.com/huggingface/datasets/issues/7313
Cannot create a dataset with relative audio path
@lhoestq thank you, but there are two problems with using AudioFolder: 1. It is said that AudioFolder requires metadata.csv. However, my datset is too large and contains nested and np.ndarray fields, so I can't use csv. 2. It is said that I need to load the dataset with `load_dataset("audiofolder", ...)`. However, if...
### Describe the bug Hello! I want to create a dataset of parquet files, with audios stored as separate .mp3 files. However, it says "No such file or directory" (see the reproducing code). ### Steps to reproduce the bug Creating a dataset ``` from pathlib import Path from datasets import Dataset, load_datas...
70
Cannot create a dataset with relative audio path ### Describe the bug Hello! I want to create a dataset of parquet files, with audios stored as separate .mp3 files. However, it says "No such file or directory" (see the reproducing code). ### Steps to reproduce the bug Creating a dataset ``` from pathlib impo...
https://github.com/huggingface/datasets/issues/7313
Cannot create a dataset with relative audio path
You can use metadata.jsonl if you have nested data :) And actually if you have a dataset structured as an AudioFolder then `load_dataset(dataset_name)` does work after uploading to HF
### Describe the bug Hello! I want to create a dataset of parquet files, with audios stored as separate .mp3 files. However, it says "No such file or directory" (see the reproducing code). ### Steps to reproduce the bug Creating a dataset ``` from pathlib import Path from datasets import Dataset, load_datas...
29
Cannot create a dataset with relative audio path ### Describe the bug Hello! I want to create a dataset of parquet files, with audios stored as separate .mp3 files. However, it says "No such file or directory" (see the reproducing code). ### Steps to reproduce the bug Creating a dataset ``` from pathlib impo...
https://github.com/huggingface/datasets/issues/7313
Cannot create a dataset with relative audio path
I have created an audio dataset. In my repo, I have explained the steps and structure. An example dataset is also available in the repo. https://github.com/pr0mila/ParquetToHuggingFace
### Describe the bug Hello! I want to create a dataset of parquet files, with audios stored as separate .mp3 files. However, it says "No such file or directory" (see the reproducing code). ### Steps to reproduce the bug Creating a dataset ``` from pathlib import Path from datasets import Dataset, load_datas...
26
Cannot create a dataset with relative audio path ### Describe the bug Hello! I want to create a dataset of parquet files, with audios stored as separate .mp3 files. However, it says "No such file or directory" (see the reproducing code). ### Steps to reproduce the bug Creating a dataset ``` from pathlib impo...
https://github.com/huggingface/datasets/issues/5855
`to_tf_dataset` consumes too much memory
Cc @amyeroberts @Rocketknight1 Indded I think it's because it does something like this under the hood when there's no multiprocessing: ```python tf_dataset = tf_dataset.shuffle(len(dataset)) ``` PS: with multiprocessing it appears to be different: ```python indices = np.arange(len(dataset)) if shuffle:...
### Describe the bug Hi, I'm using `to_tf_dataset` to convert a _large_ dataset to `tf.data.Dataset`. I observed that the data loading *before* training took a lot of time and memory, even with `batch_size=1`. After some digging, i believe the reason lies in the shuffle behavior. The [source code](https://github....
41
`to_tf_dataset` consumes too much memory ### Describe the bug Hi, I'm using `to_tf_dataset` to convert a _large_ dataset to `tf.data.Dataset`. I observed that the data loading *before* training took a lot of time and memory, even with `batch_size=1`. After some digging, i believe the reason lies in the shuffle be...
https://github.com/huggingface/datasets/issues/5855
`to_tf_dataset` consumes too much memory
Hi @massquantity, the dataset being shuffled there is not the full dataset. If you look at [the line above](https://github.com/huggingface/datasets/blob/main/src/datasets/utils/tf_utils.py#L182), the dataset is actually just a single indices array at that point, and that array is the only thing that gets fully loaded i...
### Describe the bug Hi, I'm using `to_tf_dataset` to convert a _large_ dataset to `tf.data.Dataset`. I observed that the data loading *before* training took a lot of time and memory, even with `batch_size=1`. After some digging, i believe the reason lies in the shuffle behavior. The [source code](https://github....
134
`to_tf_dataset` consumes too much memory ### Describe the bug Hi, I'm using `to_tf_dataset` to convert a _large_ dataset to `tf.data.Dataset`. I observed that the data loading *before* training took a lot of time and memory, even with `batch_size=1`. After some digging, i believe the reason lies in the shuffle be...
https://github.com/huggingface/datasets/issues/5855
`to_tf_dataset` consumes too much memory
Hi @Rocketknight1, you're right and I also noticed that only indices are used in shuffling. My data has shape (50000000, 10), but really the problem doesn't relate to a specific dataset. Simply running the following code costs me 10GB of memory. ```python from datasets import Dataset def gen(): for i in ran...
### Describe the bug Hi, I'm using `to_tf_dataset` to convert a _large_ dataset to `tf.data.Dataset`. I observed that the data loading *before* training took a lot of time and memory, even with `batch_size=1`. After some digging, i believe the reason lies in the shuffle behavior. The [source code](https://github....
160
`to_tf_dataset` consumes too much memory ### Describe the bug Hi, I'm using `to_tf_dataset` to convert a _large_ dataset to `tf.data.Dataset`. I observed that the data loading *before* training took a lot of time and memory, even with `batch_size=1`. After some digging, i believe the reason lies in the shuffle be...
https://github.com/huggingface/datasets/issues/5855
`to_tf_dataset` consumes too much memory
Thanks for that reproduction script - I've confirmed the same issue is occurring for me. Investigating it now!
### Describe the bug Hi, I'm using `to_tf_dataset` to convert a _large_ dataset to `tf.data.Dataset`. I observed that the data loading *before* training took a lot of time and memory, even with `batch_size=1`. After some digging, i believe the reason lies in the shuffle behavior. The [source code](https://github....
18
`to_tf_dataset` consumes too much memory ### Describe the bug Hi, I'm using `to_tf_dataset` to convert a _large_ dataset to `tf.data.Dataset`. I observed that the data loading *before* training took a lot of time and memory, even with `batch_size=1`. After some digging, i believe the reason lies in the shuffle be...
https://github.com/huggingface/datasets/issues/5855
`to_tf_dataset` consumes too much memory
Update: The memory usage is occurring in creation of the index and shuffle buffer. You can reproduce it very simply with: ```python import tensorflow as tf indices = tf.range(50_000_000, dtype=tf.int64) dataset = tf.data.Dataset.from_tensor_slices(indices) dataset = dataset.shuffle(len(dataset)) print(next(iter...
### Describe the bug Hi, I'm using `to_tf_dataset` to convert a _large_ dataset to `tf.data.Dataset`. I observed that the data loading *before* training took a lot of time and memory, even with `batch_size=1`. After some digging, i believe the reason lies in the shuffle behavior. The [source code](https://github....
99
`to_tf_dataset` consumes too much memory ### Describe the bug Hi, I'm using `to_tf_dataset` to convert a _large_ dataset to `tf.data.Dataset`. I observed that the data loading *before* training took a lot of time and memory, even with `batch_size=1`. After some digging, i believe the reason lies in the shuffle be...
https://github.com/huggingface/datasets/issues/6053
Change package name from "datasets" to something less generic
I encountered this issue while working on a large project with 6+ years history. We have a submodule named datasets in the backend, and face a big challenge incorporating huggingface datasets into the project, especially considering django app renaming and other issues. It would be nice if the authors at least provide...
### Feature request I'm repeatedly finding myself in situations where I want to have a package called `datasets.py` or `evaluate.py` in my code and can't because those names are being taken up by Huggingface packages. While I can understand how (even from the user's perspective) it's aesthetically pleasing to have n...
63
Change package name from "datasets" to something less generic ### Feature request I'm repeatedly finding myself in situations where I want to have a package called `datasets.py` or `evaluate.py` in my code and can't because those names are being taken up by Huggingface packages. While I can understand how (even from...
https://github.com/huggingface/datasets/issues/3608
Add support for continuous metrics (RMSE, MAE)
Hey @ck37 You can always use a custom metric as explained [in this guide from HF](https://huggingface.co/docs/datasets/master/loading_metrics.html#using-a-custom-metric-script). If this issue needs to be contributed to (for enhancing the metric API) I think [this link](https://scikit-learn.org/stable/modules/gen...
**Is your feature request related to a problem? Please describe.** I am uploading our dataset and models for the "Constructing interval measures" method we've developed, which uses item response theory to convert multiple discrete labels into a continuous spectrum for hate speech. Once we have this outcome our NLP m...
40
Add support for continuous metrics (RMSE, MAE) **Is your feature request related to a problem? Please describe.** I am uploading our dataset and models for the "Constructing interval measures" method we've developed, which uses item response theory to convert multiple discrete labels into a continuous spectrum for h...
https://github.com/huggingface/datasets/issues/3608
Add support for continuous metrics (RMSE, MAE)
You can use a local metric script just by providing its path instead of the usual shortcut name
**Is your feature request related to a problem? Please describe.** I am uploading our dataset and models for the "Constructing interval measures" method we've developed, which uses item response theory to convert multiple discrete labels into a continuous spectrum for hate speech. Once we have this outcome our NLP m...
18
Add support for continuous metrics (RMSE, MAE) **Is your feature request related to a problem? Please describe.** I am uploading our dataset and models for the "Constructing interval measures" method we've developed, which uses item response theory to convert multiple discrete labels into a continuous spectrum for h...
https://github.com/huggingface/datasets/issues/6688
Tensor type (e.g. from `return_tensors`) ignored in map
Hi, this is expected behavior since all the tensors are converted to Arrow data (the storage type behind a Dataset). To get pytorch tensors back, you can set the dataset format to "torch": ```python ds = ds.with_format("torch") ```
### Describe the bug I don't know if it is a bug or an expected behavior, but the tensor type seems to be ignored after applying map. For example, mapping over to tokenize text with a transformers' tokenizer always returns lists and it ignore the `return_tensors` argument. If this is an expected behaviour (e.g., fo...
38
Tensor type (e.g. from `return_tensors`) ignored in map ### Describe the bug I don't know if it is a bug or an expected behavior, but the tensor type seems to be ignored after applying map. For example, mapping over to tokenize text with a transformers' tokenizer always returns lists and it ignore the `return_tensors`...
https://github.com/huggingface/datasets/issues/6688
Tensor type (e.g. from `return_tensors`) ignored in map
Thanks. Just one additional question. During the pipeline `<framework> -> arrow -> <framework>`, does `.with_format` zero-copies the tensors or is it a deep copy? And is this behavior framework-dependent? Thanks again.
### Describe the bug I don't know if it is a bug or an expected behavior, but the tensor type seems to be ignored after applying map. For example, mapping over to tokenize text with a transformers' tokenizer always returns lists and it ignore the `return_tensors` argument. If this is an expected behaviour (e.g., fo...
31
Tensor type (e.g. from `return_tensors`) ignored in map ### Describe the bug I don't know if it is a bug or an expected behavior, but the tensor type seems to be ignored after applying map. For example, mapping over to tokenize text with a transformers' tokenizer always returns lists and it ignore the `return_tensors`...
https://github.com/huggingface/datasets/issues/6688
Tensor type (e.g. from `return_tensors`) ignored in map
We do zero-copy Arrow <-> NumPy <-> PyTorch when the output dtype matches the original dtype, but for other frameworks it depends. For example JAX doesn't allow zero-copy NumPy -> JAX at all IIRC. Currently tokenized data are formatted using a copy though, since tokens are stored as int32 and returned as int64 torch...
### Describe the bug I don't know if it is a bug or an expected behavior, but the tensor type seems to be ignored after applying map. For example, mapping over to tokenize text with a transformers' tokenizer always returns lists and it ignore the `return_tensors` argument. If this is an expected behaviour (e.g., fo...
55
Tensor type (e.g. from `return_tensors`) ignored in map ### Describe the bug I don't know if it is a bug or an expected behavior, but the tensor type seems to be ignored after applying map. For example, mapping over to tokenize text with a transformers' tokenizer always returns lists and it ignore the `return_tensors`...
https://github.com/huggingface/datasets/issues/5425
Sort on multiple keys with datasets.Dataset.sort()
Hi! `Dataset.sort` calls `df.sort_values` internally, and `df.sort_values` brings all the "sort" columns in memory, so sorting on multiple keys could be very expensive. This makes me think that maybe we can replace `df.sort_values` with `pyarrow.compute.sort_indices` - the latter can also sort on multiple keys and ...
### Feature request From discussion on forum: https://discuss.huggingface.co/t/datasets-dataset-sort-does-not-preserve-ordering/29065/1 `sort()` does not preserve ordering, and it does not support sorting on multiple columns, nor a key function. The suggested solution: > ... having something similar to panda...
109
Sort on multiple keys with datasets.Dataset.sort() ### Feature request From discussion on forum: https://discuss.huggingface.co/t/datasets-dataset-sort-does-not-preserve-ordering/29065/1 `sort()` does not preserve ordering, and it does not support sorting on multiple columns, nor a key function. The suggested ...
https://github.com/huggingface/datasets/issues/5425
Sort on multiple keys with datasets.Dataset.sort()
@mariosasko If I understand the code right, using `pyarrow.compute.sort_indices` would also require changes to the `select` method if it is meant to sort multiple keys. That's because `select` only accepts 1D input for `indices`, not an iterable or similar which would be required for multiple keys unless you want some ...
### Feature request From discussion on forum: https://discuss.huggingface.co/t/datasets-dataset-sort-does-not-preserve-ordering/29065/1 `sort()` does not preserve ordering, and it does not support sorting on multiple columns, nor a key function. The suggested solution: > ... having something similar to panda...
64
Sort on multiple keys with datasets.Dataset.sort() ### Feature request From discussion on forum: https://discuss.huggingface.co/t/datasets-dataset-sort-does-not-preserve-ordering/29065/1 `sort()` does not preserve ordering, and it does not support sorting on multiple columns, nor a key function. The suggested ...
https://github.com/huggingface/datasets/issues/5425
Sort on multiple keys with datasets.Dataset.sort()
@MichlF No, it doesn't require modifying select because sorting on multiple keys also returns a 1D array. It's easier to understand with an example: ```python >>> import pyarrow as pa >>> import pyarrow.compute as pc >>> table = pa.table({ ... "name": ["John", "Eve", "Peter", "John"], ... "surname": ["...
### Feature request From discussion on forum: https://discuss.huggingface.co/t/datasets-dataset-sort-does-not-preserve-ordering/29065/1 `sort()` does not preserve ordering, and it does not support sorting on multiple columns, nor a key function. The suggested solution: > ... having something similar to panda...
76
Sort on multiple keys with datasets.Dataset.sort() ### Feature request From discussion on forum: https://discuss.huggingface.co/t/datasets-dataset-sort-does-not-preserve-ordering/29065/1 `sort()` does not preserve ordering, and it does not support sorting on multiple columns, nor a key function. The suggested ...
https://github.com/huggingface/datasets/issues/5425
Sort on multiple keys with datasets.Dataset.sort()
Thanks for clarifying. I can prepare a PR to address this issue. This would be my first PR here so I have a few maybe silly questions but: - What is the preferred input type of `sort_keys` for the sort method? A sequence with name, order tuples like pyarrow's `sort_indices` requires? - What about backwards compatabi...
### Feature request From discussion on forum: https://discuss.huggingface.co/t/datasets-dataset-sort-does-not-preserve-ordering/29065/1 `sort()` does not preserve ordering, and it does not support sorting on multiple columns, nor a key function. The suggested solution: > ... having something similar to panda...
112
Sort on multiple keys with datasets.Dataset.sort() ### Feature request From discussion on forum: https://discuss.huggingface.co/t/datasets-dataset-sort-does-not-preserve-ordering/29065/1 `sort()` does not preserve ordering, and it does not support sorting on multiple columns, nor a key function. The suggested ...
https://github.com/huggingface/datasets/issues/5425
Sort on multiple keys with datasets.Dataset.sort()
I think we can have the following signature: ```python def sort( self, column_names: Union[str, Sequence[str]], reverse: Union[bool, Sequence[bool]] = False, kind="deprecated", null_placement: str = "last", keep_in_memory: bool = False, load_from_cache_fi...
### Feature request From discussion on forum: https://discuss.huggingface.co/t/datasets-dataset-sort-does-not-preserve-ordering/29065/1 `sort()` does not preserve ordering, and it does not support sorting on multiple columns, nor a key function. The suggested solution: > ... having something similar to panda...
127
Sort on multiple keys with datasets.Dataset.sort() ### Feature request From discussion on forum: https://discuss.huggingface.co/t/datasets-dataset-sort-does-not-preserve-ordering/29065/1 `sort()` does not preserve ordering, and it does not support sorting on multiple columns, nor a key function. The suggested ...
https://github.com/huggingface/datasets/issues/5425
Sort on multiple keys with datasets.Dataset.sort()
I am pretty much done with the PR. Just one clarification: `Sequence` in `arrow_dataset.py` is a custom dataclass from `features.py` instead of the `type.hinting` class `Sequence` from Python. Do you suggest using that custom `Sequence` class somehow ? Otherwise signature currently reads instead: ```Python def so...
### Feature request From discussion on forum: https://discuss.huggingface.co/t/datasets-dataset-sort-does-not-preserve-ordering/29065/1 `sort()` does not preserve ordering, and it does not support sorting on multiple columns, nor a key function. The suggested solution: > ... having something similar to panda...
119
Sort on multiple keys with datasets.Dataset.sort() ### Feature request From discussion on forum: https://discuss.huggingface.co/t/datasets-dataset-sort-does-not-preserve-ordering/29065/1 `sort()` does not preserve ordering, and it does not support sorting on multiple columns, nor a key function. The suggested ...
https://github.com/huggingface/datasets/issues/5425
Sort on multiple keys with datasets.Dataset.sort()
I meant `typing.Sequence` (`datasets.Sequence` is a feature type). Regarding `null_placement`, I think we can support both `at_start` and `at_end`, and `last` and `first` (for backward compatibility; convert internally to `at_end` and `at_start` respectively).
### Feature request From discussion on forum: https://discuss.huggingface.co/t/datasets-dataset-sort-does-not-preserve-ordering/29065/1 `sort()` does not preserve ordering, and it does not support sorting on multiple columns, nor a key function. The suggested solution: > ... having something similar to panda...
33
Sort on multiple keys with datasets.Dataset.sort() ### Feature request From discussion on forum: https://discuss.huggingface.co/t/datasets-dataset-sort-does-not-preserve-ordering/29065/1 `sort()` does not preserve ordering, and it does not support sorting on multiple columns, nor a key function. The suggested ...
https://github.com/huggingface/datasets/issues/5425
Sort on multiple keys with datasets.Dataset.sort()
> I meant typing.Sequence (datasets.Sequence is a feature type). Sorry, I actually meant `typing.Sequence` and not `type.hinting`. However, the issue is still that `dataset.Sequence` is imported in `arrow_dataset.py` so I cannot import and use `typing.Sequence` for the `sort`'s signature without overwriting the `dat...
### Feature request From discussion on forum: https://discuss.huggingface.co/t/datasets-dataset-sort-does-not-preserve-ordering/29065/1 `sort()` does not preserve ordering, and it does not support sorting on multiple columns, nor a key function. The suggested solution: > ... having something similar to panda...
119
Sort on multiple keys with datasets.Dataset.sort() ### Feature request From discussion on forum: https://discuss.huggingface.co/t/datasets-dataset-sort-does-not-preserve-ordering/29065/1 `sort()` does not preserve ordering, and it does not support sorting on multiple columns, nor a key function. The suggested ...
https://github.com/huggingface/datasets/issues/5425
Sort on multiple keys with datasets.Dataset.sort()
You can avoid the name collision by renaming `typing.Sequence` to `Sequence_` when importing: ```python from typing import Sequence as Sequence_ ```
### Feature request From discussion on forum: https://discuss.huggingface.co/t/datasets-dataset-sort-does-not-preserve-ordering/29065/1 `sort()` does not preserve ordering, and it does not support sorting on multiple columns, nor a key function. The suggested solution: > ... having something similar to panda...
21
Sort on multiple keys with datasets.Dataset.sort() ### Feature request From discussion on forum: https://discuss.huggingface.co/t/datasets-dataset-sort-does-not-preserve-ordering/29065/1 `sort()` does not preserve ordering, and it does not support sorting on multiple columns, nor a key function. The suggested ...