html_url stringlengths 48 51 | title stringlengths 5 280 | comments stringlengths 63 51.8k | body stringlengths 0 36.2k ⌀ | comment_length int64 16 1.52k | text stringlengths 159 54.1k | embeddings listlengths 768 768 |
|---|---|---|---|---|---|---|
https://github.com/huggingface/datasets/issues/5577 | Cannot load `the_pile_openwebtext2` | Hi! I've merged a PR to use `int32` instead of `int8` for `reddit_scores`, so it should work now.
| ### Describe the bug
I met the same bug mentioned in #3053 which is never fixed. Because several `reddit_scores` are larger than `int8` even `int16`. https://huggingface.co/datasets/the_pile_openwebtext2/blob/main/the_pile_openwebtext2.py#L62
### Steps to reproduce the bug
```python3
from datasets import load... | 18 | Cannot load `the_pile_openwebtext2`
### Describe the bug
I met the same bug mentioned in #3053 which is never fixed. Because several `reddit_scores` are larger than `int8` even `int16`. https://huggingface.co/datasets/the_pile_openwebtext2/blob/main/the_pile_openwebtext2.py#L62
### Steps to reproduce the bug
... | [
-0.09743817895650864,
-0.25990134477615356,
-0.016660965979099274,
0.7843771576881409,
0.14893141388893127,
0.11092916876077652,
0.2464834302663803,
0.37515589594841003,
0.36859920620918274,
-0.06786458194255829,
-0.321153849363327,
0.10087927430868149,
0.1531553417444229,
0.20926694571971... |
https://github.com/huggingface/datasets/issues/5575 | Metadata for each column | Hi! Indeed it would be useful to support this. PyArrow natively supports schema-level and column-level metadata, so implementing this should be straightforward. The API I have in mind would work as follows:
```python
col_feature = Value("string", metadata="Some column-level metadata")
features = Features({"col": c... | ### Feature request
Being able to put some metadata for each column as a string or any other type.
### Motivation
I will bring the motivation by an example, lets say we are experimenting with embedding produced by some image encoder network, and we want to iterate through a couple of preprocessing and see which on... | 48 | Metadata for each column
### Feature request
Being able to put some metadata for each column as a string or any other type.
### Motivation
I will bring the motivation by an example, lets say we are experimenting with embedding produced by some image encoder network, and we want to iterate through a couple of pre... | [
0.31374481320381165,
0.20439878106117249,
-0.04834020137786865,
-0.16208350658416748,
0.5069150328636169,
0.16051587462425232,
0.21719485521316528,
0.35996705293655396,
-0.42453205585479736,
0.15107227861881256,
0.16561944782733917,
0.3521377742290497,
-0.2388565093278885,
0.41327095031738... |
https://github.com/huggingface/datasets/issues/5575 | Metadata for each column | Sorry for the late reply,
Yes, I think this is the most straight-forward approach with the things that we already have.
| ### Feature request
Being able to put some metadata for each column as a string or any other type.
### Motivation
I will bring the motivation by an example, lets say we are experimenting with embedding produced by some image encoder network, and we want to iterate through a couple of preprocessing and see which on... | 21 | Metadata for each column
### Feature request
Being able to put some metadata for each column as a string or any other type.
### Motivation
I will bring the motivation by an example, lets say we are experimenting with embedding produced by some image encoder network, and we want to iterate through a couple of pre... | [
0.2485368698835373,
0.05798117816448212,
-0.11101052165031433,
-0.08875031769275665,
0.3689016103744507,
0.15508323907852173,
0.22258585691452026,
0.36999601125717163,
-0.23646502196788788,
0.30512604117393494,
0.2991870939731598,
0.3311542272567749,
-0.22174367308616638,
0.436356931924819... |
https://github.com/huggingface/datasets/issues/5575 | Metadata for each column | Hi, is this feature to be implemented in the near future? It would be really nice if that would be the case! | ### Feature request
Being able to put some metadata for each column as a string or any other type.
### Motivation
I will bring the motivation by an example, lets say we are experimenting with embedding produced by some image encoder network, and we want to iterate through a couple of preprocessing and see which on... | 22 | Metadata for each column
### Feature request
Being able to put some metadata for each column as a string or any other type.
### Motivation
I will bring the motivation by an example, lets say we are experimenting with embedding produced by some image encoder network, and we want to iterate through a couple of pre... | [
0.24903671443462372,
0.02517630159854889,
-0.07613015174865723,
-0.033065132796764374,
0.40545135736465454,
0.19479331374168396,
0.2185174822807312,
0.3180500864982605,
-0.2768433392047882,
0.30030202865600586,
0.33207178115844727,
0.29961100220680237,
-0.21194390952587128,
0.3685701787471... |
https://github.com/huggingface/datasets/issues/5575 | Metadata for each column | Hi, I also need this feature for tell my customer if any of the feature is encrypted with a certain key. | ### Feature request
Being able to put some metadata for each column as a string or any other type.
### Motivation
I will bring the motivation by an example, lets say we are experimenting with embedding produced by some image encoder network, and we want to iterate through a couple of preprocessing and see which on... | 21 | Metadata for each column
### Feature request
Being able to put some metadata for each column as a string or any other type.
### Motivation
I will bring the motivation by an example, lets say we are experimenting with embedding produced by some image encoder network, and we want to iterate through a couple of pre... | [
0.22968323528766632,
0.01754799485206604,
-0.07099054753780365,
-0.04288242757320404,
0.39170706272125244,
0.21746885776519775,
0.2968093156814575,
0.2860751450061798,
-0.2980235815048218,
0.2501472234725952,
0.37875157594680786,
0.3123629689216614,
-0.2613551616668701,
0.46593835949897766... |
https://github.com/huggingface/datasets/issues/5574 | c4 dataset streaming fails with `FileNotFoundError` | Also encountering this issue for every dataset I try to stream! Installed datasets from main:
```
- `datasets` version: 2.10.1.dev0
- Platform: macOS-13.1-arm64-arm-64bit
- Python version: 3.9.13
- PyArrow version: 10.0.1
- Pandas version: 1.5.2
```
Repro:
```python
from datasets import load_dataset
spig... | ### Describe the bug
Loading the `c4` dataset in streaming mode with `load_dataset("c4", "en", split="validation", streaming=True)` and then using it fails with a `FileNotFoundException`.
### Steps to reproduce the bug
```python
from datasets import load_dataset
dataset = load_dataset("c4", "en", split="train", ... | 655 | c4 dataset streaming fails with `FileNotFoundError`
### Describe the bug
Loading the `c4` dataset in streaming mode with `load_dataset("c4", "en", split="validation", streaming=True)` and then using it fails with a `FileNotFoundException`.
### Steps to reproduce the bug
```python
from datasets import load_dataset... | [
-0.2467462718486786,
0.13279876112937927,
0.04004215821623802,
0.32442140579223633,
0.1723441779613495,
0.11456891149282455,
0.14179404079914093,
0.2780021131038666,
-0.08522557467222214,
0.06967808306217194,
-0.07468783855438232,
-0.08705097436904907,
-0.0888633131980896,
0.10009647160768... |
https://github.com/huggingface/datasets/issues/5574 | c4 dataset streaming fails with `FileNotFoundError` | This problem now appears again, this time with an underlying HTTP 502 status code:
```
aiohttp.client_exceptions.ClientResponseError: 502, message='Bad Gateway', url=URL('https://huggingface.co/datasets/allenai/c4/resolve/1ddc917116b730e1859edef32896ec5c16be51d0/en/c4-validation.00002-of-00008.json.gz')
``` | ### Describe the bug
Loading the `c4` dataset in streaming mode with `load_dataset("c4", "en", split="validation", streaming=True)` and then using it fails with a `FileNotFoundException`.
### Steps to reproduce the bug
```python
from datasets import load_dataset
dataset = load_dataset("c4", "en", split="train", ... | 21 | c4 dataset streaming fails with `FileNotFoundError`
### Describe the bug
Loading the `c4` dataset in streaming mode with `load_dataset("c4", "en", split="validation", streaming=True)` and then using it fails with a `FileNotFoundException`.
### Steps to reproduce the bug
```python
from datasets import load_dataset... | [
-0.2467462718486786,
0.13279876112937927,
0.04004215821623802,
0.32442140579223633,
0.1723441779613495,
0.11456891149282455,
0.14179404079914093,
0.2780021131038666,
-0.08522557467222214,
0.06967808306217194,
-0.07468783855438232,
-0.08705097436904907,
-0.0888633131980896,
0.10009647160768... |
https://github.com/huggingface/datasets/issues/5574 | c4 dataset streaming fails with `FileNotFoundError` | Re-executing a minute later, the underlying cause is an HTTP 403 status code, as reported yesterday:
```
aiohttp.client_exceptions.ClientResponseError: 403, message='Forbidden', url=URL('https://cdn-lfs.huggingface.co/datasets/allenai/c4/4bf6b248b0f910dcde2cdf2118d6369d8208c8f9515ec29ab73e531f380b18e2?response-cont... | ### Describe the bug
Loading the `c4` dataset in streaming mode with `load_dataset("c4", "en", split="validation", streaming=True)` and then using it fails with a `FileNotFoundException`.
### Steps to reproduce the bug
```python
from datasets import load_dataset
dataset = load_dataset("c4", "en", split="train", ... | 22 | c4 dataset streaming fails with `FileNotFoundError`
### Describe the bug
Loading the `c4` dataset in streaming mode with `load_dataset("c4", "en", split="validation", streaming=True)` and then using it fails with a `FileNotFoundException`.
### Steps to reproduce the bug
```python
from datasets import load_dataset... | [
-0.2467462718486786,
0.13279876112937927,
0.04004215821623802,
0.32442140579223633,
0.1723441779613495,
0.11456891149282455,
0.14179404079914093,
0.2780021131038666,
-0.08522557467222214,
0.06967808306217194,
-0.07468783855438232,
-0.08705097436904907,
-0.0888633131980896,
0.10009647160768... |
https://github.com/huggingface/datasets/issues/5574 | c4 dataset streaming fails with `FileNotFoundError` | > It's been resolved again ;)
I'm experiencing the same issue when trying to load this dataset, `FileNotFoundError: https://huggingface.co/datasets/allenai/c4/resolve/1ddc917116b730e1859edef32896ec5c16be51d0/realnewslike/c4-train.00000-of-00512.json.gz` | ### Describe the bug
Loading the `c4` dataset in streaming mode with `load_dataset("c4", "en", split="validation", streaming=True)` and then using it fails with a `FileNotFoundException`.
### Steps to reproduce the bug
```python
from datasets import load_dataset
dataset = load_dataset("c4", "en", split="train", ... | 19 | c4 dataset streaming fails with `FileNotFoundError`
### Describe the bug
Loading the `c4` dataset in streaming mode with `load_dataset("c4", "en", split="validation", streaming=True)` and then using it fails with a `FileNotFoundException`.
### Steps to reproduce the bug
```python
from datasets import load_dataset... | [
-0.2467462718486786,
0.13279876112937927,
0.04004215821623802,
0.32442140579223633,
0.1723441779613495,
0.11456891149282455,
0.14179404079914093,
0.2780021131038666,
-0.08522557467222214,
0.06967808306217194,
-0.07468783855438232,
-0.08705097436904907,
-0.0888633131980896,
0.10009647160768... |
https://github.com/huggingface/datasets/issues/5574 | c4 dataset streaming fails with `FileNotFoundError` | Experiencing the same issues as above : `FileNotFoundError: https://huggingface.co/datasets/allenai/c4/resolve/1ddc917116b730e1859edef32896ec5c16be51d0/en/c4-train.00000-of-01024.json.gz
If the repo is private or gated, make sure to log in with `huggingface-cli login`.`
Have made sure to login as well, issue persis... | ### Describe the bug
Loading the `c4` dataset in streaming mode with `load_dataset("c4", "en", split="validation", streaming=True)` and then using it fails with a `FileNotFoundException`.
### Steps to reproduce the bug
```python
from datasets import load_dataset
dataset = load_dataset("c4", "en", split="train", ... | 33 | c4 dataset streaming fails with `FileNotFoundError`
### Describe the bug
Loading the `c4` dataset in streaming mode with `load_dataset("c4", "en", split="validation", streaming=True)` and then using it fails with a `FileNotFoundException`.
### Steps to reproduce the bug
```python
from datasets import load_dataset... | [
-0.2467462718486786,
0.13279876112937927,
0.04004215821623802,
0.32442140579223633,
0.1723441779613495,
0.11456891149282455,
0.14179404079914093,
0.2780021131038666,
-0.08522557467222214,
0.06967808306217194,
-0.07468783855438232,
-0.08705097436904907,
-0.0888633131980896,
0.10009647160768... |
https://github.com/huggingface/datasets/issues/5574 | c4 dataset streaming fails with `FileNotFoundError` | > Experiencing the same issues as above : `FileNotFoundError: https://huggingface.co/datasets/allenai/c4/resolve/1ddc917116b730e1859edef32896ec5c16be51d0/en/c4-train.00000-of-01024.json.gz If the repo is private or gated, make sure to log in with `huggingface-cli login`.`
>
> Have made sure to login as well, issue p... | ### Describe the bug
Loading the `c4` dataset in streaming mode with `load_dataset("c4", "en", split="validation", streaming=True)` and then using it fails with a `FileNotFoundException`.
### Steps to reproduce the bug
```python
from datasets import load_dataset
dataset = load_dataset("c4", "en", split="train", ... | 41 | c4 dataset streaming fails with `FileNotFoundError`
### Describe the bug
Loading the `c4` dataset in streaming mode with `load_dataset("c4", "en", split="validation", streaming=True)` and then using it fails with a `FileNotFoundException`.
### Steps to reproduce the bug
```python
from datasets import load_dataset... | [
-0.2467462718486786,
0.13279876112937927,
0.04004215821623802,
0.32442140579223633,
0.1723441779613495,
0.11456891149282455,
0.14179404079914093,
0.2780021131038666,
-0.08522557467222214,
0.06967808306217194,
-0.07468783855438232,
-0.08705097436904907,
-0.0888633131980896,
0.10009647160768... |
https://github.com/huggingface/datasets/issues/5571 | load_dataset fails for JSON in windows | Hi!
You need to pass an input json file explicitly as `data_files` to `load_dataset` to avoid this error:
```python
ds = load_dataset("json", data_files=args.input_json)
```
| ### Describe the bug
Steps:
1. Created a dataset in a Linux VM and created a small sample using dataset.to_json() method.
2. Downloaded the JSON file to my local Windows machine for working and saved in say - r"C:\Users\name\file.json"
3. I am reading the file in my local PyCharm - the location of python file is di... | 24 | load_dataset fails for JSON in windows
### Describe the bug
Steps:
1. Created a dataset in a Linux VM and created a small sample using dataset.to_json() method.
2. Downloaded the JSON file to my local Windows machine for working and saved in say - r"C:\Users\name\file.json"
3. I am reading the file in my local Py... | [
-0.21141701936721802,
0.4925994873046875,
-0.033018454909324646,
0.34813082218170166,
0.32010191679000854,
0.13950246572494507,
0.3737618625164032,
0.19964182376861572,
0.5069835782051086,
0.07556141167879105,
0.21943451464176178,
0.2802491784095764,
0.029631007462739944,
-0.10699496418237... |
https://github.com/huggingface/datasets/issues/5570 | load_dataset gives FileNotFoundError on imagenet-1k if license is not accepted on the hub | Hi, thanks for the feedback! Would it help to add a tip or note saying the dataset is gated and you need to accept the license before downloading it? | ### Describe the bug
When calling ```load_dataset('imagenet-1k')``` FileNotFoundError is raised, if not logged in and if logged in with huggingface-cli but not having accepted the licence on the hub. There is no error once accepting.
### Steps to reproduce the bug
```
from datasets import load_dataset
imagenet =... | 29 | load_dataset gives FileNotFoundError on imagenet-1k if license is not accepted on the hub
### Describe the bug
When calling ```load_dataset('imagenet-1k')``` FileNotFoundError is raised, if not logged in and if logged in with huggingface-cli but not having accepted the licence on the hub. There is no error once acce... | [
-0.3552643060684204,
-0.32136839628219604,
0.09918798506259918,
0.2748079001903534,
0.020837703719735146,
0.08795274049043655,
0.5258960723876953,
0.011118516325950623,
0.4931468367576599,
0.20048955082893372,
-0.11338060349225998,
0.16971591114997864,
-0.22929267585277557,
0.1972724646329... |
https://github.com/huggingface/datasets/issues/5570 | load_dataset gives FileNotFoundError on imagenet-1k if license is not accepted on the hub | The error is now more informative:
```
FileNotFoundError: Couldn't find a dataset script at /content/imagenet-1k/imagenet-1k.py or any data file in the same directory. Couldn't find 'imagenet-1k' on the Hugging Face Hub either: FileNotFoundError: Dataset 'imagenet-1k' doesn't exist on the Hub. If the repo is private ... | ### Describe the bug
When calling ```load_dataset('imagenet-1k')``` FileNotFoundError is raised, if not logged in and if logged in with huggingface-cli but not having accepted the licence on the hub. There is no error once accepting.
### Steps to reproduce the bug
```
from datasets import load_dataset
imagenet =... | 56 | load_dataset gives FileNotFoundError on imagenet-1k if license is not accepted on the hub
### Describe the bug
When calling ```load_dataset('imagenet-1k')``` FileNotFoundError is raised, if not logged in and if logged in with huggingface-cli but not having accepted the licence on the hub. There is no error once acce... | [
-0.33228379487991333,
-0.2758558988571167,
0.08700472116470337,
0.25952523946762085,
0.05371473729610443,
0.0687185600399971,
0.5406357049942017,
0.06523527204990387,
0.45785632729530334,
0.2602248787879944,
-0.12785670161247253,
0.18132847547531128,
-0.2027093917131424,
0.1491405963897705... |
https://github.com/huggingface/datasets/issues/5568 | dataset.to_iterable_dataset() loses useful info like dataset features | Hi ! Oh good catch. I think the features should be passed to `IterableDataset.from_generator()` in `to_iterable_dataset()` indeed.
Setting this as a good first issue if someone would like to contribute, otherwise we can take care of it :) | ### Describe the bug
Hello,
I like the new `to_iterable_dataset` feature but I noticed something that seems to be missing.
When using `to_iterable_dataset` to transform your map style dataset into iterable dataset, you lose valuable metadata like the features.
These metadata are useful if you want to interleav... | 38 | dataset.to_iterable_dataset() loses useful info like dataset features
### Describe the bug
Hello,
I like the new `to_iterable_dataset` feature but I noticed something that seems to be missing.
When using `to_iterable_dataset` to transform your map style dataset into iterable dataset, you lose valuable metadata l... | [
-0.09407901018857956,
0.12064772844314575,
-0.016311202198266983,
0.05076075717806816,
0.4780624508857727,
0.25060218572616577,
0.23195800185203552,
0.5022813677787781,
-0.4413222372531891,
-0.0548122376203537,
-0.02133994735777378,
0.7593236565589905,
-0.18928569555282593,
0.1848355829715... |
https://github.com/huggingface/datasets/issues/5568 | dataset.to_iterable_dataset() loses useful info like dataset features | seems like the feature parameter is missing from `return IterableDataset.from_generator(Dataset._iter_shards, gen_kwargs={"shards": shards})` hence it defaults to None. | ### Describe the bug
Hello,
I like the new `to_iterable_dataset` feature but I noticed something that seems to be missing.
When using `to_iterable_dataset` to transform your map style dataset into iterable dataset, you lose valuable metadata like the features.
These metadata are useful if you want to interleav... | 17 | dataset.to_iterable_dataset() loses useful info like dataset features
### Describe the bug
Hello,
I like the new `to_iterable_dataset` feature but I noticed something that seems to be missing.
When using `to_iterable_dataset` to transform your map style dataset into iterable dataset, you lose valuable metadata l... | [
-0.13188661634922028,
0.10668608546257019,
0.011545903980731964,
-0.00627666711807251,
0.44106054306030273,
0.22829240560531616,
0.29144522547721863,
0.45109689235687256,
-0.48412445187568665,
0.04485110193490982,
0.02956996113061905,
0.7640542387962341,
-0.19561854004859924,
0.13245688378... |
https://github.com/huggingface/datasets/issues/5555 | `.shuffle` throwing error `ValueError: Protocol not known: parent` | Hi ! The indices mapping is written in the same cachedirectory as your dataset.
Can you run this to show your current cache directory ?
```python
print(train_dataset.cache_files)
``` | ### Describe the bug
```
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
Cell In [16], line 1
----> 1 train_dataset = train_dataset.shuffle()
File /opt/conda/envs/pytorch/lib/python3.9/site-packages/dataset... | 28 | `.shuffle` throwing error `ValueError: Protocol not known: parent`
### Describe the bug
```
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
Cell In [16], line 1
----> 1 train_dataset = train_dataset.shuffle(... | [
0.047835830599069595,
-0.18612687289714813,
-0.026867803186178207,
0.20817533135414124,
0.3419860005378723,
-0.1306532770395279,
0.331752747297287,
0.4799611270427704,
-0.43398189544677734,
0.29154741764068604,
-0.2698074281215668,
0.4671919643878937,
-0.16841474175453186,
0.00336149521172... |
https://github.com/huggingface/datasets/issues/5555 | `.shuffle` throwing error `ValueError: Protocol not known: parent` | ```
[{'filename': '.../train/dataset.arrow'}, {'filename': '.../train/dataset.arrow'}]
```
These are the actual paths where `.hf` files are stored. | ### Describe the bug
```
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
Cell In [16], line 1
----> 1 train_dataset = train_dataset.shuffle()
File /opt/conda/envs/pytorch/lib/python3.9/site-packages/dataset... | 16 | `.shuffle` throwing error `ValueError: Protocol not known: parent`
### Describe the bug
```
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
Cell In [16], line 1
----> 1 train_dataset = train_dataset.shuffle(... | [
0.047835830599069595,
-0.18612687289714813,
-0.026867803186178207,
0.20817533135414124,
0.3419860005378723,
-0.1306532770395279,
0.331752747297287,
0.4799611270427704,
-0.43398189544677734,
0.29154741764068604,
-0.2698074281215668,
0.4671919643878937,
-0.16841474175453186,
0.00336149521172... |
https://github.com/huggingface/datasets/issues/5555 | `.shuffle` throwing error `ValueError: Protocol not known: parent` | I'm not aware of any `.hf` file ? What are you referring to ?
Also the error says "Protocol unknown: parent". Is there a chance you may have ended up with a path that contains this string `parent://` ? | ### Describe the bug
```
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
Cell In [16], line 1
----> 1 train_dataset = train_dataset.shuffle()
File /opt/conda/envs/pytorch/lib/python3.9/site-packages/dataset... | 39 | `.shuffle` throwing error `ValueError: Protocol not known: parent`
### Describe the bug
```
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
Cell In [16], line 1
----> 1 train_dataset = train_dataset.shuffle(... | [
0.047835830599069595,
-0.18612687289714813,
-0.026867803186178207,
0.20817533135414124,
0.3419860005378723,
-0.1306532770395279,
0.331752747297287,
0.4799611270427704,
-0.43398189544677734,
0.29154741764068604,
-0.2698074281215668,
0.4671919643878937,
-0.16841474175453186,
0.00336149521172... |
https://github.com/huggingface/datasets/issues/5555 | `.shuffle` throwing error `ValueError: Protocol not known: parent` | I figured out why the issue was occuring but don't know the long-term fix.
The dataset I was trying to shuffle was loaded from a saved file which had `::` delimiter in filename. When I try with the exact same file without `::` in filename, it works as expected.
Quick fix is to not use colons in filename. But if this ... | ### Describe the bug
```
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
Cell In [16], line 1
----> 1 train_dataset = train_dataset.shuffle()
File /opt/conda/envs/pytorch/lib/python3.9/site-packages/dataset... | 76 | `.shuffle` throwing error `ValueError: Protocol not known: parent`
### Describe the bug
```
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
Cell In [16], line 1
----> 1 train_dataset = train_dataset.shuffle(... | [
0.047835830599069595,
-0.18612687289714813,
-0.026867803186178207,
0.20817533135414124,
0.3419860005378723,
-0.1306532770395279,
0.331752747297287,
0.4799611270427704,
-0.43398189544677734,
0.29154741764068604,
-0.2698074281215668,
0.4671919643878937,
-0.16841474175453186,
0.00336149521172... |
https://github.com/huggingface/datasets/issues/5546 | Downloaded datasets do not cache at $HF_HOME | Hi ! Can you make sure you set `HF_HOME` before importing `datasets` ?
Then you can print
```python
print(datasets.config.HF_CACHE_HOME)
print(datasets.config.HF_DATASETS_CACHE)
``` | ### Describe the bug
In the huggingface course (https://huggingface.co/course/chapter3/2?fw=pt) it said that if we set HF_HOME, downloaded datasets would be cached at specified address but it does not. downloaded models from checkpoint names are downloaded and cached at HF_HOME but this is not the case for datasets, t... | 21 | Downloaded datasets do not cache at $HF_HOME
### Describe the bug
In the huggingface course (https://huggingface.co/course/chapter3/2?fw=pt) it said that if we set HF_HOME, downloaded datasets would be cached at specified address but it does not. downloaded models from checkpoint names are downloaded and cached at H... | [
0.02935585007071495,
-0.2774200439453125,
0.06504884362220764,
0.2512305974960327,
0.2992437481880188,
0.15360045433044434,
0.3081725835800171,
0.13932250440120697,
0.5802940726280212,
0.19665464758872986,
-0.4149155914783478,
-0.22220174968242645,
0.3078145384788513,
-0.018969200551509857... |
https://github.com/huggingface/datasets/issues/5543 | the pile datasets url seems to change back | Thanks for reporting, @wjfwzzc.
I am transferring this issue to the corresponding dataset on the Hub: https://huggingface.co/datasets/bookcorpusopen/discussions/1 | ### Describe the bug
in #3627, the host url of the pile dataset became `https://mystic.the-eye.eu`. Now the new url is broken, but `https://the-eye.eu` seems to work again.
### Steps to reproduce the bug
```python3
from datasets import load_dataset
dataset = load_dataset("bookcorpusopen")
```
shows
```python3
... | 17 | the pile datasets url seems to change back
### Describe the bug
in #3627, the host url of the pile dataset became `https://mystic.the-eye.eu`. Now the new url is broken, but `https://the-eye.eu` seems to work again.
### Steps to reproduce the bug
```python3
from datasets import load_dataset
dataset = load_datase... | [
-0.024923846125602722,
0.15067514777183533,
0.0453345961868763,
0.13577064871788025,
-0.02586647868156433,
-0.24235430359840393,
0.2773600220680237,
-0.018846776336431503,
-0.12299036979675293,
-0.10635338723659515,
-0.3565422594547272,
0.2841379642486572,
0.44859084486961365,
-0.037919260... |
https://github.com/huggingface/datasets/issues/5543 | the pile datasets url seems to change back | Thank you. All fixes are done:
- [x] https://huggingface.co/datasets/bookcorpusopen/discussions/2
- [x] https://huggingface.co/datasets/the_pile/discussions/1
- [x] https://huggingface.co/datasets/the_pile_books3/discussions/1
- [x] https://huggingface.co/datasets/the_pile_openwebtext2/discussions/2
- [x] https://... | ### Describe the bug
in #3627, the host url of the pile dataset became `https://mystic.the-eye.eu`. Now the new url is broken, but `https://the-eye.eu` seems to work again.
### Steps to reproduce the bug
```python3
from datasets import load_dataset
dataset = load_dataset("bookcorpusopen")
```
shows
```python3
... | 21 | the pile datasets url seems to change back
### Describe the bug
in #3627, the host url of the pile dataset became `https://mystic.the-eye.eu`. Now the new url is broken, but `https://the-eye.eu` seems to work again.
### Steps to reproduce the bug
```python3
from datasets import load_dataset
dataset = load_datase... | [
0.0027176812291145325,
0.14232367277145386,
0.037559155374765396,
0.16497913002967834,
0.006508542224764824,
-0.2241644263267517,
0.22020874917507172,
-0.0392807237803936,
-0.2169613093137741,
-0.11068028211593628,
-0.34006184339523315,
0.23998405039310455,
0.4222784638404846,
-0.071681812... |
https://github.com/huggingface/datasets/issues/5541 | Flattening indices in selected datasets is extremely inefficient | Running the script above on the branch https://github.com/huggingface/datasets/pull/5542 results in the expected behaviour:
```
Num chunks for original ds: 1
Original ds save/load
save_to_disk -- RAM memory used: 0.671875 MB -- Total time: 0.255265 s
load_from_disk -- RAM memory used: 42.796875 MB -- Total time: 0... | ### Describe the bug
If we perform a `select` (or `shuffle`, `train_test_split`, etc.) operation on a dataset , we end up with a dataset with an `indices_table`. Currently, flattening such dataset consumes a lot of memory and the resulting flat dataset contains ChunkedArrays with as many chunks as there are rows. Thi... | 117 | Flattening indices in selected datasets is extremely inefficient
### Describe the bug
If we perform a `select` (or `shuffle`, `train_test_split`, etc.) operation on a dataset , we end up with a dataset with an `indices_table`. Currently, flattening such dataset consumes a lot of memory and the resulting flat datase... | [
-0.19913232326507568,
-0.24241355061531067,
-0.026689382269978523,
0.42907869815826416,
0.08236698806285858,
0.24479401111602783,
0.01324290782213211,
0.44538038969039917,
-0.06731289625167847,
0.3971453905105591,
0.07559619098901749,
0.658035397529602,
-0.008868818171322346,
-0.1766570210... |
https://github.com/huggingface/datasets/issues/5539 | IndexError: invalid index of a 0-dim tensor. Use `tensor.item()` in Python or `tensor.item<T>()` in C++ to convert a 0-dim tensor to a number | Hi! The `set_transform` does not apply a custom formatting transform on a single example but the entire batch, so the fixed version of your transform would look as follows:
```python
from datasets import load_dataset
import torch
dataset = load_dataset("lambdalabs/pokemon-blip-captions", split='train')
def t(bat... | ### Describe the bug
When dataset contains a 0-dim tensor, formatting.py raises a following error and fails.
```bash
Traceback (most recent call last):
File "<path>/lib/python3.8/site-packages/datasets/formatting/formatting.py", line 501, in format_row
return _unnest(formatted_batch)
File "<path>/lib/py... | 78 | IndexError: invalid index of a 0-dim tensor. Use `tensor.item()` in Python or `tensor.item<T>()` in C++ to convert a 0-dim tensor to a number
### Describe the bug
When dataset contains a 0-dim tensor, formatting.py raises a following error and fails.
```bash
Traceback (most recent call last):
File "<path>/lib... | [
-0.2542387843132019,
-0.4156858026981354,
-0.0268503837287426,
0.4272727370262146,
0.26932069659233093,
0.12956944108009338,
0.7767345905303955,
0.6795443892478943,
-0.2534794211387634,
0.15314579010009766,
0.039237722754478455,
0.26701319217681885,
-0.3639734387397766,
0.00225091166794300... |
https://github.com/huggingface/datasets/issues/5539 | IndexError: invalid index of a 0-dim tensor. Use `tensor.item()` in Python or `tensor.item<T>()` in C++ to convert a 0-dim tensor to a number | > Hi! The `set_transform` does not apply a custom formatting transform on a single example but the entire batch, so the fixed version of your transform would look as follows:
>
> ```python
> from datasets import load_dataset
> import torch
>
> dataset = load_dataset("lambdalabs/pokemon-blip-captions", split='tr... | ### Describe the bug
When dataset contains a 0-dim tensor, formatting.py raises a following error and fails.
```bash
Traceback (most recent call last):
File "<path>/lib/python3.8/site-packages/datasets/formatting/formatting.py", line 501, in format_row
return _unnest(formatted_batch)
File "<path>/lib/py... | 104 | IndexError: invalid index of a 0-dim tensor. Use `tensor.item()` in Python or `tensor.item<T>()` in C++ to convert a 0-dim tensor to a number
### Describe the bug
When dataset contains a 0-dim tensor, formatting.py raises a following error and fails.
```bash
Traceback (most recent call last):
File "<path>/lib... | [
-0.2582031488418579,
-0.4255248010158539,
-0.031091837212443352,
0.4377169609069824,
0.26600369811058044,
0.13616031408309937,
0.7793343663215637,
0.6722733378410339,
-0.2549665868282318,
0.1577700972557068,
0.03240693360567093,
0.26492029428482056,
-0.36549460887908936,
0.0086848679929971... |
https://github.com/huggingface/datasets/issues/5538 | load_dataset in seaborn is not working for me. getting this error. | Hi! `seaborn`'s `load_dataset` pulls datasets from [here](https://github.com/mwaskom/seaborn-data) and not from our Hub, so this issue is not related to our library in any way and should be reported in their repo instead. | TimeoutError Traceback (most recent call last)
~\anaconda3\lib\urllib\request.py in do_open(self, http_class, req, **http_conn_args)
1345 try:
-> 1346 h.request(req.get_method(), req.selector, req.data, headers,
1347 encode_chu... | 32 | load_dataset in seaborn is not working for me. getting this error.
TimeoutError Traceback (most recent call last)
~\anaconda3\lib\urllib\request.py in do_open(self, http_class, req, **http_conn_args)
1345 try:
-> 1346 h.request(req.get_method(), req.selec... | [
-0.3725789189338684,
-0.077509306371212,
-0.06400500982999802,
0.11478471755981445,
0.3414335250854492,
-0.056207239627838135,
0.3485483229160309,
0.2673206031322479,
-0.043627262115478516,
0.023610085248947144,
-0.3443041741847992,
0.12141767144203186,
0.35465630888938904,
0.2098079472780... |
https://github.com/huggingface/datasets/issues/5537 | Increase speed of data files resolution | You were right, if `self.dir_cache` is not None in glob, it is exactly the same as what is returned by find, at least for all the tests we have, and some extended evaluation I did across a random sample of about 1000 datasets.
Thanks for the nice hints, and let me know if this is not exactly what we want here!
s... | Certain datasets like `bigcode/the-stack-dedup` have so many files that loading them takes forever right from the data files resolution step.
`datasets` uses file patterns to check the structure of the repository but it takes too much time to iterate over and over again on all the data files.
This comes from `res... | 64 | Increase speed of data files resolution
Certain datasets like `bigcode/the-stack-dedup` have so many files that loading them takes forever right from the data files resolution step.
`datasets` uses file patterns to check the structure of the repository but it takes too much time to iterate over and over again on a... | [
-0.2851494252681732,
-0.017127923667430878,
-0.1667213886976242,
0.2510114908218384,
0.22652849555015564,
-0.027485206723213196,
-0.06366461515426636,
0.769538402557373,
0.18300290405750275,
0.15410853922367096,
-0.1291680783033371,
0.1802806854248047,
-0.08980454504489899,
0.0692553520202... |
https://github.com/huggingface/datasets/issues/5537 | Increase speed of data files resolution | I think we can make the data files resolution (significantly) faster in 2 steps:
1. `glob` calls `find` (which in turn calls `ls`), so we need `find` to be fast, and this can be achieved by fetching all the entries in a single API call and avoiding calls to `ls`. Implementing this for `HfFileSystem.find` (the one in... | Certain datasets like `bigcode/the-stack-dedup` have so many files that loading them takes forever right from the data files resolution step.
`datasets` uses file patterns to check the structure of the repository but it takes too much time to iterate over and over again on all the data files.
This comes from `res... | 135 | Increase speed of data files resolution
Certain datasets like `bigcode/the-stack-dedup` have so many files that loading them takes forever right from the data files resolution step.
`datasets` uses file patterns to check the structure of the repository but it takes too much time to iterate over and over again on a... | [
-0.049320608377456665,
0.10979937016963959,
-0.06484201550483704,
0.21430625021457672,
0.022935984656214714,
-0.0795358419418335,
-0.08590029180049896,
0.7598603963851929,
0.13545364141464233,
0.1230635792016983,
-0.00472032418474555,
0.16313964128494263,
-0.13723717629909515,
0.0775568112... |
https://github.com/huggingface/datasets/issues/5537 | Increase speed of data files resolution | Good idea :)
For 2:
That would work ! It's also possible to have a FileSystem with a cache on `.find` and use it inside the resolver passed to `_get_data_files_patterns`. Right now they're pretty simple:
```python
# for remote repositories
resolver = partial(_resolve_single_pattern_in_dataset_repository, da... | Certain datasets like `bigcode/the-stack-dedup` have so many files that loading them takes forever right from the data files resolution step.
`datasets` uses file patterns to check the structure of the repository but it takes too much time to iterate over and over again on all the data files.
This comes from `res... | 53 | Increase speed of data files resolution
Certain datasets like `bigcode/the-stack-dedup` have so many files that loading them takes forever right from the data files resolution step.
`datasets` uses file patterns to check the structure of the repository but it takes too much time to iterate over and over again on a... | [
-0.1536896973848343,
0.15076646208763123,
-0.15555904805660248,
0.21844053268432617,
0.18327803909778595,
-0.09429463744163513,
0.020885098725557327,
0.7693638205528259,
0.09961138665676117,
0.16804906725883484,
-0.0872386246919632,
0.21129822731018066,
-0.04070941358804703,
0.049849800765... |
https://github.com/huggingface/datasets/issues/5537 | Increase speed of data files resolution | something like this maybe (with Quentin's reimplementation of `HfFilesystem.find`)?
```
@lru_cache(max_size=None)
def _find(self, path, maxdepth=None, withdirs=False, detail=False, **kwargs):
```
In any case please let me know if I can help in any way! | Certain datasets like `bigcode/the-stack-dedup` have so many files that loading them takes forever right from the data files resolution step.
`datasets` uses file patterns to check the structure of the repository but it takes too much time to iterate over and over again on all the data files.
This comes from `res... | 33 | Increase speed of data files resolution
Certain datasets like `bigcode/the-stack-dedup` have so many files that loading them takes forever right from the data files resolution step.
`datasets` uses file patterns to check the structure of the repository but it takes too much time to iterate over and over again on a... | [
-0.2579191029071808,
0.023926079273223877,
-0.14815211296081543,
0.22986972332000732,
0.12737588584423065,
0.021586455404758453,
-0.13294391334056854,
0.7983734011650085,
-0.04930676519870758,
0.16989825665950775,
0.055421896278858185,
0.0977417454123497,
0.004393680952489376,
0.0752981081... |
https://github.com/huggingface/datasets/issues/5536 | Failure to hash function when using .map() | Hi ! `enc` is not hashable:
```python
import tiktoken
from datasets.fingerprint import Hasher
enc = tiktoken.get_encoding("gpt2")
Hasher.hash(enc)
# raises TypeError: cannot pickle 'builtins.CoreBPE' object
```
It happens because it's not picklable, and because of that it's not possible to cache the result of... | ### Describe the bug
_Parameter 'function'=<function process at 0x7f1ec4388af0> of the transform datasets.arrow_dataset.Dataset.\_map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and ca... | 83 | Failure to hash function when using .map()
### Describe the bug
_Parameter 'function'=<function process at 0x7f1ec4388af0> of the transform datasets.arrow_dataset.Dataset.\_map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle... | [
-0.27017712593078613,
0.04610013961791992,
0.022127307951450348,
0.06650808453559875,
0.3817780017852783,
0.09339509159326553,
0.5055848360061646,
0.40053316950798035,
0.2478596270084381,
0.05585066229104996,
0.11794228106737137,
0.6140043139457703,
-0.2589096128940582,
-0.0799008458852768... |
https://github.com/huggingface/datasets/issues/5536 | Failure to hash function when using .map() | @lhoestq Thank you for the explanation and advice. Will relay all of this to the repo where this (non)issue arose.
Great job with huggingface! | ### Describe the bug
_Parameter 'function'=<function process at 0x7f1ec4388af0> of the transform datasets.arrow_dataset.Dataset.\_map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and ca... | 24 | Failure to hash function when using .map()
### Describe the bug
_Parameter 'function'=<function process at 0x7f1ec4388af0> of the transform datasets.arrow_dataset.Dataset.\_map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle... | [
-0.2785501480102539,
0.05490994453430176,
0.022331468760967255,
0.06358535587787628,
0.3812029957771301,
0.09191403537988663,
0.5076667666435242,
0.40114763379096985,
0.2533603608608246,
0.05205825716257095,
0.10599610209465027,
0.6064263582229614,
-0.257708877325058,
-0.08370460569858551,... |
https://github.com/huggingface/datasets/issues/5536 | Failure to hash function when using .map() | Just a heads up that when I'm trying to use TikToken along with the a given Dataset `.map()` method, I am still met with the following error :
```
File "/opt/conda/lib/python3.8/site-packages/dill/_dill.py", line 388, in save
StockPickler.save(self, obj, save_persistent_id)
File "/opt/conda/lib/python3.8/... | ### Describe the bug
_Parameter 'function'=<function process at 0x7f1ec4388af0> of the transform datasets.arrow_dataset.Dataset.\_map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and ca... | 60 | Failure to hash function when using .map()
### Describe the bug
_Parameter 'function'=<function process at 0x7f1ec4388af0> of the transform datasets.arrow_dataset.Dataset.\_map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle... | [
-0.2785240411758423,
0.05236083269119263,
0.023018188774585724,
0.05987487733364105,
0.3843640089035034,
0.08648700267076492,
0.5084617733955383,
0.39903345704078674,
0.2548632323741913,
0.050213515758514404,
0.11116009950637817,
0.604576826095581,
-0.25605282187461853,
-0.0752394720911979... |
https://github.com/huggingface/datasets/issues/5536 | Failure to hash function when using .map() | @lhoestq @edhenry I am on datasets version `'2.12.0'. I see the same `TypeError: cannot pickle 'builtins.CoreBPE' object` that others are seeing. | ### Describe the bug
_Parameter 'function'=<function process at 0x7f1ec4388af0> of the transform datasets.arrow_dataset.Dataset.\_map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and ca... | 21 | Failure to hash function when using .map()
### Describe the bug
_Parameter 'function'=<function process at 0x7f1ec4388af0> of the transform datasets.arrow_dataset.Dataset.\_map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle... | [
-0.2785501480102539,
0.05490994453430176,
0.022331468760967255,
0.06358535587787628,
0.3812029957771301,
0.09191403537988663,
0.5076667666435242,
0.40114763379096985,
0.2533603608608246,
0.05205825716257095,
0.10599610209465027,
0.6064263582229614,
-0.257708877325058,
-0.08370460569858551,... |
https://github.com/huggingface/datasets/issues/5536 | Failure to hash function when using .map() | I am able to reproduce this on datasets 2.14.2. The `datasets.disable_caching()` doesn't work around it.
@lhoestq - you might want to reopen this issue. Because of this issue folks won't be able run Karpathy's NanoGPT :(. | ### Describe the bug
_Parameter 'function'=<function process at 0x7f1ec4388af0> of the transform datasets.arrow_dataset.Dataset.\_map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and ca... | 36 | Failure to hash function when using .map()
### Describe the bug
_Parameter 'function'=<function process at 0x7f1ec4388af0> of the transform datasets.arrow_dataset.Dataset.\_map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle... | [
-0.25540387630462646,
0.052326858043670654,
0.0350506417453289,
0.0766218900680542,
0.3983868956565857,
0.07499410957098007,
0.5143856406211853,
0.3840460479259491,
0.23183977603912354,
0.055268317461013794,
0.10514780133962631,
0.6219761967658997,
-0.25351962447166443,
-0.0883869305253028... |
https://github.com/huggingface/datasets/issues/5536 | Failure to hash function when using .map() | update: temporarily solved the problem by setting
```
--preprocess_num_workers 1
```
-------------
I have met the same problem, here is my env:
```
datasets 2.14.4
transformers 4.31.0
tiktoken 0.4.0
torch 1.13.1
``` | ### Describe the bug
_Parameter 'function'=<function process at 0x7f1ec4388af0> of the transform datasets.arrow_dataset.Dataset.\_map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and ca... | 32 | Failure to hash function when using .map()
### Describe the bug
_Parameter 'function'=<function process at 0x7f1ec4388af0> of the transform datasets.arrow_dataset.Dataset.\_map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle... | [
-0.2792896628379822,
0.06205107271671295,
0.02379767596721649,
0.06021393835544586,
0.3827197551727295,
0.08332618325948715,
0.49643194675445557,
0.40409204363822937,
0.25012820959091187,
0.05256231129169464,
0.11732447147369385,
0.6077716946601868,
-0.24820895493030548,
-0.069895163178443... |
https://github.com/huggingface/datasets/issues/5536 | Failure to hash function when using .map() | @mengban I cannot reproduce the issue even with these versions installed. It would help if you could provide info about your system and the `pip list` output. | ### Describe the bug
_Parameter 'function'=<function process at 0x7f1ec4388af0> of the transform datasets.arrow_dataset.Dataset.\_map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and ca... | 27 | Failure to hash function when using .map()
### Describe the bug
_Parameter 'function'=<function process at 0x7f1ec4388af0> of the transform datasets.arrow_dataset.Dataset.\_map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle... | [
-0.2688886821269989,
0.04557964205741882,
0.023118413984775543,
0.06588529795408249,
0.38799339532852173,
0.08951503783464432,
0.5108284950256348,
0.3961569368839264,
0.2477157711982727,
0.05667120963335037,
0.11045648902654648,
0.6107147932052612,
-0.2555908262729645,
-0.08592642843723297... |
https://github.com/huggingface/datasets/issues/5536 | Failure to hash function when using .map() | @mariosasko Please take a look at this
```python
from typing import Any
from datasets import Dataset
import tiktoken
dataset = Dataset.from_list([{"n": str(i)} for i in range(20)])
enc = tiktoken.get_encoding("gpt2")
class A:
tokenizer = enc #tiktoken.get_encoding("gpt2")
def __call__(self, exa... | ### Describe the bug
_Parameter 'function'=<function process at 0x7f1ec4388af0> of the transform datasets.arrow_dataset.Dataset.\_map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and ca... | 89 | Failure to hash function when using .map()
### Describe the bug
_Parameter 'function'=<function process at 0x7f1ec4388af0> of the transform datasets.arrow_dataset.Dataset.\_map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle... | [
-0.2770145833492279,
0.05305543541908264,
0.020683731883764267,
0.06691960990428925,
0.3787440061569214,
0.09213656932115555,
0.5072981119155884,
0.40100032091140747,
0.2541043758392334,
0.05765489116311073,
0.10708295553922653,
0.604475736618042,
-0.25667130947113037,
-0.08517006039619446... |
https://github.com/huggingface/datasets/issues/5536 | Failure to hash function when using .map() | Thanks @maxwellzh! Our `Hasher` works with this snippet, but the problem is running multiprocessing with a non-serializable `tiktoken.Encoding` object.
Inserting the following code before the `map` should fix this:
```python
import copyreg
def pickle_Encoding(enc):
return (functools.partial(tiktoken.core.Enc... | ### Describe the bug
_Parameter 'function'=<function process at 0x7f1ec4388af0> of the transform datasets.arrow_dataset.Dataset.\_map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and ca... | 69 | Failure to hash function when using .map()
### Describe the bug
_Parameter 'function'=<function process at 0x7f1ec4388af0> of the transform datasets.arrow_dataset.Dataset.\_map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle... | [
-0.26971200108528137,
0.04461166262626648,
0.025779619812965393,
0.06566739827394485,
0.38949358463287354,
0.09443282335996628,
0.5057995319366455,
0.4007117748260498,
0.24779275059700012,
0.053384825587272644,
0.12246813625097275,
0.6098890900611877,
-0.2580595314502716,
-0.07688588649034... |
https://github.com/huggingface/datasets/issues/5536 | Failure to hash function when using .map() | I think the right way to fix this would be to have new tokenizer instance for each process. This applies to many other tokenizers that don't support multi-process or have bugs. To do this, first define tokenizer factory class like this:
```
class TikTokenFactory:
def __init__(self):
self._... | ### Describe the bug
_Parameter 'function'=<function process at 0x7f1ec4388af0> of the transform datasets.arrow_dataset.Dataset.\_map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and ca... | 100 | Failure to hash function when using .map()
### Describe the bug
_Parameter 'function'=<function process at 0x7f1ec4388af0> of the transform datasets.arrow_dataset.Dataset.\_map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle... | [
-0.27259427309036255,
0.05315922200679779,
0.023362349718809128,
0.06667378544807434,
0.3796428442001343,
0.08569327741861343,
0.5104526877403259,
0.3959410488605499,
0.24923396110534668,
0.050984837114810944,
0.10613124072551727,
0.6072448492050171,
-0.2558450400829315,
-0.076787121593952... |
https://github.com/huggingface/datasets/issues/5534 | map() breaks at certain dataset size when using Array3D | Hi! This code works for me locally or in Colab. What's the output of `python -c "import pyarrow as pa; print(pa.__version__)"` when you run it inside your environment? | ### Describe the bug
`map()` magically breaks when using a `Array3D` feature and mapping it. I created a very simple dummy dataset (see below). When filtering it down to 95 elements I can apply map, but it breaks when filtering it down to just 96 entries with the following exception:
```
Traceback (most recent cal... | 28 | map() breaks at certain dataset size when using Array3D
### Describe the bug
`map()` magically breaks when using a `Array3D` feature and mapping it. I created a very simple dummy dataset (see below). When filtering it down to 95 elements I can apply map, but it breaks when filtering it down to just 96 entries with... | [
-0.1609809696674347,
0.006780028343200684,
-0.03623750060796738,
0.21349231898784637,
0.09646676480770111,
-0.09540200978517532,
0.3490159511566162,
0.3220602869987488,
0.10199400782585144,
0.026630543172359467,
0.29777562618255615,
0.08814723044633865,
0.16820955276489258,
0.1861055195331... |
https://github.com/huggingface/datasets/issues/5534 | map() breaks at certain dataset size when using Array3D | Thanks for looking into this!
The output of `python -c "import pyarrow as pa; print(pa.__version__)"` is:
```
11.0.0
```
I did the following to setup the environment:
```
conda create -n datasets_debug python=3.9
conda activate datasets_debug
pip install datasets==2.9.0
```
I just tested this on another... | ### Describe the bug
`map()` magically breaks when using a `Array3D` feature and mapping it. I created a very simple dummy dataset (see below). When filtering it down to 95 elements I can apply map, but it breaks when filtering it down to just 96 entries with the following exception:
```
Traceback (most recent cal... | 60 | map() breaks at certain dataset size when using Array3D
### Describe the bug
`map()` magically breaks when using a `Array3D` feature and mapping it. I created a very simple dummy dataset (see below). When filtering it down to 95 elements I can apply map, but it breaks when filtering it down to just 96 entries with... | [
-0.1609809696674347,
0.006780028343200684,
-0.03623750060796738,
0.21349231898784637,
0.09646676480770111,
-0.09540200978517532,
0.3490159511566162,
0.3220602869987488,
0.10199400782585144,
0.026630543172359467,
0.29777562618255615,
0.08814723044633865,
0.16820955276489258,
0.1861055195331... |
https://github.com/huggingface/datasets/issues/5532 | train_test_split in arrow_dataset does not ensure to keep single classes in test set | Hi! You can get this behavior by specifying `stratify_by_column="label"` in `train_test_split`.
This is the full example:
```python
import numpy as np
from datasets import Dataset, ClassLabel
data = [
{'label': 0, 'text': "example1"},
{'label': 1, 'text': "example2"},
{'label': 1, 'text': "examp... | ### Describe the bug
When I have a dataset with very few (e.g. 1) examples per class and I call the train_test_split function on it, sometimes the single class will be in the test set. thus will never be considered for training.
### Steps to reproduce the bug
```
import numpy as np
from datasets import Dataset
... | 88 | train_test_split in arrow_dataset does not ensure to keep single classes in test set
### Describe the bug
When I have a dataset with very few (e.g. 1) examples per class and I call the train_test_split function on it, sometimes the single class will be in the test set. thus will never be considered for training.
##... | [
-0.19253776967525482,
0.057643428444862366,
-0.0064346082508563995,
0.3102373778820038,
0.28909188508987427,
0.09748195856809616,
0.5350439548492432,
0.2346283197402954,
-0.21000729501247406,
0.029851071536540985,
0.35186734795570374,
0.5292766094207764,
-0.1724994033575058,
-0.07975241541... |
https://github.com/huggingface/datasets/issues/5525 | TypeError: Couldn't cast array of type string to null | Thanks for reporting, @TJ-Solergibert.
We cannot access your Colab notebook: `There was an error loading this notebook. Ensure that the file is accessible and try again.`
Could you please make it publicly accessible?
| ### Describe the bug
Processing a dataset I alredy uploaded to the Hub (https://huggingface.co/datasets/tj-solergibert/Europarl-ST) I found that for some splits and some languages (test split, source_lang = "nl") after applying a map function I get the mentioned error.
I alredy tried reseting the shorter strings... | 33 | TypeError: Couldn't cast array of type string to null
### Describe the bug
Processing a dataset I alredy uploaded to the Hub (https://huggingface.co/datasets/tj-solergibert/Europarl-ST) I found that for some splits and some languages (test split, source_lang = "nl") after applying a map function I get the mentione... | [
-0.13287143409252167,
-0.4693015217781067,
0.024292074143886566,
0.4132038354873657,
0.41335421800613403,
-0.03989054635167122,
0.5205761790275574,
0.29646357893943787,
0.12481804192066193,
0.25412851572036743,
-0.13308405876159668,
0.3707171678543091,
-0.2303478866815567,
0.14031367003917... |
https://github.com/huggingface/datasets/issues/5525 | TypeError: Couldn't cast array of type string to null | I swear it's public, I've checked the settings and I've been able to open it in incognito mode.
Notebook: https://colab.research.google.com/drive/1JCrS7FlGfu_kFqChMrwKZ_bpabnIMqbP?usp=sharing
Anyway, this is the code to reproduce the error:
```python3
from datasets import ClassLabel
from datasets import load... | ### Describe the bug
Processing a dataset I alredy uploaded to the Hub (https://huggingface.co/datasets/tj-solergibert/Europarl-ST) I found that for some splits and some languages (test split, source_lang = "nl") after applying a map function I get the mentioned error.
I alredy tried reseting the shorter strings... | 226 | TypeError: Couldn't cast array of type string to null
### Describe the bug
Processing a dataset I alredy uploaded to the Hub (https://huggingface.co/datasets/tj-solergibert/Europarl-ST) I found that for some splits and some languages (test split, source_lang = "nl") after applying a map function I get the mentione... | [
-0.10379142314195633,
-0.4781437814235687,
0.025804750621318817,
0.38869935274124146,
0.45657652616500854,
-0.05794811621308327,
0.5366411805152893,
0.32976365089416504,
0.16466698050498962,
0.1949411928653717,
-0.0987226665019989,
0.36296314001083374,
-0.24442683160305023,
0.1220339611172... |
https://github.com/huggingface/datasets/issues/5525 | TypeError: Couldn't cast array of type string to null | Thanks, @TJ-Solergibert. I can access your notebook now. Maybe it was just a temporary issue.
At first sight, it seems something related to your data: maybe some of the examples do not have all the transcriptions for all the languages. Then, some of them are null when unrolled. And when trying to concatenate with th... | ### Describe the bug
Processing a dataset I alredy uploaded to the Hub (https://huggingface.co/datasets/tj-solergibert/Europarl-ST) I found that for some splits and some languages (test split, source_lang = "nl") after applying a map function I get the mentioned error.
I alredy tried reseting the shorter strings... | 80 | TypeError: Couldn't cast array of type string to null
### Describe the bug
Processing a dataset I alredy uploaded to the Hub (https://huggingface.co/datasets/tj-solergibert/Europarl-ST) I found that for some splits and some languages (test split, source_lang = "nl") after applying a map function I get the mentione... | [
-0.1205771416425705,
-0.4795553982257843,
0.04174375161528587,
0.3527597188949585,
0.44321107864379883,
-0.04269907996058464,
0.4515949487686157,
0.3546943962574005,
0.11704607307910919,
0.26629024744033813,
-0.06308044493198395,
0.38186201453208923,
-0.19216518104076385,
0.021854707971215... |
https://github.com/huggingface/datasets/issues/5525 | TypeError: Couldn't cast array of type string to null | See, in this example, "nl" and "ro" transcripts are null:
```python
>>> europarl_ds["test"][:1]
{'original_speech': ['− Señor Presidente, en primer lugar, quisiera felicitar al señor Seeber por el trabajo realizado, porque en su informe se recogen muchas de las preocupaciones manifestadas en esta'],
'original_lang... | ### Describe the bug
Processing a dataset I alredy uploaded to the Hub (https://huggingface.co/datasets/tj-solergibert/Europarl-ST) I found that for some splits and some languages (test split, source_lang = "nl") after applying a map function I get the mentioned error.
I alredy tried reseting the shorter strings... | 458 | TypeError: Couldn't cast array of type string to null
### Describe the bug
Processing a dataset I alredy uploaded to the Hub (https://huggingface.co/datasets/tj-solergibert/Europarl-ST) I found that for some splits and some languages (test split, source_lang = "nl") after applying a map function I get the mentione... | [
-0.07954692840576172,
-0.5227319002151489,
0.042124319821596146,
0.40471529960632324,
0.42138445377349854,
-0.005711778998374939,
0.4713701903820038,
0.3309302031993866,
0.2484809160232544,
0.17114464938640594,
-0.05038853734731674,
0.33937522768974304,
-0.27421993017196655,
-0.01515191793... |
https://github.com/huggingface/datasets/issues/5525 | TypeError: Couldn't cast array of type string to null | You can fix this issue by forcing the cast of None to str by hand:
- If you replace this line:
```python
source_t += batch[src_lang]
```
- With this line (because the batch size is 1):
```python
source_t += [str(batch[src_lang][0])]
```
- Or with this line (if the batch size were larger than 1):
```python
so... | ### Describe the bug
Processing a dataset I alredy uploaded to the Hub (https://huggingface.co/datasets/tj-solergibert/Europarl-ST) I found that for some splits and some languages (test split, source_lang = "nl") after applying a map function I get the mentioned error.
I alredy tried reseting the shorter strings... | 63 | TypeError: Couldn't cast array of type string to null
### Describe the bug
Processing a dataset I alredy uploaded to the Hub (https://huggingface.co/datasets/tj-solergibert/Europarl-ST) I found that for some splits and some languages (test split, source_lang = "nl") after applying a map function I get the mentione... | [
-0.11711007356643677,
-0.4815646708011627,
0.02524058148264885,
0.3356453776359558,
0.4890843629837036,
-0.008719071745872498,
0.5062230229377747,
0.34610745310783386,
0.18658514320850372,
0.21610313653945923,
-0.05457814037799835,
0.35119667649269104,
-0.24344445765018463,
0.0914189219474... |
https://github.com/huggingface/datasets/issues/5525 | TypeError: Couldn't cast array of type string to null | Problem solved! Thanks @albertvillanova, now I have even increased the batch size and it's crazy fast :rocket: ! | ### Describe the bug
Processing a dataset I alredy uploaded to the Hub (https://huggingface.co/datasets/tj-solergibert/Europarl-ST) I found that for some splits and some languages (test split, source_lang = "nl") after applying a map function I get the mentioned error.
I alredy tried reseting the shorter strings... | 18 | TypeError: Couldn't cast array of type string to null
### Describe the bug
Processing a dataset I alredy uploaded to the Hub (https://huggingface.co/datasets/tj-solergibert/Europarl-ST) I found that for some splits and some languages (test split, source_lang = "nl") after applying a map function I get the mentione... | [
-0.15800058841705322,
-0.4741203784942627,
0.001771615818142891,
0.3594154119491577,
0.4670639634132385,
-0.027541007846593857,
0.5098435282707214,
0.38467085361480713,
0.20798908174037933,
0.19020572304725647,
-0.0734347254037857,
0.33742567896842957,
-0.26622334122657776,
0.1427195966243... |
https://github.com/huggingface/datasets/issues/5517 | `with_format("numpy")` silently downcasts float64 to float32 features | Hi! This behavior stems from these lines:
https://github.com/huggingface/datasets/blob/b065547654efa0ec633cf373ac1512884c68b2e1/src/datasets/formatting/np_formatter.py#L45-L46
I agree we should preserve the original type whenever possible and downcast explicitly with a warning.
@lhoestq Do you remember why we ... | ### Describe the bug
When I create a dataset with a `float64` feature, then apply numpy formatting the returned numpy arrays are silently downcasted to `float32`.
### Steps to reproduce the bug
```python
import datasets
dataset = datasets.Dataset.from_dict({'a': [1.0, 2.0, 3.0]}).with_format("numpy")
print(... | 38 | `with_format("numpy")` silently downcasts float64 to float32 features
### Describe the bug
When I create a dataset with a `float64` feature, then apply numpy formatting the returned numpy arrays are silently downcasted to `float32`.
### Steps to reproduce the bug
```python
import datasets
dataset = dataset... | [
0.14177078008651733,
-0.24984367191791534,
0.000774633139371872,
0.0026635415852069855,
0.5696965456008911,
0.0561448410153389,
0.6134842038154602,
0.5261093378067017,
-0.16041861474514008,
-0.05886185169219971,
-0.13229535520076752,
0.6590015888214111,
-0.024173695594072342,
-0.0558505468... |
https://github.com/huggingface/datasets/issues/5517 | `with_format("numpy")` silently downcasts float64 to float32 features | I was also wondering why the default type logic is needed. Me just deleting it is probably too naive of a solution. | ### Describe the bug
When I create a dataset with a `float64` feature, then apply numpy formatting the returned numpy arrays are silently downcasted to `float32`.
### Steps to reproduce the bug
```python
import datasets
dataset = datasets.Dataset.from_dict({'a': [1.0, 2.0, 3.0]}).with_format("numpy")
print(... | 22 | `with_format("numpy")` silently downcasts float64 to float32 features
### Describe the bug
When I create a dataset with a `float64` feature, then apply numpy formatting the returned numpy arrays are silently downcasted to `float32`.
### Steps to reproduce the bug
```python
import datasets
dataset = dataset... | [
0.14177078008651733,
-0.24984367191791534,
0.000774633139371872,
0.0026635415852069855,
0.5696965456008911,
0.0561448410153389,
0.6134842038154602,
0.5261093378067017,
-0.16041861474514008,
-0.05886185169219971,
-0.13229535520076752,
0.6590015888214111,
-0.024173695594072342,
-0.0558505468... |
https://github.com/huggingface/datasets/issues/5517 | `with_format("numpy")` silently downcasts float64 to float32 features | Hmm I think the idea was to end up with the usual default precision for deep learning models - no matter how the data was stored or where it comes from.
For example in NLP we store tokens using an optimized low precision to save disk space, but when we set the format to `torch` we actually need to get `int64`. Altho... | ### Describe the bug
When I create a dataset with a `float64` feature, then apply numpy formatting the returned numpy arrays are silently downcasted to `float32`.
### Steps to reproduce the bug
```python
import datasets
dataset = datasets.Dataset.from_dict({'a': [1.0, 2.0, 3.0]}).with_format("numpy")
print(... | 123 | `with_format("numpy")` silently downcasts float64 to float32 features
### Describe the bug
When I create a dataset with a `float64` feature, then apply numpy formatting the returned numpy arrays are silently downcasted to `float32`.
### Steps to reproduce the bug
```python
import datasets
dataset = dataset... | [
0.14177078008651733,
-0.24984367191791534,
0.000774633139371872,
0.0026635415852069855,
0.5696965456008911,
0.0561448410153389,
0.6134842038154602,
0.5261093378067017,
-0.16041861474514008,
-0.05886185169219971,
-0.13229535520076752,
0.6590015888214111,
-0.024173695594072342,
-0.0558505468... |
https://github.com/huggingface/datasets/issues/5517 | `with_format("numpy")` silently downcasts float64 to float32 features | Unfortunately removing it for integers is a breaking change for most `transformers` + `datasets` users for NLP (which is a common case). Removing it for floats is a breaking change for `transformers` + `datasets` for ASR as well. And it also is a breaking change for the other users relying on this behavior.
Therefor... | ### Describe the bug
When I create a dataset with a `float64` feature, then apply numpy formatting the returned numpy arrays are silently downcasted to `float32`.
### Steps to reproduce the bug
```python
import datasets
dataset = datasets.Dataset.from_dict({'a': [1.0, 2.0, 3.0]}).with_format("numpy")
print(... | 102 | `with_format("numpy")` silently downcasts float64 to float32 features
### Describe the bug
When I create a dataset with a `float64` feature, then apply numpy formatting the returned numpy arrays are silently downcasted to `float32`.
### Steps to reproduce the bug
```python
import datasets
dataset = dataset... | [
0.14177078008651733,
-0.24984367191791534,
0.000774633139371872,
0.0026635415852069855,
0.5696965456008911,
0.0561448410153389,
0.6134842038154602,
0.5261093378067017,
-0.16041861474514008,
-0.05886185169219971,
-0.13229535520076752,
0.6590015888214111,
-0.024173695594072342,
-0.0558505468... |
https://github.com/huggingface/datasets/issues/5517 | `with_format("numpy")` silently downcasts float64 to float32 features | @lhoestq It should be fine to remove this conversion in Datasets 3.0, no? For now, we can warn the user (with a log message) about the future change when the default type is changed. | ### Describe the bug
When I create a dataset with a `float64` feature, then apply numpy formatting the returned numpy arrays are silently downcasted to `float32`.
### Steps to reproduce the bug
```python
import datasets
dataset = datasets.Dataset.from_dict({'a': [1.0, 2.0, 3.0]}).with_format("numpy")
print(... | 34 | `with_format("numpy")` silently downcasts float64 to float32 features
### Describe the bug
When I create a dataset with a `float64` feature, then apply numpy formatting the returned numpy arrays are silently downcasted to `float32`.
### Steps to reproduce the bug
```python
import datasets
dataset = dataset... | [
0.14177078008651733,
-0.24984367191791534,
0.000774633139371872,
0.0026635415852069855,
0.5696965456008911,
0.0561448410153389,
0.6134842038154602,
0.5261093378067017,
-0.16041861474514008,
-0.05886185169219971,
-0.13229535520076752,
0.6590015888214111,
-0.024173695594072342,
-0.0558505468... |
https://github.com/huggingface/datasets/issues/5517 | `with_format("numpy")` silently downcasts float64 to float32 features | Let's see with the transformers team if it sounds reasonable ? We'd have to fix multiple example scripts though.
If it's not ok we can also explore keeping this behavior only for tokens and audio data. | ### Describe the bug
When I create a dataset with a `float64` feature, then apply numpy formatting the returned numpy arrays are silently downcasted to `float32`.
### Steps to reproduce the bug
```python
import datasets
dataset = datasets.Dataset.from_dict({'a': [1.0, 2.0, 3.0]}).with_format("numpy")
print(... | 36 | `with_format("numpy")` silently downcasts float64 to float32 features
### Describe the bug
When I create a dataset with a `float64` feature, then apply numpy formatting the returned numpy arrays are silently downcasted to `float32`.
### Steps to reproduce the bug
```python
import datasets
dataset = dataset... | [
0.14177078008651733,
-0.24984367191791534,
0.000774633139371872,
0.0026635415852069855,
0.5696965456008911,
0.0561448410153389,
0.6134842038154602,
0.5261093378067017,
-0.16041861474514008,
-0.05886185169219971,
-0.13229535520076752,
0.6590015888214111,
-0.024173695594072342,
-0.0558505468... |
https://github.com/huggingface/datasets/issues/5517 | `with_format("numpy")` silently downcasts float64 to float32 features | IMO being coupled with Transformers can lead to unexpected behavior when one tries to use our lib without pairing it with Transformers, so I think it's still important to "fix" this, even if it means we will need to update Transformers' example scripts afterward.
| ### Describe the bug
When I create a dataset with a `float64` feature, then apply numpy formatting the returned numpy arrays are silently downcasted to `float32`.
### Steps to reproduce the bug
```python
import datasets
dataset = datasets.Dataset.from_dict({'a': [1.0, 2.0, 3.0]}).with_format("numpy")
print(... | 44 | `with_format("numpy")` silently downcasts float64 to float32 features
### Describe the bug
When I create a dataset with a `float64` feature, then apply numpy formatting the returned numpy arrays are silently downcasted to `float32`.
### Steps to reproduce the bug
```python
import datasets
dataset = dataset... | [
0.14177078008651733,
-0.24984367191791534,
0.000774633139371872,
0.0026635415852069855,
0.5696965456008911,
0.0561448410153389,
0.6134842038154602,
0.5261093378067017,
-0.16041861474514008,
-0.05886185169219971,
-0.13229535520076752,
0.6590015888214111,
-0.024173695594072342,
-0.0558505468... |
https://github.com/huggingface/datasets/issues/5517 | `with_format("numpy")` silently downcasts float64 to float32 features | For others that run into the same issue: A temporary workaround for me is this:
```python
def numpy_transform(batch):
return {key: np.asarray(val) for key, val in batch.items()}
dataset = dataset.with_transform(numpy_transform)
``` | ### Describe the bug
When I create a dataset with a `float64` feature, then apply numpy formatting the returned numpy arrays are silently downcasted to `float32`.
### Steps to reproduce the bug
```python
import datasets
dataset = datasets.Dataset.from_dict({'a': [1.0, 2.0, 3.0]}).with_format("numpy")
print(... | 30 | `with_format("numpy")` silently downcasts float64 to float32 features
### Describe the bug
When I create a dataset with a `float64` feature, then apply numpy formatting the returned numpy arrays are silently downcasted to `float32`.
### Steps to reproduce the bug
```python
import datasets
dataset = dataset... | [
0.14177078008651733,
-0.24984367191791534,
0.000774633139371872,
0.0026635415852069855,
0.5696965456008911,
0.0561448410153389,
0.6134842038154602,
0.5261093378067017,
-0.16041861474514008,
-0.05886185169219971,
-0.13229535520076752,
0.6590015888214111,
-0.024173695594072342,
-0.0558505468... |
https://github.com/huggingface/datasets/issues/5517 | `with_format("numpy")` silently downcasts float64 to float32 features | This behavior (silent upcast from `int32` to `int64`) is also unexpected for the user in https://discuss.huggingface.co/t/standard-getitem-returns-wrong-data-type-for-arrays/62470/2 | ### Describe the bug
When I create a dataset with a `float64` feature, then apply numpy formatting the returned numpy arrays are silently downcasted to `float32`.
### Steps to reproduce the bug
```python
import datasets
dataset = datasets.Dataset.from_dict({'a': [1.0, 2.0, 3.0]}).with_format("numpy")
print(... | 16 | `with_format("numpy")` silently downcasts float64 to float32 features
### Describe the bug
When I create a dataset with a `float64` feature, then apply numpy formatting the returned numpy arrays are silently downcasted to `float32`.
### Steps to reproduce the bug
```python
import datasets
dataset = dataset... | [
0.14177078008651733,
-0.24984367191791534,
0.000774633139371872,
0.0026635415852069855,
0.5696965456008911,
0.0561448410153389,
0.6134842038154602,
0.5261093378067017,
-0.16041861474514008,
-0.05886185169219971,
-0.13229535520076752,
0.6590015888214111,
-0.024173695594072342,
-0.0558505468... |
https://github.com/huggingface/datasets/issues/5517 | `with_format("numpy")` silently downcasts float64 to float32 features | Hi, I stumbled on a variation that upcasts uint8 to int64. I would expect the dtype to be the same as it was when I generated the dataset.
```
import numpy as np
import datasets as ds
foo = np.random.randint(0, 256, size=(5, 10, 10), dtype=np.uint8)
features = ds.Features({"foo": ds.Array2D((10, 10), "uint8"... | ### Describe the bug
When I create a dataset with a `float64` feature, then apply numpy formatting the returned numpy arrays are silently downcasted to `float32`.
### Steps to reproduce the bug
```python
import datasets
dataset = datasets.Dataset.from_dict({'a': [1.0, 2.0, 3.0]}).with_format("numpy")
print(... | 72 | `with_format("numpy")` silently downcasts float64 to float32 features
### Describe the bug
When I create a dataset with a `float64` feature, then apply numpy formatting the returned numpy arrays are silently downcasted to `float32`.
### Steps to reproduce the bug
```python
import datasets
dataset = dataset... | [
0.14177078008651733,
-0.24984367191791534,
0.000774633139371872,
0.0026635415852069855,
0.5696965456008911,
0.0561448410153389,
0.6134842038154602,
0.5261093378067017,
-0.16041861474514008,
-0.05886185169219971,
-0.13229535520076752,
0.6590015888214111,
-0.024173695594072342,
-0.0558505468... |
https://github.com/huggingface/datasets/issues/5517 | `with_format("numpy")` silently downcasts float64 to float32 features | workaround to remove torch upcasting
```
import datasets as ds
import torch
class FixedTorchFormatter(ds.formatting.TorchFormatter):
def _tensorize(self, value):
return torch.from_numpy(value)
ds.formatting._register_formatter(FixedTorchFormatter, "torch")
``` | ### Describe the bug
When I create a dataset with a `float64` feature, then apply numpy formatting the returned numpy arrays are silently downcasted to `float32`.
### Steps to reproduce the bug
```python
import datasets
dataset = datasets.Dataset.from_dict({'a': [1.0, 2.0, 3.0]}).with_format("numpy")
print(... | 22 | `with_format("numpy")` silently downcasts float64 to float32 features
### Describe the bug
When I create a dataset with a `float64` feature, then apply numpy formatting the returned numpy arrays are silently downcasted to `float32`.
### Steps to reproduce the bug
```python
import datasets
dataset = dataset... | [
0.14177078008651733,
-0.24984367191791534,
0.000774633139371872,
0.0026635415852069855,
0.5696965456008911,
0.0561448410153389,
0.6134842038154602,
0.5261093378067017,
-0.16041861474514008,
-0.05886185169219971,
-0.13229535520076752,
0.6590015888214111,
-0.024173695594072342,
-0.0558505468... |
https://github.com/huggingface/datasets/issues/5514 | Improve inconsistency of `Dataset.map` interface for `load_from_cache_file` | Hi, thanks for noticing this! We can't just remove the cache control as this allows us to control where the arrow files generated by the ops are written (cached on disk if enabled or a temporary directory if disabled). The right way to address this inconsistency would be by having `load_from_cache_file=None` by default... | ### Feature request
1. Replace the `load_from_cache_file` default value to `True`.
2. Remove or alter checks from `is_caching_enabled` logic.
### Motivation
I stumbled over an inconsistency in the `Dataset.map` interface. The documentation (and source) states for the parameter `load_from_cache_file`:
```
load_... | 54 | Improve inconsistency of `Dataset.map` interface for `load_from_cache_file`
### Feature request
1. Replace the `load_from_cache_file` default value to `True`.
2. Remove or alter checks from `is_caching_enabled` logic.
### Motivation
I stumbled over an inconsistency in the `Dataset.map` interface. The documenta... | [
-0.22572489082813263,
0.11557582020759583,
-0.018234264105558395,
0.08944402635097504,
-0.2545173168182373,
-0.19448745250701904,
0.2094080001115799,
0.24666523933410645,
0.4795498251914978,
-0.027434200048446655,
0.27308300137519836,
0.651593804359436,
0.21231448650360107,
0.0354168340563... |
https://github.com/huggingface/datasets/issues/5514 | Improve inconsistency of `Dataset.map` interface for `load_from_cache_file` | Hi! Yes, this seems more plausible. I can implement that. One last thing is the type annotation `load_from_cache_file: bool = None`. Which I then would change to `load_from_cache_file: Optional[bool] = None`. | ### Feature request
1. Replace the `load_from_cache_file` default value to `True`.
2. Remove or alter checks from `is_caching_enabled` logic.
### Motivation
I stumbled over an inconsistency in the `Dataset.map` interface. The documentation (and source) states for the parameter `load_from_cache_file`:
```
load_... | 31 | Improve inconsistency of `Dataset.map` interface for `load_from_cache_file`
### Feature request
1. Replace the `load_from_cache_file` default value to `True`.
2. Remove or alter checks from `is_caching_enabled` logic.
### Motivation
I stumbled over an inconsistency in the `Dataset.map` interface. The documenta... | [
-0.22042793035507202,
0.1094694435596466,
-0.014823367819190025,
0.11704322695732117,
-0.2883232831954956,
-0.1477023959159851,
0.2506014108657837,
0.2232019156217575,
0.4472062587738037,
-0.0559086948633194,
0.2891519069671631,
0.6225760579109192,
0.21416610479354858,
0.05612708628177643,... |
https://github.com/huggingface/datasets/issues/5513 | Some functions use a param named `type` shouldn't that be avoided since it's a Python reserved name? | Hi! Let's not do this - renaming it would be a breaking change, and going through the deprecation cycle is only worth it if it improves user experience. | Hi @mariosasko, @lhoestq, or whoever reads this! :)
After going through `ArrowDataset.set_format` I found out that the `type` param is actually named `type` which is a Python reserved name as you may already know, shouldn't that be renamed to `format_type` before the 3.0.0 is released?
Just wanted to get your inp... | 28 | Some functions use a param named `type` shouldn't that be avoided since it's a Python reserved name?
Hi @mariosasko, @lhoestq, or whoever reads this! :)
After going through `ArrowDataset.set_format` I found out that the `type` param is actually named `type` which is a Python reserved name as you may already know, ... | [
0.4956384301185608,
-0.4932823181152344,
-0.031042398884892464,
-0.2522832155227661,
0.25889816880226135,
-0.2998834550380707,
0.3812841773033142,
0.26294997334480286,
-0.5981423854827881,
-0.1118878722190857,
0.13323892652988434,
0.40194812417030334,
-0.34347429871559143,
0.00244186818599... |
https://github.com/huggingface/datasets/issues/5513 | Some functions use a param named `type` shouldn't that be avoided since it's a Python reserved name? | Hi @mariosasko, ok it makes sense. Anyway, don't you think it's worth it at some point to start a deprecation cycle e.g. `fs` in `load_from_disk`? It doesn't affect user experience but it's for sure a bad practice IMO, but's up to you 😄 Feel free to close this issue otherwise! | Hi @mariosasko, @lhoestq, or whoever reads this! :)
After going through `ArrowDataset.set_format` I found out that the `type` param is actually named `type` which is a Python reserved name as you may already know, shouldn't that be renamed to `format_type` before the 3.0.0 is released?
Just wanted to get your inp... | 50 | Some functions use a param named `type` shouldn't that be avoided since it's a Python reserved name?
Hi @mariosasko, @lhoestq, or whoever reads this! :)
After going through `ArrowDataset.set_format` I found out that the `type` param is actually named `type` which is a Python reserved name as you may already know, ... | [
0.4295054078102112,
-0.5103021860122681,
-0.06425859779119492,
-0.09285256266593933,
0.3008670210838318,
-0.3707627058029175,
0.4326748251914978,
0.21824632585048676,
-0.445772647857666,
0.0075672343373298645,
0.14417414367198944,
0.461667001247406,
-0.33134087920188904,
0.0245794858783483... |
https://github.com/huggingface/datasets/issues/5513 | Some functions use a param named `type` shouldn't that be avoided since it's a Python reserved name? | I don't think deprecating a param name in this particular instance is worth the hassle, so I'm closing the issue 🙂. | Hi @mariosasko, @lhoestq, or whoever reads this! :)
After going through `ArrowDataset.set_format` I found out that the `type` param is actually named `type` which is a Python reserved name as you may already know, shouldn't that be renamed to `format_type` before the 3.0.0 is released?
Just wanted to get your inp... | 21 | Some functions use a param named `type` shouldn't that be avoided since it's a Python reserved name?
Hi @mariosasko, @lhoestq, or whoever reads this! :)
After going through `ArrowDataset.set_format` I found out that the `type` param is actually named `type` which is a Python reserved name as you may already know, ... | [
0.42970770597457886,
-0.49249494075775146,
-0.03554302453994751,
-0.20596645772457123,
0.2383749783039093,
-0.31972241401672363,
0.3596762418746948,
0.2973921597003937,
-0.5891165137290955,
-0.09301255643367767,
0.1290222853422165,
0.45158031582832336,
-0.3416737914085388,
-0.0773861184716... |
https://github.com/huggingface/datasets/issues/5511 | Creating a dummy dataset from a bigger one | Update `datasets` or downgrade `huggingface-hub` ;)
The `huggingface-hub` lib did a breaking change a few months ago, and you're using an old version of `datasets` that does't support it | ### Describe the bug
I often want to create a dummy dataset from a bigger dataset for fast iteration when training. However, I'm having a hard time doing this especially when trying to upload the dataset to the Hub.
### Steps to reproduce the bug
```python
from datasets import load_dataset
dataset = load_dataset... | 29 | Creating a dummy dataset from a bigger one
### Describe the bug
I often want to create a dummy dataset from a bigger dataset for fast iteration when training. However, I'm having a hard time doing this especially when trying to upload the dataset to the Hub.
### Steps to reproduce the bug
```python
from datasets ... | [
-0.10330459475517273,
-0.46017131209373474,
0.0648631751537323,
0.33494043350219727,
0.16239123046398163,
0.10790085047483444,
0.18772070109844208,
0.3316099941730499,
-0.1263197511434555,
0.2755588889122009,
0.06896834075450897,
0.13240064680576324,
-0.05003596842288971,
0.393280088901519... |
https://github.com/huggingface/datasets/issues/5511 | Creating a dummy dataset from a bigger one | Getting same error with latest versions.
```shell
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
Cell In[99], line 1
----> 1 dataset.push_to_hub("mirfan899/kids_phoneme_asr")
File /opt/conda/lib/python3.... | ### Describe the bug
I often want to create a dummy dataset from a bigger dataset for fast iteration when training. However, I'm having a hard time doing this especially when trying to upload the dataset to the Hub.
### Steps to reproduce the bug
```python
from datasets import load_dataset
dataset = load_dataset... | 237 | Creating a dummy dataset from a bigger one
### Describe the bug
I often want to create a dummy dataset from a bigger dataset for fast iteration when training. However, I'm having a hard time doing this especially when trying to upload the dataset to the Hub.
### Steps to reproduce the bug
```python
from datasets ... | [
-0.10330459475517273,
-0.46017131209373474,
0.0648631751537323,
0.33494043350219727,
0.16239123046398163,
0.10790085047483444,
0.18772070109844208,
0.3316099941730499,
-0.1263197511434555,
0.2755588889122009,
0.06896834075450897,
0.13240064680576324,
-0.05003596842288971,
0.393280088901519... |
https://github.com/huggingface/datasets/issues/5508 | Saving a dataset after setting format to torch doesn't work, but only if filtering | Hey, I'm a research engineer working on language modelling wanting to contribute to open source. I was wondering if I could give it a shot? | ### Describe the bug
Saving a dataset after setting format to torch doesn't work, but only if filtering
### Steps to reproduce the bug
```
a = Dataset.from_dict({"b": [1, 2]})
a.set_format('torch')
a.save_to_disk("test_save") # saves successfully
a.filter(None).save_to_disk("test_save_filter") # does not
>> [..... | 25 | Saving a dataset after setting format to torch doesn't work, but only if filtering
### Describe the bug
Saving a dataset after setting format to torch doesn't work, but only if filtering
### Steps to reproduce the bug
```
a = Dataset.from_dict({"b": [1, 2]})
a.set_format('torch')
a.save_to_disk("test_save") # s... | [
-0.37882277369499207,
-0.26239991188049316,
-0.03895370289683342,
0.09076978266239166,
0.3246902823448181,
0.060432739555835724,
0.5087522864341736,
0.22538132965564728,
-0.19273561239242554,
0.03264094144105911,
-0.21385417878627777,
0.32695838809013367,
-0.3333057761192322,
0.07247728854... |
https://github.com/huggingface/datasets/issues/5506 | IterableDataset and Dataset return different batch sizes when using Trainer with multiple GPUs | Hi ! `datasets` doesn't do batching - the PyTorch DataLoader does and is created by the `Trainer`. Do you pass other arguments to training_args with respect to data loading ?
Also we recently released `.to_iterable_dataset` that does pretty much what you implemented, but using contiguous shards to get a better speed... | ### Describe the bug
I am training a Roberta model using 2 GPUs and the `Trainer` API with a batch size of 256.
Initially I used a standard `Dataset`, but had issues with slow data loading. After reading [this issue](https://github.com/huggingface/datasets/issues/2252), I swapped to loading my dataset as contiguous... | 61 | IterableDataset and Dataset return different batch sizes when using Trainer with multiple GPUs
### Describe the bug
I am training a Roberta model using 2 GPUs and the `Trainer` API with a batch size of 256.
Initially I used a standard `Dataset`, but had issues with slow data loading. After reading [this issue](ht... | [
-0.35720178484916687,
-0.1617143303155899,
-0.023187974467873573,
0.5625223517417908,
0.11427915096282959,
-0.0774904265999794,
0.3926452100276947,
0.4203515648841858,
-0.26587170362472534,
0.0382477268576622,
-0.030516652390360832,
0.03927403688430786,
-0.0694391131401062,
-0.181423544883... |
https://github.com/huggingface/datasets/issues/5506 | IterableDataset and Dataset return different batch sizes when using Trainer with multiple GPUs | This is the full set of training args passed. No training args were changed when switching dataset types.
```python
training_args = TrainingArguments(
output_dir="./checkpoints",
overwrite_output_dir=True,
num_train_epochs=1,
per_device_train_batch_size=256,
save_steps=2000,
save_total... | ### Describe the bug
I am training a Roberta model using 2 GPUs and the `Trainer` API with a batch size of 256.
Initially I used a standard `Dataset`, but had issues with slow data loading. After reading [this issue](https://github.com/huggingface/datasets/issues/2252), I swapped to loading my dataset as contiguous... | 43 | IterableDataset and Dataset return different batch sizes when using Trainer with multiple GPUs
### Describe the bug
I am training a Roberta model using 2 GPUs and the `Trainer` API with a batch size of 256.
Initially I used a standard `Dataset`, but had issues with slow data loading. After reading [this issue](ht... | [
-0.35720178484916687,
-0.1617143303155899,
-0.023187974467873573,
0.5625223517417908,
0.11427915096282959,
-0.0774904265999794,
0.3926452100276947,
0.4203515648841858,
-0.26587170362472534,
0.0382477268576622,
-0.030516652390360832,
0.03927403688430786,
-0.0694391131401062,
-0.181423544883... |
https://github.com/huggingface/datasets/issues/5506 | IterableDataset and Dataset return different batch sizes when using Trainer with multiple GPUs | Makes sense. Given that it's a `transformers` issue and already being tracked, I'll close this out. | ### Describe the bug
I am training a Roberta model using 2 GPUs and the `Trainer` API with a batch size of 256.
Initially I used a standard `Dataset`, but had issues with slow data loading. After reading [this issue](https://github.com/huggingface/datasets/issues/2252), I swapped to loading my dataset as contiguous... | 16 | IterableDataset and Dataset return different batch sizes when using Trainer with multiple GPUs
### Describe the bug
I am training a Roberta model using 2 GPUs and the `Trainer` API with a batch size of 256.
Initially I used a standard `Dataset`, but had issues with slow data loading. After reading [this issue](ht... | [
-0.35720178484916687,
-0.1617143303155899,
-0.023187974467873573,
0.5625223517417908,
0.11427915096282959,
-0.0774904265999794,
0.3926452100276947,
0.4203515648841858,
-0.26587170362472534,
0.0382477268576622,
-0.030516652390360832,
0.03927403688430786,
-0.0694391131401062,
-0.181423544883... |
https://github.com/huggingface/datasets/issues/5505 | PyTorch BatchSampler still loads from Dataset one-by-one | This change seems to come from a few months ago in the PyTorch side. That's good news and it means we may not need to pass a batch_sampler as soon as we add `Dataset.__getitems__` to get the optimal speed :)
Thanks for reporting ! Would you like to open a PR to add `__getitems__` and remove this outdated documentati... | ### Describe the bug
In [the docs here](https://huggingface.co/docs/datasets/use_with_pytorch#use-a-batchsampler), it mentions the issue of the Dataset being read one-by-one, then states that using a BatchSampler resolves the issue.
I'm not sure if this is a mistake in the docs or the code, but it seems that the on... | 60 | PyTorch BatchSampler still loads from Dataset one-by-one
### Describe the bug
In [the docs here](https://huggingface.co/docs/datasets/use_with_pytorch#use-a-batchsampler), it mentions the issue of the Dataset being read one-by-one, then states that using a BatchSampler resolves the issue.
I'm not sure if this is ... | [
-0.1101192831993103,
-0.23176124691963196,
0.08417142927646637,
0.0453609898686409,
0.0064180102199316025,
-0.03963816165924072,
0.45273303985595703,
0.16254007816314697,
0.36948633193969727,
0.2220371663570404,
-0.22642146050930023,
0.371221661567688,
-0.052604660391807556,
-0.26595732569... |
https://github.com/huggingface/datasets/issues/5505 | PyTorch BatchSampler still loads from Dataset one-by-one | Yeah I figured this was the sort of thing that probably once worked. I can confirm that you no longer need the batch sampler, just `batch_size=n` in the `DataLoader`.
I'll pass on the PR, I'm flat out right now, sorry. | ### Describe the bug
In [the docs here](https://huggingface.co/docs/datasets/use_with_pytorch#use-a-batchsampler), it mentions the issue of the Dataset being read one-by-one, then states that using a BatchSampler resolves the issue.
I'm not sure if this is a mistake in the docs or the code, but it seems that the on... | 40 | PyTorch BatchSampler still loads from Dataset one-by-one
### Describe the bug
In [the docs here](https://huggingface.co/docs/datasets/use_with_pytorch#use-a-batchsampler), it mentions the issue of the Dataset being read one-by-one, then states that using a BatchSampler resolves the issue.
I'm not sure if this is ... | [
-0.1101192831993103,
-0.23176124691963196,
0.08417142927646637,
0.0453609898686409,
0.0064180102199316025,
-0.03963816165924072,
0.45273303985595703,
0.16254007816314697,
0.36948633193969727,
0.2220371663570404,
-0.22642146050930023,
0.371221661567688,
-0.052604660391807556,
-0.26595732569... |
https://github.com/huggingface/datasets/issues/5499 | `load_dataset` has ~4 seconds of overhead for cached data | Hi ! To skip the verification step that checks if newer data exist, you can enable offline mode with `HF_DATASETS_OFFLINE=1`.
Although I agree this step should be much faster for datasets hosted on the HF Hub - we could just compare the commit hash from the local data and the remote git repository. We're not been le... | ### Feature request
When loading a dataset that has been cached locally, the `load_dataset` function takes a lot longer than it should take to fetch the dataset from disk (or memory).
This is particularly noticeable for smaller datasets. For example, wikitext-2, comparing `load_data` (once cached) and `load_from_disk... | 77 | `load_dataset` has ~4 seconds of overhead for cached data
### Feature request
When loading a dataset that has been cached locally, the `load_dataset` function takes a lot longer than it should take to fetch the dataset from disk (or memory).
This is particularly noticeable for smaller datasets. For example, wikitex... | [
-0.3865840435028076,
-0.02502131462097168,
-0.08470572531223297,
-0.10525839030742645,
-0.13569878041744232,
0.05334455519914627,
0.34366053342819214,
0.5788078904151917,
0.5157313942909241,
0.2465118020772934,
-0.021490031853318214,
0.08896809071302414,
0.19552995264530182,
-0.03234231472... |
https://github.com/huggingface/datasets/issues/5498 | TypeError: 'bool' object is not iterable when filtering a datasets.arrow_dataset.Dataset | Hi! Instead of a single boolean, your filter function should return an iterable (of booleans) in the batched mode like so:
```python
train_dataset = train_dataset.filter(
function=lambda batch: [image is not None for image in batch["image"]],
batched=True,
batch_size=10)
```
... | ### Describe the bug
Hi,
Thanks for the amazing work on the library!
**Describe the bug**
I think I might have noticed a small bug in the filter method.
Having loaded a dataset using `load_dataset`, when I try to filter out empty entries with `batched=True`, I get a TypeError.
### Steps to reproduce the ... | 74 | TypeError: 'bool' object is not iterable when filtering a datasets.arrow_dataset.Dataset
### Describe the bug
Hi,
Thanks for the amazing work on the library!
**Describe the bug**
I think I might have noticed a small bug in the filter method.
Having loaded a dataset using `load_dataset`, when I try to fi... | [
-0.18260245025157928,
-0.2624393403530121,
0.019751515239477158,
0.10276506096124649,
-0.16956520080566406,
0.049563996493816376,
0.523794412612915,
0.17173705995082855,
0.12031163275241852,
0.0702308714389801,
0.05394410341978073,
0.1757829785346985,
-0.33603477478027344,
0.26592159271240... |
https://github.com/huggingface/datasets/issues/5498 | TypeError: 'bool' object is not iterable when filtering a datasets.arrow_dataset.Dataset | I hit the same issue and the error message isn't really clear on what's going wrong. It might be helpful to update the docs with a batched example. | ### Describe the bug
Hi,
Thanks for the amazing work on the library!
**Describe the bug**
I think I might have noticed a small bug in the filter method.
Having loaded a dataset using `load_dataset`, when I try to filter out empty entries with `batched=True`, I get a TypeError.
### Steps to reproduce the ... | 28 | TypeError: 'bool' object is not iterable when filtering a datasets.arrow_dataset.Dataset
### Describe the bug
Hi,
Thanks for the amazing work on the library!
**Describe the bug**
I think I might have noticed a small bug in the filter method.
Having loaded a dataset using `load_dataset`, when I try to fi... | [
-0.18260245025157928,
-0.2624393403530121,
0.019751515239477158,
0.10276506096124649,
-0.16956520080566406,
0.049563996493816376,
0.523794412612915,
0.17173705995082855,
0.12031163275241852,
0.0702308714389801,
0.05394410341978073,
0.1757829785346985,
-0.33603477478027344,
0.26592159271240... |
https://github.com/huggingface/datasets/issues/5496 | Add a `reduce` method | Hi! Sure, feel free to open a PR, so we can see the API you have in mind. | ### Feature request
Right now the `Dataset` class implements `map()` and `filter()`, but leaves out the third functional idiom popular among Python users: `reduce`.
### Motivation
A `reduce` method is often useful when calculating dataset statistics, for example, the occurrence of a particular n-gram or the average... | 18 | Add a `reduce` method
### Feature request
Right now the `Dataset` class implements `map()` and `filter()`, but leaves out the third functional idiom popular among Python users: `reduce`.
### Motivation
A `reduce` method is often useful when calculating dataset statistics, for example, the occurrence of a particul... | [
-0.5358853340148926,
0.045247241854667664,
-0.31286129355430603,
-0.1601305603981018,
0.0483379140496254,
-0.12517549097537994,
-0.021992456167936325,
0.509962797164917,
0.09587521851062775,
0.24032767117023468,
-0.04271135479211807,
0.5281162261962891,
-0.15741084516048431,
0.321919441223... |
https://github.com/huggingface/datasets/issues/5495 | to_tf_dataset fails with datetime UTC columns even if not included in columns argument | Hi! This is indeed a bug in our zero-copy logic.
To fix it, instead of the line:
https://github.com/huggingface/datasets/blob/7cfac43b980ab9e4a69c2328f085770996323005/src/datasets/features/features.py#L702
we should have:
```python
return pa.types.is_primitive(pa_type) and not (pa.types.is_boolean(pa_type) or ... | ### Describe the bug
There appears to be some eager behavior in `to_tf_dataset` that runs against every column in a dataset even if they aren't included in the columns argument. This is problematic with datetime UTC columns due to them not working with zero copy. If I don't have UTC information in my datetime column... | 30 | to_tf_dataset fails with datetime UTC columns even if not included in columns argument
### Describe the bug
There appears to be some eager behavior in `to_tf_dataset` that runs against every column in a dataset even if they aren't included in the columns argument. This is problematic with datetime UTC columns due ... | [
-0.03506900742650032,
-0.1291126310825348,
0.17251233756542206,
0.06727857142686844,
0.29345250129699707,
0.21920818090438843,
0.24181126058101654,
0.3881341218948364,
-0.027347443625330925,
0.14691618084907532,
0.31483665108680725,
0.4119403064250946,
-0.2279355376958847,
-0.2578629255294... |
https://github.com/huggingface/datasets/issues/5494 | Update audio installation doc page | Totally agree, the docs should be in sync with our code.
Indeed to avoid confusing users, I think we should have updated the docs at the same time as this PR:
- #5167 | Our [installation documentation page](https://huggingface.co/docs/datasets/installation#audio) says that one can use Datasets for mp3 only with `torchaudio<0.12`. `torchaudio>0.12` is actually supported too but requires a specific version of ffmpeg which is not easily installed on all linux versions but there is a cust... | 33 | Update audio installation doc page
Our [installation documentation page](https://huggingface.co/docs/datasets/installation#audio) says that one can use Datasets for mp3 only with `torchaudio<0.12`. `torchaudio>0.12` is actually supported too but requires a specific version of ffmpeg which is not easily installed on a... | [
-0.29123711585998535,
-0.17746642231941223,
-0.007997283712029457,
0.19306111335754395,
0.30590444803237915,
-0.12155362218618393,
0.0991264283657074,
0.03717200458049774,
-0.1649681031703949,
0.2726282477378845,
-0.36509016156196594,
0.32531046867370605,
-0.11304717510938644,
-0.026876278... |
https://github.com/huggingface/datasets/issues/5494 | Update audio installation doc page | No, @polinaeterna, nothing to be sorry about.
My comment was for all of us datasets team, as a reminder: when making a PR, but also when reviewing some other's PR, we should not forget to update the corresponding docstring and doc pages. It is something we can improve if we help each other in reminding about it... :... | Our [installation documentation page](https://huggingface.co/docs/datasets/installation#audio) says that one can use Datasets for mp3 only with `torchaudio<0.12`. `torchaudio>0.12` is actually supported too but requires a specific version of ffmpeg which is not easily installed on all linux versions but there is a cust... | 58 | Update audio installation doc page
Our [installation documentation page](https://huggingface.co/docs/datasets/installation#audio) says that one can use Datasets for mp3 only with `torchaudio<0.12`. `torchaudio>0.12` is actually supported too but requires a specific version of ffmpeg which is not easily installed on a... | [
-0.37036871910095215,
-0.12612512707710266,
-0.022752484306693077,
0.12756696343421936,
0.39078015089035034,
-0.11761356145143509,
0.0820467472076416,
0.03473973274230957,
-0.20442403852939606,
0.2120751440525055,
-0.38398346304893494,
0.3296096920967102,
-0.0924934670329094,
-0.0330597907... |
https://github.com/huggingface/datasets/issues/5494 | Update audio installation doc page | @polinaeterna I think we can close this issue now as we no longer use `torchaudio` for decoding. | Our [installation documentation page](https://huggingface.co/docs/datasets/installation#audio) says that one can use Datasets for mp3 only with `torchaudio<0.12`. `torchaudio>0.12` is actually supported too but requires a specific version of ffmpeg which is not easily installed on all linux versions but there is a cust... | 17 | Update audio installation doc page
Our [installation documentation page](https://huggingface.co/docs/datasets/installation#audio) says that one can use Datasets for mp3 only with `torchaudio<0.12`. `torchaudio>0.12` is actually supported too but requires a specific version of ffmpeg which is not easily installed on a... | [
-0.3492278754711151,
-0.27522164583206177,
-0.02893984131515026,
0.2887772023677826,
0.42535316944122314,
-0.09463135898113251,
0.011428140103816986,
0.09107545018196106,
-0.1292063295841217,
0.32439666986465454,
-0.4973611831665039,
0.4165091812610626,
-0.12207751721143723,
-0.03663776069... |
https://github.com/huggingface/datasets/issues/5492 | Push_to_hub in a pull request | Assigned to myself and will get to it in the next week, but if someone finds this issue annoying and wants to submit a PR before I do, just ping me here and I'll reassign :). | Right now `ds.push_to_hub()` can push a dataset on `main` or on a new branch with `branch=`, but there is no way to open a pull request. Even passing `branch=refs/pr/x` doesn't seem to work: it tries to create a branch with that name
cc @nateraw
It should be possible to tweak the use of `huggingface_hub` in `pus... | 36 | Push_to_hub in a pull request
Right now `ds.push_to_hub()` can push a dataset on `main` or on a new branch with `branch=`, but there is no way to open a pull request. Even passing `branch=refs/pr/x` doesn't seem to work: it tries to create a branch with that name
cc @nateraw
It should be possible to tweak the ... | [
-0.2519308924674988,
-0.7133582234382629,
-0.03401563689112663,
-0.1695120632648468,
0.019431566819548607,
-0.07171181589365005,
-0.12493543326854706,
0.09702903032302856,
0.15460267663002014,
-0.011190623044967651,
-0.007204016670584679,
0.18875309824943542,
0.1796169877052307,
0.30434718... |
https://github.com/huggingface/datasets/issues/5488 | Error loading MP3 files from CommonVoice | Hi @kradonneoh, thanks for reporting.
Please note that to work with audio datasets (and specifically with MP3 files) we have detailed installation instructions in our docs: https://huggingface.co/docs/datasets/installation#audio
- one of the requirements is torchaudio<0.12.0
Let us know if the problem persists a... | ### Describe the bug
When loading a CommonVoice dataset with `datasets==2.9.0` and `torchaudio>=0.12.0`, I get an error reading the audio arrays:
```python
---------------------------------------------------------------------------
LibsndfileError Traceback (most recent call last)
~/.l... | 45 | Error loading MP3 files from CommonVoice
### Describe the bug
When loading a CommonVoice dataset with `datasets==2.9.0` and `torchaudio>=0.12.0`, I get an error reading the audio arrays:
```python
---------------------------------------------------------------------------
LibsndfileError ... | [
-0.27887722849845886,
0.09802080690860748,
-0.0072275567799806595,
0.5162081122398376,
0.24328209459781647,
0.06495574861764908,
0.11021738499403,
0.31326258182525635,
0.04005209729075432,
0.313784122467041,
-0.48473861813545227,
0.43479225039482117,
-0.16472384333610535,
-0.48663079738616... |
https://github.com/huggingface/datasets/issues/5488 | Error loading MP3 files from CommonVoice | I saw that and have followed it (hence the Expected Behavior section of the bug report).
Is there no intention of updating to the latest version? It does limit the version of `torch` I can use, which isn’t ideal. | ### Describe the bug
When loading a CommonVoice dataset with `datasets==2.9.0` and `torchaudio>=0.12.0`, I get an error reading the audio arrays:
```python
---------------------------------------------------------------------------
LibsndfileError Traceback (most recent call last)
~/.l... | 39 | Error loading MP3 files from CommonVoice
### Describe the bug
When loading a CommonVoice dataset with `datasets==2.9.0` and `torchaudio>=0.12.0`, I get an error reading the audio arrays:
```python
---------------------------------------------------------------------------
LibsndfileError ... | [
-0.27887722849845886,
0.09802080690860748,
-0.0072275567799806595,
0.5162081122398376,
0.24328209459781647,
0.06495574861764908,
0.11021738499403,
0.31326258182525635,
0.04005209729075432,
0.313784122467041,
-0.48473861813545227,
0.43479225039482117,
-0.16472384333610535,
-0.48663079738616... |
https://github.com/huggingface/datasets/issues/5488 | Error loading MP3 files from CommonVoice | @kradonneoh hey! actually with `ffmpeg4` loading of mp3 files should work, so this is a not expected behavior and we need to investigate it. It works on my side with `torchaudio==0.13` and `ffmpeg==4.2.7`. Which `torchaudio` version do you use?
`datasets` should support decoding of mp3 files with `torchaudio` when i... | ### Describe the bug
When loading a CommonVoice dataset with `datasets==2.9.0` and `torchaudio>=0.12.0`, I get an error reading the audio arrays:
```python
---------------------------------------------------------------------------
LibsndfileError Traceback (most recent call last)
~/.l... | 137 | Error loading MP3 files from CommonVoice
### Describe the bug
When loading a CommonVoice dataset with `datasets==2.9.0` and `torchaudio>=0.12.0`, I get an error reading the audio arrays:
```python
---------------------------------------------------------------------------
LibsndfileError ... | [
-0.27887722849845886,
0.09802080690860748,
-0.0072275567799806595,
0.5162081122398376,
0.24328209459781647,
0.06495574861764908,
0.11021738499403,
0.31326258182525635,
0.04005209729075432,
0.313784122467041,
-0.48473861813545227,
0.43479225039482117,
-0.16472384333610535,
-0.48663079738616... |
https://github.com/huggingface/datasets/issues/5487 | Incorrect filepath for dill module | Hi! The correct path is still `dill._dill.XXXX` in the latest release. What do you get when you run `python -c "import dill; print(dill.__version__)"` in your environment? | ### Describe the bug
I installed the `datasets` package and when I try to `import` it, I get the following error:
```
Traceback (most recent call last):
File "/var/folders/jt/zw5g74ln6tqfdzsl8tx378j00000gn/T/ipykernel_3805/3458380017.py", line 1, in <module>
import datasets
File "/Users/avivbrokman/... | 26 | Incorrect filepath for dill module
### Describe the bug
I installed the `datasets` package and when I try to `import` it, I get the following error:
```
Traceback (most recent call last):
File "/var/folders/jt/zw5g74ln6tqfdzsl8tx378j00000gn/T/ipykernel_3805/3458380017.py", line 1, in <module>
import da... | [
-0.2769613564014435,
0.15094640851020813,
-0.10528561472892761,
0.3617427945137024,
0.1401957869529724,
0.010012879967689514,
0.4118015766143799,
0.19778048992156982,
-0.27519461512565613,
-0.2218220978975296,
-0.20238515734672546,
0.3167159855365753,
-0.3055160939693451,
-0.18682546913623... |
https://github.com/huggingface/datasets/issues/5487 | Incorrect filepath for dill module | `0.3.6` I feel like that's bad news, because it's probably not the issue.
My mistake, about the wrong path guess. I think I didn't notice that the first `dill` in the path isn't supposed to be included in the path specification in python.
<img width="146" alt="Screen Shot 2023-01-31 at 12 58 32 PM" src="https://us... | ### Describe the bug
I installed the `datasets` package and when I try to `import` it, I get the following error:
```
Traceback (most recent call last):
File "/var/folders/jt/zw5g74ln6tqfdzsl8tx378j00000gn/T/ipykernel_3805/3458380017.py", line 1, in <module>
import datasets
File "/Users/avivbrokman/... | 54 | Incorrect filepath for dill module
### Describe the bug
I installed the `datasets` package and when I try to `import` it, I get the following error:
```
Traceback (most recent call last):
File "/var/folders/jt/zw5g74ln6tqfdzsl8tx378j00000gn/T/ipykernel_3805/3458380017.py", line 1, in <module>
import da... | [
-0.2769613564014435,
0.15094640851020813,
-0.10528561472892761,
0.3617427945137024,
0.1401957869529724,
0.010012879967689514,
0.4118015766143799,
0.19778048992156982,
-0.27519461512565613,
-0.2218220978975296,
-0.20238515734672546,
0.3167159855365753,
-0.3055160939693451,
-0.18682546913623... |
https://github.com/huggingface/datasets/issues/5487 | Incorrect filepath for dill module | Hi, @avivbrokman, this issue you report appeared only with old versions of dill. See:
- #288
Are you sure you are in the right Python environment?
- Please note that Jupyter (where I guess you get the error) may have multiple execution backends (IPython kernels) that might be different from the Python environment ... | ### Describe the bug
I installed the `datasets` package and when I try to `import` it, I get the following error:
```
Traceback (most recent call last):
File "/var/folders/jt/zw5g74ln6tqfdzsl8tx378j00000gn/T/ipykernel_3805/3458380017.py", line 1, in <module>
import datasets
File "/Users/avivbrokman/... | 85 | Incorrect filepath for dill module
### Describe the bug
I installed the `datasets` package and when I try to `import` it, I get the following error:
```
Traceback (most recent call last):
File "/var/folders/jt/zw5g74ln6tqfdzsl8tx378j00000gn/T/ipykernel_3805/3458380017.py", line 1, in <module>
import da... | [
-0.2769613564014435,
0.15094640851020813,
-0.10528561472892761,
0.3617427945137024,
0.1401957869529724,
0.010012879967689514,
0.4118015766143799,
0.19778048992156982,
-0.27519461512565613,
-0.2218220978975296,
-0.20238515734672546,
0.3167159855365753,
-0.3055160939693451,
-0.18682546913623... |
https://github.com/huggingface/datasets/issues/5487 | Incorrect filepath for dill module | I'm using spyder, and I am still getting `0.3.6` for `dill`, so unfortunately #288 isn't applicable, I think. However, I found something odd that I believe is a clue:
```
import inspect
import dill
inspect.getfile(dill)
>>> '/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/dill/__init__.py'
```
... | ### Describe the bug
I installed the `datasets` package and when I try to `import` it, I get the following error:
```
Traceback (most recent call last):
File "/var/folders/jt/zw5g74ln6tqfdzsl8tx378j00000gn/T/ipykernel_3805/3458380017.py", line 1, in <module>
import datasets
File "/Users/avivbrokman/... | 152 | Incorrect filepath for dill module
### Describe the bug
I installed the `datasets` package and when I try to `import` it, I get the following error:
```
Traceback (most recent call last):
File "/var/folders/jt/zw5g74ln6tqfdzsl8tx378j00000gn/T/ipykernel_3805/3458380017.py", line 1, in <module>
import da... | [
-0.2769613564014435,
0.15094640851020813,
-0.10528561472892761,
0.3617427945137024,
0.1401957869529724,
0.010012879967689514,
0.4118015766143799,
0.19778048992156982,
-0.27519461512565613,
-0.2218220978975296,
-0.20238515734672546,
0.3167159855365753,
-0.3055160939693451,
-0.18682546913623... |
https://github.com/huggingface/datasets/issues/5487 | Incorrect filepath for dill module | As I said above, I guess this is not a problem with `datasets`. I think you have different Python environments: one with the new dill version (the one you get while using pip) and other with the old dill version (the one where you get the AttributeError).
You should update `dill` in the Python environment you are us... | ### Describe the bug
I installed the `datasets` package and when I try to `import` it, I get the following error:
```
Traceback (most recent call last):
File "/var/folders/jt/zw5g74ln6tqfdzsl8tx378j00000gn/T/ipykernel_3805/3458380017.py", line 1, in <module>
import datasets
File "/Users/avivbrokman/... | 76 | Incorrect filepath for dill module
### Describe the bug
I installed the `datasets` package and when I try to `import` it, I get the following error:
```
Traceback (most recent call last):
File "/var/folders/jt/zw5g74ln6tqfdzsl8tx378j00000gn/T/ipykernel_3805/3458380017.py", line 1, in <module>
import da... | [
-0.2769613564014435,
0.15094640851020813,
-0.10528561472892761,
0.3617427945137024,
0.1401957869529724,
0.010012879967689514,
0.4118015766143799,
0.19778048992156982,
-0.27519461512565613,
-0.2218220978975296,
-0.20238515734672546,
0.3167159855365753,
-0.3055160939693451,
-0.18682546913623... |
https://github.com/huggingface/datasets/issues/5486 | Adding `sep` to TextConfig | Hi @omar-araboghli, thanks for your proposal.
Have you tried to use "csv" loader instead of "text"? That already has a `sep` argument. | I have a local a `.txt` file that follows the `CONLL2003` format which I need to load using `load_script`. However, by using `sample_by='line'`, one can only split the dataset into lines without splitting each line into columns. Would it be reasonable to add a `sep` argument in combination with `sample_by='paragraph'` ... | 22 | Adding `sep` to TextConfig
I have a local a `.txt` file that follows the `CONLL2003` format which I need to load using `load_script`. However, by using `sample_by='line'`, one can only split the dataset into lines without splitting each line into columns. Would it be reasonable to add a `sep` argument in combination... | [
-0.17985977232456207,
-0.2951112389564514,
-0.13400746881961823,
-0.11365757882595062,
-0.01799459382891655,
0.09609770029783249,
0.6356440782546997,
0.04844085872173309,
-0.06427372992038727,
0.16888821125030518,
0.31319910287857056,
0.3941829204559326,
-0.07302205264568329,
0.68003898859... |
https://github.com/huggingface/datasets/issues/5486 | Adding `sep` to TextConfig | Hi @albertvillanova, thanks for the quick response!
Indeed, I have been trying to use `csv` instead of `text`. However I am still not able to define range of rows as one sequence, that is achievable with passing `sample_by='paragraph'` to the `TextConfig`
For instance, the below code
```python
import datasets... | I have a local a `.txt` file that follows the `CONLL2003` format which I need to load using `load_script`. However, by using `sample_by='line'`, one can only split the dataset into lines without splitting each line into columns. Would it be reasonable to add a `sep` argument in combination with `sample_by='paragraph'` ... | 116 | Adding `sep` to TextConfig
I have a local a `.txt` file that follows the `CONLL2003` format which I need to load using `load_script`. However, by using `sample_by='line'`, one can only split the dataset into lines without splitting each line into columns. Would it be reasonable to add a `sep` argument in combination... | [
-0.17985977232456207,
-0.2951112389564514,
-0.13400746881961823,
-0.11365757882595062,
-0.01799459382891655,
0.09609770029783249,
0.6356440782546997,
0.04844085872173309,
-0.06427372992038727,
0.16888821125030518,
0.31319910287857056,
0.3941829204559326,
-0.07302205264568329,
0.68003898859... |
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 ... | [
-0.08376411348581314,
-0.09851483255624771,
-0.0035651326179504395,
0.1099003255367279,
0.10157612711191177,
-0.2267303764820099,
-0.016706716269254684,
0.22576330602169037,
-0.09258498251438141,
-0.2656981945037842,
-0.06625132262706757,
0.8153367638587952,
-0.20344191789627075,
0.4364817... |
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 ... | [
-0.2476496398448944,
-0.16579218208789825,
-0.0633038654923439,
0.21691541373729706,
0.05626900866627693,
-0.1824914813041687,
-0.016658436506986618,
0.2160484790802002,
0.03514346107840538,
-0.06509920954704285,
0.09455104172229767,
0.7727559804916382,
-0.26848629117012024,
0.423409283161... |
https://github.com/huggingface/datasets/issues/5481 | Load a cached dataset as iterable | Hi ! Sure :) you can comment `#self-assign` to assign yourself to this issue.
I can give you some pointers to get started:
`load_dataset` works roughly this way:
1. it instantiate a dataset builder using `load_dataset_builder()`
2. the builder download and prepare the dataset as Arrow files in the cache using `... | The idea would be to allow something like
```python
ds = load_dataset("c4", "en", as_iterable=True)
```
To be used to train models. It would load an IterableDataset from the cached Arrow files.
Cc @stas00
Edit : from the discussions we may load from cache when streaming=True | 146 | Load a cached dataset as iterable
The idea would be to allow something like
```python
ds = load_dataset("c4", "en", as_iterable=True)
```
To be used to train models. It would load an IterableDataset from the cached Arrow files.
Cc @stas00
Edit : from the discussions we may load from cache when stream... | [
-0.4401951730251312,
0.035374611616134644,
-0.08761930465698242,
0.09599576890468597,
0.1853853464126587,
0.2552606165409088,
0.2815189063549042,
0.4225122928619385,
0.1766819953918457,
-0.13068343698978424,
-0.05066940188407898,
0.16501735150814056,
-0.37842506170272827,
0.083784967660903... |
https://github.com/huggingface/datasets/issues/5481 | Load a cached dataset as iterable | This use-case is a bit specific, and `load_dataset` already has enough parameters (plus, `streaming=True` also returns an iterable dataset, so we would have to explain the difference), so I think it would be better to add `IterableDataset.from_file` to the API (more flexible and aligned with the goal from https://githu... | The idea would be to allow something like
```python
ds = load_dataset("c4", "en", as_iterable=True)
```
To be used to train models. It would load an IterableDataset from the cached Arrow files.
Cc @stas00
Edit : from the discussions we may load from cache when streaming=True | 50 | Load a cached dataset as iterable
The idea would be to allow something like
```python
ds = load_dataset("c4", "en", as_iterable=True)
```
To be used to train models. It would load an IterableDataset from the cached Arrow files.
Cc @stas00
Edit : from the discussions we may load from cache when stream... | [
-0.417756050825119,
-0.17543089389801025,
-0.04263514280319214,
0.06517580896615982,
0.16342905163764954,
0.17753955721855164,
0.2944328188896179,
0.38115009665489197,
0.3552761673927307,
-0.062385037541389465,
-0.04091409593820572,
0.12226374447345734,
-0.30564063787460327,
0.273185282945... |
https://github.com/huggingface/datasets/issues/5481 | Load a cached dataset as iterable | > This use-case is a bit specific
This allows to use `datasets` for large scale training where map-style datasets are too slow and use too much memory in PyTorch. So I would still consider adding it.
Alternatively we could add this feature one level bellow:
```python
builder = load_dataset_builder(...)
builder... | The idea would be to allow something like
```python
ds = load_dataset("c4", "en", as_iterable=True)
```
To be used to train models. It would load an IterableDataset from the cached Arrow files.
Cc @stas00
Edit : from the discussions we may load from cache when streaming=True | 54 | Load a cached dataset as iterable
The idea would be to allow something like
```python
ds = load_dataset("c4", "en", as_iterable=True)
```
To be used to train models. It would load an IterableDataset from the cached Arrow files.
Cc @stas00
Edit : from the discussions we may load from cache when stream... | [
-0.4622906744480133,
-0.025394022464752197,
-0.07936936616897583,
0.031785715371370316,
0.12096770107746124,
0.23055285215377808,
0.3271862864494324,
0.4027569890022278,
0.23554116487503052,
-0.07977926731109619,
0.006359554827213287,
0.1989315301179886,
-0.38240280747413635,
0.09204754233... |
https://github.com/huggingface/datasets/issues/5481 | Load a cached dataset as iterable | Yes, I see how this can be useful. Still, I think `Dataset.to_iterable` + `IterableDataset.from_file` would be much cleaner in terms of the API design (and more flexible since `load_dataset` can only access the "initial" (unprocessed) version of a dataset).
And since it can be tricky to manually find the "initial" v... | The idea would be to allow something like
```python
ds = load_dataset("c4", "en", as_iterable=True)
```
To be used to train models. It would load an IterableDataset from the cached Arrow files.
Cc @stas00
Edit : from the discussions we may load from cache when streaming=True | 75 | Load a cached dataset as iterable
The idea would be to allow something like
```python
ds = load_dataset("c4", "en", as_iterable=True)
```
To be used to train models. It would load an IterableDataset from the cached Arrow files.
Cc @stas00
Edit : from the discussions we may load from cache when stream... | [
-0.45291846990585327,
-0.016842924058437347,
-0.12488701939582825,
-0.06570792198181152,
0.08305391669273376,
0.243190735578537,
0.23844845592975616,
0.4473229944705963,
0.3207477629184723,
-0.10691706836223602,
0.1624637097120285,
0.1538330763578415,
-0.356915682554245,
0.1333274990320205... |
https://github.com/huggingface/datasets/issues/5481 | Load a cached dataset as iterable | > This allows to use datasets for large scale training where map-style datasets are too slow and use too much memory in PyTorch.
I second that. e.g. In my last experiment Oscar-en uses 16GB RSS RAM per process and when using multiple processes the host quickly runs out cpu memory. | The idea would be to allow something like
```python
ds = load_dataset("c4", "en", as_iterable=True)
```
To be used to train models. It would load an IterableDataset from the cached Arrow files.
Cc @stas00
Edit : from the discussions we may load from cache when streaming=True | 50 | Load a cached dataset as iterable
The idea would be to allow something like
```python
ds = load_dataset("c4", "en", as_iterable=True)
```
To be used to train models. It would load an IterableDataset from the cached Arrow files.
Cc @stas00
Edit : from the discussions we may load from cache when stream... | [
-0.4272119402885437,
-0.13766340911388397,
-0.08257205784320831,
0.034330710768699646,
0.13773183524608612,
0.2024301290512085,
0.25033000111579895,
0.3894108831882477,
0.3153528869152069,
-0.07966470718383789,
0.030516259372234344,
0.16636428236961365,
-0.4187723994255066,
0.0650161132216... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.