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/6394 | TorchFormatter images (H, W, C) instead of (C, H, W) format | Just ran into this working on data lib that's attempting to achieve common interfaces across hf datasets, webdataset, native torch style datasets. The defacto standards for image tensors are numpy == HWC, torch.Tensor == CHW.
I had to drop use of 'torch' formatting because as is (H, W, C) makes it incompatible with... | ### Describe the bug
Using .set_format("torch") leads to images having shape (H, W, C), the same as in numpy.
However, pytorch normally uses (C, H, W) format.
Maybe I'm missing something but this makes the format a lot less useful as I then have to permute it anyways.
If not using the format it is possible to ... | 143 | TorchFormatter images (H, W, C) instead of (C, H, W) format
### Describe the bug
Using .set_format("torch") leads to images having shape (H, W, C), the same as in numpy.
However, pytorch normally uses (C, H, W) format.
Maybe I'm missing something but this makes the format a lot less useful as I then have to per... |
https://github.com/huggingface/datasets/issues/6394 | TorchFormatter images (H, W, C) instead of (C, H, W) format | We can define something like `.with_format("torch", image_data_format="channels_first")` and recommend using this in the docs maybe ? also cc @NielsRogge | ### Describe the bug
Using .set_format("torch") leads to images having shape (H, W, C), the same as in numpy.
However, pytorch normally uses (C, H, W) format.
Maybe I'm missing something but this makes the format a lot less useful as I then have to permute it anyways.
If not using the format it is possible to ... | 19 | TorchFormatter images (H, W, C) instead of (C, H, W) format
### Describe the bug
Using .set_format("torch") leads to images having shape (H, W, C), the same as in numpy.
However, pytorch normally uses (C, H, W) format.
Maybe I'm missing something but this makes the format a lot less useful as I then have to per... |
https://github.com/huggingface/datasets/issues/6394 | TorchFormatter images (H, W, C) instead of (C, H, W) format | Sounds good to me. I guess it's not allowed to use the channels first format by default for backwards compatibility purposes? | ### Describe the bug
Using .set_format("torch") leads to images having shape (H, W, C), the same as in numpy.
However, pytorch normally uses (C, H, W) format.
Maybe I'm missing something but this makes the format a lot less useful as I then have to permute it anyways.
If not using the format it is possible to ... | 21 | TorchFormatter images (H, W, C) instead of (C, H, W) format
### Describe the bug
Using .set_format("torch") leads to images having shape (H, W, C), the same as in numpy.
However, pytorch normally uses (C, H, W) format.
Maybe I'm missing something but this makes the format a lot less useful as I then have to per... |
https://github.com/huggingface/datasets/issues/6394 | TorchFormatter images (H, W, C) instead of (C, H, W) format | This works, but am wondering how widespread the use of the function is for image datasets? My hunch would be that it's not used widely enough with image datasets to favour backwards compat (keeping default channels_last) over clumsiness of needing this to be 'correct' for typical use.. but don't have the data to back t... | ### Describe the bug
Using .set_format("torch") leads to images having shape (H, W, C), the same as in numpy.
However, pytorch normally uses (C, H, W) format.
Maybe I'm missing something but this makes the format a lot less useful as I then have to permute it anyways.
If not using the format it is possible to ... | 56 | TorchFormatter images (H, W, C) instead of (C, H, W) format
### Describe the bug
Using .set_format("torch") leads to images having shape (H, W, C), the same as in numpy.
However, pytorch normally uses (C, H, W) format.
Maybe I'm missing something but this makes the format a lot less useful as I then have to per... |
https://github.com/huggingface/datasets/issues/6394 | TorchFormatter images (H, W, C) instead of (C, H, W) format | I see. I just checked in the HF libraries and it shouldn't break anything. And to be consistent with them we should actually use C H W. For example `transformers` image processors use C H W by default too.
So I'm ok with doing a breaking change to make it consistent with `transformers`, `torchvision`, etc. | ### Describe the bug
Using .set_format("torch") leads to images having shape (H, W, C), the same as in numpy.
However, pytorch normally uses (C, H, W) format.
Maybe I'm missing something but this makes the format a lot less useful as I then have to permute it anyways.
If not using the format it is possible to ... | 55 | TorchFormatter images (H, W, C) instead of (C, H, W) format
### Describe the bug
Using .set_format("torch") leads to images having shape (H, W, C), the same as in numpy.
However, pytorch normally uses (C, H, W) format.
Maybe I'm missing something but this makes the format a lot less useful as I then have to per... |
https://github.com/huggingface/datasets/issues/6394 | TorchFormatter images (H, W, C) instead of (C, H, W) format | Since it is quite connected, the proposed PR #6402 will not work for monochrome `PIL` images since they only have 2 dimensions as `numpy `arrays. [Torchvision ](https://pytorch.org/vision/stable/_modules/torchvision/transforms/functional.html#pil_to_tensor) adds a channel before permuting. Would that make sense here as... | ### Describe the bug
Using .set_format("torch") leads to images having shape (H, W, C), the same as in numpy.
However, pytorch normally uses (C, H, W) format.
Maybe I'm missing something but this makes the format a lot less useful as I then have to permute it anyways.
If not using the format it is possible to ... | 39 | TorchFormatter images (H, W, C) instead of (C, H, W) format
### Describe the bug
Using .set_format("torch") leads to images having shape (H, W, C), the same as in numpy.
However, pytorch normally uses (C, H, W) format.
Maybe I'm missing something but this makes the format a lot less useful as I then have to per... |
https://github.com/huggingface/datasets/issues/6394 | TorchFormatter images (H, W, C) instead of (C, H, W) format | @Modexus yes, indeed that would make sense as torch expects 1, H, W for monochrome, not H,W as you'd often see in numpy (via PIL), OpenCV, etc.
The reference should be the torchvision fn https://pytorch.org/vision/main/_modules/torchvision/transforms/functional.html#pil_to_tensor | ### Describe the bug
Using .set_format("torch") leads to images having shape (H, W, C), the same as in numpy.
However, pytorch normally uses (C, H, W) format.
Maybe I'm missing something but this makes the format a lot less useful as I then have to permute it anyways.
If not using the format it is possible to ... | 35 | TorchFormatter images (H, W, C) instead of (C, H, W) format
### Describe the bug
Using .set_format("torch") leads to images having shape (H, W, C), the same as in numpy.
However, pytorch normally uses (C, H, W) format.
Maybe I'm missing something but this makes the format a lot less useful as I then have to per... |
https://github.com/huggingface/datasets/issues/5980 | Viewing dataset card returns “502 Bad Gateway” | Yes, it seems to be working now. In case it's helpful, the outage lasted several days. It was failing as late as yesterday morning. | The url is: https://huggingface.co/datasets/Confirm-Labs/pile_ngrams_trigrams
I am able to successfully view the “Files and versions” tab: [Confirm-Labs/pile_ngrams_trigrams at main](https://huggingface.co/datasets/Confirm-Labs/pile_ngrams_trigrams/tree/main)
Any help would be appreciated! Thanks! I hope this is ... | 24 | Viewing dataset card returns “502 Bad Gateway”
The url is: https://huggingface.co/datasets/Confirm-Labs/pile_ngrams_trigrams
I am able to successfully view the “Files and versions” tab: [Confirm-Labs/pile_ngrams_trigrams at main](https://huggingface.co/datasets/Confirm-Labs/pile_ngrams_trigrams/tree/main)
Any hel... |
https://github.com/huggingface/datasets/issues/5705 | Getting next item from IterableDataset took forever. | Hi! It can take some time to iterate over Parquet files as big as yours, convert the samples to Python, and find the first one that matches a filter predicate before yielding it... | ### Describe the bug
I have a large dataset, about 500GB. The format of the dataset is parquet.
I then load the dataset and try to get the first item
```python
def get_one_item():
dataset = load_dataset("path/to/datafiles", split="train", cache_dir=".", streaming=True)
dataset = dataset.filter(lambda... | 33 | Getting next item from IterableDataset took forever.
### Describe the bug
I have a large dataset, about 500GB. The format of the dataset is parquet.
I then load the dataset and try to get the first item
```python
def get_one_item():
dataset = load_dataset("path/to/datafiles", split="train", cache_dir=".",... |
https://github.com/huggingface/datasets/issues/5705 | Getting next item from IterableDataset took forever. | Thanks @mariosasko, I figured it was the filter operation. I'm closing this issue because it is not a bug, it is the expected beheaviour. | ### Describe the bug
I have a large dataset, about 500GB. The format of the dataset is parquet.
I then load the dataset and try to get the first item
```python
def get_one_item():
dataset = load_dataset("path/to/datafiles", split="train", cache_dir=".", streaming=True)
dataset = dataset.filter(lambda... | 24 | Getting next item from IterableDataset took forever.
### Describe the bug
I have a large dataset, about 500GB. The format of the dataset is parquet.
I then load the dataset and try to get the first item
```python
def get_one_item():
dataset = load_dataset("path/to/datafiles", split="train", cache_dir=".",... |
https://github.com/huggingface/datasets/issues/5442 | OneDrive Integrations with HF Datasets | Hi!
We use [`fsspec`](https://github.com/fsspec/filesystem_spec) to integrate with storage providers. You can find more info (and the usage examples) in [our docs](https://huggingface.co/docs/datasets/v2.8.0/filesystems#download-and-prepare-a-dataset-into-a-cloud-storage).
[`gdrivefs`](https://github.com/fsspec/... | ### Feature request
First of all , I would like to thank all community who are developed DataSet storage and make it free available
How to integrate our Onedrive account or any other possible storage clouds (like google drive,...) with the **HF** datasets section.
For example, if I have **50GB** on my **Onedrive*... | 67 | OneDrive Integrations with HF Datasets
### Feature request
First of all , I would like to thank all community who are developed DataSet storage and make it free available
How to integrate our Onedrive account or any other possible storage clouds (like google drive,...) with the **HF** datasets section.
For examp... |
https://github.com/huggingface/datasets/issues/3333 | load JSON files, get the errors | Hi ! The message you're getting is not an error. It simply says that your JSON dataset is being prepared to a location in `/root/.cache/huggingface/datasets` | Hi, does this bug be fixed? when I load JSON files, I get the same errors by the command
`!python3 run.py --do_train --task qa --dataset squad-retrain-data/train-v2.0.json --output_dir ./re_trained_model/`
change the dateset to load json by refering to https://huggingface.co/docs/datasets/loading.html
`dataset = ... | 25 | load JSON files, get the errors
Hi, does this bug be fixed? when I load JSON files, I get the same errors by the command
`!python3 run.py --do_train --task qa --dataset squad-retrain-data/train-v2.0.json --output_dir ./re_trained_model/`
change the dateset to load json by refering to https://huggingface.co/docs/d... |
https://github.com/huggingface/datasets/issues/3333 | load JSON files, get the errors | >
but I want to load local JSON file by command
`python3 run.py --do_train --task qa --dataset squad-retrain-data/train-v2.0.json --output_dir ./re_trained_model/`
**squad-retrain-data/train-v2.0.json** is the local JSON file, how to load it and map it to a special structure? | Hi, does this bug be fixed? when I load JSON files, I get the same errors by the command
`!python3 run.py --do_train --task qa --dataset squad-retrain-data/train-v2.0.json --output_dir ./re_trained_model/`
change the dateset to load json by refering to https://huggingface.co/docs/datasets/loading.html
`dataset = ... | 37 | load JSON files, get the errors
Hi, does this bug be fixed? when I load JSON files, I get the same errors by the command
`!python3 run.py --do_train --task qa --dataset squad-retrain-data/train-v2.0.json --output_dir ./re_trained_model/`
change the dateset to load json by refering to https://huggingface.co/docs/d... |
https://github.com/huggingface/datasets/issues/3333 | load JSON files, get the errors | You can load it with `dataset = datasets.load_dataset('json', data_files=args.dataset)` as you said.
Then if you need to apply additional processing to map it to a special structure, you can use rename columns or use `dataset.map`. For more information, you can check the documentation here: https://huggingface.co/docs... | Hi, does this bug be fixed? when I load JSON files, I get the same errors by the command
`!python3 run.py --do_train --task qa --dataset squad-retrain-data/train-v2.0.json --output_dir ./re_trained_model/`
change the dateset to load json by refering to https://huggingface.co/docs/datasets/loading.html
`dataset = ... | 59 | load JSON files, get the errors
Hi, does this bug be fixed? when I load JSON files, I get the same errors by the command
`!python3 run.py --do_train --task qa --dataset squad-retrain-data/train-v2.0.json --output_dir ./re_trained_model/`
change the dateset to load json by refering to https://huggingface.co/docs/d... |
https://github.com/huggingface/datasets/issues/3333 | load JSON files, get the errors | ```
# Dataset selection
if args.dataset.endswith('.json') or args.dataset.endswith('.jsonl'):
dataset_id = None
# Load from local json/jsonl file
dataset = datasets.load_dataset('json', data_files=args.dataset)
# By default, the "json" dataset loader places all examples in the ... | Hi, does this bug be fixed? when I load JSON files, I get the same errors by the command
`!python3 run.py --do_train --task qa --dataset squad-retrain-data/train-v2.0.json --output_dir ./re_trained_model/`
change the dateset to load json by refering to https://huggingface.co/docs/datasets/loading.html
`dataset = ... | 136 | load JSON files, get the errors
Hi, does this bug be fixed? when I load JSON files, I get the same errors by the command
`!python3 run.py --do_train --task qa --dataset squad-retrain-data/train-v2.0.json --output_dir ./re_trained_model/`
change the dateset to load json by refering to https://huggingface.co/docs/d... |
https://github.com/huggingface/datasets/issues/3333 | load JSON files, get the errors | If your JSON has the same format as the SQuAD dataset, then you need to pass `field="data"` to `load_dataset`, since the SQuAD format is one big JSON object in which the "data" field contains the list of questions and answers.
```python
dataset = datasets.load_dataset('json', data_files=args.dataset, field="data")
`... | Hi, does this bug be fixed? when I load JSON files, I get the same errors by the command
`!python3 run.py --do_train --task qa --dataset squad-retrain-data/train-v2.0.json --output_dir ./re_trained_model/`
change the dateset to load json by refering to https://huggingface.co/docs/datasets/loading.html
`dataset = ... | 54 | load JSON files, get the errors
Hi, does this bug be fixed? when I load JSON files, I get the same errors by the command
`!python3 run.py --do_train --task qa --dataset squad-retrain-data/train-v2.0.json --output_dir ./re_trained_model/`
change the dateset to load json by refering to https://huggingface.co/docs/d... |
https://github.com/huggingface/datasets/issues/3333 | load JSON files, get the errors | Yes, code works. but the format is not as expected.
```
dataset = datasets.load_dataset('json', data_files=args.dataset, field="data")
```
```
python3 run.py --do_train --task qa --dataset squad --output_dir ./re_trained_model/
```
************ train_dataset: Dataset({
features: ['id', 'title', 'context', ... | Hi, does this bug be fixed? when I load JSON files, I get the same errors by the command
`!python3 run.py --do_train --task qa --dataset squad-retrain-data/train-v2.0.json --output_dir ./re_trained_model/`
change the dateset to load json by refering to https://huggingface.co/docs/datasets/loading.html
`dataset = ... | 88 | load JSON files, get the errors
Hi, does this bug be fixed? when I load JSON files, I get the same errors by the command
`!python3 run.py --do_train --task qa --dataset squad-retrain-data/train-v2.0.json --output_dir ./re_trained_model/`
change the dateset to load json by refering to https://huggingface.co/docs/d... |
https://github.com/huggingface/datasets/issues/3333 | load JSON files, get the errors | Ok I see, you have the paragraphs so you just need to process them to extract the questions and answers. I think you can process the SQuAD-like data this way:
```python
def process_squad(articles):
out = {
"title": [],
"context": [],
"question": [],
"id": [],
"answers... | Hi, does this bug be fixed? when I load JSON files, I get the same errors by the command
`!python3 run.py --do_train --task qa --dataset squad-retrain-data/train-v2.0.json --output_dir ./re_trained_model/`
change the dateset to load json by refering to https://huggingface.co/docs/datasets/loading.html
`dataset = ... | 135 | load JSON files, get the errors
Hi, does this bug be fixed? when I load JSON files, I get the same errors by the command
`!python3 run.py --do_train --task qa --dataset squad-retrain-data/train-v2.0.json --output_dir ./re_trained_model/`
change the dateset to load json by refering to https://huggingface.co/docs/d... |
https://github.com/huggingface/datasets/issues/3333 | load JSON files, get the errors | Yes, this works. But how to get the training output during training the squad by **Trainer**
for example https://github.com/huggingface/transformers/blob/master/examples/pytorch/question-answering/trainer_qa.py
I want the training inputs, labels, outputs for every epoch and step to produce the training dynamic grap... | Hi, does this bug be fixed? when I load JSON files, I get the same errors by the command
`!python3 run.py --do_train --task qa --dataset squad-retrain-data/train-v2.0.json --output_dir ./re_trained_model/`
change the dateset to load json by refering to https://huggingface.co/docs/datasets/loading.html
`dataset = ... | 37 | load JSON files, get the errors
Hi, does this bug be fixed? when I load JSON files, I get the same errors by the command
`!python3 run.py --do_train --task qa --dataset squad-retrain-data/train-v2.0.json --output_dir ./re_trained_model/`
change the dateset to load json by refering to https://huggingface.co/docs/d... |
https://github.com/huggingface/datasets/issues/3333 | load JSON files, get the errors | I think you may need to implement your own Trainer, from the `QuestionAnsweringTrainer` for example.
This way you can have the flexibility of saving all the inputs/output used at each step | Hi, does this bug be fixed? when I load JSON files, I get the same errors by the command
`!python3 run.py --do_train --task qa --dataset squad-retrain-data/train-v2.0.json --output_dir ./re_trained_model/`
change the dateset to load json by refering to https://huggingface.co/docs/datasets/loading.html
`dataset = ... | 31 | load JSON files, get the errors
Hi, does this bug be fixed? when I load JSON files, I get the same errors by the command
`!python3 run.py --do_train --task qa --dataset squad-retrain-data/train-v2.0.json --output_dir ./re_trained_model/`
change the dateset to load json by refering to https://huggingface.co/docs/d... |
https://github.com/huggingface/datasets/issues/3333 | load JSON files, get the errors | > does there have any function to be overwritten to do this?
ok, I overwrote the compute_loss, thank you. | Hi, does this bug be fixed? when I load JSON files, I get the same errors by the command
`!python3 run.py --do_train --task qa --dataset squad-retrain-data/train-v2.0.json --output_dir ./re_trained_model/`
change the dateset to load json by refering to https://huggingface.co/docs/datasets/loading.html
`dataset = ... | 19 | load JSON files, get the errors
Hi, does this bug be fixed? when I load JSON files, I get the same errors by the command
`!python3 run.py --do_train --task qa --dataset squad-retrain-data/train-v2.0.json --output_dir ./re_trained_model/`
change the dateset to load json by refering to https://huggingface.co/docs/d... |
https://github.com/huggingface/datasets/issues/3333 | load JSON files, get the errors | Hi, I add one field **example_id**, but I can't see it in the **comput_loss** function, how can I do this? below is the information of inputs
```
*********************** inputs: {'attention_mask': tensor([[1, 1, 1, ..., 0, 0, 0],
[1, 1, 1, ..., 0, 0, 0],
[1, 1, 1, ..., 0, 0, 0],
...,
... | Hi, does this bug be fixed? when I load JSON files, I get the same errors by the command
`!python3 run.py --do_train --task qa --dataset squad-retrain-data/train-v2.0.json --output_dir ./re_trained_model/`
change the dateset to load json by refering to https://huggingface.co/docs/datasets/loading.html
`dataset = ... | 576 | load JSON files, get the errors
Hi, does this bug be fixed? when I load JSON files, I get the same errors by the command
`!python3 run.py --do_train --task qa --dataset squad-retrain-data/train-v2.0.json --output_dir ./re_trained_model/`
change the dateset to load json by refering to https://huggingface.co/docs/d... |
https://github.com/huggingface/datasets/issues/5435 | Wrong statement in "Load a Dataset in Streaming mode" leads to data leakage | Thanks for reporting, @HaoyuYang59.
Please note that these are different "dataset" objects: our docs refer to Hugging Face `datasets.Dataset` and not to TensorFlow `tf.data.Dataset`.
Our `datasets.Dataset.shuffle` method does not have a `reshuffle_each_iteration` argument. Therefore, I would say the statement in ... | ### Describe the bug
In the [Split your dataset with take and skip](https://huggingface.co/docs/datasets/v1.10.2/dataset_streaming.html#split-your-dataset-with-take-and-skip), it states:
> Using take (or skip) prevents future calls to shuffle from shuffling the dataset shards order, otherwise the taken examples cou... | 77 | Wrong statement in "Load a Dataset in Streaming mode" leads to data leakage
### Describe the bug
In the [Split your dataset with take and skip](https://huggingface.co/docs/datasets/v1.10.2/dataset_streaming.html#split-your-dataset-with-take-and-skip), it states:
> Using take (or skip) prevents future calls to shuff... |
https://github.com/huggingface/datasets/issues/5435 | Wrong statement in "Load a Dataset in Streaming mode" leads to data leakage | Also note that you are referring to an outdated documentation page: datasets 1.10.2 version
Current datasets version is 2.8.0 and the corresponding documentation page is: https://huggingface.co/docs/datasets/stream#split-dataset | ### Describe the bug
In the [Split your dataset with take and skip](https://huggingface.co/docs/datasets/v1.10.2/dataset_streaming.html#split-your-dataset-with-take-and-skip), it states:
> Using take (or skip) prevents future calls to shuffle from shuffling the dataset shards order, otherwise the taken examples cou... | 26 | Wrong statement in "Load a Dataset in Streaming mode" leads to data leakage
### Describe the bug
In the [Split your dataset with take and skip](https://huggingface.co/docs/datasets/v1.10.2/dataset_streaming.html#split-your-dataset-with-take-and-skip), it states:
> Using take (or skip) prevents future calls to shuff... |
https://github.com/huggingface/datasets/issues/5435 | Wrong statement in "Load a Dataset in Streaming mode" leads to data leakage | Hi @albertvillanova thanks for your reply and your explaination here.
Sorry for the confusion as I'm not actually a user of your repo and I just happen to find the thread by Google (and didn't read carefully).
Great to know that and you made everything very clear now.
Thanks for your time and sorry for the co... | ### Describe the bug
In the [Split your dataset with take and skip](https://huggingface.co/docs/datasets/v1.10.2/dataset_streaming.html#split-your-dataset-with-take-and-skip), it states:
> Using take (or skip) prevents future calls to shuffle from shuffling the dataset shards order, otherwise the taken examples cou... | 63 | Wrong statement in "Load a Dataset in Streaming mode" leads to data leakage
### Describe the bug
In the [Split your dataset with take and skip](https://huggingface.co/docs/datasets/v1.10.2/dataset_streaming.html#split-your-dataset-with-take-and-skip), it states:
> Using take (or skip) prevents future calls to shuff... |
https://github.com/huggingface/datasets/issues/4691 | Dataset Viewer issue for rajistics/indian_food_images | Hi, thanks for reporting. I triggered a refresh of the preview for this dataset, and it works now. I'm not sure what occurred.
<img width="1019" alt="Capture d’écran 2022-07-18 à 11 01 52" src="https://user-images.githubusercontent.com/1676121/179541327-f62ecd5e-a18a-4d91-b316-9e2ebde77a28.png">
| ### Link
https://huggingface.co/datasets/rajistics/indian_food_images/viewer/rajistics--indian_food_images/train
### Description
I have a train/test split in my dataset
<img width="410" alt="Screen Shot 2022-07-15 at 11 44 42 AM" src="https://user-images.githubusercontent.com/6808012/179293215-7b419ec3-3527-46f2-8... | 33 | Dataset Viewer issue for rajistics/indian_food_images
### Link
https://huggingface.co/datasets/rajistics/indian_food_images/viewer/rajistics--indian_food_images/train
### Description
I have a train/test split in my dataset
<img width="410" alt="Screen Shot 2022-07-15 at 11 44 42 AM" src="https://user-images.github... |
https://github.com/huggingface/datasets/issues/3358 | add new field, and get errors | Hi,
could you please post this question on our [Forum](https://discuss.huggingface.co/) as we keep issues for bugs and feature requests? | after adding new field **tokenized_examples["example_id"]**, and get errors below,
I think it is due to changing data to tensor, and **tokenized_examples["example_id"]** is string list
**all fields**
```
***************** train_dataset 1: Dataset({
features: ['attention_mask', 'end_positions', 'example_id', '... | 19 | add new field, and get errors
after adding new field **tokenized_examples["example_id"]**, and get errors below,
I think it is due to changing data to tensor, and **tokenized_examples["example_id"]** is string list
**all fields**
```
***************** train_dataset 1: Dataset({
features: ['attention_mask', 'e... |
https://github.com/huggingface/datasets/issues/3358 | add new field, and get errors | > Hi,
>
> could you please post this question on our [Forum](https://discuss.huggingface.co/) as we keep issues for bugs and feature requests?
ok. | after adding new field **tokenized_examples["example_id"]**, and get errors below,
I think it is due to changing data to tensor, and **tokenized_examples["example_id"]** is string list
**all fields**
```
***************** train_dataset 1: Dataset({
features: ['attention_mask', 'end_positions', 'example_id', '... | 23 | add new field, and get errors
after adding new field **tokenized_examples["example_id"]**, and get errors below,
I think it is due to changing data to tensor, and **tokenized_examples["example_id"]** is string list
**all fields**
```
***************** train_dataset 1: Dataset({
features: ['attention_mask', 'e... |
https://github.com/huggingface/datasets/issues/6057 | Why is the speed difference of gen example so big? | Hi!
It's hard to explain this behavior without more information. Can you profile the slower version with the following code
```python
import cProfile, pstats
from datasets import load_dataset
with cProfile.Profile() as profiler:
ds = load_dataset(...)
stats = pstats.Stats(profiler).sort_stats("cumtime"... | ```python
def _generate_examples(self, metadata_path, images_dir, conditioning_images_dir):
with open(metadata_path, 'r') as file:
metadata = json.load(file)
for idx, item in enumerate(metadata):
image_path = item.get('image_path')
text_content = item.get('tex... | 44 | Why is the speed difference of gen example so big?
```python
def _generate_examples(self, metadata_path, images_dir, conditioning_images_dir):
with open(metadata_path, 'r') as file:
metadata = json.load(file)
for idx, item in enumerate(metadata):
image_path = item.get('ima... |
https://github.com/huggingface/datasets/issues/6753 | Type error when importing datasets on Kaggle | I have the same problem
It seems that it only appears when you are using GPU
It seems to work fine with the 2.17 version though | ### Describe the bug
When trying to run
```
import datasets
print(datasets.__version__)
```
It generates the following error
```
TypeError: expected string or bytes-like object
```
It looks like It cannot find the valid versions of `fsspec`
though fsspec version is fine when I checked Via command
... | 26 | Type error when importing datasets on Kaggle
### Describe the bug
When trying to run
```
import datasets
print(datasets.__version__)
```
It generates the following error
```
TypeError: expected string or bytes-like object
```
It looks like It cannot find the valid versions of `fsspec`
though fsspec... |
https://github.com/huggingface/datasets/issues/6753 | Type error when importing datasets on Kaggle | > I have the same problem
> It seems that it only appears when you are using GPU
> It seems to work fine with the 2.17 version though
I downgraded from 2.18 to 2.17, and it works with CPU/GPU .. except now pyarrow complains
```
...
File /opt/conda/lib/python3.10/site-packages/pyarrow/array.pxi:830, in pyarrow... | ### Describe the bug
When trying to run
```
import datasets
print(datasets.__version__)
```
It generates the following error
```
TypeError: expected string or bytes-like object
```
It looks like It cannot find the valid versions of `fsspec`
though fsspec version is fine when I checked Via command
... | 64 | Type error when importing datasets on Kaggle
### Describe the bug
When trying to run
```
import datasets
print(datasets.__version__)
```
It generates the following error
```
TypeError: expected string or bytes-like object
```
It looks like It cannot find the valid versions of `fsspec`
though fsspec... |
https://github.com/huggingface/datasets/issues/6753 | Type error when importing datasets on Kaggle | I think you should remain open this issue. It works at the previous version but not the latter versions. It is possible as a bug that the maintainer could take note for. | ### Describe the bug
When trying to run
```
import datasets
print(datasets.__version__)
```
It generates the following error
```
TypeError: expected string or bytes-like object
```
It looks like It cannot find the valid versions of `fsspec`
though fsspec version is fine when I checked Via command
... | 32 | Type error when importing datasets on Kaggle
### Describe the bug
When trying to run
```
import datasets
print(datasets.__version__)
```
It generates the following error
```
TypeError: expected string or bytes-like object
```
It looks like It cannot find the valid versions of `fsspec`
though fsspec... |
https://github.com/huggingface/datasets/issues/6753 | Type error when importing datasets on Kaggle | > Solved for me by downgrading `!pip install -U datasets==2.16.0` Works with gpu as well
Verified it's working w/ GPU if I make these 3 updates.
```
datasets==2.16.0
fsspec==2023.10.0
gcsfs==2023.10.0
```
but the issue shouldn't be closed, this is just a workaround until they get the issue with 2.18.0 reso... | ### Describe the bug
When trying to run
```
import datasets
print(datasets.__version__)
```
It generates the following error
```
TypeError: expected string or bytes-like object
```
It looks like It cannot find the valid versions of `fsspec`
though fsspec version is fine when I checked Via command
... | 53 | Type error when importing datasets on Kaggle
### Describe the bug
When trying to run
```
import datasets
print(datasets.__version__)
```
It generates the following error
```
TypeError: expected string or bytes-like object
```
It looks like It cannot find the valid versions of `fsspec`
though fsspec... |
https://github.com/huggingface/datasets/issues/6753 | Type error when importing datasets on Kaggle | > > Solved for me by downgrading `!pip install -U datasets==2.16.0` Works with gpu as well
>
> Verified it's working w/ GPU if I make these 3 updates.
>
> ```
> datasets==2.16.0
> fsspec==2023.10.0
> gcsfs==2023.10.0
> ```
>
> but the issue shouldn't be closed, this is just a workaround until they get the ... | ### Describe the bug
When trying to run
```
import datasets
print(datasets.__version__)
```
It generates the following error
```
TypeError: expected string or bytes-like object
```
It looks like It cannot find the valid versions of `fsspec`
though fsspec version is fine when I checked Via command
... | 72 | Type error when importing datasets on Kaggle
### Describe the bug
When trying to run
```
import datasets
print(datasets.__version__)
```
It generates the following error
```
TypeError: expected string or bytes-like object
```
It looks like It cannot find the valid versions of `fsspec`
though fsspec... |
https://github.com/huggingface/datasets/issues/6753 | Type error when importing datasets on Kaggle | I am seeing similar error but with pandas while using kaggle kernel.
`---> 38 PANDAS_VERSION = version.parse(importlib.metadata.version("pandas"))
TypeError: expected string or bytes-like object
` | ### Describe the bug
When trying to run
```
import datasets
print(datasets.__version__)
```
It generates the following error
```
TypeError: expected string or bytes-like object
```
It looks like It cannot find the valid versions of `fsspec`
though fsspec version is fine when I checked Via command
... | 24 | Type error when importing datasets on Kaggle
### Describe the bug
When trying to run
```
import datasets
print(datasets.__version__)
```
It generates the following error
```
TypeError: expected string or bytes-like object
```
It looks like It cannot find the valid versions of `fsspec`
though fsspec... |
https://github.com/huggingface/datasets/issues/5842 | Remove columns in interable dataset | This method has been recently added to the `IterableDataset`, so you need to update the `datasets`' installation (`pip install -U datasets`) to use it. | ### Feature request
Right now, remove_columns() produces a NotImplementedError for iterable style datasets
### Motivation
It would be great to have the same functionality irrespective of whether one is using an iterable or a map-style dataset
### Your contribution
hope and courage. | 24 | Remove columns in interable dataset
### Feature request
Right now, remove_columns() produces a NotImplementedError for iterable style datasets
### Motivation
It would be great to have the same functionality irrespective of whether one is using an iterable or a map-style dataset
### Your contribution
hope and coura... |
https://github.com/huggingface/datasets/issues/3644 | Add a GROUP BY operator | Hi ! At the moment you can use `to_pandas()` to get a pandas DataFrame that supports `group_by` operations (make sure your dataset fits in memory though)
We use Arrow as a back-end for `datasets` and it doesn't have native group by (see https://github.com/apache/arrow/issues/2189) unfortunately.
I just drafted wh... | **Is your feature request related to a problem? Please describe.**
Using batch mapping, we can easily split examples. However, we lack an appropriate option for merging them back together by some key. Consider this example:
```python
# features:
# {
# "example_id": datasets.Value("int32"),
# "text": datas... | 271 | Add a GROUP BY operator
**Is your feature request related to a problem? Please describe.**
Using batch mapping, we can easily split examples. However, we lack an appropriate option for merging them back together by some key. Consider this example:
```python
# features:
# {
# "example_id": datasets.Value("int3... |
https://github.com/huggingface/datasets/issues/3644 | Add a GROUP BY operator | @lhoestq As of PyArrow 7.0.0, `pa.Table` has the [`group_by` method](https://arrow.apache.org/docs/python/generated/pyarrow.Table.html#pyarrow.Table.group_by), so we should also consider using that function for grouping. | **Is your feature request related to a problem? Please describe.**
Using batch mapping, we can easily split examples. However, we lack an appropriate option for merging them back together by some key. Consider this example:
```python
# features:
# {
# "example_id": datasets.Value("int32"),
# "text": datas... | 20 | Add a GROUP BY operator
**Is your feature request related to a problem? Please describe.**
Using batch mapping, we can easily split examples. However, we lack an appropriate option for merging them back together by some key. Consider this example:
```python
# features:
# {
# "example_id": datasets.Value("int3... |
https://github.com/huggingface/datasets/issues/3644 | Add a GROUP BY operator | Hi, I have a similar issue as OP but the suggested solutions do not work for my case. Basically, I process documents through a model to extract the last_hidden_state, using the "map" method on a Dataset object, but would like to average the result over a categorical column at the end (i.e. groupby this column).
- A to... | **Is your feature request related to a problem? Please describe.**
Using batch mapping, we can easily split examples. However, we lack an appropriate option for merging them back together by some key. Consider this example:
```python
# features:
# {
# "example_id": datasets.Value("int32"),
# "text": datas... | 111 | Add a GROUP BY operator
**Is your feature request related to a problem? Please describe.**
Using batch mapping, we can easily split examples. However, we lack an appropriate option for merging them back together by some key. Consider this example:
```python
# features:
# {
# "example_id": datasets.Value("int3... |
https://github.com/huggingface/datasets/issues/3644 | Add a GROUP BY operator | > Hi, I have a similar issue as OP but the suggested solutions do not work for my case. Basically, I process documents through a model to extract the last_hidden_state, using the "map" method on a Dataset object, but would like to average the result over a categorical column at the end (i.e. groupby this column).
I... | **Is your feature request related to a problem? Please describe.**
Using batch mapping, we can easily split examples. However, we lack an appropriate option for merging them back together by some key. Consider this example:
```python
# features:
# {
# "example_id": datasets.Value("int32"),
# "text": datas... | 266 | Add a GROUP BY operator
**Is your feature request related to a problem? Please describe.**
Using batch mapping, we can easily split examples. However, we lack an appropriate option for merging them back together by some key. Consider this example:
```python
# features:
# {
# "example_id": datasets.Value("int3... |
https://github.com/huggingface/datasets/issues/3644 | Add a GROUP BY operator | Hi @davanstrien , thanks a lot, I didn't know about this library and the answer works! I need to try it on the full dataset now, but I'm hopeful. Here's what my code looks like:
```
list_size = 768
df.groupby("date").agg(
pl.concat_list(
[
pl.col("hidden_state")
.arr.slice(n, ... | **Is your feature request related to a problem? Please describe.**
Using batch mapping, we can easily split examples. However, we lack an appropriate option for merging them back together by some key. Consider this example:
```python
# features:
# {
# "example_id": datasets.Value("int32"),
# "text": datas... | 99 | Add a GROUP BY operator
**Is your feature request related to a problem? Please describe.**
Using batch mapping, we can easily split examples. However, we lack an appropriate option for merging them back together by some key. Consider this example:
```python
# features:
# {
# "example_id": datasets.Value("int3... |
https://github.com/huggingface/datasets/issues/3644 | Add a GROUP BY operator | I find this functionality missing in my workflow as well and the workarounds with SQL and Polars unsatisfying. Since PyArrow has exposed this functionality, I hope this soon makes it into a release. (: | **Is your feature request related to a problem? Please describe.**
Using batch mapping, we can easily split examples. However, we lack an appropriate option for merging them back together by some key. Consider this example:
```python
# features:
# {
# "example_id": datasets.Value("int32"),
# "text": datas... | 34 | Add a GROUP BY operator
**Is your feature request related to a problem? Please describe.**
Using batch mapping, we can easily split examples. However, we lack an appropriate option for merging them back together by some key. Consider this example:
```python
# features:
# {
# "example_id": datasets.Value("int3... |
https://github.com/huggingface/datasets/issues/3644 | Add a GROUP BY operator | We added a proper Polars integration at #3334 if it can help:
```python
>>> from datasets import load_dataset
>>> ds = load_dataset("TheBritishLibrary/blbooks", "1700_1799", split="train")
>>> ds.to_polars().groupby('date').len()
┌─────────────────────┬──────┐
│ date ┆ len │
│ --- ... | **Is your feature request related to a problem? Please describe.**
Using batch mapping, we can easily split examples. However, we lack an appropriate option for merging them back together by some key. Consider this example:
```python
# features:
# {
# "example_id": datasets.Value("int32"),
# "text": datas... | 110 | Add a GROUP BY operator
**Is your feature request related to a problem? Please describe.**
Using batch mapping, we can easily split examples. However, we lack an appropriate option for merging them back together by some key. Consider this example:
```python
# features:
# {
# "example_id": datasets.Value("int3... |
https://github.com/huggingface/datasets/issues/3644 | Add a GROUP BY operator | According to the [polars docs](https://docs.pola.rs/api/python/dev/reference/api/polars.from_arrow.html):
> This operation will be zero copy for the most part. Types that are not supported by Polars may be cast to the closest supported type.
which means that for the most part the memory mapped data is not copied, so ... | **Is your feature request related to a problem? Please describe.**
Using batch mapping, we can easily split examples. However, we lack an appropriate option for merging them back together by some key. Consider this example:
```python
# features:
# {
# "example_id": datasets.Value("int32"),
# "text": datas... | 53 | Add a GROUP BY operator
**Is your feature request related to a problem? Please describe.**
Using batch mapping, we can easily split examples. However, we lack an appropriate option for merging them back together by some key. Consider this example:
```python
# features:
# {
# "example_id": datasets.Value("int3... |
https://github.com/huggingface/datasets/issues/5881 | Split dataset by node: index error when sharding iterable dataset | cc @lhoestq in case you have any ideas here! Might need a multi-host set-up to debug (can give you access to a JAX one if you need) | ### Describe the bug
Context: we're splitting an iterable dataset by node and then passing it to a torch data loader with multiple workers
When we iterate over it for 5 steps, we don't get an error
When we instead iterate over it for 8 steps, we get an `IndexError` when fetching the data if we have too many wo... | 27 | Split dataset by node: index error when sharding iterable dataset
### Describe the bug
Context: we're splitting an iterable dataset by node and then passing it to a torch data loader with multiple workers
When we iterate over it for 5 steps, we don't get an error
When we instead iterate over it for 8 steps, we... |
https://github.com/huggingface/datasets/issues/5881 | Split dataset by node: index error when sharding iterable dataset | I am also facing the same problem. Could you let me know if you found a solution for this? | ### Describe the bug
Context: we're splitting an iterable dataset by node and then passing it to a torch data loader with multiple workers
When we iterate over it for 5 steps, we don't get an error
When we instead iterate over it for 8 steps, we get an `IndexError` when fetching the data if we have too many wo... | 19 | Split dataset by node: index error when sharding iterable dataset
### Describe the bug
Context: we're splitting an iterable dataset by node and then passing it to a torch data loader with multiple workers
When we iterate over it for 5 steps, we don't get an error
When we instead iterate over it for 8 steps, we... |
https://github.com/huggingface/datasets/issues/5881 | Split dataset by node: index error when sharding iterable dataset | I couldn't reproduce with the latest version of `datasets` 2.16.1, can you update `datasets` and try again ? | ### Describe the bug
Context: we're splitting an iterable dataset by node and then passing it to a torch data loader with multiple workers
When we iterate over it for 5 steps, we don't get an error
When we instead iterate over it for 8 steps, we get an `IndexError` when fetching the data if we have too many wo... | 18 | Split dataset by node: index error when sharding iterable dataset
### Describe the bug
Context: we're splitting an iterable dataset by node and then passing it to a torch data loader with multiple workers
When we iterate over it for 5 steps, we don't get an error
When we instead iterate over it for 8 steps, we... |
https://github.com/huggingface/datasets/issues/5881 | Split dataset by node: index error when sharding iterable dataset | I have a similar issue when sharding for multiple nodes. I am using datasets 3.2.0.
```
Processing shard 2/129
Shard has 10000 entries
Traceback (most recent call last):
File "/pfss/mlde/workspaces/mlde_wsp_KIServiceCenter/finngu/LlavaGuard/src/experiments/datasets/imagenet/entrypoint_download.py", line 39, in <modu... | ### Describe the bug
Context: we're splitting an iterable dataset by node and then passing it to a torch data loader with multiple workers
When we iterate over it for 5 steps, we don't get an error
When we instead iterate over it for 8 steps, we get an `IndexError` when fetching the data if we have too many wo... | 80 | Split dataset by node: index error when sharding iterable dataset
### Describe the bug
Context: we're splitting an iterable dataset by node and then passing it to a torch data loader with multiple workers
When we iterate over it for 5 steps, we don't get an error
When we instead iterate over it for 8 steps, we... |
https://github.com/huggingface/datasets/issues/5881 | Split dataset by node: index error when sharding iterable dataset | Hi ! on which dataset ? can you share a code example that reproduces the issue ? | ### Describe the bug
Context: we're splitting an iterable dataset by node and then passing it to a torch data loader with multiple workers
When we iterate over it for 5 steps, we don't get an error
When we instead iterate over it for 8 steps, we get an `IndexError` when fetching the data if we have too many wo... | 17 | Split dataset by node: index error when sharding iterable dataset
### Describe the bug
Context: we're splitting an iterable dataset by node and then passing it to a torch data loader with multiple workers
When we iterate over it for 5 steps, we don't get an error
When we instead iterate over it for 8 steps, we... |
https://github.com/huggingface/datasets/issues/7869 | Why does dataset merge fail when tools have different parameters? | Hi @hitszxs,
This is indeed by design,
The `datasets` library is built on top of [Apache Arrow](https://arrow.apache.org/), which uses a **columnar storage format** with strict schema requirements. When you try to concatenate/merge datasets, the library checks if features can be aligned using the [`_check_if_features... | Hi, I have a question about SFT (Supervised Fine-tuning) for an agent model.
Suppose I want to fine-tune an agent model that may receive two different tools: tool1 and tool2. These tools have different parameters and types in their schema definitions.
When I try to merge datasets containing different tool definitions... | 117 | Why does dataset merge fail when tools have different parameters?
Hi, I have a question about SFT (Supervised Fine-tuning) for an agent model.
Suppose I want to fine-tune an agent model that may receive two different tools: tool1 and tool2. These tools have different parameters and types in their schema definitions.
... |
https://github.com/huggingface/datasets/issues/7869 | Why does dataset merge fail when tools have different parameters? | Hi ! with #8027 you will be able to use the `Json()` type for tool fields where you need to store dictionaries with arbitrary keys and values. For example you can define the features of a tool calling dataset like this:
```python
from datasets import Features, Json, List, Value
features = Features({
'messages': L... | Hi, I have a question about SFT (Supervised Fine-tuning) for an agent model.
Suppose I want to fine-tune an agent model that may receive two different tools: tool1 and tool2. These tools have different parameters and types in their schema definitions.
When I try to merge datasets containing different tool definitions... | 127 | Why does dataset merge fail when tools have different parameters?
Hi, I have a question about SFT (Supervised Fine-tuning) for an agent model.
Suppose I want to fine-tune an agent model that may receive two different tools: tool1 and tool2. These tools have different parameters and types in their schema definitions.
... |
https://github.com/huggingface/datasets/issues/4031 | Cannot load the dataset conll2012_ontonotesv5 | Hi @cathyxl, thanks for reporting.
Indeed, we have recently updated the loading script of that dataset (and fixed that bug as well):
- #4002
That fix will be available in our next `datasets` library release. In the meantime, you can incorporate that fix by:
- installing `datasets` from our GitHub repo:
```bash... | ## Describe the bug
Cannot load the dataset conll2012_ontonotesv5
## Steps to reproduce the bug
```python
# Sample code to reproduce the bug
from datasets import load_dataset
dataset = load_dataset('conll2012_ontonotesv5', 'english_v4', split="test")
print(dataset)
```
## Expected results
The datasets s... | 82 | Cannot load the dataset conll2012_ontonotesv5
## Describe the bug
Cannot load the dataset conll2012_ontonotesv5
## Steps to reproduce the bug
```python
# Sample code to reproduce the bug
from datasets import load_dataset
dataset = load_dataset('conll2012_ontonotesv5', 'english_v4', split="test")
print(dataset)... |
https://github.com/huggingface/datasets/issues/7493 | push_to_hub does not upload videos | Hi ! the `Video` type is still experimental, and in particular `push_to_hub` doesn't upload videos at the moment (only the paths).
There is an open question to either upload the videos inside the Parquet files, or rather have them as separate files (which is great to enable remote seeking/streaming) | ### Describe the bug
Hello,
I would like to upload a video dataset (some .mp4 files and some segments within them), i.e. rows correspond to subsequences from videos. Videos might be referenced by several rows.
I created a dataset locally and it references the videos and the video readers can read them correctly. I u... | 49 | push_to_hub does not upload videos
### Describe the bug
Hello,
I would like to upload a video dataset (some .mp4 files and some segments within them), i.e. rows correspond to subsequences from videos. Videos might be referenced by several rows.
I created a dataset locally and it references the videos and the video r... |
https://github.com/huggingface/datasets/issues/7493 | push_to_hub does not upload videos | im having the same issue (btw i mistook this to be xet error https://huggingface.co/spaces/xet-team/README/discussions/4 )
@jsulz suggested me to use `upload_folder` but it exceeds hf limits (>10k files per folder and >100k files in total)
from my reading of the docs, in my case i have to save as either parquet or we... | ### Describe the bug
Hello,
I would like to upload a video dataset (some .mp4 files and some segments within them), i.e. rows correspond to subsequences from videos. Videos might be referenced by several rows.
I created a dataset locally and it references the videos and the video readers can read them correctly. I u... | 83 | push_to_hub does not upload videos
### Describe the bug
Hello,
I would like to upload a video dataset (some .mp4 files and some segments within them), i.e. rows correspond to subsequences from videos. Videos might be referenced by several rows.
I created a dataset locally and it references the videos and the video r... |
https://github.com/huggingface/datasets/issues/7493 | push_to_hub does not upload videos | I just added support in push_to_hub() for videos :)
Note a small discrepancy for video datasets I hope to fix soon:
- `load_dataset("username/my-folder-of-videos", streaming=True)` -> videos are lazy loaded one by one when iterating, and only actually downloaded when accessing frames in torchcodec (only the requested... | ### Describe the bug
Hello,
I would like to upload a video dataset (some .mp4 files and some segments within them), i.e. rows correspond to subsequences from videos. Videos might be referenced by several rows.
I created a dataset locally and it references the videos and the video readers can read them correctly. I u... | 74 | push_to_hub does not upload videos
### Describe the bug
Hello,
I would like to upload a video dataset (some .mp4 files and some segments within them), i.e. rows correspond to subsequences from videos. Videos might be referenced by several rows.
I created a dataset locally and it references the videos and the video r... |
https://github.com/huggingface/datasets/issues/7792 | Concatenate IterableDataset instances and distribute underlying shards in a RoundRobin manner | # With `datasets.Dataset`
Here is an small script that shows the distribution differences of samples between `interleave_datasets`, `concatenate_datasets` and `concatenate_datasets` + shuffling.
```python
import datasets as hf_datasets
def gen(dataset: int, n_samples: int):
for i in range(n_samples):
yie... | ### Feature request
I would like to be able to concatenate multiple `IterableDataset` with possibly different features. I would like to then be able to stream the results in parallel (both using DDP and multiple workers in the pytorch DataLoader). I want the merge of datasets to be well balanced between the different ... | 349 | Concatenate IterableDataset instances and distribute underlying shards in a RoundRobin manner
### Feature request
I would like to be able to concatenate multiple `IterableDataset` with possibly different features. I would like to then be able to stream the results in parallel (both using DDP and multiple workers in th... |
https://github.com/huggingface/datasets/issues/7792 | Concatenate IterableDataset instances and distribute underlying shards in a RoundRobin manner | # With `datasets.IterableDataset`
The above works for `Dataset`, but with a sharded `IterableDataset` some data get discarded. See the following results obtained with the script below.
> Simulate run with 3 workers
> Interleave datasets
Worker 0 process sample 0 {'dataset': 0, 'sample': 0}
Worker 1 fails with list i... | ### Feature request
I would like to be able to concatenate multiple `IterableDataset` with possibly different features. I would like to then be able to stream the results in parallel (both using DDP and multiple workers in the pytorch DataLoader). I want the merge of datasets to be well balanced between the different ... | 736 | Concatenate IterableDataset instances and distribute underlying shards in a RoundRobin manner
### Feature request
I would like to be able to concatenate multiple `IterableDataset` with possibly different features. I would like to then be able to stream the results in parallel (both using DDP and multiple workers in th... |
https://github.com/huggingface/datasets/issues/7792 | Concatenate IterableDataset instances and distribute underlying shards in a RoundRobin manner | # Larger Experiment
> The example is quite small, showing that some data get discarded, but on large datasets is this significant?
Continuing the experiment above, but with 3 larger and unbalanced datasets, with respectively 1000, 150, and 300 samples, and a dataloader with 4 workers:
> Interleave datasets
With dat... | ### Feature request
I would like to be able to concatenate multiple `IterableDataset` with possibly different features. I would like to then be able to stream the results in parallel (both using DDP and multiple workers in the pytorch DataLoader). I want the merge of datasets to be well balanced between the different ... | 218 | Concatenate IterableDataset instances and distribute underlying shards in a RoundRobin manner
### Feature request
I would like to be able to concatenate multiple `IterableDataset` with possibly different features. I would like to then be able to stream the results in parallel (both using DDP and multiple workers in th... |
https://github.com/huggingface/datasets/issues/7792 | Concatenate IterableDataset instances and distribute underlying shards in a RoundRobin manner | > I believe this PR could solve your issue? :)
Thank you @lhoestq for the reply.
I have just tested it with the script above. It gives:
> Interleave datasets without replacement
With dataloader
Too many dataloader workers: 4 (max is dataset.num_shards=1). Stopping 3 dataloader workers.
Yield 705 samples
If we compar... | ### Feature request
I would like to be able to concatenate multiple `IterableDataset` with possibly different features. I would like to then be able to stream the results in parallel (both using DDP and multiple workers in the pytorch DataLoader). I want the merge of datasets to be well balanced between the different ... | 91 | Concatenate IterableDataset instances and distribute underlying shards in a RoundRobin manner
### Feature request
I would like to be able to concatenate multiple `IterableDataset` with possibly different features. I would like to then be able to stream the results in parallel (both using DDP and multiple workers in th... |
https://github.com/huggingface/datasets/issues/7792 | Concatenate IterableDataset instances and distribute underlying shards in a RoundRobin manner | @LTMeyer With the following script and using the code from #7786 I get all 1450 samples
```
import datasets as hf_datasets
def gen(dataset: int, n_samples: int):
for i in range(n_samples):
yield {"dataset": dataset, "sample": i}
ds_1 = hf_datasets.Dataset.from_generator(gen, gen_kwargs={"dataset": 0, "... | ### Feature request
I would like to be able to concatenate multiple `IterableDataset` with possibly different features. I would like to then be able to stream the results in parallel (both using DDP and multiple workers in the pytorch DataLoader). I want the merge of datasets to be well balanced between the different ... | 100 | Concatenate IterableDataset instances and distribute underlying shards in a RoundRobin manner
### Feature request
I would like to be able to concatenate multiple `IterableDataset` with possibly different features. I would like to then be able to stream the results in parallel (both using DDP and multiple workers in th... |
https://github.com/huggingface/datasets/issues/7792 | Concatenate IterableDataset instances and distribute underlying shards in a RoundRobin manner | > [@LTMeyer](https://github.com/LTMeyer) With the following script and using the code from [#7786](https://github.com/huggingface/datasets/pull/7786) I get all 1450 samples
This depends on the number of shards and the number of processes being used.
In the example below there is only one shard per dataset (the default... | ### Feature request
I would like to be able to concatenate multiple `IterableDataset` with possibly different features. I would like to then be able to stream the results in parallel (both using DDP and multiple workers in the pytorch DataLoader). I want the merge of datasets to be well balanced between the different ... | 510 | Concatenate IterableDataset instances and distribute underlying shards in a RoundRobin manner
### Feature request
I would like to be able to concatenate multiple `IterableDataset` with possibly different features. I would like to then be able to stream the results in parallel (both using DDP and multiple workers in th... |
https://github.com/huggingface/datasets/issues/7792 | Concatenate IterableDataset instances and distribute underlying shards in a RoundRobin manner | I added a small fix to your PR @radulescupetru to try to make @LTMeyer 's example work :)
Can you confirm it works for you now @LTMeyer ?
Note that maximum parallelism requires each subset to have num_shards >= num_workers, otherwise there aren't enough shards to distribute to every worker for interleaving. In your e... | ### Feature request
I would like to be able to concatenate multiple `IterableDataset` with possibly different features. I would like to then be able to stream the results in parallel (both using DDP and multiple workers in the pytorch DataLoader). I want the merge of datasets to be well balanced between the different ... | 72 | Concatenate IterableDataset instances and distribute underlying shards in a RoundRobin manner
### Feature request
I would like to be able to concatenate multiple `IterableDataset` with possibly different features. I would like to then be able to stream the results in parallel (both using DDP and multiple workers in th... |
https://github.com/huggingface/datasets/issues/7792 | Concatenate IterableDataset instances and distribute underlying shards in a RoundRobin manner | > Can you confirm it works for you now [@LTMeyer](https://github.com/LTMeyer) ?
Result with https://github.com/huggingface/datasets/pull/7786/commits/a547d81469128bea4acc3bcc2a4a6a95968936ee:
```
Dataloader with 0 workers.
1450 processed samples
Dataloader with 1 workers.
1450 processed samples
Dataloader with 2 worke... | ### Feature request
I would like to be able to concatenate multiple `IterableDataset` with possibly different features. I would like to then be able to stream the results in parallel (both using DDP and multiple workers in the pytorch DataLoader). I want the merge of datasets to be well balanced between the different ... | 295 | Concatenate IterableDataset instances and distribute underlying shards in a RoundRobin manner
### Feature request
I would like to be able to concatenate multiple `IterableDataset` with possibly different features. I would like to then be able to stream the results in parallel (both using DDP and multiple workers in th... |
https://github.com/huggingface/datasets/issues/7792 | Concatenate IterableDataset instances and distribute underlying shards in a RoundRobin manner | @LTMeyer I think it's just a design choice that datasets library took. From my interaction with it, it seems that even when concatenating or interleaving, individual components are still treated individually (for example, num_shards is not summed).
I guess in a real scenario you wouldn't end up with 1 shard only, but... | ### Feature request
I would like to be able to concatenate multiple `IterableDataset` with possibly different features. I would like to then be able to stream the results in parallel (both using DDP and multiple workers in the pytorch DataLoader). I want the merge of datasets to be well balanced between the different ... | 114 | Concatenate IterableDataset instances and distribute underlying shards in a RoundRobin manner
### Feature request
I would like to be able to concatenate multiple `IterableDataset` with possibly different features. I would like to then be able to stream the results in parallel (both using DDP and multiple workers in th... |
https://github.com/huggingface/datasets/issues/7792 | Concatenate IterableDataset instances and distribute underlying shards in a RoundRobin manner | > [@LTMeyer](https://github.com/LTMeyer) I think it's just a design choice that datasets library took. From my interaction with it, it seems that even when concatenating or interleaving, individual components are still treated individually (for example, num_shards is not summed).
Indeed. I am curious to know if there ... | ### Feature request
I would like to be able to concatenate multiple `IterableDataset` with possibly different features. I would like to then be able to stream the results in parallel (both using DDP and multiple workers in the pytorch DataLoader). I want the merge of datasets to be well balanced between the different ... | 562 | Concatenate IterableDataset instances and distribute underlying shards in a RoundRobin manner
### Feature request
I would like to be able to concatenate multiple `IterableDataset` with possibly different features. I would like to then be able to stream the results in parallel (both using DDP and multiple workers in th... |
https://github.com/huggingface/datasets/issues/7792 | Concatenate IterableDataset instances and distribute underlying shards in a RoundRobin manner | When concatenating or interleaving, the resulting `num_shards` is the *minimum `num_shards` of the input datasets*. This allows each new shard to always contain data from every input dataset. This ensures in every shard the right sampling when interleaving and the right data order when concatenating.
Summing the datas... | ### Feature request
I would like to be able to concatenate multiple `IterableDataset` with possibly different features. I would like to then be able to stream the results in parallel (both using DDP and multiple workers in the pytorch DataLoader). I want the merge of datasets to be well balanced between the different ... | 70 | Concatenate IterableDataset instances and distribute underlying shards in a RoundRobin manner
### Feature request
I would like to be able to concatenate multiple `IterableDataset` with possibly different features. I would like to then be able to stream the results in parallel (both using DDP and multiple workers in th... |
https://github.com/huggingface/datasets/issues/7792 | Concatenate IterableDataset instances and distribute underlying shards in a RoundRobin manner | Thank you @lhoestq, it makes perfect sense. The part I am missing is that if I concatenate many datasets with small number of shards it will result in a global dataset with not so many shards, thus limiting the use of available workers. Data loading will be consequently inefficient. I was looking for a solution to leve... | ### Feature request
I would like to be able to concatenate multiple `IterableDataset` with possibly different features. I would like to then be able to stream the results in parallel (both using DDP and multiple workers in the pytorch DataLoader). I want the merge of datasets to be well balanced between the different ... | 240 | Concatenate IterableDataset instances and distribute underlying shards in a RoundRobin manner
### Feature request
I would like to be able to concatenate multiple `IterableDataset` with possibly different features. I would like to then be able to stream the results in parallel (both using DDP and multiple workers in th... |
https://github.com/huggingface/datasets/issues/7792 | Concatenate IterableDataset instances and distribute underlying shards in a RoundRobin manner | Also, I notice in the example above that if we modify the number of shards, we get different number of samples per GPU and workers even with the implementation of @radulescupetru. This will cause a deadlock in the DDP. So I guess HF expects all shards to contain the same number of samples. Is that a correct assumption ... | ### Feature request
I would like to be able to concatenate multiple `IterableDataset` with possibly different features. I would like to then be able to stream the results in parallel (both using DDP and multiple workers in the pytorch DataLoader). I want the merge of datasets to be well balanced between the different ... | 364 | Concatenate IterableDataset instances and distribute underlying shards in a RoundRobin manner
### Feature request
I would like to be able to concatenate multiple `IterableDataset` with possibly different features. I would like to then be able to stream the results in parallel (both using DDP and multiple workers in th... |
https://github.com/huggingface/datasets/issues/7792 | Concatenate IterableDataset instances and distribute underlying shards in a RoundRobin manner | I see @LTMeyer, that makes sense. Do you think we should sum the shards by default for concatenating then ? I feel like your use case is more important than ensuring each worker has data of every subdataset in order.
(I wouldn't touch the interleaving logic though)
> Also, I notice in the example above that if we mod... | ### Feature request
I would like to be able to concatenate multiple `IterableDataset` with possibly different features. I would like to then be able to stream the results in parallel (both using DDP and multiple workers in the pytorch DataLoader). I want the merge of datasets to be well balanced between the different ... | 203 | Concatenate IterableDataset instances and distribute underlying shards in a RoundRobin manner
### Feature request
I would like to be able to concatenate multiple `IterableDataset` with possibly different features. I would like to then be able to stream the results in parallel (both using DDP and multiple workers in th... |
https://github.com/huggingface/datasets/issues/7792 | Concatenate IterableDataset instances and distribute underlying shards in a RoundRobin manner | To summarize, and highlight the distinction with https://github.com/huggingface/datasets/pull/7786, there are actually two feature requests:
1. Similarly to `interleave_datasets`, we want to interleave the longest dataset without repetition. This is handled by https://github.com/huggingface/datasets/pull/7786, and is c... | ### Feature request
I would like to be able to concatenate multiple `IterableDataset` with possibly different features. I would like to then be able to stream the results in parallel (both using DDP and multiple workers in the pytorch DataLoader). I want the merge of datasets to be well balanced between the different ... | 259 | Concatenate IterableDataset instances and distribute underlying shards in a RoundRobin manner
### Feature request
I would like to be able to concatenate multiple `IterableDataset` with possibly different features. I would like to then be able to stream the results in parallel (both using DDP and multiple workers in th... |
https://github.com/huggingface/datasets/issues/7792 | Concatenate IterableDataset instances and distribute underlying shards in a RoundRobin manner | I'm closing this issue because of several existing solutions:
- https://github.com/huggingface/datasets/pull/7786 allows to interleave datasets without replacement.
- Using [`.shard`](https://huggingface.co/docs/datasets/v4.2.0/en/package_reference/main_classes#datasets.IterableDataset.shard) instead of [`split_dataset... | ### Feature request
I would like to be able to concatenate multiple `IterableDataset` with possibly different features. I would like to then be able to stream the results in parallel (both using DDP and multiple workers in the pytorch DataLoader). I want the merge of datasets to be well balanced between the different ... | 89 | Concatenate IterableDataset instances and distribute underlying shards in a RoundRobin manner
### Feature request
I would like to be able to concatenate multiple `IterableDataset` with possibly different features. I would like to then be able to stream the results in parallel (both using DDP and multiple workers in th... |
https://github.com/huggingface/datasets/issues/5482 | Reload features from Parquet metadata | I'd be happy to have a look, if nobody else has started working on this yet @lhoestq.
It seems to me that for the `arrow` format features are currently attached as metadata [in `datasets.arrow_writer`](https://github.com/huggingface/datasets/blob/5f810b7011a8a4ab077a1847c024d2d9e267b065/src/datasets/arrow_writer.py... | The idea would be to allow this :
```python
ds.to_parquet("my_dataset/ds.parquet")
reloaded = load_dataset("my_dataset")
assert ds.features == reloaded.features
```
And it should also work with Image and Audio types (right now they're reloaded as a dict type)
This can be implemented by storing and reading th... | 66 | Reload features from Parquet metadata
The idea would be to allow this :
```python
ds.to_parquet("my_dataset/ds.parquet")
reloaded = load_dataset("my_dataset")
assert ds.features == reloaded.features
```
And it should also work with Image and Audio types (right now they're reloaded as a dict type)
This can be... |
https://github.com/huggingface/datasets/issues/5482 | Reload features from Parquet metadata | Thanks @MFreidank ! That's correct :)
Reading the metadata to infer the features can be ideally done in the `parquet.py` file in `packaged_builder` when a parquet file is read. You can cast the arrow table to the schema you get from the features.arrow_schema | The idea would be to allow this :
```python
ds.to_parquet("my_dataset/ds.parquet")
reloaded = load_dataset("my_dataset")
assert ds.features == reloaded.features
```
And it should also work with Image and Audio types (right now they're reloaded as a dict type)
This can be implemented by storing and reading th... | 43 | Reload features from Parquet metadata
The idea would be to allow this :
```python
ds.to_parquet("my_dataset/ds.parquet")
reloaded = load_dataset("my_dataset")
assert ds.features == reloaded.features
```
And it should also work with Image and Audio types (right now they're reloaded as a dict type)
This can be... |
https://github.com/huggingface/datasets/issues/3455 | Easier information editing | Hi ! I guess you are talking about the dataset cards that are in this repository on github ?
I think github allows to submit a PR even for 1 line though the `Edit file` button on the page of the dataset card.
Maybe let's mention this in `CONTRIBUTING.md` ? | **Is your feature request related to a problem? Please describe.**
It requires a lot of effort to improve a datasheet.
**Describe the solution you'd like**
UI or at least a link to the place where the code that needs to be edited is (and an easy way to edit this code directly from the site, without cloning, branc... | 50 | Easier information editing
**Is your feature request related to a problem? Please describe.**
It requires a lot of effort to improve a datasheet.
**Describe the solution you'd like**
UI or at least a link to the place where the code that needs to be edited is (and an easy way to edit this code directly from the s... |
https://github.com/huggingface/datasets/issues/3455 | Easier information editing | We now host all the datasets on the HF Hub, where you can easily edit them through UI (for single file changes) or Git workflow (for single/multiple file changes) | **Is your feature request related to a problem? Please describe.**
It requires a lot of effort to improve a datasheet.
**Describe the solution you'd like**
UI or at least a link to the place where the code that needs to be edited is (and an easy way to edit this code directly from the site, without cloning, branc... | 29 | Easier information editing
**Is your feature request related to a problem? Please describe.**
It requires a lot of effort to improve a datasheet.
**Describe the solution you'd like**
UI or at least a link to the place where the code that needs to be edited is (and an easy way to edit this code directly from the s... |
https://github.com/huggingface/datasets/issues/7192 | Add repeat() for iterable datasets | `concatenate_datasets` does the job when there is a finite number of repetitions, but in case of `.repeat()` forever we need a new logic in `iterable_dataset.py` | ### Feature request
It would be useful to be able to straightforwardly repeat iterable datasets indefinitely, to provide complete control over starting and ending of iteration to the user.
An IterableDataset.repeat(n) function could do this automatically
### Motivation
This feature was discussed in this iss... | 25 | Add repeat() for iterable datasets
### Feature request
It would be useful to be able to straightforwardly repeat iterable datasets indefinitely, to provide complete control over starting and ending of iteration to the user.
An IterableDataset.repeat(n) function could do this automatically
### Motivation
Thi... |
https://github.com/huggingface/datasets/issues/4146 | SAMSum dataset viewer not working | Currently, only the datasets that can be streamed support the dataset viewer. Maybe @lhoestq @albertvillanova or @mariosasko could give more details about why the dataset cannot be streamed. | ## Dataset viewer issue for '*name of the dataset*'
**Link:** *link to the dataset viewer page*
*short description of the issue*
Am I the one who added this dataset ? Yes-No
| 28 | SAMSum dataset viewer not working
## Dataset viewer issue for '*name of the dataset*'
**Link:** *link to the dataset viewer page*
*short description of the issue*
Am I the one who added this dataset ? Yes-No
Currently, only the datasets that can be streamed support the dataset viewer. Maybe @lhoestq @albertv... |
https://github.com/huggingface/datasets/issues/4146 | SAMSum dataset viewer not working | It looks like the host (https://arxiv.org) doesn't allow HTTP Range requests, which is what we use to stream data.
This can be fix if we host the data ourselves, which is ok since the dataset is under CC BY-NC-ND 4.0 | ## Dataset viewer issue for '*name of the dataset*'
**Link:** *link to the dataset viewer page*
*short description of the issue*
Am I the one who added this dataset ? Yes-No
| 40 | SAMSum dataset viewer not working
## Dataset viewer issue for '*name of the dataset*'
**Link:** *link to the dataset viewer page*
*short description of the issue*
Am I the one who added this dataset ? Yes-No
It looks like the host (https://arxiv.org) doesn't allow HTTP Range requests, which is what we use to... |
https://github.com/huggingface/datasets/issues/3444 | Align the Dataset and IterableDataset processing API | Yes I agree, these should be as aligned as possible. Maybe we can also check the feedback in the survey at http://hf.co/oss-survey and see if people mentioned related things on the API (in particular if we go the breaking change way, it would be good to be sure we are taking the right direction for the community). | ## Intro
items marked like <s>this</s> are done already :)
Currently the two classes have two distinct API for processing:
### The `.map()` method
Both have those parameters in common: function, batched, batch_size
- IterableDataset is missing those parameters:
<s>with_indices</s>, with_rank, <s>input_columns</s>,... | 57 | Align the Dataset and IterableDataset processing API
## Intro
items marked like <s>this</s> are done already :)
Currently the two classes have two distinct API for processing:
### The `.map()` method
Both have those parameters in common: function, batched, batch_size
- IterableDataset is missing those parameters:
... |
https://github.com/huggingface/datasets/issues/3444 | Align the Dataset and IterableDataset processing API | I like this proposal.
> There is also an important difference in terms of behavior:
Dataset.map adds new columns (with dict.update)
BUT
IterableDataset discards previous columns (it overwrites the dict)
IMO the two methods should have the same behavior. This would be an important breaking change though.
> The... | ## Intro
items marked like <s>this</s> are done already :)
Currently the two classes have two distinct API for processing:
### The `.map()` method
Both have those parameters in common: function, batched, batch_size
- IterableDataset is missing those parameters:
<s>with_indices</s>, with_rank, <s>input_columns</s>,... | 322 | Align the Dataset and IterableDataset processing API
## Intro
items marked like <s>this</s> are done already :)
Currently the two classes have two distinct API for processing:
### The `.map()` method
Both have those parameters in common: function, batched, batch_size
- IterableDataset is missing those parameters:
... |
https://github.com/huggingface/datasets/issues/3444 | Align the Dataset and IterableDataset processing API | > If I understand this part correctly, the idea would be for Dataset.map to behave similarly to Dataset.with_transform (lazy processing) and to have an option to cache processed data (with .cache()). This idea is really nice because it can also be applied to IterableDataset to fix #3142 (again we get the aligned APIs).... | ## Intro
items marked like <s>this</s> are done already :)
Currently the two classes have two distinct API for processing:
### The `.map()` method
Both have those parameters in common: function, batched, batch_size
- IterableDataset is missing those parameters:
<s>with_indices</s>, with_rank, <s>input_columns</s>,... | 105 | Align the Dataset and IterableDataset processing API
## Intro
items marked like <s>this</s> are done already :)
Currently the two classes have two distinct API for processing:
### The `.map()` method
Both have those parameters in common: function, batched, batch_size
- IterableDataset is missing those parameters:
... |
https://github.com/huggingface/datasets/issues/3444 | Align the Dataset and IterableDataset processing API | Yes indeed, thanks. I added it to the list of methods to align in the first post | ## Intro
items marked like <s>this</s> are done already :)
Currently the two classes have two distinct API for processing:
### The `.map()` method
Both have those parameters in common: function, batched, batch_size
- IterableDataset is missing those parameters:
<s>with_indices</s>, with_rank, <s>input_columns</s>,... | 17 | Align the Dataset and IterableDataset processing API
## Intro
items marked like <s>this</s> are done already :)
Currently the two classes have two distinct API for processing:
### The `.map()` method
Both have those parameters in common: function, batched, batch_size
- IterableDataset is missing those parameters:
... |
https://github.com/huggingface/datasets/issues/3444 | Align the Dataset and IterableDataset processing API | I just encountered the problem of the missing `fn_kwargs` parameter in the `map` method. I am commenting to give a workaround in case someone has the same problem and does not find a solution.
You can wrap your function call inside a class that contains the other parameters needed by the function called by map, like t... | ## Intro
items marked like <s>this</s> are done already :)
Currently the two classes have two distinct API for processing:
### The `.map()` method
Both have those parameters in common: function, batched, batch_size
- IterableDataset is missing those parameters:
<s>with_indices</s>, with_rank, <s>input_columns</s>,... | 96 | Align the Dataset and IterableDataset processing API
## Intro
items marked like <s>this</s> are done already :)
Currently the two classes have two distinct API for processing:
### The `.map()` method
Both have those parameters in common: function, batched, batch_size
- IterableDataset is missing those parameters:
... |
https://github.com/huggingface/datasets/issues/3444 | Align the Dataset and IterableDataset processing API | The main differences have been addressed (map, formatting) but there are still a few things to implement like Dataset.take, Dataset.skip, IterableDataset.set_format, IterableDataset.formatted_as, IterableDataset.reset_format.
The rest cannot be implemented for the general case. E.g. train_test_split and select can o... | ## Intro
items marked like <s>this</s> are done already :)
Currently the two classes have two distinct API for processing:
### The `.map()` method
Both have those parameters in common: function, batched, batch_size
- IterableDataset is missing those parameters:
<s>with_indices</s>, with_rank, <s>input_columns</s>,... | 65 | Align the Dataset and IterableDataset processing API
## Intro
items marked like <s>this</s> are done already :)
Currently the two classes have two distinct API for processing:
### The `.map()` method
Both have those parameters in common: function, batched, batch_size
- IterableDataset is missing those parameters:
... |
https://github.com/huggingface/datasets/issues/3444 | Align the Dataset and IterableDataset processing API | It appears `IterableDataset` now supports all the formats apart from `pandas` but the documentation doesn't have any mention of it yet. The docstring of `with_format` seems like it's even older incorrectly saying it only supports `arrow`. Are there any plans to update the documentation and have some guides on best prac... | ## Intro
items marked like <s>this</s> are done already :)
Currently the two classes have two distinct API for processing:
### The `.map()` method
Both have those parameters in common: function, batched, batch_size
- IterableDataset is missing those parameters:
<s>with_indices</s>, with_rank, <s>input_columns</s>,... | 51 | Align the Dataset and IterableDataset processing API
## Intro
items marked like <s>this</s> are done already :)
Currently the two classes have two distinct API for processing:
### The `.map()` method
Both have those parameters in common: function, batched, batch_size
- IterableDataset is missing those parameters:
... |
https://github.com/huggingface/datasets/issues/3444 | Align the Dataset and IterableDataset processing API | Thanks, I updated the docstrings. Would be cool to have more examples in the docs though, if this is something you'd like to contribute ;) | ## Intro
items marked like <s>this</s> are done already :)
Currently the two classes have two distinct API for processing:
### The `.map()` method
Both have those parameters in common: function, batched, batch_size
- IterableDataset is missing those parameters:
<s>with_indices</s>, with_rank, <s>input_columns</s>,... | 25 | Align the Dataset and IterableDataset processing API
## Intro
items marked like <s>this</s> are done already :)
Currently the two classes have two distinct API for processing:
### The `.map()` method
Both have those parameters in common: function, batched, batch_size
- IterableDataset is missing those parameters:
... |
https://github.com/huggingface/datasets/issues/3444 | Align the Dataset and IterableDataset processing API | Now both `Dataset` and `IterableDataset` support all formats including pandas, arrow, polars, torch, tf, numpy, jax :)
```python
for df in ds.with_format("pandas").iter(batch_size=100):
...
```
will do a new release soon | ## Intro
items marked like <s>this</s> are done already :)
Currently the two classes have two distinct API for processing:
### The `.map()` method
Both have those parameters in common: function, batched, batch_size
- IterableDataset is missing those parameters:
<s>with_indices</s>, with_rank, <s>input_columns</s>,... | 30 | Align the Dataset and IterableDataset processing API
## Intro
items marked like <s>this</s> are done already :)
Currently the two classes have two distinct API for processing:
### The `.map()` method
Both have those parameters in common: function, batched, batch_size
- IterableDataset is missing those parameters:
... |
https://github.com/huggingface/datasets/issues/7467 | load_dataset with streaming hangs on parquet datasets | Hi ! The issue comes from `pyarrow`, I reported it here: https://github.com/apache/arrow/issues/45214 (feel free to comment / thumb up).
Alternatively we can try to find something else than `ParquetFileFragment.to_batches()` to iterate on Parquet data and keep the option the pass `filters=`... | ### Describe the bug
When I try to load a dataset with parquet files (e.g. "bigcode/the-stack") the dataset loads, but python interpreter can't exit and hangs
### Steps to reproduce the bug
```python3
import datasets
print('Start')
dataset = datasets.load_dataset("bigcode/the-stack", data_dir="data/yaml", streaming... | 41 | load_dataset with streaming hangs on parquet datasets
### Describe the bug
When I try to load a dataset with parquet files (e.g. "bigcode/the-stack") the dataset loads, but python interpreter can't exit and hangs
### Steps to reproduce the bug
```python3
import datasets
print('Start')
dataset = datasets.load_datase... |
https://github.com/huggingface/datasets/issues/7467 | load_dataset with streaming hangs on parquet datasets | I pushed a workaround for the current version of PyArrow (24.0.0) and older versions at https://github.com/huggingface/datasets/pull/8176
For future versions it should be fixed directly in PyArrow | ### Describe the bug
When I try to load a dataset with parquet files (e.g. "bigcode/the-stack") the dataset loads, but python interpreter can't exit and hangs
### Steps to reproduce the bug
```python3
import datasets
print('Start')
dataset = datasets.load_dataset("bigcode/the-stack", data_dir="data/yaml", streaming... | 26 | load_dataset with streaming hangs on parquet datasets
### Describe the bug
When I try to load a dataset with parquet files (e.g. "bigcode/the-stack") the dataset loads, but python interpreter can't exit and hangs
### Steps to reproduce the bug
```python3
import datasets
print('Start')
dataset = datasets.load_datase... |
https://github.com/huggingface/datasets/issues/3820 | `pubmed_qa` checksum mismatch | Hi @jon-tow, thanks for reporting.
This issue was already reported and its root cause is a change in the Google Drive service. See:
- #3786
We have already fixed it. See:
- #3787
We are planning to make a patch release today.
In the meantime, you can get this fix by installing our library from the GitHu... | ## Describe the bug
Loading [`pubmed_qa`](https://huggingface.co/datasets/pubmed_qa) results in a mismatched checksum error.
## Steps to reproduce the bug
```python
# Sample code to reproduce the bug
import datasets
try:
datasets.load_dataset("pubmed_qa", "pqa_labeled")
except Exception as e:
print(e... | 109 | `pubmed_qa` checksum mismatch
## Describe the bug
Loading [`pubmed_qa`](https://huggingface.co/datasets/pubmed_qa) results in a mismatched checksum error.
## Steps to reproduce the bug
```python
# Sample code to reproduce the bug
import datasets
try:
datasets.load_dataset("pubmed_qa", "pqa_labeled")
excep... |
https://github.com/huggingface/datasets/issues/6721 | Hi,do you know how to load the dataset from local file now? |
@Gera001
# Loading Dataset from Local Files Using 🤗Hugging Face.
To load a dataset from local files using the Hugging Face datasets library, you can use the `load_dataset` function.
```
from datasets import load_dataset
dataset = load_dataset('csv', data_files={'train': 'path/to/train.csv',
... | Hi, if I want to load the dataset from local file, then how to specify the configuration name?
_Originally posted by @WHU-gentle in https://github.com/huggingface/datasets/issues/2976#issuecomment-1333455222_
| 58 | Hi,do you know how to load the dataset from local file now?
Hi, if I want to load the dataset from local file, then how to specify the configuration name?
_Originally posted by @WHU-gentle in https://github.com/huggingface/datasets/issues/2976#issuecomment-1333455222_
@Gera001
# Loadin... |
https://github.com/huggingface/datasets/issues/6721 | Hi,do you know how to load the dataset from local file now? | @ge00009
> like this: from datasets import load_from_disk dataset = load_from_disk(data_path)
Loads a dataset that was previously saved using `save_to_disk()`.
Reference link:
https://huggingface.co/docs/datasets/en/package_reference/loading_methods#datasets.load_from_disk.example | Hi, if I want to load the dataset from local file, then how to specify the configuration name?
_Originally posted by @WHU-gentle in https://github.com/huggingface/datasets/issues/2976#issuecomment-1333455222_
| 23 | Hi,do you know how to load the dataset from local file now?
Hi, if I want to load the dataset from local file, then how to specify the configuration name?
_Originally posted by @WHU-gentle in https://github.com/huggingface/datasets/issues/2976#issuecomment-1333455222_
@ge00009
> like th... |
https://github.com/huggingface/datasets/issues/6202 | avoid downgrading jax version | https://github.com/huggingface/datasets/blob/main/setup.py#L236
Currently has the highest version at 0.3.25; Not sure if there is any reason for this, other than that was the tested version? | ### Feature request
Whenever I `pip install datasets[jax]` it downgrades jax to version 0.3.25. I seem to be able to install this library first then upgrade jax back to version 0.4.13.
### Motivation
It would be nice to not overwrite currently installed version of jax if possible.
### Your contribution
I... | 24 | avoid downgrading jax version
### Feature request
Whenever I `pip install datasets[jax]` it downgrades jax to version 0.3.25. I seem to be able to install this library first then upgrade jax back to version 0.4.13.
### Motivation
It would be nice to not overwrite currently installed version of jax if possible.... |
https://github.com/huggingface/datasets/issues/3872 | HTTP error 504 Server Error: Gateway Time-out | yes but is there any way you could try pushing with `git` command line directly instead of `push_to_hub`? | I am trying to push a large dataset(450000+) records with the help of `push_to_hub()`
While pushing, it gives some error like this.
```
Traceback (most recent call last):
File "data_split_speech.py", line 159, in <module>
data_new_2.push_to_hub("user-name/dataset-name",private=True)
File "/opt/conda/lib... | 18 | HTTP error 504 Server Error: Gateway Time-out
I am trying to push a large dataset(450000+) records with the help of `push_to_hub()`
While pushing, it gives some error like this.
```
Traceback (most recent call last):
File "data_split_speech.py", line 159, in <module>
data_new_2.push_to_hub("user-name/datas... |
https://github.com/huggingface/datasets/issues/3872 | HTTP error 504 Server Error: Gateway Time-out | Okay. I didnt saved the dataset to my local machine. So, I processed the dataset and pushed it directly to the hub. I think I should try saving those dataset to my local machine by `save_to_disk` and then push it with git command line | I am trying to push a large dataset(450000+) records with the help of `push_to_hub()`
While pushing, it gives some error like this.
```
Traceback (most recent call last):
File "data_split_speech.py", line 159, in <module>
data_new_2.push_to_hub("user-name/dataset-name",private=True)
File "/opt/conda/lib... | 44 | HTTP error 504 Server Error: Gateway Time-out
I am trying to push a large dataset(450000+) records with the help of `push_to_hub()`
While pushing, it gives some error like this.
```
Traceback (most recent call last):
File "data_split_speech.py", line 159, in <module>
data_new_2.push_to_hub("user-name/datas... |
https://github.com/huggingface/datasets/issues/3872 | HTTP error 504 Server Error: Gateway Time-out | `push_to_hub` is the preferred way of uploading a dataset to the Hub, which can then be reloaded with `load_dataset`. Feel free to try again and see if the server is working as expected now. Maybe we can add a retry mechanism in the meantime to workaround 504 errors.
Regarding `save_to_disk`, this must only be used ... | I am trying to push a large dataset(450000+) records with the help of `push_to_hub()`
While pushing, it gives some error like this.
```
Traceback (most recent call last):
File "data_split_speech.py", line 159, in <module>
data_new_2.push_to_hub("user-name/dataset-name",private=True)
File "/opt/conda/lib... | 93 | HTTP error 504 Server Error: Gateway Time-out
I am trying to push a large dataset(450000+) records with the help of `push_to_hub()`
While pushing, it gives some error like this.
```
Traceback (most recent call last):
File "data_split_speech.py", line 159, in <module>
data_new_2.push_to_hub("user-name/datas... |
https://github.com/huggingface/datasets/issues/3488 | URL query parameters are set as path in the compression hop for fsspec | I think the test passes because it simply ignore what's after `gzip://`.
The returned urlpath is expected to look like `gzip://filename::url`, and the filename is currently considered to be what's after the final `/`, hence the result.
We can decide to change this and simply have `gzip://::url`, this way we don't... | ## Describe the bug
There is an ssue with `StreamingDownloadManager._extract`.
I don't know how the test `test_streaming_gg_drive_gzipped` passes:
For
```python
TEST_GG_DRIVE_GZIPPED_URL = "https://drive.google.com/uc?export=download&id=1Bt4Garpf0QLiwkJhHJzXaVa0I0H5Qhwz"
urlpath = StreamingDownloadManager().... | 61 | URL query parameters are set as path in the compression hop for fsspec
## Describe the bug
There is an ssue with `StreamingDownloadManager._extract`.
I don't know how the test `test_streaming_gg_drive_gzipped` passes:
For
```python
TEST_GG_DRIVE_GZIPPED_URL = "https://drive.google.com/uc?export=download&id=1B... |
https://github.com/huggingface/datasets/issues/5414 | Sharding error with Multilingual LibriSpeech | Thanks for reporting, @Nithin-Holla.
This is a known issue for multiple datasets and we are investigating it:
- See e.g.: https://huggingface.co/datasets/ami/discussions/3 | ### Describe the bug
Loading the German Multilingual LibriSpeech dataset results in a RuntimeError regarding sharding with the following stacktrace:
```
Downloading and preparing dataset multilingual_librispeech/german to /home/nithin/datadrive/cache/huggingface/datasets/facebook___multilingual_librispeech/german/... | 21 | Sharding error with Multilingual LibriSpeech
### Describe the bug
Loading the German Multilingual LibriSpeech dataset results in a RuntimeError regarding sharding with the following stacktrace:
```
Downloading and preparing dataset multilingual_librispeech/german to /home/nithin/datadrive/cache/huggingface/dataset... |
https://github.com/huggingface/datasets/issues/6729 | Support zipfiles that span multiple disks? | No. cc @albertvillanova @lhoestq @polinaeterna for an evaluation of what it would take to support this feature. | See https://huggingface.co/datasets/PhilEO-community/PhilEO-downstream
The dataset viewer gives the following error:
```
Error code: ConfigNamesError
Exception: BadZipFile
Message: zipfiles that span multiple disks are not supported
Traceback: Traceback (most recent call last):
F... | 17 | Support zipfiles that span multiple disks?
See https://huggingface.co/datasets/PhilEO-community/PhilEO-downstream
The dataset viewer gives the following error:
```
Error code: ConfigNamesError
Exception: BadZipFile
Message: zipfiles that span multiple disks are not supported
Traceback: Traceback ... |
https://github.com/huggingface/datasets/issues/6729 | Support zipfiles that span multiple disks? | The underlying issue issue is that the dataset repository has used split ZIP archive files: https://huggingface.co/datasets/PhilEO-community/PhilEO-downstream/tree/main/data
```
downstream_dataset_patches_npzip.z01
downstream_dataset_patches_npzip.z02
...
downstream_dataset_patches_npzip.zip
```
and these are no... | See https://huggingface.co/datasets/PhilEO-community/PhilEO-downstream
The dataset viewer gives the following error:
```
Error code: ConfigNamesError
Exception: BadZipFile
Message: zipfiles that span multiple disks are not supported
Traceback: Traceback (most recent call last):
F... | 34 | Support zipfiles that span multiple disks?
See https://huggingface.co/datasets/PhilEO-community/PhilEO-downstream
The dataset viewer gives the following error:
```
Error code: ConfigNamesError
Exception: BadZipFile
Message: zipfiles that span multiple disks are not supported
Traceback: Traceback ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.