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/5156 | Unable to download dataset using Azure Data Lake Gen 2 | Hi ! From the `adlfs` docs, there are two filesystems you can use:
> To use the Gen1 filesystem:
> - known_implementations[‘adl’] = {‘class’: ‘adlfs.AzureDatalakeFileSystem’}
>
> To use the Gen2 filesystem:
> - known_implementations[‘abfs’] = {‘class’: ‘adlfs.AzureBlobFileSystem’}
If I'm not mistaken you're using the second one - so you should use `abfs://` instead of `adl://`, and also run this at the beginning of your script:
```python
from fsspec.registry import known_implementations
known_implementations['abfs'] = {'class': 'adlfs.AzureDatalakeFileSystem'}
```
| ### Describe the bug
When using the DatasetBuilder method with the credentials for the cloud storage Azure Data Lake (adl) Gen2, the following error is showed:
```
Traceback (most recent call last):
File "download_hf_dataset.py", line 143, in <module>
main()
File "download_hf_dataset.py", line 102, in main
builder.download_and_prepare(save_dir, storage_options=storage_options, max_shard_size="250MB", file_format="parquet")
File "/home/clarisses/miniconda3/envs/hf_datasets_env/lib/python3.8/site-packages/datasets/builder.py", line 671, in download_and_prepare
fs_token_paths = fsspec.get_fs_token_paths(output_dir, storage_options=storage_options)
File "/home/clarisses/miniconda3/envs/hf_datasets_env/lib/python3.8/site-packages/fsspec/core.py", line 639, in get_fs_token_paths
fs = cls(**options)
File "/home/clarisses/miniconda3/envs/hf_datasets_env/lib/python3.8/site-packages/fsspec/spec.py", line 76, in __call__
obj = super().__call__(*args, **kwargs)
TypeError: __init__() got an unexpected keyword argument 'account_name'
```
If I don't pass the storage_options argument (leave it as None), it requires the credentials used in ADL Gen 1:
`TypeError: __init__() missing 3 required positional arguments: 'tenant_id', 'client_id', and 'client_secret'`
Thus, it is not possible to download a dataset from the cloud using Azure Data Lake (adl) Gen2.
### Steps to reproduce the bug
Assuming that you have an account on Azure and at Storage Account that can be used for reproduce:
1. Create a dict with the format to connect to Azure Data Lake Gen 2
```
storage_options = {"account_name": ACCOUNT_NAME, "account_key": ACCOUNT_KEY) # gen 2 filesystem
```
2. Create a dataset builder for any HF hosted dataset
```
builder = load_dataset_builder(dataset_name)
```
3. Try to download the dataset passing the storage_options as an argument
```
save_dir = 'adl://my_save_dir'
builder.download_and_prepare(save_dir, storage_options=storage_options, max_shard_size="250MB", file_format="parquet")
```
### Expected behavior
Not seeing the error mentioned above and being able to download the dataset to the provided path on ADL
### Environment info
- `datasets` version: 2.6.1
- Platform: Linux-5.15.0-46-generic-x86_64-with-glibc2.17
- Python version: 3.8.13
- PyArrow version: 9.0.0
- Pandas version: 1.5.1 | 76 | Unable to download dataset using Azure Data Lake Gen 2
### Describe the bug
When using the DatasetBuilder method with the credentials for the cloud storage Azure Data Lake (adl) Gen2, the following error is showed:
```
Traceback (most recent call last):
File "download_hf_dataset.py", line 143, in <module>
main()
File "download_hf_dataset.py", line 102, in main
builder.download_and_prepare(save_dir, storage_options=storage_options, max_shard_size="250MB", file_format="parquet")
File "/home/clarisses/miniconda3/envs/hf_datasets_env/lib/python3.8/site-packages/datasets/builder.py", line 671, in download_and_prepare
fs_token_paths = fsspec.get_fs_token_paths(output_dir, storage_options=storage_options)
File "/home/clarisses/miniconda3/envs/hf_datasets_env/lib/python3.8/site-packages/fsspec/core.py", line 639, in get_fs_token_paths
fs = cls(**options)
File "/home/clarisses/miniconda3/envs/hf_datasets_env/lib/python3.8/site-packages/fsspec/spec.py", line 76, in __call__
obj = super().__call__(*args, **kwargs)
TypeError: __init__() got an unexpected keyword argument 'account_name'
```
If I don't pass the storage_options argument (leave it as None), it requires the credentials used in ADL Gen 1:
`TypeError: __init__() missing 3 required positional arguments: 'tenant_id', 'client_id', and 'client_secret'`
Thus, it is not possible to download a dataset from the cloud using Azure Data Lake (adl) Gen2.
### Steps to reproduce the bug
Assuming that you have an account on Azure and at Storage Account that can be used for reproduce:
1. Create a dict with the format to connect to Azure Data Lake Gen 2
```
storage_options = {"account_name": ACCOUNT_NAME, "account_key": ACCOUNT_KEY) # gen 2 filesystem
```
2. Create a dataset builder for any HF hosted dataset
```
builder = load_dataset_builder(dataset_name)
```
3. Try to download the dataset passing the storage_options as an argument
```
save_dir = 'adl://my_save_dir'
builder.download_and_prepare(save_dir, storage_options=storage_options, max_shard_size="250MB", file_format="parquet")
```
### Expected behavior
Not seeing the error mentioned above and being able to download the dataset to the provided path on ADL
### Environment info
- `datasets` version: 2.6.1
- Platform: Linux-5.15.0-46-generic-x86_64-with-glibc2.17
- Python version: 3.8.13
- PyArrow version: 9.0.0
- Pandas version: 1.5.1
Hi ! From the `adlfs` docs, there are two filesystems you can use:
> To use the Gen1 filesystem:
> - known_implementations[‘adl’] = {‘class’: ‘adlfs.AzureDatalakeFileSystem’}
>
> To use the Gen2 filesystem:
> - known_implementations[‘abfs’] = {‘class’: ‘adlfs.AzureBlobFileSystem’}
If I'm not mistaken you're using the second one - so you should use `abfs://` instead of `adl://`, and also run this at the beginning of your script:
```python
from fsspec.registry import known_implementations
known_implementations['abfs'] = {'class': 'adlfs.AzureDatalakeFileSystem'}
```
| [
0.007943641394376755,
0.22752279043197632,
0.008019868284463882,
0.23792657256126404,
0.09995664656162262,
0.1969153881072998,
0.18387220799922943,
0.19614644348621368,
-0.05162261053919792,
-0.16205672919750214,
-0.02739519439637661,
-0.006244535557925701,
0.23231925070285797,
0.11577480286359787,
0.06217158958315849,
-0.14681625366210938,
0.06896603107452393,
0.041803643107414246,
-0.22745269536972046,
0.03948894143104553,
-0.16260980069637299,
0.22406311333179474,
-0.0439194031059742,
0.09229294955730438,
0.013923054561018944,
0.04565799608826637,
-0.1451137810945511,
0.2088007628917694,
-0.2447453886270523,
-0.32522377371788025,
0.1856880933046341,
0.04442405328154564,
0.21219691634178162,
-0.052528850734233856,
-0.00011962045391555876,
0.09590853750705719,
0.1959754377603531,
-0.062162093818187714,
-0.32365208864212036,
-0.20500124990940094,
0.03943164646625519,
0.009961195290088654,
0.10352542996406555,
-0.3278973400592804,
0.21032601594924927,
0.06965601444244385,
0.028988759964704514,
-0.35426172614097595,
0.5778915882110596,
0.2921009063720703,
0.2282661497592926,
-0.15950071811676025,
0.2683534622192383,
-0.12259455770254135,
-0.11582673341035843,
0.044956475496292114,
-0.22856667637825012,
0.07190382480621338,
0.2500379681587219,
0.14227326214313507,
0.034297797828912735,
0.1107783317565918,
-0.07881981134414673,
0.2625519037246704,
0.26762089133262634,
0.11232568323612213,
0.24413251876831055,
-0.30887189507484436,
0.33070844411849976,
-0.07618805021047592,
0.7068105936050415,
-0.15865370631217957,
-0.39321330189704895,
-0.04711395874619484,
0.10434890538454056,
0.15538544952869415,
0.4085442125797272,
0.07155068963766098,
-0.39254137873649597,
0.03561007231473923,
-0.3528866469860077,
-0.4848954975605011,
-0.2134999930858612,
-0.07637438178062439,
0.1271580010652542,
0.16829361021518707,
-0.08730829507112503,
0.1737832874059677,
0.00975915789604187,
-0.06345053017139435,
0.1920035183429718,
-0.0300028957426548,
-0.32733631134033203,
0.30476438999176025,
-0.33320823311805725,
0.026101864874362946,
-0.0875391736626625,
-0.18417754769325256,
0.12981033325195312,
0.18079215288162231,
0.32451245188713074,
-0.384024441242218,
-0.04292161762714386,
-0.03313356637954712,
0.011746580712497234,
0.1933959275484085,
0.2784356474876404,
-0.13887207210063934,
0.10479487478733063,
0.05094616115093231,
0.11257587373256683,
-0.20252084732055664,
-0.1464635133743286,
-0.11874735355377197,
-0.021126987412571907,
0.0758943110704422,
0.08175867050886154,
-0.33025240898132324,
-0.4745492935180664,
0.2613758444786072,
-0.369291752576828,
0.0754009336233139,
0.26318737864494324,
0.17252182960510254,
-0.04086848720908165,
0.052717432379722595,
0.2415013164281845,
0.2043665647506714,
-0.0537211075425148,
-0.4082185626029968,
-0.13111288845539093,
-0.05532329902052879,
0.1084718257188797,
-0.013041436672210693,
0.2601507306098938,
-0.24656060338020325,
0.37921732664108276,
0.29098427295684814,
-0.18162523210048676,
0.07943752408027649,
0.016789333894848824,
-0.19281327724456787,
-0.25622910261154175,
0.11414965987205505,
0.16538916528224945,
0.03757081925868988,
-0.10400702059268951,
-0.2577083110809326,
0.13339069485664368,
-0.07803557068109512,
-0.34489530324935913,
-0.27628839015960693,
-0.39352771639823914,
0.12178760021924973,
-0.14104726910591125,
0.04285167157649994,
-0.27046310901641846,
0.1308417022228241,
-0.044684357941150665,
-0.08011406660079956,
-0.2670442759990692,
0.04565788805484772,
-0.06940010190010071,
-0.12226787209510803,
0.41138800978660583,
0.2610263228416443,
-0.48035919666290283,
-0.0001541227102279663,
-0.36928123235702515,
-0.0891057699918747,
0.1336330622434616,
-0.17881499230861664,
-0.08171753585338593,
0.16017714142799377,
-0.2509552538394928,
0.3113654851913452,
0.18597501516342163,
-0.3714340627193451,
-0.5458224415779114,
0.49680036306381226,
0.03184393048286438,
-0.37139710783958435,
0.1374664306640625,
0.004180855117738247,
0.4402630031108856,
-0.045757144689559937,
-0.02486375719308853,
0.1383906602859497,
-0.10793782770633698,
-0.08410224318504333,
-0.10262054204940796,
-0.2521091103553772,
-0.3844097852706909,
0.12303626537322998,
-0.06798408925533295,
0.2032063901424408,
0.30369043350219727,
0.5065411925315857,
0.14831390976905823,
0.025357477366924286,
0.26246878504753113,
0.15855537354946136,
0.10164573788642883,
-0.20778970420360565,
-0.09284352511167526,
0.21342095732688904,
-0.8136515021324158,
0.2805800139904022,
-0.10630537569522858,
0.04538075625896454,
-0.04576152563095093,
0.23978756368160248,
-0.201655775308609,
-0.08964458107948303,
-0.20128779113292694,
0.026458999142050743,
0.05438391864299774,
-0.14179114997386932,
0.22293290495872498,
-0.1017613559961319,
0.13075222074985504,
0.007299039512872696,
-0.17475803196430206,
0.03840184584259987,
0.3903687596321106,
0.5705410242080688,
0.05830094963312149,
-0.19543048739433289,
-0.011116378009319305,
-0.20373034477233887,
0.3287416696548462,
0.10148516297340393,
-0.28669580817222595,
0.252876877784729,
-0.12809039652347565,
0.2651106119155884,
0.09393815696239471,
0.11712032556533813,
0.06192012131214142,
-0.011530406773090363,
0.18139895796775818,
-0.14677628874778748,
0.14438289403915405,
-0.1313880980014801,
0.12302253395318985,
0.09194208681583405,
0.1849215179681778,
0.3568962514400482,
0.004735220223665237,
0.3130732476711273,
0.19151940941810608,
-0.007212094962596893,
0.3031019866466522,
-0.1983679085969925,
0.19217418134212494,
0.11469434201717377,
0.3925507068634033,
-0.3151474595069885,
-0.3916800618171692,
0.11004313081502914,
-0.06286536157131195,
0.23363003134727478,
-0.08741245418787003,
0.09521284699440002,
-0.12672406435012817,
-0.09810987114906311,
0.4106031656265259,
0.297548770904541,
0.7392265200614929,
0.015390705317258835,
-0.08154818415641785,
0.14476865530014038,
-0.09050730615854263,
-0.183436781167984,
0.18015149235725403,
-0.09467054903507233,
0.18146952986717224,
0.14540576934814453,
0.20440644025802612,
0.08595124632120132,
-0.15491923689842224,
0.06101970747113228,
0.4533306658267975,
0.22452068328857422,
-0.346122145652771,
-0.0053749773651361465,
-0.13187964260578156,
-0.22841587662696838,
0.11970511078834534,
0.1984383463859558,
-0.18549814820289612,
-0.39817890524864197,
-0.11845996975898743,
0.543586254119873,
0.018386472016572952,
-0.17547725141048431,
-0.2692851126194,
0.18231268227100372,
0.06529244035482407,
-0.10325240343809128,
-0.39028406143188477,
0.3159090578556061,
-0.2691638767719269,
0.0992811918258667,
0.36364924907684326,
-0.17346414923667908,
0.3346543312072754,
0.05030583590269089,
-0.0577821284532547,
-0.8538766503334045,
-0.3177332878112793,
0.2838614583015442,
0.11414305120706558,
0.5853000283241272,
0.17984038591384888,
0.2741510272026062,
-0.10472427308559418,
-0.08691181242465973,
0.14741730690002441,
0.018887056037783623,
-0.4085313677787781,
-0.06348368525505066,
-0.4349779486656189,
-0.17129242420196533,
-0.36638423800468445,
-0.13479295372962952,
-0.10506681352853775,
-0.05730241537094116,
0.04234399273991585,
0.2373037189245224,
0.2981347441673279,
-0.1309649497270584,
-0.2617056369781494,
0.14878377318382263,
0.1984436959028244,
0.2074737548828125,
-0.27088579535484314,
-0.6338189840316772,
0.12192409485578537,
-0.22439135611057281,
-0.23804061114788055,
0.24954378604888916,
0.10070227086544037,
0.47538140416145325,
-0.010297585278749466,
-0.5225910544395447,
-0.20631010830402374,
-0.11681033670902252,
0.0527271144092083,
-0.2677364647388458,
-0.17955006659030914,
0.08708996325731277,
-0.09609393775463104,
0.18515121936798096,
-0.13767854869365692,
-0.019688185304403305,
0.5078467130661011,
0.3816928565502167,
0.223684623837471,
0.09361545741558075,
0.3996657729148865,
0.18293949961662292,
0.3908116817474365,
0.22747579216957092,
0.05014494061470032,
0.44284898042678833,
-0.17668713629245758,
-0.1936505287885666,
-0.33435311913490295,
-0.13568751513957977,
0.40410977602005005,
0.06743466109037399,
0.14764247834682465,
-0.07414665818214417,
0.13218551874160767,
0.0347197949886322,
-0.09968193620443344,
0.3043379485607147,
-0.25811827182769775,
-0.25114354491233826,
-0.272771418094635,
-0.2972826361656189,
0.08693521469831467,
0.1396895796060562,
0.3405901789665222,
-0.021553684026002884,
-0.12941280007362366,
-0.12463277578353882,
0.11455944180488586,
0.21716627478599548,
0.27599573135375977,
-0.045561958104372025,
-0.25331270694732666,
-0.6627150774002075,
0.4218142628669739,
-0.05143899470567703,
0.30285850167274475,
-0.3761156499385834,
0.3023659288883209,
0.18500399589538574,
-0.11778769642114639,
0.3097028136253357,
-0.2323872596025467,
0.16789044439792633,
-0.05069601535797119,
0.0984216034412384,
-0.15317974984645844,
-0.2952174246311188,
0.07042232155799866,
0.2903304398059845,
0.19961848855018616,
0.23519860208034515,
-0.38137033581733704,
-0.13824766874313354,
-0.021130844950675964,
-0.18256616592407227,
-0.05887794494628906,
-0.022590136155486107,
0.03265349939465523,
-0.347874253988266,
-0.13827021420001984,
-0.07439412921667099,
-0.15908029675483704,
0.340825617313385,
0.09726116806268692,
0.1895759403705597,
0.07234522700309753,
0.1093331053853035,
0.18676745891571045,
0.1476101577281952,
0.3227901756763458,
-0.012774511240422726,
0.3971034586429596,
0.37981340289115906,
-0.11796058714389801,
0.14169976115226746,
0.5419377088546753,
0.28940877318382263,
0.060713425278663635,
0.22900289297103882,
-0.16909952461719513,
0.14151543378829956,
0.2126670777797699,
-0.262682169675827,
0.13586604595184326,
-0.23290997743606567,
0.052585702389478683,
-0.11014626175165176,
0.15470118820667267,
0.22638216614723206,
-0.09717798978090286,
-0.05389838293194771,
-0.5124441981315613,
0.2521085739135742,
0.022021587938070297,
-0.15793611109256744,
0.2735584080219269,
0.11438553035259247,
-0.4964890480041504,
0.02687530592083931,
0.14581719040870667,
0.40963050723075867,
0.27270543575286865,
0.050435733050107956,
0.3275853097438812,
0.3054869771003723,
0.36864081025123596,
0.1788647472858429,
-0.07023221254348755,
-0.2954334020614624,
-0.029148925095796585,
-0.21174967288970947,
0.055720146745443344,
0.2371748983860016,
0.2182302325963974,
-0.22727146744728088,
0.3172999620437622,
-0.04458156228065491,
0.1461118757724762,
0.19567541778087616,
0.19606825709342957,
-0.3934975564479828,
-0.32642921805381775,
-0.1142665296792984,
0.19247329235076904,
-0.2717728614807129,
0.20419564843177795,
0.013008944690227509,
-0.21894614398479462,
-0.07787000387907028,
-0.366011381149292,
-0.37342649698257446,
0.3128111958503723,
-0.36305299401283264,
0.14658580720424652,
0.021997777745127678,
0.13446925580501556,
0.4203172028064728,
0.297624796628952,
0.31212514638900757,
0.044069357216358185,
-0.25829076766967773,
0.22246985137462616,
0.12610125541687012,
0.17970320582389832,
0.2806287109851837,
-0.03353847935795784,
0.036657314747571945,
-0.20391002297401428,
0.008632034063339233,
-0.004022419452667236,
-0.1649359166622162,
-0.10073646157979965,
-0.13448864221572876,
-0.19910527765750885,
0.17578068375587463,
-0.10425306856632233,
-0.06540882587432861,
-0.0014628618955612183,
-0.28565412759780884,
-0.17181061208248138,
0.05471235513687134,
-0.013767845928668976,
0.04478554055094719,
-0.014360174536705017,
-0.16115382313728333,
0.01298234611749649,
0.1447066366672516,
0.3112638592720032,
-0.2047111690044403,
0.1739387810230255,
0.7150832414627075,
-0.07197144627571106,
0.13886043429374695,
-0.15195049345493317,
0.13012567162513733,
-0.4300231635570526,
-0.22331726551055908,
0.1847541183233261,
0.02991122379899025,
-0.05978360027074814,
-0.006110404152423143,
0.18921582400798798,
0.060652438551187515,
0.15118059515953064,
0.11030896008014679,
-0.30625879764556885,
-0.21387727558612823,
0.09298481792211533,
-0.3593214154243469,
-0.09794260561466217,
-0.2525225877761841,
0.3495725989341736,
0.06630849093198776,
-0.2864830493927002,
-0.2178570032119751,
0.05873633176088333,
-0.15122509002685547,
-0.08537885546684265,
-0.12722119688987732,
0.047084975987672806,
0.12559470534324646,
-0.10165348649024963,
0.10423657298088074,
0.1305733323097229,
-0.1404714584350586,
-0.09897290170192719,
-0.23299062252044678,
0.13139790296554565,
0.08552280068397522,
-0.30103060603141785,
-0.03201659768819809,
-0.38067978620529175,
-0.43707436323165894,
0.17978806793689728,
0.10979343950748444,
0.1541973352432251,
0.020760662853717804,
-0.04277007654309273,
0.32300180196762085,
0.042145900428295135,
-0.1973051130771637,
0.20306392014026642,
-0.010816119611263275,
0.4178280830383301,
-0.2047702968120575,
0.3826056122779846,
-0.07777246832847595,
0.03865683823823929,
-0.267689973115921,
0.18819892406463623,
-0.3659290075302124,
-0.16946470737457275,
0.2796504497528076,
-0.1747715324163437,
0.1210450828075409,
-0.08055911213159561,
0.0900718942284584,
0.17795607447624207,
-0.222146674990654,
0.08989973366260529,
0.12410788238048553,
0.1925375908613205,
-0.041138287633657455,
-0.0016542136436328292,
-0.16341902315616608,
0.11995901167392731,
0.02032903954386711,
-0.017299778759479523,
0.13140447437763214,
-0.1536450982093811,
-0.3760247230529785,
0.034542523324489594,
0.4241912066936493,
-0.09061704576015472,
0.11612126231193542,
0.4912559688091278,
0.027804944664239883,
0.3133527636528015,
0.24993792176246643,
-0.27031421661376953,
-0.28332382440567017,
0.3879989981651306,
-0.19571170210838318,
-0.1514485776424408,
0.12414349615573883,
0.19428294897079468,
0.36894091963768005,
-0.4002887010574341,
-0.15389038622379303,
0.18204307556152344,
-0.1897825300693512,
0.11884951591491699,
-0.04658740758895874,
0.3653774559497833,
-0.0366763211786747,
-0.3229553699493408,
-0.5286081433296204,
0.34015196561813354,
-0.22830158472061157,
-0.04885657876729965,
-0.6750702857971191,
-0.1986522674560547,
0.05005145072937012,
0.16597880423069,
-0.20789170265197754,
-0.4344862699508667,
0.1012423187494278,
0.0629439651966095,
-0.08950862288475037,
-0.3867102861404419,
-0.24239569902420044,
0.4188181459903717,
-0.0935506597161293,
-0.2940652668476105,
0.5436410307884216,
0.21776436269283295,
-0.07726839184761047,
0.3298938572406769,
0.36849966645240784,
0.3344617486000061,
0.39844104647636414,
0.1631486862897873,
-0.09107588231563568,
0.22973868250846863,
-0.21607705950737,
-0.038217466324567795,
0.22904767096042633,
0.2295287698507309,
-0.047787752002477646,
0.3515125811100006,
0.10511269420385361,
-0.011272171512246132,
0.044420816004276276,
-0.011782955378293991,
0.45735445618629456,
-0.023015180602669716,
0.4993676245212555,
-0.31711670756340027,
0.1202676072716713,
0.08852265775203705,
0.19295936822891235,
-0.3544374108314514,
-0.3567494750022888,
0.12941941618919373,
-0.08999703824520111,
0.2572464644908905,
-0.11398638039827347,
0.016563840210437775,
-0.22894400358200073,
0.23980677127838135,
0.010357368737459183,
0.002149004489183426,
-0.41038814187049866,
-0.2501009702682495,
-0.45047643780708313,
-0.32458022236824036,
0.19874221086502075,
-0.0444265641272068,
0.11429489403963089,
0.34905678033828735,
-0.10180587321519852,
-0.08335284143686295,
0.06499457359313965,
0.2842080593109131,
-0.0089163389056921,
0.08825770020484924,
-0.3364410996437073,
-0.17147314548492432,
0.22762201726436615,
0.02956187166273594,
-0.1320192515850067,
-0.4051891267299652,
0.34427610039711,
0.04723794385790825,
-0.05082767829298973,
-0.029839184135198593,
0.15002372860908508,
0.1930762529373169,
0.29466739296913147,
0.25570929050445557,
0.06297920644283295,
0.5637892484664917,
-0.013591930270195007,
-0.12296511232852936,
-0.1938382387161255,
-0.4384525716304779,
-0.23751835525035858,
-0.1957065761089325,
-0.23052465915679932,
0.4693877100944519,
-0.03448205813765526,
0.1994885355234146,
-0.17385302484035492,
-0.1000126302242279,
-0.15075039863586426,
-0.023887762799859047,
-0.861813485622406,
0.48804423213005066,
-0.41690754890441895,
0.45225223898887634,
-0.21461735665798187,
0.036727387458086014,
0.030241994187235832,
0.0955222025513649,
-0.32611119747161865,
-0.29290124773979187,
0.561587929725647,
-0.2153431475162506,
0.0926278829574585,
0.0955442413687706,
0.25363045930862427,
-0.012824378907680511,
-0.2677324712276459,
-0.29989585280418396,
-0.16359323263168335,
0.33734843134880066,
-0.3155955970287323,
-0.32284781336784363,
0.25305500626564026,
-0.023772049695253372,
0.1102132648229599,
-0.01103173941373825,
0.16973444819450378,
0.12632670998573303,
-0.39785236120224,
0.15540388226509094,
-0.09339211881160736
] |
https://github.com/huggingface/datasets/issues/5156 | Unable to download dataset using Azure Data Lake Gen 2 | Thank you @lhoestq . Great call.
Using the default class from `known_implementations` dict solved my problem
```
known_implementations[‘abfs’] = {‘class’: ‘adlfs.AzureBlobFileSystem’}
```
I'm closing this issue. | ### Describe the bug
When using the DatasetBuilder method with the credentials for the cloud storage Azure Data Lake (adl) Gen2, the following error is showed:
```
Traceback (most recent call last):
File "download_hf_dataset.py", line 143, in <module>
main()
File "download_hf_dataset.py", line 102, in main
builder.download_and_prepare(save_dir, storage_options=storage_options, max_shard_size="250MB", file_format="parquet")
File "/home/clarisses/miniconda3/envs/hf_datasets_env/lib/python3.8/site-packages/datasets/builder.py", line 671, in download_and_prepare
fs_token_paths = fsspec.get_fs_token_paths(output_dir, storage_options=storage_options)
File "/home/clarisses/miniconda3/envs/hf_datasets_env/lib/python3.8/site-packages/fsspec/core.py", line 639, in get_fs_token_paths
fs = cls(**options)
File "/home/clarisses/miniconda3/envs/hf_datasets_env/lib/python3.8/site-packages/fsspec/spec.py", line 76, in __call__
obj = super().__call__(*args, **kwargs)
TypeError: __init__() got an unexpected keyword argument 'account_name'
```
If I don't pass the storage_options argument (leave it as None), it requires the credentials used in ADL Gen 1:
`TypeError: __init__() missing 3 required positional arguments: 'tenant_id', 'client_id', and 'client_secret'`
Thus, it is not possible to download a dataset from the cloud using Azure Data Lake (adl) Gen2.
### Steps to reproduce the bug
Assuming that you have an account on Azure and at Storage Account that can be used for reproduce:
1. Create a dict with the format to connect to Azure Data Lake Gen 2
```
storage_options = {"account_name": ACCOUNT_NAME, "account_key": ACCOUNT_KEY) # gen 2 filesystem
```
2. Create a dataset builder for any HF hosted dataset
```
builder = load_dataset_builder(dataset_name)
```
3. Try to download the dataset passing the storage_options as an argument
```
save_dir = 'adl://my_save_dir'
builder.download_and_prepare(save_dir, storage_options=storage_options, max_shard_size="250MB", file_format="parquet")
```
### Expected behavior
Not seeing the error mentioned above and being able to download the dataset to the provided path on ADL
### Environment info
- `datasets` version: 2.6.1
- Platform: Linux-5.15.0-46-generic-x86_64-with-glibc2.17
- Python version: 3.8.13
- PyArrow version: 9.0.0
- Pandas version: 1.5.1 | 26 | Unable to download dataset using Azure Data Lake Gen 2
### Describe the bug
When using the DatasetBuilder method with the credentials for the cloud storage Azure Data Lake (adl) Gen2, the following error is showed:
```
Traceback (most recent call last):
File "download_hf_dataset.py", line 143, in <module>
main()
File "download_hf_dataset.py", line 102, in main
builder.download_and_prepare(save_dir, storage_options=storage_options, max_shard_size="250MB", file_format="parquet")
File "/home/clarisses/miniconda3/envs/hf_datasets_env/lib/python3.8/site-packages/datasets/builder.py", line 671, in download_and_prepare
fs_token_paths = fsspec.get_fs_token_paths(output_dir, storage_options=storage_options)
File "/home/clarisses/miniconda3/envs/hf_datasets_env/lib/python3.8/site-packages/fsspec/core.py", line 639, in get_fs_token_paths
fs = cls(**options)
File "/home/clarisses/miniconda3/envs/hf_datasets_env/lib/python3.8/site-packages/fsspec/spec.py", line 76, in __call__
obj = super().__call__(*args, **kwargs)
TypeError: __init__() got an unexpected keyword argument 'account_name'
```
If I don't pass the storage_options argument (leave it as None), it requires the credentials used in ADL Gen 1:
`TypeError: __init__() missing 3 required positional arguments: 'tenant_id', 'client_id', and 'client_secret'`
Thus, it is not possible to download a dataset from the cloud using Azure Data Lake (adl) Gen2.
### Steps to reproduce the bug
Assuming that you have an account on Azure and at Storage Account that can be used for reproduce:
1. Create a dict with the format to connect to Azure Data Lake Gen 2
```
storage_options = {"account_name": ACCOUNT_NAME, "account_key": ACCOUNT_KEY) # gen 2 filesystem
```
2. Create a dataset builder for any HF hosted dataset
```
builder = load_dataset_builder(dataset_name)
```
3. Try to download the dataset passing the storage_options as an argument
```
save_dir = 'adl://my_save_dir'
builder.download_and_prepare(save_dir, storage_options=storage_options, max_shard_size="250MB", file_format="parquet")
```
### Expected behavior
Not seeing the error mentioned above and being able to download the dataset to the provided path on ADL
### Environment info
- `datasets` version: 2.6.1
- Platform: Linux-5.15.0-46-generic-x86_64-with-glibc2.17
- Python version: 3.8.13
- PyArrow version: 9.0.0
- Pandas version: 1.5.1
Thank you @lhoestq . Great call.
Using the default class from `known_implementations` dict solved my problem
```
known_implementations[‘abfs’] = {‘class’: ‘adlfs.AzureBlobFileSystem’}
```
I'm closing this issue. | [
0.007943641394376755,
0.22752279043197632,
0.008019868284463882,
0.23792657256126404,
0.09995664656162262,
0.1969153881072998,
0.18387220799922943,
0.19614644348621368,
-0.05162261053919792,
-0.16205672919750214,
-0.02739519439637661,
-0.006244535557925701,
0.23231925070285797,
0.11577480286359787,
0.06217158958315849,
-0.14681625366210938,
0.06896603107452393,
0.041803643107414246,
-0.22745269536972046,
0.03948894143104553,
-0.16260980069637299,
0.22406311333179474,
-0.0439194031059742,
0.09229294955730438,
0.013923054561018944,
0.04565799608826637,
-0.1451137810945511,
0.2088007628917694,
-0.2447453886270523,
-0.32522377371788025,
0.1856880933046341,
0.04442405328154564,
0.21219691634178162,
-0.052528850734233856,
-0.00011962045391555876,
0.09590853750705719,
0.1959754377603531,
-0.062162093818187714,
-0.32365208864212036,
-0.20500124990940094,
0.03943164646625519,
0.009961195290088654,
0.10352542996406555,
-0.3278973400592804,
0.21032601594924927,
0.06965601444244385,
0.028988759964704514,
-0.35426172614097595,
0.5778915882110596,
0.2921009063720703,
0.2282661497592926,
-0.15950071811676025,
0.2683534622192383,
-0.12259455770254135,
-0.11582673341035843,
0.044956475496292114,
-0.22856667637825012,
0.07190382480621338,
0.2500379681587219,
0.14227326214313507,
0.034297797828912735,
0.1107783317565918,
-0.07881981134414673,
0.2625519037246704,
0.26762089133262634,
0.11232568323612213,
0.24413251876831055,
-0.30887189507484436,
0.33070844411849976,
-0.07618805021047592,
0.7068105936050415,
-0.15865370631217957,
-0.39321330189704895,
-0.04711395874619484,
0.10434890538454056,
0.15538544952869415,
0.4085442125797272,
0.07155068963766098,
-0.39254137873649597,
0.03561007231473923,
-0.3528866469860077,
-0.4848954975605011,
-0.2134999930858612,
-0.07637438178062439,
0.1271580010652542,
0.16829361021518707,
-0.08730829507112503,
0.1737832874059677,
0.00975915789604187,
-0.06345053017139435,
0.1920035183429718,
-0.0300028957426548,
-0.32733631134033203,
0.30476438999176025,
-0.33320823311805725,
0.026101864874362946,
-0.0875391736626625,
-0.18417754769325256,
0.12981033325195312,
0.18079215288162231,
0.32451245188713074,
-0.384024441242218,
-0.04292161762714386,
-0.03313356637954712,
0.011746580712497234,
0.1933959275484085,
0.2784356474876404,
-0.13887207210063934,
0.10479487478733063,
0.05094616115093231,
0.11257587373256683,
-0.20252084732055664,
-0.1464635133743286,
-0.11874735355377197,
-0.021126987412571907,
0.0758943110704422,
0.08175867050886154,
-0.33025240898132324,
-0.4745492935180664,
0.2613758444786072,
-0.369291752576828,
0.0754009336233139,
0.26318737864494324,
0.17252182960510254,
-0.04086848720908165,
0.052717432379722595,
0.2415013164281845,
0.2043665647506714,
-0.0537211075425148,
-0.4082185626029968,
-0.13111288845539093,
-0.05532329902052879,
0.1084718257188797,
-0.013041436672210693,
0.2601507306098938,
-0.24656060338020325,
0.37921732664108276,
0.29098427295684814,
-0.18162523210048676,
0.07943752408027649,
0.016789333894848824,
-0.19281327724456787,
-0.25622910261154175,
0.11414965987205505,
0.16538916528224945,
0.03757081925868988,
-0.10400702059268951,
-0.2577083110809326,
0.13339069485664368,
-0.07803557068109512,
-0.34489530324935913,
-0.27628839015960693,
-0.39352771639823914,
0.12178760021924973,
-0.14104726910591125,
0.04285167157649994,
-0.27046310901641846,
0.1308417022228241,
-0.044684357941150665,
-0.08011406660079956,
-0.2670442759990692,
0.04565788805484772,
-0.06940010190010071,
-0.12226787209510803,
0.41138800978660583,
0.2610263228416443,
-0.48035919666290283,
-0.0001541227102279663,
-0.36928123235702515,
-0.0891057699918747,
0.1336330622434616,
-0.17881499230861664,
-0.08171753585338593,
0.16017714142799377,
-0.2509552538394928,
0.3113654851913452,
0.18597501516342163,
-0.3714340627193451,
-0.5458224415779114,
0.49680036306381226,
0.03184393048286438,
-0.37139710783958435,
0.1374664306640625,
0.004180855117738247,
0.4402630031108856,
-0.045757144689559937,
-0.02486375719308853,
0.1383906602859497,
-0.10793782770633698,
-0.08410224318504333,
-0.10262054204940796,
-0.2521091103553772,
-0.3844097852706909,
0.12303626537322998,
-0.06798408925533295,
0.2032063901424408,
0.30369043350219727,
0.5065411925315857,
0.14831390976905823,
0.025357477366924286,
0.26246878504753113,
0.15855537354946136,
0.10164573788642883,
-0.20778970420360565,
-0.09284352511167526,
0.21342095732688904,
-0.8136515021324158,
0.2805800139904022,
-0.10630537569522858,
0.04538075625896454,
-0.04576152563095093,
0.23978756368160248,
-0.201655775308609,
-0.08964458107948303,
-0.20128779113292694,
0.026458999142050743,
0.05438391864299774,
-0.14179114997386932,
0.22293290495872498,
-0.1017613559961319,
0.13075222074985504,
0.007299039512872696,
-0.17475803196430206,
0.03840184584259987,
0.3903687596321106,
0.5705410242080688,
0.05830094963312149,
-0.19543048739433289,
-0.011116378009319305,
-0.20373034477233887,
0.3287416696548462,
0.10148516297340393,
-0.28669580817222595,
0.252876877784729,
-0.12809039652347565,
0.2651106119155884,
0.09393815696239471,
0.11712032556533813,
0.06192012131214142,
-0.011530406773090363,
0.18139895796775818,
-0.14677628874778748,
0.14438289403915405,
-0.1313880980014801,
0.12302253395318985,
0.09194208681583405,
0.1849215179681778,
0.3568962514400482,
0.004735220223665237,
0.3130732476711273,
0.19151940941810608,
-0.007212094962596893,
0.3031019866466522,
-0.1983679085969925,
0.19217418134212494,
0.11469434201717377,
0.3925507068634033,
-0.3151474595069885,
-0.3916800618171692,
0.11004313081502914,
-0.06286536157131195,
0.23363003134727478,
-0.08741245418787003,
0.09521284699440002,
-0.12672406435012817,
-0.09810987114906311,
0.4106031656265259,
0.297548770904541,
0.7392265200614929,
0.015390705317258835,
-0.08154818415641785,
0.14476865530014038,
-0.09050730615854263,
-0.183436781167984,
0.18015149235725403,
-0.09467054903507233,
0.18146952986717224,
0.14540576934814453,
0.20440644025802612,
0.08595124632120132,
-0.15491923689842224,
0.06101970747113228,
0.4533306658267975,
0.22452068328857422,
-0.346122145652771,
-0.0053749773651361465,
-0.13187964260578156,
-0.22841587662696838,
0.11970511078834534,
0.1984383463859558,
-0.18549814820289612,
-0.39817890524864197,
-0.11845996975898743,
0.543586254119873,
0.018386472016572952,
-0.17547725141048431,
-0.2692851126194,
0.18231268227100372,
0.06529244035482407,
-0.10325240343809128,
-0.39028406143188477,
0.3159090578556061,
-0.2691638767719269,
0.0992811918258667,
0.36364924907684326,
-0.17346414923667908,
0.3346543312072754,
0.05030583590269089,
-0.0577821284532547,
-0.8538766503334045,
-0.3177332878112793,
0.2838614583015442,
0.11414305120706558,
0.5853000283241272,
0.17984038591384888,
0.2741510272026062,
-0.10472427308559418,
-0.08691181242465973,
0.14741730690002441,
0.018887056037783623,
-0.4085313677787781,
-0.06348368525505066,
-0.4349779486656189,
-0.17129242420196533,
-0.36638423800468445,
-0.13479295372962952,
-0.10506681352853775,
-0.05730241537094116,
0.04234399273991585,
0.2373037189245224,
0.2981347441673279,
-0.1309649497270584,
-0.2617056369781494,
0.14878377318382263,
0.1984436959028244,
0.2074737548828125,
-0.27088579535484314,
-0.6338189840316772,
0.12192409485578537,
-0.22439135611057281,
-0.23804061114788055,
0.24954378604888916,
0.10070227086544037,
0.47538140416145325,
-0.010297585278749466,
-0.5225910544395447,
-0.20631010830402374,
-0.11681033670902252,
0.0527271144092083,
-0.2677364647388458,
-0.17955006659030914,
0.08708996325731277,
-0.09609393775463104,
0.18515121936798096,
-0.13767854869365692,
-0.019688185304403305,
0.5078467130661011,
0.3816928565502167,
0.223684623837471,
0.09361545741558075,
0.3996657729148865,
0.18293949961662292,
0.3908116817474365,
0.22747579216957092,
0.05014494061470032,
0.44284898042678833,
-0.17668713629245758,
-0.1936505287885666,
-0.33435311913490295,
-0.13568751513957977,
0.40410977602005005,
0.06743466109037399,
0.14764247834682465,
-0.07414665818214417,
0.13218551874160767,
0.0347197949886322,
-0.09968193620443344,
0.3043379485607147,
-0.25811827182769775,
-0.25114354491233826,
-0.272771418094635,
-0.2972826361656189,
0.08693521469831467,
0.1396895796060562,
0.3405901789665222,
-0.021553684026002884,
-0.12941280007362366,
-0.12463277578353882,
0.11455944180488586,
0.21716627478599548,
0.27599573135375977,
-0.045561958104372025,
-0.25331270694732666,
-0.6627150774002075,
0.4218142628669739,
-0.05143899470567703,
0.30285850167274475,
-0.3761156499385834,
0.3023659288883209,
0.18500399589538574,
-0.11778769642114639,
0.3097028136253357,
-0.2323872596025467,
0.16789044439792633,
-0.05069601535797119,
0.0984216034412384,
-0.15317974984645844,
-0.2952174246311188,
0.07042232155799866,
0.2903304398059845,
0.19961848855018616,
0.23519860208034515,
-0.38137033581733704,
-0.13824766874313354,
-0.021130844950675964,
-0.18256616592407227,
-0.05887794494628906,
-0.022590136155486107,
0.03265349939465523,
-0.347874253988266,
-0.13827021420001984,
-0.07439412921667099,
-0.15908029675483704,
0.340825617313385,
0.09726116806268692,
0.1895759403705597,
0.07234522700309753,
0.1093331053853035,
0.18676745891571045,
0.1476101577281952,
0.3227901756763458,
-0.012774511240422726,
0.3971034586429596,
0.37981340289115906,
-0.11796058714389801,
0.14169976115226746,
0.5419377088546753,
0.28940877318382263,
0.060713425278663635,
0.22900289297103882,
-0.16909952461719513,
0.14151543378829956,
0.2126670777797699,
-0.262682169675827,
0.13586604595184326,
-0.23290997743606567,
0.052585702389478683,
-0.11014626175165176,
0.15470118820667267,
0.22638216614723206,
-0.09717798978090286,
-0.05389838293194771,
-0.5124441981315613,
0.2521085739135742,
0.022021587938070297,
-0.15793611109256744,
0.2735584080219269,
0.11438553035259247,
-0.4964890480041504,
0.02687530592083931,
0.14581719040870667,
0.40963050723075867,
0.27270543575286865,
0.050435733050107956,
0.3275853097438812,
0.3054869771003723,
0.36864081025123596,
0.1788647472858429,
-0.07023221254348755,
-0.2954334020614624,
-0.029148925095796585,
-0.21174967288970947,
0.055720146745443344,
0.2371748983860016,
0.2182302325963974,
-0.22727146744728088,
0.3172999620437622,
-0.04458156228065491,
0.1461118757724762,
0.19567541778087616,
0.19606825709342957,
-0.3934975564479828,
-0.32642921805381775,
-0.1142665296792984,
0.19247329235076904,
-0.2717728614807129,
0.20419564843177795,
0.013008944690227509,
-0.21894614398479462,
-0.07787000387907028,
-0.366011381149292,
-0.37342649698257446,
0.3128111958503723,
-0.36305299401283264,
0.14658580720424652,
0.021997777745127678,
0.13446925580501556,
0.4203172028064728,
0.297624796628952,
0.31212514638900757,
0.044069357216358185,
-0.25829076766967773,
0.22246985137462616,
0.12610125541687012,
0.17970320582389832,
0.2806287109851837,
-0.03353847935795784,
0.036657314747571945,
-0.20391002297401428,
0.008632034063339233,
-0.004022419452667236,
-0.1649359166622162,
-0.10073646157979965,
-0.13448864221572876,
-0.19910527765750885,
0.17578068375587463,
-0.10425306856632233,
-0.06540882587432861,
-0.0014628618955612183,
-0.28565412759780884,
-0.17181061208248138,
0.05471235513687134,
-0.013767845928668976,
0.04478554055094719,
-0.014360174536705017,
-0.16115382313728333,
0.01298234611749649,
0.1447066366672516,
0.3112638592720032,
-0.2047111690044403,
0.1739387810230255,
0.7150832414627075,
-0.07197144627571106,
0.13886043429374695,
-0.15195049345493317,
0.13012567162513733,
-0.4300231635570526,
-0.22331726551055908,
0.1847541183233261,
0.02991122379899025,
-0.05978360027074814,
-0.006110404152423143,
0.18921582400798798,
0.060652438551187515,
0.15118059515953064,
0.11030896008014679,
-0.30625879764556885,
-0.21387727558612823,
0.09298481792211533,
-0.3593214154243469,
-0.09794260561466217,
-0.2525225877761841,
0.3495725989341736,
0.06630849093198776,
-0.2864830493927002,
-0.2178570032119751,
0.05873633176088333,
-0.15122509002685547,
-0.08537885546684265,
-0.12722119688987732,
0.047084975987672806,
0.12559470534324646,
-0.10165348649024963,
0.10423657298088074,
0.1305733323097229,
-0.1404714584350586,
-0.09897290170192719,
-0.23299062252044678,
0.13139790296554565,
0.08552280068397522,
-0.30103060603141785,
-0.03201659768819809,
-0.38067978620529175,
-0.43707436323165894,
0.17978806793689728,
0.10979343950748444,
0.1541973352432251,
0.020760662853717804,
-0.04277007654309273,
0.32300180196762085,
0.042145900428295135,
-0.1973051130771637,
0.20306392014026642,
-0.010816119611263275,
0.4178280830383301,
-0.2047702968120575,
0.3826056122779846,
-0.07777246832847595,
0.03865683823823929,
-0.267689973115921,
0.18819892406463623,
-0.3659290075302124,
-0.16946470737457275,
0.2796504497528076,
-0.1747715324163437,
0.1210450828075409,
-0.08055911213159561,
0.0900718942284584,
0.17795607447624207,
-0.222146674990654,
0.08989973366260529,
0.12410788238048553,
0.1925375908613205,
-0.041138287633657455,
-0.0016542136436328292,
-0.16341902315616608,
0.11995901167392731,
0.02032903954386711,
-0.017299778759479523,
0.13140447437763214,
-0.1536450982093811,
-0.3760247230529785,
0.034542523324489594,
0.4241912066936493,
-0.09061704576015472,
0.11612126231193542,
0.4912559688091278,
0.027804944664239883,
0.3133527636528015,
0.24993792176246643,
-0.27031421661376953,
-0.28332382440567017,
0.3879989981651306,
-0.19571170210838318,
-0.1514485776424408,
0.12414349615573883,
0.19428294897079468,
0.36894091963768005,
-0.4002887010574341,
-0.15389038622379303,
0.18204307556152344,
-0.1897825300693512,
0.11884951591491699,
-0.04658740758895874,
0.3653774559497833,
-0.0366763211786747,
-0.3229553699493408,
-0.5286081433296204,
0.34015196561813354,
-0.22830158472061157,
-0.04885657876729965,
-0.6750702857971191,
-0.1986522674560547,
0.05005145072937012,
0.16597880423069,
-0.20789170265197754,
-0.4344862699508667,
0.1012423187494278,
0.0629439651966095,
-0.08950862288475037,
-0.3867102861404419,
-0.24239569902420044,
0.4188181459903717,
-0.0935506597161293,
-0.2940652668476105,
0.5436410307884216,
0.21776436269283295,
-0.07726839184761047,
0.3298938572406769,
0.36849966645240784,
0.3344617486000061,
0.39844104647636414,
0.1631486862897873,
-0.09107588231563568,
0.22973868250846863,
-0.21607705950737,
-0.038217466324567795,
0.22904767096042633,
0.2295287698507309,
-0.047787752002477646,
0.3515125811100006,
0.10511269420385361,
-0.011272171512246132,
0.044420816004276276,
-0.011782955378293991,
0.45735445618629456,
-0.023015180602669716,
0.4993676245212555,
-0.31711670756340027,
0.1202676072716713,
0.08852265775203705,
0.19295936822891235,
-0.3544374108314514,
-0.3567494750022888,
0.12941941618919373,
-0.08999703824520111,
0.2572464644908905,
-0.11398638039827347,
0.016563840210437775,
-0.22894400358200073,
0.23980677127838135,
0.010357368737459183,
0.002149004489183426,
-0.41038814187049866,
-0.2501009702682495,
-0.45047643780708313,
-0.32458022236824036,
0.19874221086502075,
-0.0444265641272068,
0.11429489403963089,
0.34905678033828735,
-0.10180587321519852,
-0.08335284143686295,
0.06499457359313965,
0.2842080593109131,
-0.0089163389056921,
0.08825770020484924,
-0.3364410996437073,
-0.17147314548492432,
0.22762201726436615,
0.02956187166273594,
-0.1320192515850067,
-0.4051891267299652,
0.34427610039711,
0.04723794385790825,
-0.05082767829298973,
-0.029839184135198593,
0.15002372860908508,
0.1930762529373169,
0.29466739296913147,
0.25570929050445557,
0.06297920644283295,
0.5637892484664917,
-0.013591930270195007,
-0.12296511232852936,
-0.1938382387161255,
-0.4384525716304779,
-0.23751835525035858,
-0.1957065761089325,
-0.23052465915679932,
0.4693877100944519,
-0.03448205813765526,
0.1994885355234146,
-0.17385302484035492,
-0.1000126302242279,
-0.15075039863586426,
-0.023887762799859047,
-0.861813485622406,
0.48804423213005066,
-0.41690754890441895,
0.45225223898887634,
-0.21461735665798187,
0.036727387458086014,
0.030241994187235832,
0.0955222025513649,
-0.32611119747161865,
-0.29290124773979187,
0.561587929725647,
-0.2153431475162506,
0.0926278829574585,
0.0955442413687706,
0.25363045930862427,
-0.012824378907680511,
-0.2677324712276459,
-0.29989585280418396,
-0.16359323263168335,
0.33734843134880066,
-0.3155955970287323,
-0.32284781336784363,
0.25305500626564026,
-0.023772049695253372,
0.1102132648229599,
-0.01103173941373825,
0.16973444819450378,
0.12632670998573303,
-0.39785236120224,
0.15540388226509094,
-0.09339211881160736
] |
https://github.com/huggingface/datasets/issues/5156 | Unable to download dataset using Azure Data Lake Gen 2 | > Thank you @lhoestq . Great call. Using the default class from `known_implementations` dict solved my problem
>
> ```
> known_implementations[‘abfs’] = {‘class’: ‘adlfs.AzureBlobFileSystem’}
> ```
>
> I'm closing this issue.
Hi so here `Saving serialized datasets
After you have processed your dataset, you can save it to your cloud storage with [Dataset.save_to_disk()](https://huggingface.co/docs/datasets/v2.17.0/en/package_reference/main_classes#datasets.Dataset.save_to_disk):` what is the encoded dataset I have failed to save it | ### Describe the bug
When using the DatasetBuilder method with the credentials for the cloud storage Azure Data Lake (adl) Gen2, the following error is showed:
```
Traceback (most recent call last):
File "download_hf_dataset.py", line 143, in <module>
main()
File "download_hf_dataset.py", line 102, in main
builder.download_and_prepare(save_dir, storage_options=storage_options, max_shard_size="250MB", file_format="parquet")
File "/home/clarisses/miniconda3/envs/hf_datasets_env/lib/python3.8/site-packages/datasets/builder.py", line 671, in download_and_prepare
fs_token_paths = fsspec.get_fs_token_paths(output_dir, storage_options=storage_options)
File "/home/clarisses/miniconda3/envs/hf_datasets_env/lib/python3.8/site-packages/fsspec/core.py", line 639, in get_fs_token_paths
fs = cls(**options)
File "/home/clarisses/miniconda3/envs/hf_datasets_env/lib/python3.8/site-packages/fsspec/spec.py", line 76, in __call__
obj = super().__call__(*args, **kwargs)
TypeError: __init__() got an unexpected keyword argument 'account_name'
```
If I don't pass the storage_options argument (leave it as None), it requires the credentials used in ADL Gen 1:
`TypeError: __init__() missing 3 required positional arguments: 'tenant_id', 'client_id', and 'client_secret'`
Thus, it is not possible to download a dataset from the cloud using Azure Data Lake (adl) Gen2.
### Steps to reproduce the bug
Assuming that you have an account on Azure and at Storage Account that can be used for reproduce:
1. Create a dict with the format to connect to Azure Data Lake Gen 2
```
storage_options = {"account_name": ACCOUNT_NAME, "account_key": ACCOUNT_KEY) # gen 2 filesystem
```
2. Create a dataset builder for any HF hosted dataset
```
builder = load_dataset_builder(dataset_name)
```
3. Try to download the dataset passing the storage_options as an argument
```
save_dir = 'adl://my_save_dir'
builder.download_and_prepare(save_dir, storage_options=storage_options, max_shard_size="250MB", file_format="parquet")
```
### Expected behavior
Not seeing the error mentioned above and being able to download the dataset to the provided path on ADL
### Environment info
- `datasets` version: 2.6.1
- Platform: Linux-5.15.0-46-generic-x86_64-with-glibc2.17
- Python version: 3.8.13
- PyArrow version: 9.0.0
- Pandas version: 1.5.1 | 66 | Unable to download dataset using Azure Data Lake Gen 2
### Describe the bug
When using the DatasetBuilder method with the credentials for the cloud storage Azure Data Lake (adl) Gen2, the following error is showed:
```
Traceback (most recent call last):
File "download_hf_dataset.py", line 143, in <module>
main()
File "download_hf_dataset.py", line 102, in main
builder.download_and_prepare(save_dir, storage_options=storage_options, max_shard_size="250MB", file_format="parquet")
File "/home/clarisses/miniconda3/envs/hf_datasets_env/lib/python3.8/site-packages/datasets/builder.py", line 671, in download_and_prepare
fs_token_paths = fsspec.get_fs_token_paths(output_dir, storage_options=storage_options)
File "/home/clarisses/miniconda3/envs/hf_datasets_env/lib/python3.8/site-packages/fsspec/core.py", line 639, in get_fs_token_paths
fs = cls(**options)
File "/home/clarisses/miniconda3/envs/hf_datasets_env/lib/python3.8/site-packages/fsspec/spec.py", line 76, in __call__
obj = super().__call__(*args, **kwargs)
TypeError: __init__() got an unexpected keyword argument 'account_name'
```
If I don't pass the storage_options argument (leave it as None), it requires the credentials used in ADL Gen 1:
`TypeError: __init__() missing 3 required positional arguments: 'tenant_id', 'client_id', and 'client_secret'`
Thus, it is not possible to download a dataset from the cloud using Azure Data Lake (adl) Gen2.
### Steps to reproduce the bug
Assuming that you have an account on Azure and at Storage Account that can be used for reproduce:
1. Create a dict with the format to connect to Azure Data Lake Gen 2
```
storage_options = {"account_name": ACCOUNT_NAME, "account_key": ACCOUNT_KEY) # gen 2 filesystem
```
2. Create a dataset builder for any HF hosted dataset
```
builder = load_dataset_builder(dataset_name)
```
3. Try to download the dataset passing the storage_options as an argument
```
save_dir = 'adl://my_save_dir'
builder.download_and_prepare(save_dir, storage_options=storage_options, max_shard_size="250MB", file_format="parquet")
```
### Expected behavior
Not seeing the error mentioned above and being able to download the dataset to the provided path on ADL
### Environment info
- `datasets` version: 2.6.1
- Platform: Linux-5.15.0-46-generic-x86_64-with-glibc2.17
- Python version: 3.8.13
- PyArrow version: 9.0.0
- Pandas version: 1.5.1
> Thank you @lhoestq . Great call. Using the default class from `known_implementations` dict solved my problem
>
> ```
> known_implementations[‘abfs’] = {‘class’: ‘adlfs.AzureBlobFileSystem’}
> ```
>
> I'm closing this issue.
Hi so here `Saving serialized datasets
After you have processed your dataset, you can save it to your cloud storage with [Dataset.save_to_disk()](https://huggingface.co/docs/datasets/v2.17.0/en/package_reference/main_classes#datasets.Dataset.save_to_disk):` what is the encoded dataset I have failed to save it | [
0.007943641394376755,
0.22752279043197632,
0.008019868284463882,
0.23792657256126404,
0.09995664656162262,
0.1969153881072998,
0.18387220799922943,
0.19614644348621368,
-0.05162261053919792,
-0.16205672919750214,
-0.02739519439637661,
-0.006244535557925701,
0.23231925070285797,
0.11577480286359787,
0.06217158958315849,
-0.14681625366210938,
0.06896603107452393,
0.041803643107414246,
-0.22745269536972046,
0.03948894143104553,
-0.16260980069637299,
0.22406311333179474,
-0.0439194031059742,
0.09229294955730438,
0.013923054561018944,
0.04565799608826637,
-0.1451137810945511,
0.2088007628917694,
-0.2447453886270523,
-0.32522377371788025,
0.1856880933046341,
0.04442405328154564,
0.21219691634178162,
-0.052528850734233856,
-0.00011962045391555876,
0.09590853750705719,
0.1959754377603531,
-0.062162093818187714,
-0.32365208864212036,
-0.20500124990940094,
0.03943164646625519,
0.009961195290088654,
0.10352542996406555,
-0.3278973400592804,
0.21032601594924927,
0.06965601444244385,
0.028988759964704514,
-0.35426172614097595,
0.5778915882110596,
0.2921009063720703,
0.2282661497592926,
-0.15950071811676025,
0.2683534622192383,
-0.12259455770254135,
-0.11582673341035843,
0.044956475496292114,
-0.22856667637825012,
0.07190382480621338,
0.2500379681587219,
0.14227326214313507,
0.034297797828912735,
0.1107783317565918,
-0.07881981134414673,
0.2625519037246704,
0.26762089133262634,
0.11232568323612213,
0.24413251876831055,
-0.30887189507484436,
0.33070844411849976,
-0.07618805021047592,
0.7068105936050415,
-0.15865370631217957,
-0.39321330189704895,
-0.04711395874619484,
0.10434890538454056,
0.15538544952869415,
0.4085442125797272,
0.07155068963766098,
-0.39254137873649597,
0.03561007231473923,
-0.3528866469860077,
-0.4848954975605011,
-0.2134999930858612,
-0.07637438178062439,
0.1271580010652542,
0.16829361021518707,
-0.08730829507112503,
0.1737832874059677,
0.00975915789604187,
-0.06345053017139435,
0.1920035183429718,
-0.0300028957426548,
-0.32733631134033203,
0.30476438999176025,
-0.33320823311805725,
0.026101864874362946,
-0.0875391736626625,
-0.18417754769325256,
0.12981033325195312,
0.18079215288162231,
0.32451245188713074,
-0.384024441242218,
-0.04292161762714386,
-0.03313356637954712,
0.011746580712497234,
0.1933959275484085,
0.2784356474876404,
-0.13887207210063934,
0.10479487478733063,
0.05094616115093231,
0.11257587373256683,
-0.20252084732055664,
-0.1464635133743286,
-0.11874735355377197,
-0.021126987412571907,
0.0758943110704422,
0.08175867050886154,
-0.33025240898132324,
-0.4745492935180664,
0.2613758444786072,
-0.369291752576828,
0.0754009336233139,
0.26318737864494324,
0.17252182960510254,
-0.04086848720908165,
0.052717432379722595,
0.2415013164281845,
0.2043665647506714,
-0.0537211075425148,
-0.4082185626029968,
-0.13111288845539093,
-0.05532329902052879,
0.1084718257188797,
-0.013041436672210693,
0.2601507306098938,
-0.24656060338020325,
0.37921732664108276,
0.29098427295684814,
-0.18162523210048676,
0.07943752408027649,
0.016789333894848824,
-0.19281327724456787,
-0.25622910261154175,
0.11414965987205505,
0.16538916528224945,
0.03757081925868988,
-0.10400702059268951,
-0.2577083110809326,
0.13339069485664368,
-0.07803557068109512,
-0.34489530324935913,
-0.27628839015960693,
-0.39352771639823914,
0.12178760021924973,
-0.14104726910591125,
0.04285167157649994,
-0.27046310901641846,
0.1308417022228241,
-0.044684357941150665,
-0.08011406660079956,
-0.2670442759990692,
0.04565788805484772,
-0.06940010190010071,
-0.12226787209510803,
0.41138800978660583,
0.2610263228416443,
-0.48035919666290283,
-0.0001541227102279663,
-0.36928123235702515,
-0.0891057699918747,
0.1336330622434616,
-0.17881499230861664,
-0.08171753585338593,
0.16017714142799377,
-0.2509552538394928,
0.3113654851913452,
0.18597501516342163,
-0.3714340627193451,
-0.5458224415779114,
0.49680036306381226,
0.03184393048286438,
-0.37139710783958435,
0.1374664306640625,
0.004180855117738247,
0.4402630031108856,
-0.045757144689559937,
-0.02486375719308853,
0.1383906602859497,
-0.10793782770633698,
-0.08410224318504333,
-0.10262054204940796,
-0.2521091103553772,
-0.3844097852706909,
0.12303626537322998,
-0.06798408925533295,
0.2032063901424408,
0.30369043350219727,
0.5065411925315857,
0.14831390976905823,
0.025357477366924286,
0.26246878504753113,
0.15855537354946136,
0.10164573788642883,
-0.20778970420360565,
-0.09284352511167526,
0.21342095732688904,
-0.8136515021324158,
0.2805800139904022,
-0.10630537569522858,
0.04538075625896454,
-0.04576152563095093,
0.23978756368160248,
-0.201655775308609,
-0.08964458107948303,
-0.20128779113292694,
0.026458999142050743,
0.05438391864299774,
-0.14179114997386932,
0.22293290495872498,
-0.1017613559961319,
0.13075222074985504,
0.007299039512872696,
-0.17475803196430206,
0.03840184584259987,
0.3903687596321106,
0.5705410242080688,
0.05830094963312149,
-0.19543048739433289,
-0.011116378009319305,
-0.20373034477233887,
0.3287416696548462,
0.10148516297340393,
-0.28669580817222595,
0.252876877784729,
-0.12809039652347565,
0.2651106119155884,
0.09393815696239471,
0.11712032556533813,
0.06192012131214142,
-0.011530406773090363,
0.18139895796775818,
-0.14677628874778748,
0.14438289403915405,
-0.1313880980014801,
0.12302253395318985,
0.09194208681583405,
0.1849215179681778,
0.3568962514400482,
0.004735220223665237,
0.3130732476711273,
0.19151940941810608,
-0.007212094962596893,
0.3031019866466522,
-0.1983679085969925,
0.19217418134212494,
0.11469434201717377,
0.3925507068634033,
-0.3151474595069885,
-0.3916800618171692,
0.11004313081502914,
-0.06286536157131195,
0.23363003134727478,
-0.08741245418787003,
0.09521284699440002,
-0.12672406435012817,
-0.09810987114906311,
0.4106031656265259,
0.297548770904541,
0.7392265200614929,
0.015390705317258835,
-0.08154818415641785,
0.14476865530014038,
-0.09050730615854263,
-0.183436781167984,
0.18015149235725403,
-0.09467054903507233,
0.18146952986717224,
0.14540576934814453,
0.20440644025802612,
0.08595124632120132,
-0.15491923689842224,
0.06101970747113228,
0.4533306658267975,
0.22452068328857422,
-0.346122145652771,
-0.0053749773651361465,
-0.13187964260578156,
-0.22841587662696838,
0.11970511078834534,
0.1984383463859558,
-0.18549814820289612,
-0.39817890524864197,
-0.11845996975898743,
0.543586254119873,
0.018386472016572952,
-0.17547725141048431,
-0.2692851126194,
0.18231268227100372,
0.06529244035482407,
-0.10325240343809128,
-0.39028406143188477,
0.3159090578556061,
-0.2691638767719269,
0.0992811918258667,
0.36364924907684326,
-0.17346414923667908,
0.3346543312072754,
0.05030583590269089,
-0.0577821284532547,
-0.8538766503334045,
-0.3177332878112793,
0.2838614583015442,
0.11414305120706558,
0.5853000283241272,
0.17984038591384888,
0.2741510272026062,
-0.10472427308559418,
-0.08691181242465973,
0.14741730690002441,
0.018887056037783623,
-0.4085313677787781,
-0.06348368525505066,
-0.4349779486656189,
-0.17129242420196533,
-0.36638423800468445,
-0.13479295372962952,
-0.10506681352853775,
-0.05730241537094116,
0.04234399273991585,
0.2373037189245224,
0.2981347441673279,
-0.1309649497270584,
-0.2617056369781494,
0.14878377318382263,
0.1984436959028244,
0.2074737548828125,
-0.27088579535484314,
-0.6338189840316772,
0.12192409485578537,
-0.22439135611057281,
-0.23804061114788055,
0.24954378604888916,
0.10070227086544037,
0.47538140416145325,
-0.010297585278749466,
-0.5225910544395447,
-0.20631010830402374,
-0.11681033670902252,
0.0527271144092083,
-0.2677364647388458,
-0.17955006659030914,
0.08708996325731277,
-0.09609393775463104,
0.18515121936798096,
-0.13767854869365692,
-0.019688185304403305,
0.5078467130661011,
0.3816928565502167,
0.223684623837471,
0.09361545741558075,
0.3996657729148865,
0.18293949961662292,
0.3908116817474365,
0.22747579216957092,
0.05014494061470032,
0.44284898042678833,
-0.17668713629245758,
-0.1936505287885666,
-0.33435311913490295,
-0.13568751513957977,
0.40410977602005005,
0.06743466109037399,
0.14764247834682465,
-0.07414665818214417,
0.13218551874160767,
0.0347197949886322,
-0.09968193620443344,
0.3043379485607147,
-0.25811827182769775,
-0.25114354491233826,
-0.272771418094635,
-0.2972826361656189,
0.08693521469831467,
0.1396895796060562,
0.3405901789665222,
-0.021553684026002884,
-0.12941280007362366,
-0.12463277578353882,
0.11455944180488586,
0.21716627478599548,
0.27599573135375977,
-0.045561958104372025,
-0.25331270694732666,
-0.6627150774002075,
0.4218142628669739,
-0.05143899470567703,
0.30285850167274475,
-0.3761156499385834,
0.3023659288883209,
0.18500399589538574,
-0.11778769642114639,
0.3097028136253357,
-0.2323872596025467,
0.16789044439792633,
-0.05069601535797119,
0.0984216034412384,
-0.15317974984645844,
-0.2952174246311188,
0.07042232155799866,
0.2903304398059845,
0.19961848855018616,
0.23519860208034515,
-0.38137033581733704,
-0.13824766874313354,
-0.021130844950675964,
-0.18256616592407227,
-0.05887794494628906,
-0.022590136155486107,
0.03265349939465523,
-0.347874253988266,
-0.13827021420001984,
-0.07439412921667099,
-0.15908029675483704,
0.340825617313385,
0.09726116806268692,
0.1895759403705597,
0.07234522700309753,
0.1093331053853035,
0.18676745891571045,
0.1476101577281952,
0.3227901756763458,
-0.012774511240422726,
0.3971034586429596,
0.37981340289115906,
-0.11796058714389801,
0.14169976115226746,
0.5419377088546753,
0.28940877318382263,
0.060713425278663635,
0.22900289297103882,
-0.16909952461719513,
0.14151543378829956,
0.2126670777797699,
-0.262682169675827,
0.13586604595184326,
-0.23290997743606567,
0.052585702389478683,
-0.11014626175165176,
0.15470118820667267,
0.22638216614723206,
-0.09717798978090286,
-0.05389838293194771,
-0.5124441981315613,
0.2521085739135742,
0.022021587938070297,
-0.15793611109256744,
0.2735584080219269,
0.11438553035259247,
-0.4964890480041504,
0.02687530592083931,
0.14581719040870667,
0.40963050723075867,
0.27270543575286865,
0.050435733050107956,
0.3275853097438812,
0.3054869771003723,
0.36864081025123596,
0.1788647472858429,
-0.07023221254348755,
-0.2954334020614624,
-0.029148925095796585,
-0.21174967288970947,
0.055720146745443344,
0.2371748983860016,
0.2182302325963974,
-0.22727146744728088,
0.3172999620437622,
-0.04458156228065491,
0.1461118757724762,
0.19567541778087616,
0.19606825709342957,
-0.3934975564479828,
-0.32642921805381775,
-0.1142665296792984,
0.19247329235076904,
-0.2717728614807129,
0.20419564843177795,
0.013008944690227509,
-0.21894614398479462,
-0.07787000387907028,
-0.366011381149292,
-0.37342649698257446,
0.3128111958503723,
-0.36305299401283264,
0.14658580720424652,
0.021997777745127678,
0.13446925580501556,
0.4203172028064728,
0.297624796628952,
0.31212514638900757,
0.044069357216358185,
-0.25829076766967773,
0.22246985137462616,
0.12610125541687012,
0.17970320582389832,
0.2806287109851837,
-0.03353847935795784,
0.036657314747571945,
-0.20391002297401428,
0.008632034063339233,
-0.004022419452667236,
-0.1649359166622162,
-0.10073646157979965,
-0.13448864221572876,
-0.19910527765750885,
0.17578068375587463,
-0.10425306856632233,
-0.06540882587432861,
-0.0014628618955612183,
-0.28565412759780884,
-0.17181061208248138,
0.05471235513687134,
-0.013767845928668976,
0.04478554055094719,
-0.014360174536705017,
-0.16115382313728333,
0.01298234611749649,
0.1447066366672516,
0.3112638592720032,
-0.2047111690044403,
0.1739387810230255,
0.7150832414627075,
-0.07197144627571106,
0.13886043429374695,
-0.15195049345493317,
0.13012567162513733,
-0.4300231635570526,
-0.22331726551055908,
0.1847541183233261,
0.02991122379899025,
-0.05978360027074814,
-0.006110404152423143,
0.18921582400798798,
0.060652438551187515,
0.15118059515953064,
0.11030896008014679,
-0.30625879764556885,
-0.21387727558612823,
0.09298481792211533,
-0.3593214154243469,
-0.09794260561466217,
-0.2525225877761841,
0.3495725989341736,
0.06630849093198776,
-0.2864830493927002,
-0.2178570032119751,
0.05873633176088333,
-0.15122509002685547,
-0.08537885546684265,
-0.12722119688987732,
0.047084975987672806,
0.12559470534324646,
-0.10165348649024963,
0.10423657298088074,
0.1305733323097229,
-0.1404714584350586,
-0.09897290170192719,
-0.23299062252044678,
0.13139790296554565,
0.08552280068397522,
-0.30103060603141785,
-0.03201659768819809,
-0.38067978620529175,
-0.43707436323165894,
0.17978806793689728,
0.10979343950748444,
0.1541973352432251,
0.020760662853717804,
-0.04277007654309273,
0.32300180196762085,
0.042145900428295135,
-0.1973051130771637,
0.20306392014026642,
-0.010816119611263275,
0.4178280830383301,
-0.2047702968120575,
0.3826056122779846,
-0.07777246832847595,
0.03865683823823929,
-0.267689973115921,
0.18819892406463623,
-0.3659290075302124,
-0.16946470737457275,
0.2796504497528076,
-0.1747715324163437,
0.1210450828075409,
-0.08055911213159561,
0.0900718942284584,
0.17795607447624207,
-0.222146674990654,
0.08989973366260529,
0.12410788238048553,
0.1925375908613205,
-0.041138287633657455,
-0.0016542136436328292,
-0.16341902315616608,
0.11995901167392731,
0.02032903954386711,
-0.017299778759479523,
0.13140447437763214,
-0.1536450982093811,
-0.3760247230529785,
0.034542523324489594,
0.4241912066936493,
-0.09061704576015472,
0.11612126231193542,
0.4912559688091278,
0.027804944664239883,
0.3133527636528015,
0.24993792176246643,
-0.27031421661376953,
-0.28332382440567017,
0.3879989981651306,
-0.19571170210838318,
-0.1514485776424408,
0.12414349615573883,
0.19428294897079468,
0.36894091963768005,
-0.4002887010574341,
-0.15389038622379303,
0.18204307556152344,
-0.1897825300693512,
0.11884951591491699,
-0.04658740758895874,
0.3653774559497833,
-0.0366763211786747,
-0.3229553699493408,
-0.5286081433296204,
0.34015196561813354,
-0.22830158472061157,
-0.04885657876729965,
-0.6750702857971191,
-0.1986522674560547,
0.05005145072937012,
0.16597880423069,
-0.20789170265197754,
-0.4344862699508667,
0.1012423187494278,
0.0629439651966095,
-0.08950862288475037,
-0.3867102861404419,
-0.24239569902420044,
0.4188181459903717,
-0.0935506597161293,
-0.2940652668476105,
0.5436410307884216,
0.21776436269283295,
-0.07726839184761047,
0.3298938572406769,
0.36849966645240784,
0.3344617486000061,
0.39844104647636414,
0.1631486862897873,
-0.09107588231563568,
0.22973868250846863,
-0.21607705950737,
-0.038217466324567795,
0.22904767096042633,
0.2295287698507309,
-0.047787752002477646,
0.3515125811100006,
0.10511269420385361,
-0.011272171512246132,
0.044420816004276276,
-0.011782955378293991,
0.45735445618629456,
-0.023015180602669716,
0.4993676245212555,
-0.31711670756340027,
0.1202676072716713,
0.08852265775203705,
0.19295936822891235,
-0.3544374108314514,
-0.3567494750022888,
0.12941941618919373,
-0.08999703824520111,
0.2572464644908905,
-0.11398638039827347,
0.016563840210437775,
-0.22894400358200073,
0.23980677127838135,
0.010357368737459183,
0.002149004489183426,
-0.41038814187049866,
-0.2501009702682495,
-0.45047643780708313,
-0.32458022236824036,
0.19874221086502075,
-0.0444265641272068,
0.11429489403963089,
0.34905678033828735,
-0.10180587321519852,
-0.08335284143686295,
0.06499457359313965,
0.2842080593109131,
-0.0089163389056921,
0.08825770020484924,
-0.3364410996437073,
-0.17147314548492432,
0.22762201726436615,
0.02956187166273594,
-0.1320192515850067,
-0.4051891267299652,
0.34427610039711,
0.04723794385790825,
-0.05082767829298973,
-0.029839184135198593,
0.15002372860908508,
0.1930762529373169,
0.29466739296913147,
0.25570929050445557,
0.06297920644283295,
0.5637892484664917,
-0.013591930270195007,
-0.12296511232852936,
-0.1938382387161255,
-0.4384525716304779,
-0.23751835525035858,
-0.1957065761089325,
-0.23052465915679932,
0.4693877100944519,
-0.03448205813765526,
0.1994885355234146,
-0.17385302484035492,
-0.1000126302242279,
-0.15075039863586426,
-0.023887762799859047,
-0.861813485622406,
0.48804423213005066,
-0.41690754890441895,
0.45225223898887634,
-0.21461735665798187,
0.036727387458086014,
0.030241994187235832,
0.0955222025513649,
-0.32611119747161865,
-0.29290124773979187,
0.561587929725647,
-0.2153431475162506,
0.0926278829574585,
0.0955442413687706,
0.25363045930862427,
-0.012824378907680511,
-0.2677324712276459,
-0.29989585280418396,
-0.16359323263168335,
0.33734843134880066,
-0.3155955970287323,
-0.32284781336784363,
0.25305500626564026,
-0.023772049695253372,
0.1102132648229599,
-0.01103173941373825,
0.16973444819450378,
0.12632670998573303,
-0.39785236120224,
0.15540388226509094,
-0.09339211881160736
] |
https://github.com/huggingface/datasets/issues/5153 | default Image/AudioFolder infers labels when there is no metadata files even if there is only one dir | Makes sense! For the last structure, we could count the path segments (delimited by "/" for URLs and `os.sep` for local paths) to ensure all inferred labels are on the same level. Otherwise, I think it's safe to assume they are meaningless and ignore them.
| ### Describe the bug
By default FolderBasedBuilder infers labels if there is not metadata files, even if it's meaningless (for example, they are in a single directory or in the root folder, see this repo as an example: https://huggingface.co/datasets/patrickvonplaten/audios
As this is a corner case for quick exploration of images or audios on the Hub.
### Steps to reproduce the bug
If you have directory like this:
```
repo
image1.jpg
image2.jpg
image3.jpg
```
or
```
repo
data
image1.jpg
image2.jpg
image3.jpg
```
doing `ds = load_dataset(repo)` would create `label` feature:
```python
print(ds["train"][0])
>> {'image': <PIL.JpegImagePlugin.JpegImageFile image mode=RGB size=500x375 at 0x7FB5326468E0>, 'label': 0}
```
Also, if you have the following structure:
```
repo
data
image1.jpg
image2.jpg
image3.jpg
image4.jpg
image5.jpg
image6.jpg
```
it will infer two labels:
```python
print(ds["train"][0])
print(ds["train"][-1])
>> {'image': <PIL.JpegImagePlugin.JpegImageFile image mode=RGB size=500x375 at 0x7FB5326468E0>, 'label': 1}
>> {'image': <PIL.JpegImagePlugin.JpegImageFile image mode=RGB size=500x415 at 0x7FB5326555B0>, 'label': 0}
```
### Expected behavior
We should have only one base feature (Image/Audio) in such cases.
### Environment info
all versions of `datasets` | 45 | default Image/AudioFolder infers labels when there is no metadata files even if there is only one dir
### Describe the bug
By default FolderBasedBuilder infers labels if there is not metadata files, even if it's meaningless (for example, they are in a single directory or in the root folder, see this repo as an example: https://huggingface.co/datasets/patrickvonplaten/audios
As this is a corner case for quick exploration of images or audios on the Hub.
### Steps to reproduce the bug
If you have directory like this:
```
repo
image1.jpg
image2.jpg
image3.jpg
```
or
```
repo
data
image1.jpg
image2.jpg
image3.jpg
```
doing `ds = load_dataset(repo)` would create `label` feature:
```python
print(ds["train"][0])
>> {'image': <PIL.JpegImagePlugin.JpegImageFile image mode=RGB size=500x375 at 0x7FB5326468E0>, 'label': 0}
```
Also, if you have the following structure:
```
repo
data
image1.jpg
image2.jpg
image3.jpg
image4.jpg
image5.jpg
image6.jpg
```
it will infer two labels:
```python
print(ds["train"][0])
print(ds["train"][-1])
>> {'image': <PIL.JpegImagePlugin.JpegImageFile image mode=RGB size=500x375 at 0x7FB5326468E0>, 'label': 1}
>> {'image': <PIL.JpegImagePlugin.JpegImageFile image mode=RGB size=500x415 at 0x7FB5326555B0>, 'label': 0}
```
### Expected behavior
We should have only one base feature (Image/Audio) in such cases.
### Environment info
all versions of `datasets`
Makes sense! For the last structure, we could count the path segments (delimited by "/" for URLs and `os.sep` for local paths) to ensure all inferred labels are on the same level. Otherwise, I think it's safe to assume they are meaningless and ignore them.
| [
-0.19025085866451263,
0.02678552269935608,
0.04564252123236656,
0.46496856212615967,
0.19161538779735565,
-0.03204803913831711,
0.556429922580719,
-0.020104091614484787,
-0.00944617111235857,
0.4672832489013672,
-0.34523800015449524,
0.17693735659122467,
-0.23394906520843506,
-0.16997769474983215,
-0.2532479763031006,
0.1367865949869156,
0.023260384798049927,
0.4043831527233124,
-0.08570083975791931,
-0.40111827850341797,
-0.3618810474872589,
0.11278432607650757,
-0.12825070321559906,
0.01673564314842224,
-0.7593173384666443,
0.0954304113984108,
-0.07682733237743378,
0.23708704113960266,
-0.2913040220737457,
-0.35313618183135986,
0.1022949367761612,
0.1721784472465515,
-0.19014881551265717,
0.38763803243637085,
-0.00011662428732961416,
-0.11203750967979431,
0.4646380543708801,
-0.07600873708724976,
-0.14018940925598145,
-0.2894408106803894,
-0.20915177464485168,
0.2662827670574188,
0.0926678478717804,
-0.21378567814826965,
-0.04858880862593651,
-0.12455905228853226,
0.23515819013118744,
0.24764969944953918,
-0.16738082468509674,
0.15174682438373566,
0.12974733114242554,
-0.3190295994281769,
-0.2661348283290863,
-0.008421040140092373,
0.5734723806381226,
0.4695028066635132,
-0.051817379891872406,
0.32719555497169495,
0.07456380128860474,
-0.02052019163966179,
-0.14102816581726074,
0.5661235451698303,
-0.06290759146213531,
0.12358170747756958,
0.28671953082084656,
0.40684640407562256,
0.46352723240852356,
-0.48203936219215393,
-0.042953021824359894,
0.3363173305988312,
0.5379232168197632,
-0.2664448916912079,
-0.18994370102882385,
-0.3046744763851166,
-0.019561946392059326,
-0.2719893157482147,
0.2323799729347229,
0.32442161440849304,
-0.14283746480941772,
0.007442127913236618,
-0.18857620656490326,
-0.0474722646176815,
0.026890859007835388,
0.24175070226192474,
-0.017835885286331177,
0.28160709142684937,
-0.10490582138299942,
0.0716785192489624,
0.1869429349899292,
0.06863181293010712,
0.19514727592468262,
-0.2976383864879608,
-0.22045192122459412,
0.11766187846660614,
0.08401976525783539,
-0.013420850038528442,
0.19664239883422852,
0.3038131594657898,
-0.14673340320587158,
0.22772739827632904,
0.036288026720285416,
0.0326974093914032,
-0.684751033782959,
0.24902945756912231,
0.17547360062599182,
0.12692373991012573,
0.24822965264320374,
0.23835784196853638,
0.3810057044029236,
0.2031567543745041,
0.08964782953262329,
0.06146373599767685,
-0.04665806144475937,
0.21159370243549347,
0.24757437407970428,
-0.11863095313310623,
0.40043848752975464,
0.02176736667752266,
-0.08391708880662918,
-0.09632626920938492,
-0.08639885485172272,
0.1417328417301178,
0.3232305943965912,
0.22020474076271057,
0.20617875456809998,
0.13377198576927185,
0.019267331808805466,
0.23100990056991577,
0.08317526429891586,
0.1411551833152771,
-0.12292064726352692,
-0.01936233416199684,
-0.20455557107925415,
-0.024231785908341408,
0.1595320701599121,
-0.04937739297747612,
0.397667795419693,
0.20422489941120148,
0.1879919469356537,
-0.18751272559165955,
-0.13730986416339874,
-0.3400697112083435,
0.046928416937589645,
0.3296777009963989,
-0.06369224190711975,
0.4096902310848236,
0.03791245073080063,
-0.19024047255516052,
-0.211118683218956,
-0.008430391550064087,
-0.46592891216278076,
0.013934265822172165,
0.05602513998746872,
0.16312092542648315,
-0.11156440526247025,
0.38038620352745056,
-0.59210205078125,
-0.050781894475221634,
-0.34518200159072876,
-0.2697884440422058,
0.24720272421836853,
0.015608265995979309,
-0.14014707505702972,
-0.12497161328792572,
-0.09064114838838577,
0.2857470214366913,
0.03979289159178734,
-0.19260936975479126,
-0.12286379188299179,
-0.15765714645385742,
0.015944331884384155,
-0.05270148441195488,
-0.15593163669109344,
0.36367470026016235,
-0.45912328362464905,
0.11206810176372528,
0.14605993032455444,
-0.7555127143859863,
-0.215133935213089,
-0.10514291375875473,
0.0038577094674110413,
0.19652500748634338,
0.041195958852767944,
0.32562777400016785,
0.171966090798378,
-0.17849308252334595,
0.0010515227913856506,
0.1607052981853485,
0.16722948849201202,
0.24010255932807922,
0.016580503433942795,
-0.1874544471502304,
-0.3501173257827759,
0.2289247065782547,
-0.07762809097766876,
0.17123478651046753,
-0.10206861048936844,
0.17746511101722717,
0.1318311095237732,
-0.05827264115214348,
0.089397132396698,
0.26988187432289124,
0.36091846227645874,
-0.1561862826347351,
0.05565986409783363,
-0.21520817279815674,
-0.2102685272693634,
0.2971440553665161,
0.14049530029296875,
0.39343440532684326,
-0.13459180295467377,
-0.18305927515029907,
0.028952833265066147,
-0.19276881217956543,
-0.41076335310935974,
0.07150877267122269,
0.15511177480220795,
0.3732909560203552,
-0.31697139143943787,
-0.1259106993675232,
-0.05401410162448883,
0.1100175678730011,
-0.031457118690013885,
0.25636959075927734,
-0.0592028982937336,
0.23939628899097443,
0.14581820368766785,
0.02463514171540737,
-0.1490183174610138,
0.00205385684967041,
0.1505831480026245,
0.0475049689412117,
0.07361741364002228,
0.6524390578269958,
0.4478003680706024,
0.21745973825454712,
-0.28527092933654785,
0.28412702679634094,
0.24696077406406403,
-0.24096040427684784,
0.0759725421667099,
0.11974681913852692,
0.4324977695941925,
-0.1601681113243103,
-0.32726046442985535,
-0.029596179723739624,
-0.017185326665639877,
0.21015870571136475,
0.028673306107521057,
-0.11135010421276093,
0.04588182270526886,
0.046594809740781784,
-0.1505536586046219,
-0.2612764239311218,
-0.09542524814605713,
0.06167522817850113,
0.26586073637008667,
0.3961801826953888,
-0.04116658493876457,
-0.08023477345705032,
0.20693834125995636,
-0.14154577255249023,
0.2757052779197693,
0.11352251470088959,
-0.32513776421546936,
-0.0550646036863327,
0.07651741802692413,
0.12555260956287384,
0.2858125567436218,
0.15715546905994415,
0.04745369777083397,
-0.054716192185878754,
-0.09061592817306519,
-0.03189440816640854,
0.20040428638458252,
0.19114693999290466,
0.22135086357593536,
0.2029113471508026,
0.3242226541042328,
-0.0836593508720398,
-0.48889926075935364,
-0.38344380259513855,
0.11988901346921921,
0.10867749154567719,
-0.2543155550956726,
-0.16175320744514465,
-0.17714804410934448,
-0.07973785698413849,
0.013607310131192207,
-0.5776085257530212,
-0.28181886672973633,
-0.1779576539993286,
0.23748356103897095,
0.4038335382938385,
-0.08776195347309113,
0.09705653041601181,
0.15603569149971008,
0.35098955035209656,
-0.1221250668168068,
-0.1440194994211197,
-0.30494076013565063,
0.24292254447937012,
-0.09434182196855545,
-0.05315428972244263,
-0.007688713259994984,
0.10698110610246658,
0.00609963946044445,
-0.25119057297706604,
-0.058708708733320236,
-0.2897821068763733,
-0.2472110092639923,
0.34298551082611084,
0.017301971092820168,
0.11425855755805969,
0.3228359818458557,
-0.040662601590156555,
0.3418678641319275,
-0.2258324921131134,
0.21368102729320526,
0.14539003372192383,
-0.08105933666229248,
0.03310832753777504,
0.105259008705616,
0.08487952500581741,
-0.35408008098602295,
-0.006192222237586975,
-0.01709473691880703,
-0.42079299688339233,
-0.030239909887313843,
0.30838993191719055,
0.3259449601173401,
0.3243853449821472,
-0.19883525371551514,
-0.09501270204782486,
-0.08040939271450043,
0.25288161635398865,
-0.1272810995578766,
-0.3169967234134674,
0.07032482326030731,
0.1485050767660141,
0.07820781320333481,
-0.08075477182865143,
-0.24943554401397705,
0.33931708335876465,
0.00497508654370904,
-0.3341885805130005,
-0.5738121271133423,
-0.0536140501499176,
0.1983696073293686,
0.14273792505264282,
0.17578250169754028,
0.264399915933609,
0.48843127489089966,
-0.07497577369213104,
-0.26521334052085876,
0.010742511600255966,
0.026250436902046204,
-0.048588596284389496,
0.07582907378673553,
-0.041324540972709656,
0.04674462974071503,
-0.26680099964141846,
0.21249806880950928,
-0.12858504056930542,
0.18169668316841125,
0.3822616636753082,
-0.12223375588655472,
0.5468107461929321,
-0.31834590435028076,
0.03178548812866211,
-0.14467944204807281,
0.28772854804992676,
-0.19498084485530853,
0.4611783027648926,
0.17406216263771057,
-0.2533271014690399,
-0.0840686708688736,
0.05300230160355568,
-0.5335013270378113,
-0.17143775522708893,
-0.276481032371521,
-0.14877551794052124,
-0.1764240264892578,
-0.17873069643974304,
0.09881845861673355,
-0.003634203225374222,
-0.11761395633220673,
-0.05574803426861763,
0.1583973616361618,
-0.037200845777988434,
-0.09282184392213821,
-0.41381576657295227,
0.028545597568154335,
0.18619480729103088,
-0.2528812885284424,
-0.0040379180572927,
0.10947882384061813,
-0.07580479979515076,
0.0690479427576065,
0.0855972096323967,
0.04550488665699959,
0.4335363507270813,
-0.31876787543296814,
0.3563010096549988,
-0.028204958885908127,
0.06670092046260834,
-0.0045204441994428635,
-0.2569727301597595,
-0.3954501152038574,
-0.084979347884655,
0.07979916781187057,
0.8423765301704407,
-0.23595505952835083,
-0.19361117482185364,
0.11488597095012665,
-0.005395049229264259,
-0.07380013912916183,
0.13723838329315186,
-0.28706565499305725,
-0.07232920825481415,
-0.04359619319438934,
-0.05848044902086258,
0.1322171837091446,
-0.11770951002836227,
-0.03695574402809143,
0.05730953440070152,
0.005387554876506329,
-0.11406104266643524,
0.07658212631940842,
0.20201705396175385,
0.2693445682525635,
-0.01000825222581625,
0.23038223385810852,
0.16076335310935974,
-0.015596449375152588,
0.30846256017684937,
0.4658580422401428,
-0.13462793827056885,
-0.29237446188926697,
0.15744712948799133,
-0.14030906558036804,
0.07503516972064972,
0.45135700702667236,
0.10811584442853928,
-0.2388175129890442,
-0.526768684387207,
0.09468956291675568,
-0.6079313158988953,
0.238650843501091,
0.441807359457016,
-0.03238383308053017,
-0.3224865794181824,
-0.12250694632530212,
0.8316541910171509,
0.0650254338979721,
-0.44672077894210815,
0.3283432424068451,
0.5068058371543884,
-0.4371602535247803,
0.504094660282135,
-0.2642218768596649,
0.9355782270431519,
0.2547847032546997,
0.18525521457195282,
0.3112333118915558,
-0.17130479216575623,
0.17866376042366028,
-0.21509963274002075,
0.040757108479738235,
-0.14527283608913422,
-0.3180355131626129,
-0.056025587022304535,
0.015518289059400558,
-0.2924836277961731,
0.34288543462753296,
-0.11769531667232513,
0.16918472945690155,
-0.2104259431362152,
0.21760845184326172,
-0.007083762437105179,
-0.12296272069215775,
-0.34664037823677063,
-0.3144565522670746,
-0.10892686247825623,
0.10153551399707794,
-0.008377894759178162,
0.29981425404548645,
-0.12269476801156998,
0.1790616661310196,
-0.033343616873025894,
-0.35049861669540405,
0.030741915106773376,
0.24904081225395203,
0.1929367631673813,
-0.08525131642818451,
0.057259492576122284,
0.29673653841018677,
-0.38391944766044617,
0.16234539449214935,
0.025163743644952774,
0.35729432106018066,
-0.14636442065238953,
0.28901344537734985,
-0.046855948865413666,
0.5926649570465088,
-0.007630716077983379,
-0.02426363155245781,
0.18350882828235626,
0.22414624691009521,
-0.21265971660614014,
-0.21269094944000244,
-0.20486925542354584,
0.11643083393573761,
-0.06530963629484177,
-0.14652113616466522,
0.07682161778211594,
0.04462689906358719,
-0.13537678122520447,
0.10493917763233185,
-0.03793199360370636,
-0.13236252963542938,
0.09596768021583557,
0.01624498888850212,
-0.20107224583625793,
0.15572045743465424,
-0.11271627247333527,
-0.41701430082321167,
-0.09341584146022797,
0.38029661774635315,
0.14758461713790894,
0.0908842384815216,
0.11233518272638321,
-0.4064698815345764,
0.02591053396463394,
-0.20222708582878113,
0.35960182547569275,
0.2679557204246521,
-0.4287920594215393,
0.2812984585762024,
0.16658474504947662,
-0.3873752951622009,
0.07711021602153778,
0.18195699155330658,
0.002686101943254471,
-0.06968177109956741,
-0.4539218246936798,
-0.2252328097820282,
0.05790591239929199,
0.4793122410774231,
-0.22155116498470306,
0.43976518511772156,
-0.09720311313867569,
-0.27120241522789,
0.10153969377279282,
-0.12482483685016632,
-0.2688137888908386,
0.21510878205299377,
-0.33996859192848206,
0.2978057861328125,
-0.0831761509180069,
0.2610864043235779,
0.21953487396240234,
-0.09657533466815948,
0.12084519863128662,
-0.15591616928577423,
-0.18499377369880676,
-0.041737645864486694,
-0.17249801754951477,
0.1938454508781433,
0.14220502972602844,
0.24584239721298218,
0.07102926820516586,
-0.15526001155376434,
-0.08651107549667358,
-0.3718433380126953,
0.31768593192100525,
0.22218599915504456,
-0.04540804773569107,
0.09478124231100082,
0.0712745413184166,
0.19076652824878693,
0.018582649528980255,
0.13244396448135376,
-0.184839129447937,
-0.06786797940731049,
-0.07518323510885239,
0.07680409401655197,
-0.32643306255340576,
-0.034979198127985,
-0.030447427183389664,
0.27123868465423584,
-0.16723455488681793,
0.02349969930946827,
0.24323827028274536,
-0.03626769781112671,
0.3512759804725647,
0.11647893488407135,
0.4499973654747009,
-0.05637132376432419,
-0.22230421006679535,
-0.3715055584907532,
-0.051553938537836075,
0.2573579251766205,
-0.25117939710617065,
-0.40207305550575256,
-0.30246788263320923,
-0.11254414170980453,
0.3071226477622986,
0.3065080940723419,
-0.0042744651436805725,
-0.06038670614361763,
-0.11372174322605133,
-0.0798444151878357,
0.732758104801178,
-0.36392778158187866,
0.11781090497970581,
0.5549885034561157,
-0.4697948396205902,
0.1603163629770279,
0.5024964213371277,
-0.16711315512657166,
-0.025669313967227936,
0.6895980834960938,
-0.10572875291109085,
0.4146174192428589,
0.11849082261323929,
-0.28943148255348206,
0.43951553106307983,
-0.09830665588378906,
-0.2515551745891571,
0.17899611592292786,
0.03353019058704376,
-0.06427466124296188,
-0.14949361979961395,
-0.0953550860285759,
-0.5210832357406616,
0.04094484820961952,
-0.21016602218151093,
-0.14833779633045197,
-0.18281790614128113,
-0.13363073766231537,
-0.1677391231060028,
-0.24183154106140137,
-0.2906567454338074,
-0.08560687303543091,
-0.11792175471782684,
-0.16867506504058838,
-0.012430250644683838,
-0.040095530450344086,
-0.18552400171756744,
-0.19344061613082886,
-0.24615952372550964,
0.2086958885192871,
0.24935588240623474,
-0.2663732171058655,
0.31995537877082825,
0.11841211467981339,
0.12561136484146118,
0.18979045748710632,
0.5218265652656555,
0.23976559937000275,
0.37761983275413513,
0.22998256981372833,
-0.05562100186944008,
0.00218066293746233,
-0.14315804839134216,
-0.1422809362411499,
-0.08608169108629227,
0.162472665309906,
0.2889076769351959,
-0.0332457572221756,
0.20370212197303772,
-0.2303139567375183,
0.18952709436416626,
-0.004630465060472488,
0.0629192590713501,
-0.01971600018441677,
0.44232118129730225,
-0.18146465718746185,
0.12171203643083572,
-0.07815065234899521,
-0.07826501876115799,
-0.37948182225227356,
-0.3010793924331665,
0.3092912435531616,
0.09826942533254623,
0.23335397243499756,
0.06090209260582924,
0.03526840731501579,
0.0569792166352272,
0.07934104651212692,
0.3759059011936188,
-0.21503788232803345,
-0.13989216089248657,
-0.06037462130188942,
-0.5339702367782593,
-0.07056812196969986,
-0.057418692857027054,
-0.3442675471305847,
0.05588846653699875,
0.015727059915661812,
0.15274867415428162,
-0.01933576539158821,
-0.053740307688713074,
0.17047804594039917,
0.07148311287164688,
0.14538437128067017,
-0.3969404399394989,
0.1255374550819397,
0.06000998988747597,
0.11261157691478729,
-0.123386450111866,
-0.6250808238983154,
0.14338308572769165,
-0.07683469355106354,
0.012222733348608017,
0.27292823791503906,
0.13892699778079987,
-0.1725717931985855,
-0.013230808079242706,
0.3162204623222351,
-0.0883222371339798,
0.13090939819812775,
-0.12375602126121521,
-0.08644957095384598,
-0.25617825984954834,
-0.2896929979324341,
-0.2204418033361435,
-0.45283982157707214,
0.10453727841377258,
0.5007612705230713,
-0.03978461027145386,
0.1785852164030075,
-0.1549248993396759,
-0.09499740600585938,
0.16362431645393372,
0.31709542870521545,
-0.5392633080482483,
0.2802795469760895,
-0.4216952323913574,
0.13503505289554596,
-0.10543341189622879,
-0.136844664812088,
0.18759265542030334,
-0.1026710718870163,
-0.3404383659362793,
-0.6195369362831116,
0.6236863732337952,
0.11866135150194168,
-0.2539486289024353,
-0.3695669174194336,
0.4205712378025055,
0.11143410950899124,
0.07065654546022415,
-0.4179316759109497,
0.10003916174173355,
0.3174677789211273,
0.026267141103744507,
-0.6268939971923828,
-0.031001228839159012,
-0.04226618632674217,
-0.12117241322994232,
-0.13266710937023163,
-0.27234160900115967,
0.08151298761367798,
-0.28971341252326965,
0.18880115449428558,
-0.21183709800243378
] |
https://github.com/huggingface/datasets/issues/5150 | Problems after upgrading to 2.6.1 | Hi! I can't reproduce the error following these steps. Can you please provide a reproducible example? | ### Describe the bug
Loading a dataset_dict from disk with `load_from_disk` is now creating a `KeyError "length"` that was not occurring in v2.5.2.
Context:
- Each individual dataset in the dict is created with `Dataset.from_pandas`
- The dataset_dict is create from a dict of `Dataset`s, e.g., `DatasetDict({"train": train_ds, "validation": val_ds})
- The pandas dataframe, besides text columns, has a column with a dictionary inside and potentially different keys in each row. Correctly the `Dataset.from_pandas` function adds `key: None` to all dictionaries in each row so that the schema can be correctly inferred.
### Steps to reproduce the bug
Steps to reproduce:
- Upgrade to datasets==2.6.1
- Create a dataset from pandas dataframe with `Dataset.from_pandas`
- Create a dataset_dict from a dict of `Dataset`s, e.g., `DatasetDict({"train": train_ds, "validation": val_ds})
- Save to disk with the `save` function
### Expected behavior
Same as in v2.5.2, that is load from disk without errors
### Environment info
- `datasets` version: 2.6.1
- Platform: Linux-5.4.209-129.367.amzn2int.x86_64-x86_64-with-glibc2.26
- Python version: 3.9.13
- PyArrow version: 9.0.0
- Pandas version: 1.5.1 | 16 | Problems after upgrading to 2.6.1
### Describe the bug
Loading a dataset_dict from disk with `load_from_disk` is now creating a `KeyError "length"` that was not occurring in v2.5.2.
Context:
- Each individual dataset in the dict is created with `Dataset.from_pandas`
- The dataset_dict is create from a dict of `Dataset`s, e.g., `DatasetDict({"train": train_ds, "validation": val_ds})
- The pandas dataframe, besides text columns, has a column with a dictionary inside and potentially different keys in each row. Correctly the `Dataset.from_pandas` function adds `key: None` to all dictionaries in each row so that the schema can be correctly inferred.
### Steps to reproduce the bug
Steps to reproduce:
- Upgrade to datasets==2.6.1
- Create a dataset from pandas dataframe with `Dataset.from_pandas`
- Create a dataset_dict from a dict of `Dataset`s, e.g., `DatasetDict({"train": train_ds, "validation": val_ds})
- Save to disk with the `save` function
### Expected behavior
Same as in v2.5.2, that is load from disk without errors
### Environment info
- `datasets` version: 2.6.1
- Platform: Linux-5.4.209-129.367.amzn2int.x86_64-x86_64-with-glibc2.26
- Python version: 3.9.13
- PyArrow version: 9.0.0
- Pandas version: 1.5.1
Hi! I can't reproduce the error following these steps. Can you please provide a reproducible example? | [
0.10454501211643219,
0.0607992559671402,
0.05969845876097679,
0.5349827408790588,
0.22519730031490326,
0.12659436464309692,
0.3924105167388916,
0.2159557342529297,
0.15846477448940277,
0.2107512652873993,
0.34398511052131653,
0.22761820256710052,
-0.14738380908966064,
-0.11087767779827118,
-0.20353518426418304,
-0.05486277490854263,
0.272683709859848,
0.003620050847530365,
-0.20365041494369507,
0.12749968469142914,
-0.39929327368736267,
0.26819777488708496,
-0.23280847072601318,
0.08959980309009552,
-0.3480604290962219,
0.00797930359840393,
-0.45532768964767456,
0.22060626745224,
0.06865053623914719,
-0.6111015677452087,
0.4734254777431488,
-0.17647996544837952,
0.14618495106697083,
0.3177163004875183,
-0.00012767635053023696,
-0.07175266742706299,
0.21529701352119446,
-0.036832667887210846,
-0.3224118649959564,
-0.3750540018081665,
-0.11313509196043015,
0.007096666842699051,
0.4737943112850189,
-0.14543594419956207,
0.21740558743476868,
0.049702126532793045,
-0.36624452471733093,
-0.34755393862724304,
0.24552716314792633,
0.4575064182281494,
0.10733765363693237,
-0.038385286927223206,
0.023696277290582657,
-0.390961617231369,
-0.15536245703697205,
0.06747642904520035,
0.10034023970365524,
0.36020371317863464,
0.012703195214271545,
-0.07002255320549011,
-0.1281122863292694,
0.2527366280555725,
0.20256854593753815,
-0.062418315559625626,
0.2378021776676178,
-0.03246665745973587,
0.34294983744621277,
-0.34840458631515503,
0.24116605520248413,
0.20158502459526062,
0.19693267345428467,
-0.2654472887516022,
-0.39633843302726746,
-0.3722727298736572,
0.32140499353408813,
0.22072824835777283,
0.43499618768692017,
-0.24102824926376343,
0.10221408307552338,
0.21631969511508942,
0.002382672857493162,
-0.2845025956630707,
-0.18801085650920868,
-0.15756958723068237,
-0.20324575901031494,
-0.36762872338294983,
0.012945689260959625,
0.093002088367939,
0.05508851259946823,
-0.15238319337368011,
0.3430199921131134,
-0.10292428731918335,
-0.23752635717391968,
0.2410736382007599,
-0.13174021244049072,
-0.02279665507376194,
0.2439175844192505,
-0.20620378851890564,
0.04281243681907654,
-0.5994025468826294,
-0.20809955894947052,
-0.33648374676704407,
0.0003845673054456711,
-0.08475971966981888,
0.2666514217853546,
0.2377595156431198,
0.43192654848098755,
0.1824018359184265,
-0.07371169328689575,
0.04086031764745712,
-0.08790388703346252,
0.022387299686670303,
-0.15706312656402588,
-0.11461170017719269,
0.2260807901620865,
-0.08407364040613174,
0.196034237742424,
-0.008107103407382965,
-0.18211525678634644,
0.4248604476451874,
-0.050737641751766205,
-0.05049508064985275,
0.05442291870713234,
0.22936737537384033,
0.12793275713920593,
0.3693705201148987,
0.07874834537506104,
0.20239436626434326,
-0.12850262224674225,
0.1410943865776062,
-0.24156145751476288,
0.30951711535453796,
-0.17894288897514343,
-0.252909779548645,
0.022653106600046158,
-0.12533564865589142,
0.09503478556871414,
0.17204999923706055,
0.08283597230911255,
-0.26617980003356934,
-0.6261469125747681,
-0.11286866664886475,
0.009831272065639496,
0.18679317831993103,
-0.17372584342956543,
0.10733050853013992,
0.2854818105697632,
-0.037732355296611786,
-0.12465982884168625,
0.3139611780643463,
-0.1392858922481537,
0.01768099144101143,
-0.2605811655521393,
0.08931853622198105,
-0.2373102903366089,
0.1377025842666626,
-0.12909835577011108,
0.1319803148508072,
0.24583980441093445,
-0.2930321991443634,
-0.047231681644916534,
-0.3139330744743347,
-0.2412930279970169,
-0.2873974144458771,
-0.016373127698898315,
0.5779162645339966,
-0.4726238250732422,
-0.19275638461112976,
0.1677180826663971,
-0.06977207958698273,
0.01092877984046936,
-0.09726633131504059,
-0.04944409802556038,
-0.013239488005638123,
-0.22401881217956543,
0.1679355502128601,
0.3714413344860077,
-0.22800694406032562,
-0.6939548850059509,
0.3092961609363556,
-0.11330074816942215,
0.22440581023693085,
0.04745742678642273,
-0.055968768894672394,
0.5358526706695557,
0.011416655965149403,
0.25049859285354614,
0.129963219165802,
-0.032722920179367065,
0.03950069099664688,
-0.3782026171684265,
-0.32374292612075806,
0.09803298115730286,
-0.14969535171985626,
0.2736361622810364,
0.17751257121562958,
0.12927287817001343,
-0.015996575355529785,
0.18026597797870636,
0.032876938581466675,
0.10877395421266556,
0.19273141026496887,
-0.0403296984732151,
-0.04046753793954849,
0.18166892230510712,
-0.266194611787796,
-0.38423240184783936,
0.4020625948905945,
-0.07413382083177567,
0.08398545533418655,
-0.09222373366355896,
-0.009615795686841011,
-0.4517025649547577,
0.227506622672081,
-0.237838014960289,
-0.15264585614204407,
-0.09583280980587006,
-0.16772174835205078,
0.07457995414733887,
0.20723438262939453,
-0.08206507563591003,
0.05683547258377075,
-0.27144211530685425,
0.1932179480791092,
0.04146353155374527,
0.3287540376186371,
-0.10772509127855301,
-0.06326852738857269,
-0.22923965752124786,
0.1005946546792984,
0.22802570462226868,
0.02826446294784546,
-0.37705522775650024,
0.43041762709617615,
0.3857889771461487,
0.04201732948422432,
-0.32664936780929565,
-0.24737952649593353,
0.4260435700416565,
0.418081134557724,
0.2891242206096649,
0.2355467975139618,
0.02186473086476326,
-0.061581164598464966,
-0.2200007140636444,
0.4787483215332031,
0.08607102930545807,
0.4146965742111206,
0.05503538250923157,
0.1939740777015686,
0.2818526029586792,
0.0778498500585556,
0.15037213265895844,
-0.3390863239765167,
-0.135381281375885,
-0.1194898933172226,
-0.08279979228973389,
0.213214710354805,
0.08675552904605865,
-0.041675783693790436,
0.40861988067626953,
0.05685783550143242,
-0.033805325627326965,
0.31585609912872314,
-0.19609582424163818,
-0.2782939672470093,
0.024824470281600952,
0.6806843876838684,
0.3115326762199402,
0.01765206828713417,
-0.04796445742249489,
-0.14475147426128387,
-0.02022130787372589,
0.043797414749860764,
0.06626907736063004,
-0.1316770762205124,
0.37946921586990356,
0.24243706464767456,
0.11798597127199173,
0.20487584173679352,
-0.030329575762152672,
-0.03110978566110134,
-0.013998359441757202,
0.31347936391830444,
-0.4773278832435608,
-0.009839898906648159,
-0.1394960582256317,
0.010358504951000214,
0.2403498739004135,
-0.24733476340770721,
-0.08242347836494446,
-0.3305244445800781,
-0.21940620243549347,
0.013690534979104996,
-0.01669061928987503,
0.17877097427845,
-0.050667282193899155,
-0.005961865186691284,
0.28492146730422974,
0.053809888660907745,
0.1522608995437622,
-0.2124112993478775,
-0.058020614087581635,
-0.047691572457551956,
-0.1075252816081047,
-0.19982661306858063,
0.03373897075653076,
0.052931688725948334,
-0.20227687060832977,
0.04880385845899582,
-0.32319438457489014,
0.0937337577342987,
-0.06379550695419312,
0.08844846487045288,
0.3366079330444336,
0.10144472867250443,
-0.029126949608325958,
-0.10067939013242722,
0.17372529208660126,
-0.0320141464471817,
-0.3007892966270447,
0.43081334233283997,
0.21741506457328796,
0.11033317446708679,
-0.14026330411434174,
-0.2592388987541199,
-0.1409696638584137,
-0.23970696330070496,
0.2097579538822174,
0.07338513433933258,
0.2117040604352951,
-0.05830474942922592,
0.5127541422843933,
0.07100893557071686,
0.26673194766044617,
0.25022274255752563,
-0.12107238918542862,
-0.06258154660463333,
0.14241930842399597,
0.02479902096092701,
-0.39891254901885986,
-0.04187142848968506,
-0.2579685151576996,
0.0865132138133049,
0.13964718580245972,
-0.4836024045944214,
-0.267600953578949,
-0.09777230024337769,
0.2879762053489685,
0.16106440126895905,
-0.1175835132598877,
0.44580960273742676,
0.148628830909729,
0.07172653079032898,
-0.04322926327586174,
-0.10548189282417297,
0.11705754697322845,
0.10425398498773575,
0.14802676439285278,
-0.18979820609092712,
0.7520852088928223,
-0.1860695779323578,
0.1920306384563446,
0.01580003648996353,
0.07654587179422379,
-0.04194730520248413,
-0.22638601064682007,
0.3201165795326233,
-0.30568116903305054,
-0.26990941166877747,
-0.044405218213796616,
-0.13394767045974731,
-0.250555157661438,
0.07146447151899338,
0.0013789739459753036,
0.24385812878608704,
0.019911430776119232,
-0.29568517208099365,
-0.2221796214580536,
-0.1918027400970459,
-0.11756344139575958,
-0.7438530921936035,
0.2725299596786499,
0.0648096352815628,
0.47681406140327454,
0.015007849782705307,
0.3290691375732422,
-0.09232272207736969,
-0.08210062980651855,
0.30219346284866333,
-0.247266948223114,
-0.007358163595199585,
0.3084225356578827,
-0.4358360767364502,
0.20735584199428558,
0.25581344962120056,
0.3595978915691376,
0.006241675466299057,
-0.3475577235221863,
0.0658600926399231,
-0.0820542499423027,
0.6229314804077148,
0.15975362062454224,
-0.07286413013935089,
0.3715325593948364,
-0.2524334192276001,
-0.6976016759872437,
-0.169648677110672,
0.1947030872106552,
0.2567712068557739,
0.48973941802978516,
0.2621348202228546,
0.00021098554134368896,
0.07625831663608551,
0.07443156838417053,
0.14712277054786682,
-0.22581562399864197,
-0.06410913914442062,
-0.07929723709821701,
-0.010825686156749725,
-0.2715022563934326,
0.11251417547464371,
-0.11759050190448761,
0.47479042410850525,
-0.0697530061006546,
0.04156944528222084,
-0.20327727496623993,
-0.41995668411254883,
0.033556774258613586,
0.3269293010234833,
0.27416107058525085,
-0.3274824023246765,
0.4159594774246216,
0.07846982032060623,
-0.23316925764083862,
0.5079207420349121,
0.2996017038822174,
-0.2867065668106079,
-0.5381798148155212,
-0.017505180090665817,
-0.2598280608654022,
-0.015742190182209015,
0.14911384880542755,
-0.21859858930110931,
0.056187380105257034,
-0.20021431148052216,
-0.026072904467582703,
-0.15844810009002686,
-0.05814030021429062,
0.2610004246234894,
-0.11122220754623413,
-0.21042940020561218,
-0.46755701303482056,
0.23148232698440552,
-0.04054493457078934,
-0.17158207297325134,
0.28903496265411377,
0.37617719173431396,
-0.3631346523761749,
0.3651024103164673,
-0.08817470818758011,
0.564180314540863,
0.08776232600212097,
0.0977955162525177,
0.3520846664905548,
-0.22389456629753113,
0.3439757227897644,
0.5417569279670715,
-0.1866493970155716,
-0.5414210557937622,
-0.040016110986471176,
0.060394711792469025,
-0.040061820298433304,
0.05994964390993118,
-0.042972587049007416,
-0.15615259110927582,
0.10194598138332367,
-0.428838312625885,
-0.11329755187034607,
-0.16476982831954956,
-0.01635752059519291,
-0.30060288310050964,
-0.08467349410057068,
-0.15544620156288147,
0.0036826282739639282,
0.11030825972557068,
-0.05379829183220863,
0.020322445780038834,
0.13041533529758453,
-0.06691424548625946,
-0.545367956161499,
-0.4940947890281677,
0.16913005709648132,
-0.07514122128486633,
0.29923415184020996,
0.19197382032871246,
-0.4252302646636963,
0.28851303458213806,
0.41218850016593933,
0.2359178215265274,
0.06462124735116959,
0.00005012005567550659,
0.19018855690956116,
-0.12871184945106506,
0.19702927768230438,
0.19379650056362152,
0.19516779482364655,
0.1192750632762909,
0.21542981266975403,
-0.024573855102062225,
-0.13325420022010803,
-0.2694365978240967,
-0.04234762489795685,
-0.09946966171264648,
0.08958067744970322,
0.012394312769174576,
-0.45772334933280945,
-0.24475198984146118,
-0.3446641266345978,
-0.06828474998474121,
-0.43664249777793884,
0.009942745789885521,
0.18930751085281372,
-0.03976965323090553,
0.2476126253604889,
-0.2802709937095642,
-0.27132415771484375,
-0.07333560287952423,
0.6691246628761292,
0.14153964817523956,
-0.2548242211341858,
0.4217434823513031,
-0.018033146858215332,
-0.14644615352153778,
-0.07865250110626221,
0.15512120723724365,
0.02289622463285923,
-0.17536592483520508,
0.5688979029655457,
0.0000021047890186309814,
-0.08335445821285248,
-0.18070368468761444,
0.18329450488090515,
0.19719180464744568,
0.4184376001358032,
0.0909966379404068,
-0.2379130721092224,
-0.4612932801246643,
0.25072553753852844,
-0.10833151638507843,
0.22087624669075012,
-0.03788111358880997,
-0.12639006972312927,
-0.15147730708122253,
0.09836150705814362,
-0.12883260846138,
0.1648644208908081,
-0.024436624720692635,
-0.0736026018857956,
0.3635168969631195,
0.029229899868369102,
0.10209783911705017,
-0.38025251030921936,
0.021635593846440315,
-0.008036576211452484,
0.2441331297159195,
0.019558198750019073,
-0.2659149467945099,
0.1294797956943512,
-0.009470440447330475,
0.2812439799308777,
-0.12434709072113037,
-0.2222672551870346,
-0.0688244104385376,
-0.10147786885499954,
0.195876345038414,
0.4417511820793152,
-0.18201766908168793,
0.39961498975753784,
0.18607333302497864,
0.3912506103515625,
0.27419614791870117,
0.38037458062171936,
-0.26331281661987305,
0.41083967685699463,
0.0821426659822464,
0.2420794665813446,
-0.010028012096881866,
0.021191060543060303,
-0.32178348302841187,
0.2359766662120819,
-0.3166617155075073,
-0.18815094232559204,
0.39553919434547424,
-0.0975363701581955,
0.2280597984790802,
0.2852931618690491,
0.34331873059272766,
0.3730490505695343,
-0.270842581987381,
-0.034163698554039,
-0.029313813894987106,
0.13437777757644653,
-0.28194302320480347,
-0.099543496966362,
-0.061632443219423294,
-0.08357309550046921,
-0.20713908970355988,
0.0857449322938919,
-0.2514161765575409,
-0.3128952980041504,
-0.4376726746559143,
0.22686037421226501,
0.3932708203792572,
-0.0426734983921051,
0.25518369674682617,
0.8165216445922852,
-0.12216947972774506,
0.07917418330907822,
0.4539215862751007,
0.08185167610645294,
0.08231090009212494,
0.7017261981964111,
-0.2574663758277893,
0.3199669122695923,
0.018506646156311035,
0.1514013260602951,
0.04974871501326561,
-0.3647174537181854,
0.2162514328956604,
0.015131622552871704,
-0.3298378884792328,
-0.32388919591903687,
0.032096296548843384,
-0.030552014708518982,
-0.177517831325531,
-0.1201319471001625,
-0.1353888362646103,
0.08894680440425873,
-0.20575359463691711,
-0.17710036039352417,
0.1291486918926239,
-0.170763298869133,
0.21283668279647827,
-0.05138827860355377,
-0.137962207198143,
-0.05646606534719467,
0.19279348850250244,
0.08587966114282608,
-0.10448808968067169,
-0.31466153264045715,
0.007126590237021446,
0.028097420930862427,
0.13597381114959717,
-0.3503485918045044,
-0.06321636587381363,
0.34520554542541504,
0.2262585461139679,
0.15027262270450592,
-0.021157624199986458,
0.6135950088500977,
0.4061807096004486,
-0.16435422003269196,
-0.12737217545509338,
0.06765663623809814,
-0.046977777034044266,
0.19087766110897064,
0.27057427167892456,
-0.09161275625228882,
0.5710968971252441,
0.2136642336845398,
-0.044265374541282654,
-0.0004325471818447113,
0.3327094614505768,
0.1988651603460312,
0.3518284857273102,
-0.1312129646539688,
0.6467042565345764,
-0.14512473344802856,
-0.11663170903921127,
-0.1649170070886612,
0.4308801293373108,
-0.12793324887752533,
-0.4273439645767212,
0.21467755734920502,
0.05736395716667175,
0.16003155708312988,
-0.037757065147161484,
0.019297629594802856,
0.14382115006446838,
0.22286412119865417,
0.5252568125724792,
-0.07344410568475723,
-0.3107614815235138,
-0.018019288778305054,
-0.5044698119163513,
-0.16127949953079224,
-0.04688234254717827,
0.17140892148017883,
0.13356128334999084,
0.24230484664440155,
-0.24814966320991516,
-0.2413826733827591,
0.0210735946893692,
0.38580507040023804,
-0.31221216917037964,
0.16297626495361328,
-0.07918281853199005,
-0.09656496345996857,
-0.0003048032522201538,
-0.30504363775253296,
0.035369761288166046,
-0.213751882314682,
0.1592186838388443,
-0.14920274913311005,
-0.07374857366085052,
0.01413983665406704,
-0.07060770690441132,
-0.04480791836977005,
0.02906913496553898,
0.29037824273109436,
0.2563091516494751,
0.17768272757530212,
0.09950188547372818,
-0.10270597785711288,
-0.225996732711792,
-0.3832237720489502,
-0.020603716373443604,
0.2083456814289093,
-0.06482695043087006,
0.4036771357059479,
-0.1223040446639061,
-0.3162154257297516,
0.008876429870724678,
0.06462201476097107,
-0.07107271999120712,
-0.06404183804988861,
-0.48383796215057373,
0.2259666919708252,
-0.055894866585731506,
0.2833006680011749,
0.03497269004583359,
0.11134110391139984,
-0.06933256983757019,
0.2854022979736328,
-0.0744200348854065,
-0.2824306786060333,
0.21001718938350677,
-0.14854510128498077,
-0.29760119318962097,
-0.146123468875885,
0.10698510706424713,
-0.13057678937911987,
-0.30577343702316284,
-0.44204312562942505,
-0.10944956541061401,
0.4863887429237366,
-0.06042434275150299,
-0.3174647390842438,
-0.06647825241088867,
-0.22013668715953827,
0.13488627970218658,
-0.1631699949502945,
0.05254358798265457,
-0.07038895040750504,
-0.06514886766672134,
0.049048278480768204,
-0.36618494987487793
] |
https://github.com/huggingface/datasets/issues/5150 | Problems after upgrading to 2.6.1 | I faced the same issue:
### Repro
```
!pip install datasets==2.6.1
import datasets as Dataset
dataset = Dataset.from_pandas(dataframe)
dataset.save_to_disk(local)
!pip install datasets==2.5.2
import datasets as Dataset
dataset = Dataset.load_from_disk(local)
```
| ### Describe the bug
Loading a dataset_dict from disk with `load_from_disk` is now creating a `KeyError "length"` that was not occurring in v2.5.2.
Context:
- Each individual dataset in the dict is created with `Dataset.from_pandas`
- The dataset_dict is create from a dict of `Dataset`s, e.g., `DatasetDict({"train": train_ds, "validation": val_ds})
- The pandas dataframe, besides text columns, has a column with a dictionary inside and potentially different keys in each row. Correctly the `Dataset.from_pandas` function adds `key: None` to all dictionaries in each row so that the schema can be correctly inferred.
### Steps to reproduce the bug
Steps to reproduce:
- Upgrade to datasets==2.6.1
- Create a dataset from pandas dataframe with `Dataset.from_pandas`
- Create a dataset_dict from a dict of `Dataset`s, e.g., `DatasetDict({"train": train_ds, "validation": val_ds})
- Save to disk with the `save` function
### Expected behavior
Same as in v2.5.2, that is load from disk without errors
### Environment info
- `datasets` version: 2.6.1
- Platform: Linux-5.4.209-129.367.amzn2int.x86_64-x86_64-with-glibc2.26
- Python version: 3.9.13
- PyArrow version: 9.0.0
- Pandas version: 1.5.1 | 30 | Problems after upgrading to 2.6.1
### Describe the bug
Loading a dataset_dict from disk with `load_from_disk` is now creating a `KeyError "length"` that was not occurring in v2.5.2.
Context:
- Each individual dataset in the dict is created with `Dataset.from_pandas`
- The dataset_dict is create from a dict of `Dataset`s, e.g., `DatasetDict({"train": train_ds, "validation": val_ds})
- The pandas dataframe, besides text columns, has a column with a dictionary inside and potentially different keys in each row. Correctly the `Dataset.from_pandas` function adds `key: None` to all dictionaries in each row so that the schema can be correctly inferred.
### Steps to reproduce the bug
Steps to reproduce:
- Upgrade to datasets==2.6.1
- Create a dataset from pandas dataframe with `Dataset.from_pandas`
- Create a dataset_dict from a dict of `Dataset`s, e.g., `DatasetDict({"train": train_ds, "validation": val_ds})
- Save to disk with the `save` function
### Expected behavior
Same as in v2.5.2, that is load from disk without errors
### Environment info
- `datasets` version: 2.6.1
- Platform: Linux-5.4.209-129.367.amzn2int.x86_64-x86_64-with-glibc2.26
- Python version: 3.9.13
- PyArrow version: 9.0.0
- Pandas version: 1.5.1
I faced the same issue:
### Repro
```
!pip install datasets==2.6.1
import datasets as Dataset
dataset = Dataset.from_pandas(dataframe)
dataset.save_to_disk(local)
!pip install datasets==2.5.2
import datasets as Dataset
dataset = Dataset.load_from_disk(local)
```
| [
0.005164016038179398,
0.05801574885845184,
0.04512276127934456,
0.5168248414993286,
0.23230350017547607,
0.07308744639158249,
0.3342001438140869,
0.22718411684036255,
0.1912030279636383,
0.17448043823242188,
0.25057584047317505,
0.26578155159950256,
-0.11492929607629776,
-0.10880542546510696,
-0.18711593747138977,
-0.032901063561439514,
0.24201637506484985,
0.05805434286594391,
-0.16855183243751526,
0.14268580079078674,
-0.39932772517204285,
0.2322869598865509,
-0.2109413892030716,
0.017724722623825073,
-0.2879459857940674,
0.02817464992403984,
-0.40242382884025574,
0.18054181337356567,
0.038172781467437744,
-0.6867721080780029,
0.47314441204071045,
-0.1575327217578888,
0.11724796891212463,
0.3339705765247345,
-0.00012582041381392628,
-0.03625371679663658,
0.18457373976707458,
-0.01398406084626913,
-0.3862133324146271,
-0.3849979043006897,
-0.08610600233078003,
-0.06122015416622162,
0.5306690335273743,
-0.12476485967636108,
0.2102518379688263,
0.06595251709222794,
-0.33897316455841064,
-0.31459471583366394,
0.25069671869277954,
0.4441717863082886,
0.11745202541351318,
-0.0007299557328224182,
0.05060405656695366,
-0.3252490162849426,
-0.12918227910995483,
0.11788423359394073,
0.06175224483013153,
0.2981906831264496,
0.006003551185131073,
-0.049508124589920044,
-0.10927807539701462,
0.23635563254356384,
0.13311231136322021,
-0.018116183578968048,
0.16433504223823547,
-0.0392678864300251,
0.3448474407196045,
-0.3504903018474579,
0.2261882722377777,
0.27306485176086426,
0.12248986959457397,
-0.26463207602500916,
-0.4353049397468567,
-0.4027629792690277,
0.28224676847457886,
0.18778304755687714,
0.39668938517570496,
-0.2448039948940277,
0.07658781111240387,
0.18000848591327667,
0.02315589413046837,
-0.23710599541664124,
-0.1363365650177002,
-0.18104355037212372,
-0.25173985958099365,
-0.26472553610801697,
-0.0005426597781479359,
0.08695769309997559,
0.10791639983654022,
-0.1489938348531723,
0.2972835600376129,
-0.10450495779514313,
-0.3149091601371765,
0.2225112020969391,
-0.07289475202560425,
-0.00872819498181343,
0.2606258988380432,
-0.17364028096199036,
0.030694708228111267,
-0.5824799537658691,
-0.19101382791996002,
-0.2626422643661499,
0.06718819588422775,
-0.10618679970502853,
0.25448131561279297,
0.23709654808044434,
0.41180169582366943,
0.20315700769424438,
-0.02738940715789795,
0.04804563894867897,
-0.0717635303735733,
0.017143631353974342,
-0.07851939648389816,
-0.14462517201900482,
0.21734173595905304,
-0.06148210167884827,
0.20375089347362518,
-0.04378160089254379,
-0.2462204098701477,
0.36567404866218567,
-0.038236264139413834,
-0.05059043690562248,
0.08522702008485794,
0.19585953652858734,
0.11867991834878922,
0.45864447951316833,
0.04175878316164017,
0.20570296049118042,
-0.18030156195163727,
0.20873267948627472,
-0.25567352771759033,
0.2892112731933594,
-0.10975918173789978,
-0.2555645704269409,
0.06433524191379547,
-0.14862219989299774,
0.12123947590589523,
0.1763027310371399,
0.10620167851448059,
-0.2067188024520874,
-0.6148315072059631,
-0.1794721782207489,
0.05135514214634895,
0.25475800037384033,
-0.14910008013248444,
0.13502056896686554,
0.2988583743572235,
-0.1244853287935257,
-0.13406941294670105,
0.27387145161628723,
-0.1285756230354309,
0.04294310882687569,
-0.20759086310863495,
0.10767977684736252,
-0.2619604170322418,
0.08643937110900879,
-0.22289779782295227,
0.09028259664773941,
0.2641289234161377,
-0.25582483410835266,
-0.06879868358373642,
-0.35140037536621094,
-0.19326820969581604,
-0.2885301411151886,
-0.043034955859184265,
0.5431185960769653,
-0.4287344217300415,
-0.17737415432929993,
0.1608576774597168,
-0.08485147356987,
0.00017429888248443604,
-0.11629045009613037,
-0.060311127454042435,
-0.01481878012418747,
-0.2013276070356369,
0.08929336071014404,
0.4030586779117584,
-0.31130847334861755,
-0.6810212731361389,
0.33860987424850464,
-0.0668269470334053,
0.2506198287010193,
0.05616885796189308,
-0.09693016111850739,
0.568068265914917,
0.009070233441889286,
0.25870388746261597,
0.14244264364242554,
-0.014755325391888618,
0.08690521866083145,
-0.4140688478946686,
-0.333326518535614,
0.0622253455221653,
-0.11500221490859985,
0.26041939854621887,
0.09443838149309158,
0.08885350823402405,
0.005523928441107273,
0.18255048990249634,
0.10423675924539566,
0.07819831371307373,
0.2312096357345581,
0.02064421772956848,
-0.02374541014432907,
0.12798963487148285,
-0.2832799553871155,
-0.3714238405227661,
0.37804558873176575,
-0.04679447412490845,
0.12491710484027863,
-0.1674310714006424,
-0.036546021699905396,
-0.3834415674209595,
0.24749968945980072,
-0.29645878076553345,
-0.22045129537582397,
-0.04988941177725792,
-0.15490442514419556,
0.13694971799850464,
0.24128703773021698,
-0.04489938169717789,
0.03874620050191879,
-0.197342649102211,
0.21254093945026398,
0.06390847265720367,
0.30068033933639526,
-0.10216986387968063,
-0.05951832979917526,
-0.2569628357887268,
0.1539451777935028,
0.24516597390174866,
0.03050038404762745,
-0.34442541003227234,
0.42325857281684875,
0.38707098364830017,
0.02162964642047882,
-0.3525698184967041,
-0.2518869638442993,
0.44543206691741943,
0.4288163185119629,
0.272340327501297,
0.26674187183380127,
0.0392184816300869,
-0.06023716181516647,
-0.24384835362434387,
0.4609999656677246,
0.07238082587718964,
0.4594617784023285,
0.06860766559839249,
0.1602148413658142,
0.31367194652557373,
0.1061834990978241,
0.11000070720911026,
-0.37594664096832275,
-0.13867589831352234,
-0.08297160267829895,
-0.03141175955533981,
0.23474235832691193,
0.16872017085552216,
-0.038226418197155,
0.41707849502563477,
0.12306785583496094,
-0.050985418260097504,
0.2762738764286041,
-0.22222384810447693,
-0.2578076422214508,
0.0023294389247894287,
0.6941186785697937,
0.3499155640602112,
0.0441761314868927,
0.0005523823201656342,
-0.1645868569612503,
-0.05200016871094704,
0.05334465950727463,
0.0716949999332428,
-0.09353309869766235,
0.2967585623264313,
0.25522029399871826,
0.14907236397266388,
0.18211393058300018,
-0.060313984751701355,
-0.02081838808953762,
-0.0639248937368393,
0.31995609402656555,
-0.4587564170360565,
-0.004987809807062149,
-0.13203243911266327,
0.03602167218923569,
0.21273434162139893,
-0.28580066561698914,
-0.08917580544948578,
-0.3910256624221802,
-0.22788478434085846,
0.02494145929813385,
-0.004306608811020851,
0.1989358365535736,
-0.06881223618984222,
-0.10883559286594391,
0.21792295575141907,
-0.07803073525428772,
0.1552830934524536,
-0.19052894413471222,
-0.047596633434295654,
-0.021339068189263344,
-0.10579515993595123,
-0.21200522780418396,
0.055455997586250305,
0.04869995266199112,
-0.24226854741573334,
0.057457514107227325,
-0.3555942475795746,
0.07104932516813278,
-0.12173408269882202,
0.12041963636875153,
0.34711727499961853,
0.1320454180240631,
-0.005818020552396774,
-0.08838304132223129,
0.22825048863887787,
0.0007910039275884628,
-0.2306455373764038,
0.40541431307792664,
0.17553579807281494,
0.07489028573036194,
-0.17654265463352203,
-0.2761908173561096,
-0.15583081543445587,
-0.2890791893005371,
0.20427466928958893,
0.12458689510822296,
0.17583881318569183,
-0.05080893635749817,
0.512263298034668,
0.04820742830634117,
0.23633116483688354,
0.2514391243457794,
-0.11562105268239975,
-0.049844104796648026,
0.16332101821899414,
0.019718216732144356,
-0.3297961354255676,
-0.03995833918452263,
-0.25955477356910706,
0.12055519223213196,
0.15462087094783783,
-0.5065588355064392,
-0.3103155493736267,
-0.15102669596672058,
0.3070724308490753,
0.2064540833234787,
-0.05886708199977875,
0.46878719329833984,
0.1699696183204651,
0.0547151044011116,
0.014354906976222992,
-0.09603723883628845,
0.0625411719083786,
0.14225295186042786,
0.1430584043264389,
-0.24501895904541016,
0.7107057571411133,
-0.14209198951721191,
0.2098354995250702,
0.018750160932540894,
0.08353915810585022,
-0.03288061171770096,
-0.224856436252594,
0.3609045147895813,
-0.3569844663143158,
-0.29764893651008606,
-0.06224389374256134,
-0.11668556928634644,
-0.21722063422203064,
0.049155037850141525,
0.022560924291610718,
0.241792693734169,
0.02265433967113495,
-0.2381543070077896,
-0.19100987911224365,
-0.19185179471969604,
-0.07367141544818878,
-0.6751192808151245,
0.2595418393611908,
0.07213397324085236,
0.5129510760307312,
0.000512249767780304,
0.28700464963912964,
-0.17311641573905945,
-0.07965587079524994,
0.25393709540367126,
-0.23932336270809174,
-0.034005165100097656,
0.2544998228549957,
-0.45254868268966675,
0.1947728544473648,
0.2565491795539856,
0.32663458585739136,
0.034011226147413254,
-0.3537873923778534,
0.0335686095058918,
-0.0955447405576706,
0.5541620850563049,
0.144810289144516,
-0.1459270715713501,
0.396852046251297,
-0.23225070536136627,
-0.7543307542800903,
-0.17746832966804504,
0.20812943577766418,
0.24271750450134277,
0.4974616765975952,
0.25893649458885193,
-0.07554957270622253,
0.02835998870432377,
0.11591485142707825,
0.18679824471473694,
-0.21509015560150146,
-0.0023871511220932007,
-0.12701816856861115,
-0.07433263957500458,
-0.2530890703201294,
0.09825433045625687,
-0.09288633614778519,
0.4707493484020233,
-0.07702481746673584,
0.04572458192706108,
-0.223819762468338,
-0.398195743560791,
0.05943192169070244,
0.3263409435749054,
0.3072071671485901,
-0.3139163553714752,
0.42878425121307373,
0.07275974005460739,
-0.2609995901584625,
0.5113197565078735,
0.346727579832077,
-0.33534500002861023,
-0.5380811095237732,
-0.08855415880680084,
-0.2649763226509094,
-0.02209462970495224,
0.1615394949913025,
-0.22832471132278442,
0.04250965267419815,
-0.21873839199543,
0.03402235358953476,
-0.2045917809009552,
-0.03195039555430412,
0.2202387899160385,
-0.1263338327407837,
-0.21233820915222168,
-0.5153934359550476,
0.2357814610004425,
-0.023112386465072632,
-0.16532427072525024,
0.21738584339618683,
0.3805122375488281,
-0.36983540654182434,
0.41913485527038574,
-0.07071920484304428,
0.531568169593811,
0.09420119225978851,
0.12776713073253632,
0.3805171549320221,
-0.215423122048378,
0.32164785265922546,
0.5159527063369751,
-0.16614088416099548,
-0.5120072364807129,
-0.003628215752542019,
0.06554798036813736,
0.0005038082599639893,
0.0834636241197586,
-0.08856523036956787,
-0.11787492036819458,
0.176130473613739,
-0.33598989248275757,
-0.11911220848560333,
-0.21156112849712372,
-0.012323539704084396,
-0.3298470675945282,
-0.1494276076555252,
-0.125703364610672,
0.02886069193482399,
0.08195891231298447,
-0.06817096471786499,
0.039756305515766144,
0.14276713132858276,
-0.04217294231057167,
-0.6057726740837097,
-0.5106110572814941,
0.12889006733894348,
-0.16595424711704254,
0.3228606581687927,
0.15380801260471344,
-0.44400644302368164,
0.2104090452194214,
0.3902384638786316,
0.20230498909950256,
0.11690397560596466,
0.04636675864458084,
0.2369440197944641,
-0.09204370528459549,
0.18551525473594666,
0.22146442532539368,
0.19268934428691864,
0.07917197048664093,
0.23481765389442444,
-0.012425072491168976,
-0.15293699502944946,
-0.2760660648345947,
-0.0559757836163044,
-0.07882150262594223,
0.14221811294555664,
0.06574854254722595,
-0.44378238916397095,
-0.2205388844013214,
-0.32728058099746704,
-0.05221583694219589,
-0.4289521276950836,
0.03259625285863876,
0.14421389997005463,
-0.04745553433895111,
0.33197861909866333,
-0.3466570973396301,
-0.31278887391090393,
-0.13307800889015198,
0.6595163941383362,
0.14913156628608704,
-0.2938928008079529,
0.4103827178478241,
-0.06247742474079132,
-0.20460636913776398,
-0.1136573776602745,
0.1924864947795868,
-0.06196128576993942,
-0.15257717669010162,
0.5350563526153564,
0.04847947135567665,
-0.1145356073975563,
-0.15043558180332184,
0.17477448284626007,
0.1254299283027649,
0.3616606295108795,
0.068287193775177,
-0.183842733502388,
-0.44205501675605774,
0.23147572576999664,
-0.07334761321544647,
0.22571678459644318,
0.0009382292628288269,
-0.1437331736087799,
-0.15284641087055206,
0.04711461067199707,
-0.1560375690460205,
0.17811821401119232,
-0.007511628791689873,
-0.03710655868053436,
0.33641117811203003,
0.03194659203290939,
0.18385380506515503,
-0.3769545555114746,
0.06783748418092728,
-0.0006912238895893097,
0.21562036871910095,
-0.013492533937096596,
-0.27836206555366516,
0.11446274816989899,
-0.019624095410108566,
0.22847183048725128,
-0.16376811265945435,
-0.17148807644844055,
0.0035449303686618805,
-0.13803930580615997,
0.22980356216430664,
0.4451572299003601,
-0.16460491716861725,
0.3941725194454193,
0.1636303961277008,
0.42603325843811035,
0.34000593423843384,
0.39799225330352783,
-0.2843330204486847,
0.4199032783508301,
0.14189481735229492,
0.2907539904117584,
-0.033629436045885086,
0.03649265319108963,
-0.3032505512237549,
0.1835797131061554,
-0.3081713914871216,
-0.16785472631454468,
0.3633654713630676,
-0.1298300176858902,
0.16123203933238983,
0.30729246139526367,
0.3385879397392273,
0.39240017533302307,
-0.24056431651115417,
-0.03388814255595207,
-0.03857304900884628,
0.160623699426651,
-0.22177618741989136,
-0.09358339011669159,
-0.047968510538339615,
-0.03294340893626213,
-0.15630578994750977,
0.10596625506877899,
-0.22986091673374176,
-0.36522939801216125,
-0.36747586727142334,
0.24426281452178955,
0.42741483449935913,
-0.09228778630495071,
0.2530503571033478,
0.8178689479827881,
-0.0988762378692627,
0.039090704172849655,
0.4247279465198517,
0.08461673557758331,
0.09178581833839417,
0.6955822706222534,
-0.2562107443809509,
0.34746959805488586,
0.016683613881468773,
0.11516305804252625,
0.00966421514749527,
-0.3208213746547699,
0.14429156482219696,
-0.04687218368053436,
-0.337246835231781,
-0.28721991181373596,
0.09568910300731659,
-0.05927316099405289,
-0.20181378722190857,
-0.13861699402332306,
-0.16575707495212555,
0.05388519540429115,
-0.22133931517601013,
-0.2401934564113617,
0.18881088495254517,
-0.12717607617378235,
0.2190176546573639,
-0.012926341965794563,
-0.12096934020519257,
-0.06567026674747467,
0.14660635590553284,
0.10603233426809311,
-0.09243489801883698,
-0.30580613017082214,
-0.034014277160167694,
0.03630583733320236,
0.12726014852523804,
-0.3608841001987457,
-0.06666051596403122,
0.4045991897583008,
0.21460016071796417,
0.08568716049194336,
-0.013261290267109871,
0.6465817093849182,
0.38676539063453674,
-0.22655616700649261,
-0.11820132285356522,
0.046273089945316315,
-0.03489024192094803,
0.1092570424079895,
0.2275232970714569,
-0.15375815331935883,
0.6246357560157776,
0.2103717029094696,
0.015417370945215225,
-0.028656601905822754,
0.2806800603866577,
0.09942542016506195,
0.3506397306919098,
-0.11173076927661896,
0.6703195571899414,
-0.08917702734470367,
-0.10284985601902008,
-0.14862477779388428,
0.4130309224128723,
-0.13370168209075928,
-0.3933006823062897,
0.22471830248832703,
0.10763049125671387,
0.1806221902370453,
-0.11035662144422531,
0.02862953022122383,
0.16801126301288605,
0.1953534334897995,
0.48971542716026306,
-0.055090174078941345,
-0.33078351616859436,
0.04595667123794556,
-0.5316675305366516,
-0.2215365469455719,
-0.10459242761135101,
0.16972310841083527,
0.08326030522584915,
0.27126866579055786,
-0.22635358572006226,
-0.16046221554279327,
-0.029227927327156067,
0.3563535213470459,
-0.2659844160079956,
0.14868217706680298,
-0.05747881904244423,
-0.09532931447029114,
0.01603950932621956,
-0.31365248560905457,
0.04404515027999878,
-0.2578321695327759,
0.09847123920917511,
-0.14471428096294403,
-0.03875856474041939,
0.003927823156118393,
-0.05031062290072441,
-0.004106363281607628,
0.05162849649786949,
0.29546672105789185,
0.26511910557746887,
0.14400768280029297,
0.08147832006216049,
-0.12482218444347382,
-0.2274034023284912,
-0.33616289496421814,
-0.04839932918548584,
0.21449339389801025,
-0.07146638631820679,
0.43695977330207825,
-0.15155477821826935,
-0.3230476379394531,
0.00847700797021389,
0.06189598888158798,
-0.08563435077667236,
-0.09683375060558319,
-0.39997053146362305,
0.172411248087883,
-0.01819806545972824,
0.29707327485084534,
-0.033262792974710464,
0.15559634566307068,
-0.042685456573963165,
0.25311630964279175,
-0.026292622089385986,
-0.31142234802246094,
0.20228028297424316,
-0.12309049814939499,
-0.25995808839797974,
-0.11820654571056366,
0.08860329538583755,
-0.12582999467849731,
-0.2762446999549866,
-0.4643026888370514,
-0.06088731065392494,
0.45675724744796753,
-0.09967391937971115,
-0.36714693903923035,
-0.049446213990449905,
-0.16555622220039368,
0.12626291811466217,
-0.20891335606575012,
0.000759318470954895,
-0.09743473678827286,
-0.04442419111728668,
0.06589852273464203,
-0.3410729169845581
] |
https://github.com/huggingface/datasets/issues/5150 | Problems after upgrading to 2.6.1 | I bumped into the issue too. @Lokiiiiii thanks for steps. I "solved" if for now by `pip install datasets>=2.6.1` everywhere. | ### Describe the bug
Loading a dataset_dict from disk with `load_from_disk` is now creating a `KeyError "length"` that was not occurring in v2.5.2.
Context:
- Each individual dataset in the dict is created with `Dataset.from_pandas`
- The dataset_dict is create from a dict of `Dataset`s, e.g., `DatasetDict({"train": train_ds, "validation": val_ds})
- The pandas dataframe, besides text columns, has a column with a dictionary inside and potentially different keys in each row. Correctly the `Dataset.from_pandas` function adds `key: None` to all dictionaries in each row so that the schema can be correctly inferred.
### Steps to reproduce the bug
Steps to reproduce:
- Upgrade to datasets==2.6.1
- Create a dataset from pandas dataframe with `Dataset.from_pandas`
- Create a dataset_dict from a dict of `Dataset`s, e.g., `DatasetDict({"train": train_ds, "validation": val_ds})
- Save to disk with the `save` function
### Expected behavior
Same as in v2.5.2, that is load from disk without errors
### Environment info
- `datasets` version: 2.6.1
- Platform: Linux-5.4.209-129.367.amzn2int.x86_64-x86_64-with-glibc2.26
- Python version: 3.9.13
- PyArrow version: 9.0.0
- Pandas version: 1.5.1 | 20 | Problems after upgrading to 2.6.1
### Describe the bug
Loading a dataset_dict from disk with `load_from_disk` is now creating a `KeyError "length"` that was not occurring in v2.5.2.
Context:
- Each individual dataset in the dict is created with `Dataset.from_pandas`
- The dataset_dict is create from a dict of `Dataset`s, e.g., `DatasetDict({"train": train_ds, "validation": val_ds})
- The pandas dataframe, besides text columns, has a column with a dictionary inside and potentially different keys in each row. Correctly the `Dataset.from_pandas` function adds `key: None` to all dictionaries in each row so that the schema can be correctly inferred.
### Steps to reproduce the bug
Steps to reproduce:
- Upgrade to datasets==2.6.1
- Create a dataset from pandas dataframe with `Dataset.from_pandas`
- Create a dataset_dict from a dict of `Dataset`s, e.g., `DatasetDict({"train": train_ds, "validation": val_ds})
- Save to disk with the `save` function
### Expected behavior
Same as in v2.5.2, that is load from disk without errors
### Environment info
- `datasets` version: 2.6.1
- Platform: Linux-5.4.209-129.367.amzn2int.x86_64-x86_64-with-glibc2.26
- Python version: 3.9.13
- PyArrow version: 9.0.0
- Pandas version: 1.5.1
I bumped into the issue too. @Lokiiiiii thanks for steps. I "solved" if for now by `pip install datasets>=2.6.1` everywhere. | [
-0.0006473995745182037,
0.0647660493850708,
0.03313672915101051,
0.5055516958236694,
0.2395569235086441,
0.07631459087133408,
0.3385421931743622,
0.27240437269210815,
0.1971953958272934,
0.16364777088165283,
0.2738051414489746,
0.24853959679603577,
-0.10855770856142044,
-0.06331106275320053,
-0.2003067284822464,
-0.04190179705619812,
0.23961898684501648,
0.0326974093914032,
-0.20652949810028076,
0.15556062757968903,
-0.4194449484348297,
0.2646529972553253,
-0.21807719767093658,
0.05207548663020134,
-0.3031262755393982,
0.03759964928030968,
-0.4105168282985687,
0.16050425171852112,
0.04981127381324768,
-0.6840086579322815,
0.4730012118816376,
-0.1554080843925476,
0.14326375722885132,
0.3333785831928253,
-0.00012198830518173054,
-0.05327638238668442,
0.1924125701189041,
0.009892193600535393,
-0.36365360021591187,
-0.39209866523742676,
-0.060848161578178406,
-0.04873356223106384,
0.5077811479568481,
-0.11529595404863358,
0.1933768391609192,
0.05821698531508446,
-0.3523910939693451,
-0.2967674732208252,
0.25730541348457336,
0.4413403570652008,
0.1556699126958847,
0.02967425435781479,
0.09096124768257141,
-0.3422325551509857,
-0.1688583791255951,
0.05447155237197876,
0.0750851109623909,
0.2865203320980072,
0.02562882751226425,
-0.037244319915771484,
-0.12513971328735352,
0.28642454743385315,
0.16561205685138702,
-0.04813001677393913,
0.18653008341789246,
-0.08955036848783493,
0.3532879054546356,
-0.37148594856262207,
0.22967997193336487,
0.27905991673469543,
0.18150120973587036,
-0.25058990716934204,
-0.41216909885406494,
-0.3781360983848572,
0.31564268469810486,
0.19686779379844666,
0.4373895525932312,
-0.22146479785442352,
0.10809043049812317,
0.21387562155723572,
-0.005251632072031498,
-0.24669788777828217,
-0.1481356918811798,
-0.18253697454929352,
-0.23259560763835907,
-0.27066129446029663,
-0.0075903842225670815,
0.08101878315210342,
0.13488923013210297,
-0.18771354854106903,
0.3762046694755554,
-0.08132167905569077,
-0.3205224573612213,
0.21346087753772736,
-0.13848596811294556,
-0.01231290027499199,
0.22943806648254395,
-0.16514524817466736,
0.04832521080970764,
-0.5975934863090515,
-0.19254514575004578,
-0.2705164849758148,
0.011732974089682102,
-0.10754217952489853,
0.2614840567111969,
0.18453127145767212,
0.4189964830875397,
0.18961144983768463,
-0.026211626827716827,
0.007254812400788069,
-0.04264770448207855,
0.018234916031360626,
-0.0868881344795227,
-0.1821444183588028,
0.17953257262706757,
-0.05226945877075195,
0.16938941180706024,
-0.0665849968791008,
-0.19705215096473694,
0.3439345955848694,
-0.019934965297579765,
-0.021333832293748856,
0.07123175263404846,
0.21357524394989014,
0.1496327668428421,
0.44673365354537964,
0.0660107359290123,
0.19832751154899597,
-0.16484233736991882,
0.16055694222450256,
-0.26247331500053406,
0.28329378366470337,
-0.12001979351043701,
-0.2807225286960602,
0.07667304575443268,
-0.15154929459095,
0.12799492478370667,
0.13697238266468048,
0.09961062669754028,
-0.18940620124340057,
-0.6158445477485657,
-0.14614300429821014,
0.03440380096435547,
0.24551136791706085,
-0.1777990162372589,
0.09561866521835327,
0.26388391852378845,
-0.08119712024927139,
-0.11235284805297852,
0.2669721841812134,
-0.15949887037277222,
0.03203956410288811,
-0.22115366160869598,
0.13965332508087158,
-0.25927096605300903,
0.07598525285720825,
-0.1870661973953247,
0.11548911035060883,
0.2291063666343689,
-0.26638269424438477,
-0.05083947628736496,
-0.3815408945083618,
-0.17166505753993988,
-0.2606542110443115,
-0.05985187739133835,
0.4994974136352539,
-0.4683831036090851,
-0.16093771159648895,
0.15812736749649048,
-0.08973173797130585,
-0.01686900109052658,
-0.0970858782529831,
-0.07322889566421509,
-0.037582047283649445,
-0.22014352679252625,
0.11454342305660248,
0.3647999167442322,
-0.24391286075115204,
-0.6801541447639465,
0.32970815896987915,
-0.0700027123093605,
0.2108200192451477,
0.021409735083580017,
-0.07153020799160004,
0.5397675037384033,
-0.022762611508369446,
0.24308837950229645,
0.14605718851089478,
-0.0005043186247348785,
0.060782864689826965,
-0.42506879568099976,
-0.3151857554912567,
0.08395371586084366,
-0.10926342010498047,
0.2700751721858978,
0.05582680180668831,
0.0789150670170784,
-0.023386148735880852,
0.19099965691566467,
0.057388897985219955,
0.08874384313821793,
0.2285165637731552,
-0.006699040532112122,
-0.04661936312913895,
0.1639786809682846,
-0.2965443730354309,
-0.38435742259025574,
0.3748677372932434,
-0.03238485008478165,
0.11536960303783417,
-0.15954352915287018,
-0.01774096116423607,
-0.38659465312957764,
0.24727196991443634,
-0.25204721093177795,
-0.22715997695922852,
-0.028265247121453285,
-0.21114927530288696,
0.12121303379535675,
0.19473443925380707,
-0.08895568549633026,
0.03839508071541786,
-0.2372027039527893,
0.2000211626291275,
0.059703100472688675,
0.2986578047275543,
-0.11281263083219528,
-0.034395892173051834,
-0.20243144035339355,
0.1445206105709076,
0.22657474875450134,
0.02487623319029808,
-0.36622288823127747,
0.44313764572143555,
0.3666853904724121,
-0.006259121000766754,
-0.281072735786438,
-0.24827070534229279,
0.42963913083076477,
0.4375680983066559,
0.28689661622047424,
0.24389812350273132,
0.013564870692789555,
-0.05867218226194382,
-0.24031907320022583,
0.4609661102294922,
0.045037783682346344,
0.4316258430480957,
0.03777516633272171,
0.17906935513019562,
0.3357604146003723,
0.12736491858959198,
0.10248760133981705,
-0.34961697459220886,
-0.13105589151382446,
-0.10355542600154877,
-0.07749573886394501,
0.259038507938385,
0.10030338168144226,
-0.02407865971326828,
0.4104219079017639,
0.08449189364910126,
-0.06308665126562119,
0.30739644169807434,
-0.23149240016937256,
-0.25080469250679016,
0.02596760168671608,
0.7047034502029419,
0.3052830696105957,
0.06982217729091644,
-0.04741479083895683,
-0.17622369527816772,
-0.034506138414144516,
0.029955122619867325,
0.07546849548816681,
-0.154507577419281,
0.2830340564250946,
0.20931559801101685,
0.1194537952542305,
0.14250612258911133,
-0.07578857243061066,
-0.012025285512208939,
-0.06377211958169937,
0.33128997683525085,
-0.44985172152519226,
-0.03918303921818733,
-0.15009914338588715,
0.014622043818235397,
0.2128836214542389,
-0.27313709259033203,
-0.08622482419013977,
-0.374783992767334,
-0.2004430741071701,
0.016648873686790466,
-0.03340420499444008,
0.23411138355731964,
-0.09650841355323792,
-0.06254969537258148,
0.24510632455348969,
-0.012679899111390114,
0.1298365592956543,
-0.22874778509140015,
-0.041895873844623566,
0.013572562485933304,
-0.08925680816173553,
-0.21200501918792725,
0.04726652801036835,
0.04415098577737808,
-0.20588548481464386,
0.023508882150053978,
-0.3606567680835724,
0.03471750766038895,
-0.1546538770198822,
0.0856127217411995,
0.3493310511112213,
0.13254483044147491,
-0.014128677546977997,
-0.07316406816244125,
0.20247572660446167,
-0.05960709601640701,
-0.20349964499473572,
0.42325863242149353,
0.18325212597846985,
0.050605110824108124,
-0.17551201581954956,
-0.3210130035877228,
-0.15329255163669586,
-0.26730653643608093,
0.222989022731781,
0.09510385990142822,
0.17545542120933533,
-0.03360537439584732,
0.5218184590339661,
0.018875055015087128,
0.20942465960979462,
0.22289732098579407,
-0.13171249628067017,
-0.07645566761493683,
0.18109333515167236,
0.03238852322101593,
-0.3732374310493469,
-0.016521651297807693,
-0.24051132798194885,
0.1447124481201172,
0.14459064602851868,
-0.5157299041748047,
-0.3118956685066223,
-0.1254255622625351,
0.3035909831523895,
0.21626846492290497,
-0.08862954378128052,
0.4272739291191101,
0.17350231111049652,
0.03449827432632446,
-0.003354731947183609,
-0.04362247884273529,
0.09174583107233047,
0.14094460010528564,
0.1505788117647171,
-0.2226446270942688,
0.690532922744751,
-0.1524454802274704,
0.20457793772220612,
-0.00025043636560440063,
0.07893119752407074,
-0.09447753429412842,
-0.2007986605167389,
0.3842674195766449,
-0.36687764525413513,
-0.284760981798172,
-0.014436794444918633,
-0.10374811291694641,
-0.19343745708465576,
0.028982609510421753,
0.01412651315331459,
0.2360161393880844,
0.031156808137893677,
-0.2545583248138428,
-0.16576844453811646,
-0.19911983609199524,
-0.07951579988002777,
-0.6594861149787903,
0.2438133955001831,
0.09511880576610565,
0.5073882937431335,
-0.009122774936258793,
0.23816925287246704,
-0.12718762457370758,
-0.10423317551612854,
0.23575374484062195,
-0.24555586278438568,
-0.0364384725689888,
0.2794519364833832,
-0.4733637571334839,
0.2307714819908142,
0.18789178133010864,
0.33180004358291626,
0.04804646596312523,
-0.33592796325683594,
0.04573716223239899,
-0.06386981904506683,
0.567984402179718,
0.16810892522335052,
-0.14635203778743744,
0.3810695707798004,
-0.23682744801044464,
-0.7479634284973145,
-0.16888350248336792,
0.19322824478149414,
0.22706639766693115,
0.5071210265159607,
0.257702112197876,
-0.06944076716899872,
0.01065728161484003,
0.12244655936956406,
0.17165450751781464,
-0.19500459730625153,
-0.049439504742622375,
-0.08851838111877441,
-0.029208607971668243,
-0.24838006496429443,
0.08770596981048584,
-0.07896262407302856,
0.46539151668548584,
-0.10365229845046997,
0.012892201542854309,
-0.20710964500904083,
-0.43111827969551086,
0.04548245668411255,
0.3261100649833679,
0.2888689637184143,
-0.3147975504398346,
0.4608202278614044,
0.09943877160549164,
-0.2382746934890747,
0.5005545616149902,
0.3365646004676819,
-0.32701608538627625,
-0.5153384208679199,
-0.09217344224452972,
-0.28924527764320374,
-0.024307839572429657,
0.16574794054031372,
-0.2730588912963867,
0.040652524679899216,
-0.22312621772289276,
0.05658815801143646,
-0.20502212643623352,
-0.01061529852449894,
0.24095134437084198,
-0.0667111948132515,
-0.18668010830879211,
-0.52992182970047,
0.20445412397384644,
-0.02385396510362625,
-0.1608363389968872,
0.2409505397081375,
0.36532843112945557,
-0.3643651306629181,
0.4019107222557068,
-0.09078965336084366,
0.5202065110206604,
0.06857474148273468,
0.10254334658384323,
0.37726283073425293,
-0.18340227007865906,
0.3504916727542877,
0.49366551637649536,
-0.14262689650058746,
-0.5244952440261841,
-0.029748737812042236,
0.06312928348779678,
0.011986326426267624,
0.06986842304468155,
-0.06628236174583435,
-0.1041371077299118,
0.1865593045949936,
-0.28221356868743896,
-0.10698278248310089,
-0.2093842625617981,
0.0170464888215065,
-0.3169207274913788,
-0.15267601609230042,
-0.14226461946964264,
0.06470339745283127,
0.05010830610990524,
-0.0890084058046341,
0.050895728170871735,
0.13225319981575012,
0.008743692189455032,
-0.5889262557029724,
-0.48097938299179077,
0.17793726921081543,
-0.11355339735746384,
0.3208092451095581,
0.1684093475341797,
-0.40098512172698975,
0.24197939038276672,
0.367593914270401,
0.1915922462940216,
0.13609325885772705,
0.028878821060061455,
0.25722309947013855,
-0.1036231741309166,
0.17726534605026245,
0.22766193747520447,
0.23766915500164032,
0.08084627985954285,
0.20663133263587952,
-0.04400061070919037,
-0.11210063844919205,
-0.23389294743537903,
-0.04820169508457184,
-0.08109267801046371,
0.08266843110322952,
0.025557540357112885,
-0.4526020586490631,
-0.2214997559785843,
-0.33298078179359436,
-0.059641845524311066,
-0.4035061299800873,
0.07519640773534775,
0.1579521894454956,
-0.031385499984025955,
0.3240980803966522,
-0.2893480956554413,
-0.3149731159210205,
-0.13248616456985474,
0.6303813457489014,
0.12653660774230957,
-0.2617134153842926,
0.432712197303772,
-0.0033456385135650635,
-0.20515009760856628,
-0.1354069709777832,
0.17296984791755676,
-0.040285199880599976,
-0.13230657577514648,
0.536428689956665,
0.059677887707948685,
-0.09223761409521103,
-0.13272108137607574,
0.1634274572134018,
0.14542922377586365,
0.32173678278923035,
0.07439914345741272,
-0.19220007956027985,
-0.4781665503978729,
0.2262386977672577,
-0.11464536190032959,
0.25659868121147156,
0.003534805029630661,
-0.1389465481042862,
-0.16731691360473633,
0.0574822723865509,
-0.1999664306640625,
0.16066236793994904,
-0.0051259007304906845,
-0.03553270548582077,
0.3090629279613495,
0.011272940784692764,
0.17468667030334473,
-0.35774505138397217,
0.08222194761037827,
0.008731253445148468,
0.1787993311882019,
-0.053838953375816345,
-0.23854763805866241,
0.0973687544465065,
-0.023045189678668976,
0.23095425963401794,
-0.16657672822475433,
-0.22311879694461823,
-0.045815784484148026,
-0.1391352266073227,
0.20751945674419403,
0.4217151999473572,
-0.1710851639509201,
0.3960000276565552,
0.16294562816619873,
0.37833043932914734,
0.38700491189956665,
0.41487130522727966,
-0.2854621112346649,
0.4098297357559204,
0.1052115261554718,
0.26221686601638794,
-0.03486480563879013,
0.025963246822357178,
-0.2472999095916748,
0.19472435116767883,
-0.32803916931152344,
-0.1664229929447174,
0.39669835567474365,
-0.11206139624118805,
0.14520761370658875,
0.31680068373680115,
0.35757315158843994,
0.41558313369750977,
-0.2534530758857727,
-0.06218073517084122,
-0.011520599946379662,
0.19691085815429688,
-0.25663959980010986,
-0.0315193273127079,
-0.03750363737344742,
-0.010579110123217106,
-0.15686489641666412,
0.08000722527503967,
-0.21409770846366882,
-0.3496862053871155,
-0.34702324867248535,
0.2828075885772705,
0.431302934885025,
-0.13884396851062775,
0.22392314672470093,
0.7841379642486572,
-0.08123341202735901,
0.002535998821258545,
0.4747562110424042,
0.11282439529895782,
0.10694755613803864,
0.698884904384613,
-0.28536438941955566,
0.3269828259944916,
0.05038563162088394,
0.14613495767116547,
0.0428023487329483,
-0.3358280062675476,
0.14995868504047394,
-0.031084418296813965,
-0.3523092269897461,
-0.33028626441955566,
0.08591395616531372,
-0.052558742463588715,
-0.18992027640342712,
-0.16193194687366486,
-0.1796705722808838,
0.1017206609249115,
-0.2237480878829956,
-0.2242286056280136,
0.1377696543931961,
-0.1296779066324234,
0.21926268935203552,
-0.017283791676163673,
-0.12262782454490662,
-0.05686275660991669,
0.13450829684734344,
0.09580294787883759,
-0.086215540766716,
-0.33787739276885986,
-0.027608856558799744,
0.04895526543259621,
0.13138441741466522,
-0.3810126483440399,
-0.06927990913391113,
0.38971519470214844,
0.1977047324180603,
0.12775973975658417,
-0.035173460841178894,
0.6269064545631409,
0.3946737051010132,
-0.2125624269247055,
-0.1146593987941742,
0.023386375978589058,
-0.020132893696427345,
0.13928349316120148,
0.290951132774353,
-0.12934643030166626,
0.6075180768966675,
0.24228514730930328,
0.03165266662836075,
-0.03299607336521149,
0.271828830242157,
0.10347384959459305,
0.39020195603370667,
-0.14264121651649475,
0.6335726976394653,
-0.07660897076129913,
-0.09748731553554535,
-0.18892158567905426,
0.39000123739242554,
-0.13904201984405518,
-0.3988364636898041,
0.25628727674484253,
0.08475734293460846,
0.17080765962600708,
-0.11806896328926086,
0.05272597819566727,
0.15303917229175568,
0.22439981997013092,
0.5052417516708374,
-0.07496257871389389,
-0.3351224958896637,
0.057382732629776,
-0.5118914842605591,
-0.2114381492137909,
-0.09992356598377228,
0.16308188438415527,
0.07488139718770981,
0.22299855947494507,
-0.18396109342575073,
-0.19512122869491577,
-0.011646702885627747,
0.35684818029403687,
-0.2838558256626129,
0.11151784658432007,
-0.08476828038692474,
-0.08340911567211151,
0.002807244658470154,
-0.2939896583557129,
0.05240008234977722,
-0.20624637603759766,
0.12030090391635895,
-0.14460532367229462,
-0.027141721919178963,
0.02945018745958805,
-0.033908769488334656,
0.005820155143737793,
0.028250735253095627,
0.2825509309768677,
0.2609787583351135,
0.13093487918376923,
0.11610329896211624,
-0.07339508831501007,
-0.25834599137306213,
-0.38015347719192505,
-0.03063930943608284,
0.2033296823501587,
-0.022650431841611862,
0.40506038069725037,
-0.16436636447906494,
-0.33796247839927673,
-0.012281734496355057,
0.07410350441932678,
-0.11934851109981537,
-0.09193865954875946,
-0.4013008773326874,
0.19148823618888855,
-0.03640177100896835,
0.2927793860435486,
-0.03030681610107422,
0.14923988282680511,
-0.049686580896377563,
0.2501875162124634,
-0.021618463099002838,
-0.31364721059799194,
0.2326018363237381,
-0.11094727367162704,
-0.27923330664634705,
-0.13493265211582184,
0.08032172918319702,
-0.09992171078920364,
-0.2864285111427307,
-0.4840690493583679,
-0.03978759050369263,
0.4384364187717438,
-0.0673089325428009,
-0.32685381174087524,
-0.07244640588760376,
-0.1724611520767212,
0.14408373832702637,
-0.20643135905265808,
0.018252089619636536,
-0.08072139322757721,
-0.08569344133138657,
0.011441100388765335,
-0.3207031488418579
] |
https://github.com/huggingface/datasets/issues/5150 | Problems after upgrading to 2.6.1 | Hi all,
I experienced the same issue.
Please note that the pull request is related to the IMDB example provided in the doc, and is a fix for that, in that context, to make sure that people can follow the doc example and have a working system.
It does not provide a fix for Datasets itself. | ### Describe the bug
Loading a dataset_dict from disk with `load_from_disk` is now creating a `KeyError "length"` that was not occurring in v2.5.2.
Context:
- Each individual dataset in the dict is created with `Dataset.from_pandas`
- The dataset_dict is create from a dict of `Dataset`s, e.g., `DatasetDict({"train": train_ds, "validation": val_ds})
- The pandas dataframe, besides text columns, has a column with a dictionary inside and potentially different keys in each row. Correctly the `Dataset.from_pandas` function adds `key: None` to all dictionaries in each row so that the schema can be correctly inferred.
### Steps to reproduce the bug
Steps to reproduce:
- Upgrade to datasets==2.6.1
- Create a dataset from pandas dataframe with `Dataset.from_pandas`
- Create a dataset_dict from a dict of `Dataset`s, e.g., `DatasetDict({"train": train_ds, "validation": val_ds})
- Save to disk with the `save` function
### Expected behavior
Same as in v2.5.2, that is load from disk without errors
### Environment info
- `datasets` version: 2.6.1
- Platform: Linux-5.4.209-129.367.amzn2int.x86_64-x86_64-with-glibc2.26
- Python version: 3.9.13
- PyArrow version: 9.0.0
- Pandas version: 1.5.1 | 56 | Problems after upgrading to 2.6.1
### Describe the bug
Loading a dataset_dict from disk with `load_from_disk` is now creating a `KeyError "length"` that was not occurring in v2.5.2.
Context:
- Each individual dataset in the dict is created with `Dataset.from_pandas`
- The dataset_dict is create from a dict of `Dataset`s, e.g., `DatasetDict({"train": train_ds, "validation": val_ds})
- The pandas dataframe, besides text columns, has a column with a dictionary inside and potentially different keys in each row. Correctly the `Dataset.from_pandas` function adds `key: None` to all dictionaries in each row so that the schema can be correctly inferred.
### Steps to reproduce the bug
Steps to reproduce:
- Upgrade to datasets==2.6.1
- Create a dataset from pandas dataframe with `Dataset.from_pandas`
- Create a dataset_dict from a dict of `Dataset`s, e.g., `DatasetDict({"train": train_ds, "validation": val_ds})
- Save to disk with the `save` function
### Expected behavior
Same as in v2.5.2, that is load from disk without errors
### Environment info
- `datasets` version: 2.6.1
- Platform: Linux-5.4.209-129.367.amzn2int.x86_64-x86_64-with-glibc2.26
- Python version: 3.9.13
- PyArrow version: 9.0.0
- Pandas version: 1.5.1
Hi all,
I experienced the same issue.
Please note that the pull request is related to the IMDB example provided in the doc, and is a fix for that, in that context, to make sure that people can follow the doc example and have a working system.
It does not provide a fix for Datasets itself. | [
-0.02353217452764511,
0.18796074390411377,
0.036584172397851944,
0.5241067409515381,
0.17488601803779602,
0.09343991428613663,
0.40412962436676025,
0.2676888704299927,
0.18014955520629883,
0.1660766303539276,
0.2483799010515213,
0.22665992379188538,
-0.09475917369127274,
-0.06879343837499619,
-0.20372939109802246,
0.01357748731970787,
0.23179271817207336,
0.011418759822845459,
-0.24018141627311707,
0.13307404518127441,
-0.4003652334213257,
0.2701817452907562,
-0.2635570168495178,
0.026605013757944107,
-0.38893693685531616,
-0.014554491266608238,
-0.3863948881626129,
0.16962525248527527,
0.06378552317619324,
-0.658815860748291,
0.4296497106552124,
-0.11834657192230225,
0.10523951053619385,
0.354032963514328,
-0.00012236263137310743,
-0.08885082602500916,
0.25420594215393066,
-0.021138930693268776,
-0.3963792324066162,
-0.38388556241989136,
-0.07604373246431351,
0.06453510373830795,
0.5007442831993103,
-0.10680683702230453,
0.21845993399620056,
0.07395707815885544,
-0.3012203872203827,
-0.37464624643325806,
0.16304969787597656,
0.4448939859867096,
0.15208478271961212,
-0.03250779211521149,
0.07294254004955292,
-0.3490060865879059,
-0.15628227591514587,
0.10365474224090576,
0.0777178481221199,
0.34282153844833374,
0.05673384666442871,
-0.054860278964042664,
-0.16594380140304565,
0.28847038745880127,
0.1664029210805893,
-0.06607477366924286,
0.2505417466163635,
-0.032588012516498566,
0.26139408349990845,
-0.38638606667518616,
0.22767621278762817,
0.30601951479911804,
0.26225897669792175,
-0.25925230979919434,
-0.4363846778869629,
-0.35151827335357666,
0.36204931139945984,
0.21748942136764526,
0.42145681381225586,
-0.23301716148853302,
0.1067771315574646,
0.19805902242660522,
-0.07791045308113098,
-0.26134181022644043,
-0.14833006262779236,
-0.14907042682170868,
-0.20682956278324127,
-0.3406911790370941,
-0.00806207861751318,
0.06855189055204391,
0.10021605342626572,
-0.20008611679077148,
0.3791407644748688,
-0.08861367404460907,
-0.24080538749694824,
0.19416910409927368,
-0.12798571586608887,
-0.023657655343413353,
0.21140500903129578,
-0.16501903533935547,
0.03957236558198929,
-0.5559409856796265,
-0.20558498799800873,
-0.24765858054161072,
-0.028485752642154694,
-0.09017599374055862,
0.30507954955101013,
0.18570472300052643,
0.4438745379447937,
0.19344137609004974,
-0.0006957799196243286,
0.046477220952510834,
-0.12186779081821442,
-0.017013028264045715,
-0.13958404958248138,
-0.168744757771492,
0.23833252489566803,
-0.07734348624944687,
0.19639475643634796,
-0.05037728697061539,
-0.17709660530090332,
0.3698301315307617,
-0.04314730688929558,
-0.012957366183400154,
0.09380040317773819,
0.22481167316436768,
0.1076921746134758,
0.38976719975471497,
0.07023908197879791,
0.20971950888633728,
-0.10218697041273117,
0.134023979306221,
-0.2755751609802246,
0.27411267161369324,
-0.15482759475708008,
-0.22766229510307312,
0.1345544010400772,
-0.13039793074131012,
0.14206860959529877,
0.15594057738780975,
0.15407517552375793,
-0.191692516207695,
-0.5933679938316345,
-0.15013709664344788,
0.0956806093454361,
0.21668154001235962,
-0.12134826183319092,
0.11696582287549973,
0.2380974143743515,
-0.07018935680389404,
-0.13306991755962372,
0.28318122029304504,
-0.136488676071167,
0.03421856835484505,
-0.22808001935482025,
0.14224326610565186,
-0.19640661776065826,
0.04477415978908539,
-0.22523623704910278,
0.12603241205215454,
0.20813657343387604,
-0.28583258390426636,
-0.012335158884525299,
-0.35628724098205566,
-0.1934926062822342,
-0.24567055702209473,
-0.02977447584271431,
0.5897418260574341,
-0.5203466415405273,
-0.13280189037322998,
0.09089995920658112,
-0.02657482400536537,
-0.054196856915950775,
-0.0733838677406311,
-0.07132847607135773,
-0.08612633496522903,
-0.23505763709545135,
0.1822795420885086,
0.361018568277359,
-0.2271597683429718,
-0.6552630066871643,
0.36285799741744995,
-0.018414225429296494,
0.2102118283510208,
0.03137645125389099,
-0.044334933161735535,
0.584503173828125,
-0.017041664570569992,
0.23492464423179626,
0.15288867056369781,
-0.03186926245689392,
0.04311997443437576,
-0.3808097541332245,
-0.296071320772171,
0.03862135857343674,
-0.08080986142158508,
0.2906404435634613,
0.10587549209594727,
0.09878095984458923,
-0.011877830140292645,
0.1968407928943634,
0.09951998293399811,
0.11143071949481964,
0.19945557415485382,
-0.03393701836466789,
-0.01741825044155121,
0.15793630480766296,
-0.31145602464675903,
-0.41206520795822144,
0.37783026695251465,
0.02600991725921631,
0.1339210867881775,
-0.13493679463863373,
-0.06958216428756714,
-0.4001993238925934,
0.2151772826910019,
-0.21701227128505707,
-0.16689883172512054,
-0.035621028393507004,
-0.23514065146446228,
-0.007269995287060738,
0.191481351852417,
-0.16115128993988037,
0.038330331444740295,
-0.25710010528564453,
0.19496993720531464,
-0.018454622477293015,
0.2782241106033325,
-0.11973879486322403,
-0.06815410405397415,
-0.139235258102417,
0.06808881461620331,
0.19084054231643677,
-0.021381577476859093,
-0.3747478425502777,
0.508490264415741,
0.3580242097377777,
0.04604851454496384,
-0.2797185182571411,
-0.17273767292499542,
0.45797309279441833,
0.38129356503486633,
0.3200371563434601,
0.20742858946323395,
0.03624045476317406,
-0.05636516958475113,
-0.29554468393325806,
0.4614335894584656,
-0.020745549350976944,
0.40407732129096985,
0.11244718730449677,
0.14192602038383484,
0.29852744936943054,
0.10711520910263062,
0.060685597360134125,
-0.4295370280742645,
-0.19996483623981476,
-0.07702422142028809,
-0.08427265286445618,
0.2676183581352234,
0.06126067042350769,
0.02815467119216919,
0.49205121397972107,
0.11958567798137665,
-0.06098339706659317,
0.32989051938056946,
-0.2609126567840576,
-0.2764231860637665,
0.042203307151794434,
0.6292679905891418,
0.29547691345214844,
0.08042436093091965,
-0.020244788378477097,
-0.16275084018707275,
-0.02925054356455803,
-0.002985379658639431,
0.11582553386688232,
-0.1445729285478592,
0.31764450669288635,
0.20267757773399353,
0.054543811827898026,
0.15263083577156067,
-0.11141107976436615,
-0.08501850813627243,
-0.04964810609817505,
0.3068142533302307,
-0.47904449701309204,
-0.052461881190538406,
-0.2052893191576004,
-0.01935342140495777,
0.2654273211956024,
-0.273934543132782,
-0.04796268418431282,
-0.37033262848854065,
-0.18149293959140778,
0.07953222841024399,
-0.030724113807082176,
0.22071415185928345,
-0.11299972236156464,
-0.038407549262046814,
0.23453788459300995,
0.05915389955043793,
0.11854839324951172,
-0.27761635184288025,
-0.03565209358930588,
0.02450602874159813,
-0.001999341882765293,
-0.16879045963287354,
0.004252269864082336,
0.01257442869246006,
-0.21258416771888733,
0.0372028648853302,
-0.3415600061416626,
0.0498390831053257,
-0.10679702460765839,
0.08798430860042572,
0.33994394540786743,
0.13583588600158691,
-0.025153473019599915,
-0.11176979541778564,
0.14570146799087524,
-0.11961747705936432,
-0.20869380235671997,
0.42126938700675964,
0.16886845231056213,
0.011667503975331783,
-0.14716969430446625,
-0.3556329011917114,
-0.07774648815393448,
-0.27862265706062317,
0.21723251044750214,
0.08961774408817291,
0.1539863646030426,
0.01048905961215496,
0.5393898487091064,
0.04513915255665779,
0.29939815402030945,
0.23829439282417297,
-0.13273648917675018,
-0.12110484391450882,
0.19379960000514984,
0.007371942047029734,
-0.36509111523628235,
-0.012976668775081635,
-0.2340688854455948,
0.09634244441986084,
0.13712498545646667,
-0.5021790862083435,
-0.2886064350605011,
-0.11938413977622986,
0.3255184590816498,
0.23606233298778534,
-0.11353816092014313,
0.3640400171279907,
0.16288308799266815,
0.002698531374335289,
0.007040172815322876,
-0.0685548484325409,
0.09910736978054047,
0.1363186091184616,
0.0909382551908493,
-0.24346965551376343,
0.7484691143035889,
-0.17299064993858337,
0.15515515208244324,
0.0057904720306396484,
0.03915371745824814,
-0.04323276877403259,
-0.22197870910167694,
0.40750426054000854,
-0.41603198647499084,
-0.2866421043872833,
-0.006422727834433317,
-0.11918270587921143,
-0.1982552409172058,
0.05123280733823776,
-0.023905646055936813,
0.17624783515930176,
0.036439210176467896,
-0.22215628623962402,
-0.2256624400615692,
-0.2144429087638855,
-0.06407609581947327,
-0.7175326347351074,
0.18729007244110107,
0.07541689276695251,
0.48594948649406433,
0.012200906872749329,
0.2210543155670166,
-0.11755669116973877,
-0.114632248878479,
0.31006914377212524,
-0.2912471890449524,
-0.01356901228427887,
0.3387839198112488,
-0.43471550941467285,
0.23134008049964905,
0.18489037454128265,
0.3321092426776886,
0.026642251759767532,
-0.32351529598236084,
0.05112653225660324,
-0.047156501561403275,
0.637145459651947,
0.10801630467176437,
-0.13206253945827484,
0.39311620593070984,
-0.24226301908493042,
-0.7206422686576843,
-0.12170599400997162,
0.1501912921667099,
0.22997550666332245,
0.4862372875213623,
0.2911779582500458,
-0.05337352678179741,
0.03876740485429764,
0.1138177290558815,
0.13656914234161377,
-0.16624154150485992,
-0.04598241671919823,
-0.04541347920894623,
0.03782927244901657,
-0.28568992018699646,
0.10002344846725464,
-0.04069872200489044,
0.4156455099582672,
-0.09622368216514587,
-0.0435699038207531,
-0.20342135429382324,
-0.4517585039138794,
0.07694615423679352,
0.33621540665626526,
0.28361988067626953,
-0.24877071380615234,
0.4702818989753723,
0.08338601142168045,
-0.27557429671287537,
0.5820156931877136,
0.3047685921192169,
-0.3236599266529083,
-0.477120041847229,
-0.025042369961738586,
-0.3024223744869232,
0.002093203365802765,
0.22032064199447632,
-0.20780351758003235,
-0.059662483632564545,
-0.1866973340511322,
0.02655341848731041,
-0.15024706721305847,
-0.006851013284176588,
0.23169176280498505,
-0.09395348280668259,
-0.16821087896823883,
-0.5539873242378235,
0.20152854919433594,
-0.0457586944103241,
-0.12893521785736084,
0.2978747487068176,
0.4076330065727234,
-0.34021902084350586,
0.4164937734603882,
-0.03258030116558075,
0.5712869763374329,
0.1034843921661377,
0.08337970823049545,
0.2870801091194153,
-0.15202471613883972,
0.32213348150253296,
0.4591308832168579,
-0.1662398725748062,
-0.5624947547912598,
-0.07963486760854721,
0.07232999056577682,
-0.006536945700645447,
0.001446738839149475,
0.0007662810385227203,
-0.14917229115962982,
0.1458096206188202,
-0.39126056432724,
-0.13598214089870453,
-0.22549471259117126,
0.08583168685436249,
-0.3827153146266937,
-0.1640491634607315,
-0.08123977482318878,
0.063605397939682,
0.10106915235519409,
-0.11580522358417511,
0.057320572435855865,
0.15326102077960968,
0.007498931139707565,
-0.4900639057159424,
-0.5211769342422485,
0.1978231966495514,
-0.0658918023109436,
0.3002241253852844,
0.14569240808486938,
-0.38681304454803467,
0.23332321643829346,
0.36800846457481384,
0.24304912984371185,
0.1050494909286499,
0.029146403074264526,
0.24974745512008667,
-0.053272709250450134,
0.18059863150119781,
0.21545374393463135,
0.2186611443758011,
0.19718918204307556,
0.21138322353363037,
-0.048572443425655365,
-0.14175426959991455,
-0.17534874379634857,
-0.03439442440867424,
-0.059253983199596405,
0.04491984099149704,
0.03634485602378845,
-0.42503395676612854,
-0.24175575375556946,
-0.36326369643211365,
-0.08646602928638458,
-0.43072089552879333,
0.0661553293466568,
0.13344508409500122,
0.013034570962190628,
0.30302515625953674,
-0.1839483082294464,
-0.3113304078578949,
-0.13310186564922333,
0.6773494482040405,
0.08520275354385376,
-0.20314419269561768,
0.419759064912796,
0.028834249824285507,
-0.20851722359657288,
-0.12468117475509644,
0.19035190343856812,
0.07222715765237808,
-0.16191624104976654,
0.542221188545227,
0.05759236961603165,
-0.07463154941797256,
-0.09377987682819366,
0.14580599963665009,
0.14725711941719055,
0.37300536036491394,
0.03546625003218651,
-0.20448428392410278,
-0.4395630359649658,
0.27319109439849854,
-0.15471217036247253,
0.2771468460559845,
-0.05827527120709419,
-0.1727139949798584,
-0.15416744351387024,
0.04405747354030609,
-0.20815441012382507,
0.15020997822284698,
-0.03209790587425232,
-0.03464217483997345,
0.31107741594314575,
-0.018771663308143616,
0.1443101167678833,
-0.4042919874191284,
0.07053089141845703,
-0.003772992640733719,
0.2006959617137909,
-0.05394367128610611,
-0.23191335797309875,
0.09955815970897675,
-0.03318173810839653,
0.2420044094324112,
-0.17671537399291992,
-0.2286040484905243,
-0.11912839114665985,
-0.17195799946784973,
0.2013363391160965,
0.44963377714157104,
-0.16764795780181885,
0.39528319239616394,
0.14989712834358215,
0.33121028542518616,
0.32497459650039673,
0.36682435870170593,
-0.24353352189064026,
0.40580540895462036,
0.054238975048065186,
0.25114917755126953,
-0.04952879250049591,
0.035734787583351135,
-0.24481536448001862,
0.24743586778640747,
-0.34074050188064575,
-0.1638149619102478,
0.4305080473423004,
-0.07685427367687225,
0.18976742029190063,
0.3226744532585144,
0.3684411644935608,
0.4393818974494934,
-0.19039885699748993,
-0.10422378778457642,
-0.0497710220515728,
0.19381120800971985,
-0.23961107432842255,
-0.022083403542637825,
-0.027457550168037415,
-0.029359739273786545,
-0.16578267514705658,
0.09543291479349136,
-0.22310952842235565,
-0.28933411836624146,
-0.35040605068206787,
0.24527665972709656,
0.45377740263938904,
-0.13169147074222565,
0.20688146352767944,
0.684495210647583,
-0.13047951459884644,
0.01574615016579628,
0.4876998960971832,
0.12946738302707672,
0.13322247564792633,
0.7064177989959717,
-0.2965541481971741,
0.2759288549423218,
0.03307802975177765,
0.17520636320114136,
0.06855399906635284,
-0.3406814634799957,
0.19394433498382568,
0.0011047124862670898,
-0.3452443778514862,
-0.3047023117542267,
0.08861318230628967,
-0.07090043276548386,
-0.16851459443569183,
-0.12747244536876678,
-0.17235258221626282,
0.07034710049629211,
-0.22030162811279297,
-0.1932906061410904,
0.07655180245637894,
-0.17956286668777466,
0.17768168449401855,
-0.023847196251153946,
-0.17265908420085907,
-0.040650464594364166,
0.11030421406030655,
0.1419782191514969,
-0.09649479389190674,
-0.3665832579135895,
0.03398812934756279,
-0.04855673760175705,
0.15725445747375488,
-0.34825170040130615,
-0.06209873408079147,
0.34287554025650024,
0.2527124285697937,
0.16247417032718658,
-0.011027200147509575,
0.6162312626838684,
0.3738909959793091,
-0.18695785105228424,
-0.07969368994235992,
0.08290496468544006,
-0.04650840908288956,
0.13749925792217255,
0.22640793025493622,
-0.09804992377758026,
0.5705325603485107,
0.1800345629453659,
0.04423490911722183,
-0.026637591421604156,
0.30104950070381165,
0.11699745059013367,
0.38090917468070984,
-0.12531355023384094,
0.5556161999702454,
-0.09442350268363953,
-0.11099574714899063,
-0.17701399326324463,
0.3722745180130005,
-0.0981382206082344,
-0.44866129755973816,
0.29611700773239136,
-0.01780354045331478,
0.13346636295318604,
-0.12323856353759766,
0.05184284597635269,
0.13601846992969513,
0.2290792167186737,
0.5354377031326294,
-0.07592805474996567,
-0.3302626311779022,
0.055411919951438904,
-0.5216732621192932,
-0.1821422278881073,
0.012099180370569229,
0.21087174117565155,
0.10812293738126755,
0.30184340476989746,
-0.1786869764328003,
-0.20653469860553741,
-0.004133790731430054,
0.3368198275566101,
-0.3328867256641388,
0.1640496551990509,
-0.08914899826049805,
-0.04101106896996498,
0.004750750958919525,
-0.28722479939460754,
0.03204682841897011,
-0.19970852136611938,
0.12877070903778076,
-0.28470540046691895,
-0.040385883301496506,
0.022377735003829002,
-0.08459699153900146,
0.023204904049634933,
0.13094204664230347,
0.3217812180519104,
0.1954374760389328,
0.1530531942844391,
0.09873729199171066,
-0.0935170128941536,
-0.2571270763874054,
-0.41298744082450867,
-0.05587851256132126,
0.25851941108703613,
-0.02455255761742592,
0.3993414342403412,
-0.1494522988796234,
-0.3538818657398224,
0.01362139917910099,
0.09998061507940292,
-0.10396522283554077,
-0.10103408992290497,
-0.4480583369731903,
0.14871829748153687,
-0.06700363010168076,
0.2760077714920044,
-0.006843887269496918,
0.13398005068302155,
-0.07579831779003143,
0.2424667328596115,
-0.04135441407561302,
-0.33641451597213745,
0.24972334504127502,
-0.0578007809817791,
-0.2621276080608368,
-0.1769963800907135,
0.08338451385498047,
-0.051885269582271576,
-0.2880461513996124,
-0.4638711214065552,
-0.05530092865228653,
0.43525373935699463,
-0.07387819141149521,
-0.3501758277416229,
-0.08743728697299957,
-0.1710493117570877,
0.18981721997261047,
-0.2500368356704712,
0.022777222096920013,
-0.0415157824754715,
-0.11470262706279755,
-0.04314257949590683,
-0.3131849765777588
] |
https://github.com/huggingface/datasets/issues/5150 | Problems after upgrading to 2.6.1 | im getting the same error.
- using the base AWS HF container that uses a datasets <2.
- updating the AWS HF container to use dataset 2.4
| ### Describe the bug
Loading a dataset_dict from disk with `load_from_disk` is now creating a `KeyError "length"` that was not occurring in v2.5.2.
Context:
- Each individual dataset in the dict is created with `Dataset.from_pandas`
- The dataset_dict is create from a dict of `Dataset`s, e.g., `DatasetDict({"train": train_ds, "validation": val_ds})
- The pandas dataframe, besides text columns, has a column with a dictionary inside and potentially different keys in each row. Correctly the `Dataset.from_pandas` function adds `key: None` to all dictionaries in each row so that the schema can be correctly inferred.
### Steps to reproduce the bug
Steps to reproduce:
- Upgrade to datasets==2.6.1
- Create a dataset from pandas dataframe with `Dataset.from_pandas`
- Create a dataset_dict from a dict of `Dataset`s, e.g., `DatasetDict({"train": train_ds, "validation": val_ds})
- Save to disk with the `save` function
### Expected behavior
Same as in v2.5.2, that is load from disk without errors
### Environment info
- `datasets` version: 2.6.1
- Platform: Linux-5.4.209-129.367.amzn2int.x86_64-x86_64-with-glibc2.26
- Python version: 3.9.13
- PyArrow version: 9.0.0
- Pandas version: 1.5.1 | 27 | Problems after upgrading to 2.6.1
### Describe the bug
Loading a dataset_dict from disk with `load_from_disk` is now creating a `KeyError "length"` that was not occurring in v2.5.2.
Context:
- Each individual dataset in the dict is created with `Dataset.from_pandas`
- The dataset_dict is create from a dict of `Dataset`s, e.g., `DatasetDict({"train": train_ds, "validation": val_ds})
- The pandas dataframe, besides text columns, has a column with a dictionary inside and potentially different keys in each row. Correctly the `Dataset.from_pandas` function adds `key: None` to all dictionaries in each row so that the schema can be correctly inferred.
### Steps to reproduce the bug
Steps to reproduce:
- Upgrade to datasets==2.6.1
- Create a dataset from pandas dataframe with `Dataset.from_pandas`
- Create a dataset_dict from a dict of `Dataset`s, e.g., `DatasetDict({"train": train_ds, "validation": val_ds})
- Save to disk with the `save` function
### Expected behavior
Same as in v2.5.2, that is load from disk without errors
### Environment info
- `datasets` version: 2.6.1
- Platform: Linux-5.4.209-129.367.amzn2int.x86_64-x86_64-with-glibc2.26
- Python version: 3.9.13
- PyArrow version: 9.0.0
- Pandas version: 1.5.1
im getting the same error.
- using the base AWS HF container that uses a datasets <2.
- updating the AWS HF container to use dataset 2.4
| [
-0.045134227722883224,
0.08813954889774323,
0.07960566878318787,
0.4128674268722534,
0.16125161945819855,
0.05661221593618393,
0.3962489366531372,
0.24633632600307465,
0.2683168947696686,
0.14761196076869965,
0.24307268857955933,
0.09313531965017319,
-0.03807796537876129,
-0.034216172993183136,
-0.20230138301849365,
-0.07559701800346375,
0.28522634506225586,
0.026278182864189148,
-0.19023379683494568,
0.07885167002677917,
-0.4343026578426361,
0.23011408746242523,
-0.15877413749694824,
0.05571703985333443,
-0.2958521246910095,
0.022300872951745987,
-0.4446333944797516,
0.15201807022094727,
0.1169728934764862,
-0.6087817549705505,
0.49611496925354004,
-0.1160321831703186,
0.2658465504646301,
0.3217412531375885,
-0.0001291564985876903,
-0.043128110468387604,
0.2136549949645996,
0.018267588689923286,
-0.40673646330833435,
-0.36171072721481323,
-0.14778557419776917,
0.042249247431755066,
0.43224865198135376,
-0.05008147656917572,
0.19910591840744019,
0.10772474855184555,
-0.43104618787765503,
-0.23972095549106598,
0.2628607749938965,
0.43171510100364685,
0.0903739258646965,
0.0485253781080246,
0.029576722532510757,
-0.35766398906707764,
0.022166434675455093,
0.1134326308965683,
0.029987195506691933,
0.2000688910484314,
-0.042627617716789246,
-0.19732040166854858,
-0.1991153061389923,
0.37021875381469727,
0.19782903790473938,
0.09431327879428864,
0.2858007252216339,
-0.06119869649410248,
0.32805517315864563,
-0.2390919327735901,
0.2625545263290405,
0.26678046584129333,
0.2840331196784973,
-0.1844998300075531,
-0.45089298486709595,
-0.3106577396392822,
0.2988717257976532,
0.24436019361019135,
0.4531596302986145,
-0.21079212427139282,
0.19200900197029114,
0.16507023572921753,
0.09166267514228821,
-0.3563394248485565,
-0.205119326710701,
-0.044425688683986664,
-0.27257466316223145,
-0.20328977704048157,
0.0020717261359095573,
0.11773008108139038,
0.07085783779621124,
-0.19954603910446167,
0.42234715819358826,
-0.1333787441253662,
-0.344249427318573,
0.26317957043647766,
-0.1940828114748001,
0.022108159959316254,
0.23268434405326843,
-0.1702667772769928,
-0.002799004316329956,
-0.5343361496925354,
-0.270430326461792,
-0.26338738203048706,
-0.022997837513685226,
-0.11926404386758804,
0.20832106471061707,
0.16714337468147278,
0.4523664116859436,
0.20992064476013184,
-0.043713316321372986,
0.11228515952825546,
-0.08482573926448822,
-0.03875555843114853,
-0.07262682169675827,
-0.11472626775503159,
0.1341344565153122,
-0.2146138846874237,
0.13918499648571014,
-0.08277677744626999,
-0.205727681517601,
0.44440993666648865,
-0.02393992431461811,
-0.06236167997121811,
0.004157946445047855,
0.3327929675579071,
0.230024516582489,
0.2785336375236511,
0.12191948294639587,
0.24777886271476746,
-0.26478156447410583,
0.14057868719100952,
-0.23973272740840912,
0.26750341057777405,
-0.07199297100305557,
-0.23229406774044037,
-0.021041886880993843,
-0.14602221548557281,
0.03772895783185959,
0.11512159556150436,
0.17756929993629456,
-0.2117314636707306,
-0.5478549599647522,
-0.15836045145988464,
0.013226799666881561,
0.3050100803375244,
-0.18400543928146362,
0.12769658863544464,
0.2995397746562958,
-0.0717453733086586,
-0.05946345627307892,
0.2290109395980835,
-0.2385147511959076,
0.006967600435018539,
-0.3427627682685852,
0.059984251856803894,
-0.15772034227848053,
0.11601614952087402,
-0.257095605134964,
0.10794788599014282,
0.23225203156471252,
-0.2861962914466858,
-0.02037951350212097,
-0.4081769585609436,
-0.20896202325820923,
-0.2033139318227768,
-0.022791124880313873,
0.5817110538482666,
-0.4859628677368164,
-0.2089785784482956,
0.08103427290916443,
0.04406191408634186,
0.0002824366092681885,
0.029201015830039978,
-0.11391717940568924,
-0.06678073853254318,
-0.21929757297039032,
0.13510745763778687,
0.29049229621887207,
-0.1983722746372223,
-0.676794707775116,
0.42030131816864014,
-0.00041522085666656494,
0.1801312118768692,
0.0005003288388252258,
-0.1393471211194992,
0.4516693949699402,
-0.03399335965514183,
0.20376446843147278,
0.03616593778133392,
0.00004203617572784424,
0.013095157220959663,
-0.3952925503253937,
-0.32904112339019775,
-0.011966913938522339,
-0.11068040132522583,
0.3784233629703522,
0.10449583828449249,
0.22714197635650635,
0.06595969945192337,
0.22242289781570435,
0.017447512596845627,
0.10167749971151352,
0.2902452349662781,
0.0036571361124515533,
-0.035291887819767,
0.18145868182182312,
-0.20555847883224487,
-0.4687579870223999,
0.3180227279663086,
-0.13057008385658264,
0.11946118623018265,
-0.12211939692497253,
0.03346563130617142,
-0.36624133586883545,
0.2238903045654297,
-0.2046620100736618,
-0.1769997924566269,
-0.13727787137031555,
-0.20995670557022095,
-0.02302512526512146,
0.13983109593391418,
-0.053997259587049484,
0.05599093437194824,
-0.3104797303676605,
0.22030694782733917,
0.05251827836036682,
0.4385819435119629,
-0.07197590172290802,
0.05218454822897911,
-0.11276635527610779,
0.05819418653845787,
0.24806606769561768,
-0.026911118999123573,
-0.4462382197380066,
0.4557530879974365,
0.32924067974090576,
0.1431068480014801,
-0.23102667927742004,
-0.14999569952487946,
0.4080752432346344,
0.42058414220809937,
0.35592031478881836,
0.2263856828212738,
0.01998167112469673,
-0.10924485325813293,
-0.2757780849933624,
0.4690049886703491,
0.10415630042552948,
0.5133394002914429,
0.06435205787420273,
0.11502943187952042,
0.24091783165931702,
0.1097857654094696,
0.18217873573303223,
-0.3736496567726135,
-0.09985709190368652,
-0.16814862191677094,
-0.12419852614402771,
0.15789814293384552,
0.184725821018219,
0.032017484307289124,
0.46534085273742676,
0.124672070145607,
-0.08482810109853745,
0.35010454058647156,
-0.23400256037712097,
-0.30179134011268616,
0.18316787481307983,
0.7288088202476501,
0.3119267225265503,
0.06621351093053818,
-0.07932847738265991,
-0.17768323421478271,
-0.07530233263969421,
0.042133986949920654,
0.11093754321336746,
-0.14052119851112366,
0.31398048996925354,
0.23673057556152344,
0.12175393104553223,
0.09772220999002457,
-0.12014549970626831,
-0.12801213562488556,
-0.06639466434717178,
0.3194616734981537,
-0.5290012359619141,
0.017285386100411415,
-0.17210304737091064,
0.029903598129749298,
0.2895141839981079,
-0.1082124412059784,
-0.15421056747436523,
-0.42074331641197205,
-0.21880708634853363,
0.11804898083209991,
-0.045860882848501205,
0.1611582189798355,
-0.14941096305847168,
-0.038009777665138245,
0.29046711325645447,
0.019314680248498917,
0.016968771815299988,
-0.200336754322052,
-0.09010236710309982,
-0.056442469358444214,
-0.12460464239120483,
-0.19276392459869385,
0.04210181534290314,
0.11433403939008713,
-0.23901157081127167,
-0.08616850525140762,
-0.40625977516174316,
0.08932480216026306,
-0.09614135324954987,
0.09440469741821289,
0.3357500433921814,
0.15641425549983978,
-0.19364657998085022,
-0.09382861852645874,
0.1944742202758789,
-0.02551601082086563,
-0.20680491626262665,
0.4008987247943878,
0.0887051597237587,
0.09709146618843079,
-0.07259755581617355,
-0.32900750637054443,
-0.061906248331069946,
-0.22129206359386444,
0.12961959838867188,
0.13868950307369232,
0.17930366098880768,
-0.12569202482700348,
0.5341390371322632,
0.019507702440023422,
0.33687958121299744,
0.06117192655801773,
-0.16956683993339539,
-0.1292017251253128,
0.18917393684387207,
0.04067649319767952,
-0.36445727944374084,
-0.027885911986231804,
-0.18487542867660522,
0.18385253846645355,
0.2151712030172348,
-0.5419881343841553,
-0.13749094307422638,
-0.08643227070569992,
0.25867000222206116,
0.10426577925682068,
-0.052526287734508514,
0.3934754431247711,
0.11650646477937698,
0.08290138840675354,
-0.03953924775123596,
0.01304786279797554,
0.09485713392496109,
0.1536107212305069,
0.24133217334747314,
-0.21046483516693115,
0.7059832215309143,
-0.19526343047618866,
0.3893313407897949,
-0.0255071260035038,
0.06949298083782196,
0.03164101019501686,
-0.15950089693069458,
0.3049246668815613,
-0.3922465443611145,
-0.24089668691158295,
0.059290047734975815,
-0.07805261015892029,
-0.16372421383857727,
0.0869000181555748,
0.021141957491636276,
0.27806079387664795,
0.11319470405578613,
-0.3128802478313446,
-0.17217543721199036,
-0.21213357150554657,
-0.07920347154140472,
-0.7309618592262268,
0.2825513184070587,
0.13746750354766846,
0.43975165486335754,
0.010717330500483513,
0.18682700395584106,
-0.0397363007068634,
-0.04842086136341095,
0.26409587264060974,
-0.14604103565216064,
0.011436328291893005,
0.27633002400398254,
-0.498007595539093,
0.3773964047431946,
0.1614065319299698,
0.3323432505130768,
-0.017634395509958267,
-0.24781331419944763,
0.060399532318115234,
-0.15155288577079773,
0.5026639699935913,
-0.020469190552830696,
-0.06282173842191696,
0.32566073536872864,
-0.2511884272098541,
-0.6624169945716858,
-0.16177038848400116,
0.15462467074394226,
0.1627504825592041,
0.3449306786060333,
0.2694286108016968,
-0.060800351202487946,
-0.01461219135671854,
0.03387611731886864,
0.009950830601155758,
-0.2100517898797989,
-0.0546862930059433,
-0.021170757710933685,
0.034801967442035675,
-0.28778567910194397,
0.1439603865146637,
-0.086124949157238,
0.3571898937225342,
-0.10597063601016998,
0.056463006883859634,
-0.20504692196846008,
-0.36958053708076477,
0.05574817210435867,
0.2961948812007904,
0.1994103491306305,
-0.3405781388282776,
0.34571167826652527,
0.10170449316501617,
-0.26449811458587646,
0.7369841933250427,
0.30163004994392395,
-0.23441725969314575,
-0.4875217080116272,
-0.06529369950294495,
-0.24183590710163116,
-0.01598193496465683,
0.19032980501651764,
-0.19342507421970367,
0.14928805828094482,
-0.09073017537593842,
0.16019579768180847,
-0.17999665439128876,
-0.10370510071516037,
0.2277057021856308,
-0.05578804016113281,
-0.16549506783485413,
-0.45674994587898254,
0.28564783930778503,
-0.13922426104545593,
-0.17053857445716858,
0.3237960934638977,
0.5554308891296387,
-0.3538985550403595,
0.5715274810791016,
-0.13413923978805542,
0.5340374708175659,
0.08669982850551605,
0.11572384834289551,
0.3774091601371765,
-0.23629434406757355,
0.34771499037742615,
0.2455582469701767,
-0.20548947155475616,
-0.5085331201553345,
0.03691776096820831,
-0.01851707324385643,
0.000009492039680480957,
0.16105806827545166,
0.03267640620470047,
-0.040078453719615936,
0.21233081817626953,
-0.36025434732437134,
-0.06733796000480652,
-0.25433534383773804,
0.026058897376060486,
-0.3630008399486542,
-0.19776961207389832,
-0.18888716399669647,
0.021545227617025375,
0.01776212826371193,
0.011262323707342148,
-0.00796466413885355,
0.16310901939868927,
0.07641266286373138,
-0.6507758498191833,
-0.47288376092910767,
0.2049279510974884,
-0.07647382467985153,
0.29224449396133423,
0.21601775288581848,
-0.36113691329956055,
0.3636711835861206,
0.23095296323299408,
0.2100343406200409,
0.0818755105137825,
0.006575576961040497,
0.2817991375923157,
-0.08638594299554825,
0.222481831908226,
0.12471342086791992,
0.1567474901676178,
0.12568382918834686,
0.24407365918159485,
-0.10863768309354782,
-0.1736055314540863,
-0.2763805091381073,
-0.10247538238763809,
-0.008854702115058899,
0.017527073621749878,
-0.009688429534435272,
-0.4137241542339325,
-0.15698795020580292,
-0.27707839012145996,
-0.15874768793582916,
-0.43751874566078186,
0.0024310853332281113,
0.074562206864357,
-0.03300834074616432,
0.2400725781917572,
-0.1487107127904892,
-0.2995842695236206,
-0.14070065319538116,
0.7100569009780884,
0.11809670925140381,
-0.24332372844219208,
0.48045554757118225,
0.03819960728287697,
-0.16585907340049744,
-0.1426916867494583,
0.1679922640323639,
0.16202706098556519,
-0.12500180304050446,
0.5102735161781311,
0.021426452323794365,
-0.0725691094994545,
-0.10354960709810257,
0.07976289093494415,
0.15542830526828766,
0.3902646005153656,
0.07501181960105896,
-0.20388035476207733,
-0.3993338942527771,
0.22689378261566162,
-0.20588092505931854,
0.2219718098640442,
-0.02408500760793686,
-0.11284662783145905,
-0.15520094335079193,
0.2051953375339508,
-0.12656137347221375,
0.11589871346950531,
0.032694779336452484,
-0.06390074640512466,
0.24190381169319153,
0.05539277195930481,
0.18508674204349518,
-0.38361892104148865,
-0.0007486343383789062,
-0.007531065493822098,
0.11846953630447388,
0.012980412691831589,
-0.3855178952217102,
0.1584610641002655,
0.026118110865354538,
0.30104562640190125,
-0.18641528487205505,
-0.2570197582244873,
-0.0740385502576828,
-0.13087216019630432,
0.3127882182598114,
0.4169673025608063,
-0.20157809555530548,
0.3441096842288971,
0.28080281615257263,
0.22904446721076965,
0.3313583731651306,
0.37199166417121887,
-0.17978572845458984,
0.3670353293418884,
-0.017754854634404182,
0.23382888734340668,
0.03911871835589409,
0.01818334311246872,
-0.2931915819644928,
0.2642040550708771,
-0.3333951234817505,
-0.1364663541316986,
0.45604419708251953,
-0.11263974010944366,
0.14077842235565186,
0.1084117740392685,
0.3456289768218994,
0.31140968203544617,
-0.17953801155090332,
-0.1642800271511078,
-0.05851905792951584,
0.11310245096683502,
-0.30486002564430237,
-0.09712212532758713,
-0.18464389443397522,
-0.010082143358886242,
-0.17189759016036987,
0.056992366909980774,
-0.18062913417816162,
-0.3348929286003113,
-0.3850078582763672,
0.2453225553035736,
0.3668610751628876,
-0.36357593536376953,
0.20210914313793182,
0.7910794615745544,
-0.1224546730518341,
0.1351751685142517,
0.44522491097450256,
0.034203991293907166,
0.059715285897254944,
0.7594285607337952,
-0.2086276412010193,
0.2232120782136917,
0.21844330430030823,
0.23182618618011475,
0.03300170600414276,
-0.43616345524787903,
-0.0004742555320262909,
0.061350710690021515,
-0.2939358353614807,
-0.23570910096168518,
0.12795281410217285,
-0.10855018347501755,
0.007474721875041723,
-0.22064003348350525,
-0.18185558915138245,
0.055039748549461365,
-0.166387677192688,
-0.2663770616054535,
0.004424788057804108,
-0.13261057436466217,
0.16293179988861084,
-0.06979003548622131,
-0.08949032425880432,
-0.06659169495105743,
0.2692974805831909,
0.18295349180698395,
0.04541105777025223,
-0.3558497130870819,
-0.004818879067897797,
0.03215572237968445,
0.128045916557312,
-0.32617267966270447,
-0.05416599661111832,
0.3669182062149048,
0.2075764536857605,
0.18769486248493195,
-0.1359281688928604,
0.6046454310417175,
0.28725430369377136,
-0.12310898303985596,
-0.0936165526509285,
0.14239272475242615,
-0.056843820959329605,
0.2153545469045639,
0.2230471819639206,
-0.11720587313175201,
0.4802793860435486,
0.25091537833213806,
-0.037093907594680786,
0.020037688314914703,
0.34727492928504944,
0.0571410171687603,
0.36551010608673096,
-0.1602887064218521,
0.7124557495117188,
-0.157863050699234,
-0.07780544459819794,
-0.14246481657028198,
0.41641098260879517,
-0.06890764832496643,
-0.37471944093704224,
0.3462665379047394,
-0.005725175142288208,
0.2408018410205841,
-0.032562777400016785,
0.007457904517650604,
0.08808170258998871,
0.25515997409820557,
0.5329424738883972,
-0.10749924927949905,
-0.35078176856040955,
0.047297701239585876,
-0.43150219321250916,
-0.2803988456726074,
-0.20909661054611206,
0.23410218954086304,
0.13828112185001373,
0.28494733572006226,
-0.16208338737487793,
-0.30573827028274536,
0.12125883996486664,
0.2407107949256897,
-0.31486570835113525,
0.19571782648563385,
-0.11909915506839752,
-0.07774122059345245,
-0.06428657472133636,
-0.18338659405708313,
-0.01849300041794777,
-0.26913395524024963,
0.16865764558315277,
0.03959956392645836,
-0.13011755049228668,
-0.02234414964914322,
0.013100974261760712,
0.08792522549629211,
-0.1033179759979248,
0.2853701710700989,
0.22434468567371368,
0.11424234509468079,
0.0376385897397995,
-0.0033851154148578644,
-0.20751112699508667,
-0.4821343421936035,
0.00016688555479049683,
0.25100868940353394,
-0.114412322640419,
0.5899693965911865,
-0.10140395164489746,
-0.4403380751609802,
0.0029692447278648615,
0.02568727731704712,
-0.13154751062393188,
-0.011497626081109047,
-0.446833997964859,
0.29794156551361084,
-0.16427432000637054,
0.34419935941696167,
-0.0016325879842042923,
0.12725606560707092,
0.038632407784461975,
0.2761669158935547,
-0.0756177306175232,
-0.3453844487667084,
0.25228938460350037,
-0.10991165786981583,
-0.34942010045051575,
-0.03437431529164314,
0.1501195877790451,
-0.027916334569454193,
-0.3400713801383972,
-0.5014967918395996,
-0.10969674587249756,
0.4397197663784027,
-0.07826684415340424,
-0.3144821226596832,
-0.13010236620903015,
-0.1420741230249405,
0.18973366916179657,
-0.24335919320583344,
0.05603925883769989,
-0.10184112936258316,
-0.09563741087913513,
-0.03080274537205696,
-0.34680843353271484
] |
https://github.com/huggingface/datasets/issues/5150 | Problems after upgrading to 2.6.1 | Same here, running on our SageMaker pipelines. It's only happening for some but not all of our saved Datasets. | ### Describe the bug
Loading a dataset_dict from disk with `load_from_disk` is now creating a `KeyError "length"` that was not occurring in v2.5.2.
Context:
- Each individual dataset in the dict is created with `Dataset.from_pandas`
- The dataset_dict is create from a dict of `Dataset`s, e.g., `DatasetDict({"train": train_ds, "validation": val_ds})
- The pandas dataframe, besides text columns, has a column with a dictionary inside and potentially different keys in each row. Correctly the `Dataset.from_pandas` function adds `key: None` to all dictionaries in each row so that the schema can be correctly inferred.
### Steps to reproduce the bug
Steps to reproduce:
- Upgrade to datasets==2.6.1
- Create a dataset from pandas dataframe with `Dataset.from_pandas`
- Create a dataset_dict from a dict of `Dataset`s, e.g., `DatasetDict({"train": train_ds, "validation": val_ds})
- Save to disk with the `save` function
### Expected behavior
Same as in v2.5.2, that is load from disk without errors
### Environment info
- `datasets` version: 2.6.1
- Platform: Linux-5.4.209-129.367.amzn2int.x86_64-x86_64-with-glibc2.26
- Python version: 3.9.13
- PyArrow version: 9.0.0
- Pandas version: 1.5.1 | 19 | Problems after upgrading to 2.6.1
### Describe the bug
Loading a dataset_dict from disk with `load_from_disk` is now creating a `KeyError "length"` that was not occurring in v2.5.2.
Context:
- Each individual dataset in the dict is created with `Dataset.from_pandas`
- The dataset_dict is create from a dict of `Dataset`s, e.g., `DatasetDict({"train": train_ds, "validation": val_ds})
- The pandas dataframe, besides text columns, has a column with a dictionary inside and potentially different keys in each row. Correctly the `Dataset.from_pandas` function adds `key: None` to all dictionaries in each row so that the schema can be correctly inferred.
### Steps to reproduce the bug
Steps to reproduce:
- Upgrade to datasets==2.6.1
- Create a dataset from pandas dataframe with `Dataset.from_pandas`
- Create a dataset_dict from a dict of `Dataset`s, e.g., `DatasetDict({"train": train_ds, "validation": val_ds})
- Save to disk with the `save` function
### Expected behavior
Same as in v2.5.2, that is load from disk without errors
### Environment info
- `datasets` version: 2.6.1
- Platform: Linux-5.4.209-129.367.amzn2int.x86_64-x86_64-with-glibc2.26
- Python version: 3.9.13
- PyArrow version: 9.0.0
- Pandas version: 1.5.1
Same here, running on our SageMaker pipelines. It's only happening for some but not all of our saved Datasets. | [
-0.002203691750764847,
0.17898768186569214,
0.06423191726207733,
0.5237191319465637,
0.1632162630558014,
0.08636394888162613,
0.3798888027667999,
0.2597455680370331,
0.2343611717224121,
0.22525250911712646,
0.32204142212867737,
0.18334490060806274,
-0.16927596926689148,
-0.009654328227043152,
-0.19913677871227264,
0.010655786842107773,
0.28599241375923157,
0.003711991012096405,
-0.13768650591373444,
0.16064755618572235,
-0.41095486283302307,
0.2679348289966583,
-0.23363415896892548,
0.04377831891179085,
-0.3845854699611664,
0.06392792612314224,
-0.3552204370498657,
0.22278189659118652,
0.10609253495931625,
-0.650854229927063,
0.41844069957733154,
-0.09364697337150574,
0.13429796695709229,
0.24156704545021057,
-0.0001283735764445737,
-0.02357872575521469,
0.18773379921913147,
-0.024832556024193764,
-0.41992509365081787,
-0.3548334836959839,
-0.0636579692363739,
0.016490917652845383,
0.4909934401512146,
-0.046464480459690094,
0.21939295530319214,
0.04727257788181305,
-0.35459133982658386,
-0.32917794585227966,
0.21766355633735657,
0.49429693818092346,
0.10222560912370682,
-0.052183445543050766,
0.03467366471886635,
-0.3446824550628662,
-0.16823992133140564,
0.12505266070365906,
0.047230690717697144,
0.24108105897903442,
-0.09230285882949829,
-0.09309922158718109,
-0.17845258116722107,
0.2816348373889923,
0.1286201924085617,
-0.050850238651037216,
0.2656019926071167,
-0.07183095067739487,
0.34807658195495605,
-0.37516605854034424,
0.3038903772830963,
0.28579503297805786,
0.16705778241157532,
-0.20694750547409058,
-0.38458043336868286,
-0.47121915221214294,
0.25690019130706787,
0.18309812247753143,
0.43727174401283264,
-0.26336100697517395,
0.08195629715919495,
0.14584414660930634,
-0.0252687968313694,
-0.2351832538843155,
-0.14399701356887817,
-0.19711779057979584,
-0.2275214046239853,
-0.2736039161682129,
0.03692721202969551,
0.1281004101037979,
0.13098223507404327,
-0.14828276634216309,
0.238454669713974,
-0.10914044082164764,
-0.333150178194046,
0.17082573473453522,
-0.1510835736989975,
0.015692830085754395,
0.3271837532520294,
-0.126644104719162,
0.058655619621276855,
-0.46075302362442017,
-0.12942317128181458,
-0.23558193445205688,
0.08875954151153564,
-0.12026844173669815,
0.3134393095970154,
0.1424594521522522,
0.5039258003234863,
0.08938019722700119,
0.04785281419754028,
0.0750574916601181,
-0.11451926827430725,
0.03156822919845581,
-0.08417791873216629,
-0.13441136479377747,
0.2793132960796356,
-0.05070790648460388,
0.18981698155403137,
-0.10697606205940247,
-0.23806647956371307,
0.45586344599723816,
-0.08367197215557098,
-0.06665440648794174,
0.09039947390556335,
0.20610088109970093,
0.1357361525297165,
0.46427807211875916,
0.007413297891616821,
0.1969582438468933,
-0.159284770488739,
0.11920837312936783,
-0.24037230014801025,
0.2425033003091812,
-0.14952890574932098,
-0.17577452957630157,
0.08415700495243073,
-0.21101726591587067,
0.06656407564878464,
0.13061530888080597,
0.13671427965164185,
-0.2245206981897354,
-0.5968464612960815,
-0.09829819202423096,
0.061317041516304016,
0.2630743682384491,
-0.12827128171920776,
0.13833460211753845,
0.2405330240726471,
-0.16886694729328156,
-0.14714674651622772,
0.269674152135849,
-0.11137769371271133,
0.06339514255523682,
-0.1545143574476242,
0.09509722888469696,
-0.2786651849746704,
0.0415419340133667,
-0.17700394988059998,
0.1489534080028534,
0.2557918429374695,
-0.2913152575492859,
-0.1081240102648735,
-0.32349681854248047,
-0.27713122963905334,
-0.28058862686157227,
-0.04217328503727913,
0.5752525329589844,
-0.5578843951225281,
-0.1276090443134308,
0.10892429202795029,
-0.06762734055519104,
-0.03799443691968918,
-0.07275164127349854,
-0.061024125665426254,
0.04824060574173927,
-0.21309535205364227,
0.11010414361953735,
0.4401497542858124,
-0.18961314857006073,
-0.6756066679954529,
0.3078721761703491,
-0.03039165958762169,
0.21740779280662537,
0.06904742121696472,
-0.10883433371782303,
0.5381250381469727,
-0.03138870745897293,
0.2678205966949463,
0.13590741157531738,
-0.03560122102499008,
0.05294107645750046,
-0.37748730182647705,
-0.2309972196817398,
0.05719377100467682,
-0.09419134259223938,
0.3145659565925598,
0.12149439752101898,
0.07403837144374847,
-0.035769250243902206,
0.142078697681427,
0.015308089554309845,
0.11506890505552292,
0.2217724770307541,
-0.06329265236854553,
-0.029687032103538513,
0.20314183831214905,
-0.24961203336715698,
-0.42167574167251587,
0.43975070118904114,
-0.04624515771865845,
0.05324189364910126,
-0.08558924496173859,
0.05192090570926666,
-0.34050706028938293,
0.25821173191070557,
-0.3304842710494995,
-0.21408729255199432,
-0.09738631546497345,
-0.14053720235824585,
0.08985483646392822,
0.23177872598171234,
-0.11998361349105835,
0.021771810948848724,
-0.1580556333065033,
0.1867333948612213,
0.01398511417210102,
0.31264954805374146,
-0.055497586727142334,
-0.08362451940774918,
-0.2773292064666748,
0.12142978608608246,
0.2464132010936737,
0.1158405989408493,
-0.3802286684513092,
0.3642132580280304,
0.35263895988464355,
0.03989027813076973,
-0.34796279668807983,
-0.16589955985546112,
0.3530902862548828,
0.45424309372901917,
0.306562215089798,
0.23205764591693878,
0.007241260260343552,
-0.08190174400806427,
-0.24271926283836365,
0.47303980588912964,
0.14938174188137054,
0.49096909165382385,
0.007744219154119492,
0.17761699855327606,
0.30187058448791504,
0.10144522786140442,
0.12779118120670319,
-0.3778332471847534,
-0.13418419659137726,
-0.1383640468120575,
-0.0184892937541008,
0.2505022883415222,
0.13954314589500427,
0.034131646156311035,
0.4519553780555725,
0.06558944284915924,
-0.05210708826780319,
0.2845367193222046,
-0.30172285437583923,
-0.3199518918991089,
-0.007228679955005646,
0.7488277554512024,
0.29885661602020264,
0.021582327783107758,
-0.04461085423827171,
-0.1633659452199936,
-0.07811131328344345,
-0.027053803205490112,
0.055194444954395294,
-0.07711946964263916,
0.28535622358322144,
0.31076323986053467,
0.08416229486465454,
0.1361263394355774,
-0.18404829502105713,
0.0029518380761146545,
-0.03990238904953003,
0.31860050559043884,
-0.4581008851528168,
0.06269824504852295,
-0.15804409980773926,
-0.005152326077222824,
0.20152918994426727,
-0.2085237354040146,
-0.09048300981521606,
-0.4296788275241852,
-0.14498260617256165,
0.12613868713378906,
-0.12952624261379242,
0.14020788669586182,
-0.030300362035632133,
0.03505721688270569,
0.21341019868850708,
0.03995203226804733,
0.0722656100988388,
-0.2066614031791687,
-0.08866903930902481,
-0.0470246747136116,
-0.03596792370080948,
-0.26339057087898254,
0.052496254444122314,
0.07484612613916397,
-0.17559054493904114,
-0.0810050517320633,
-0.38287848234176636,
0.06871257722377777,
-0.12953490018844604,
0.09950929880142212,
0.3170228600502014,
0.06893013417720795,
0.08259696513414383,
-0.05187980458140373,
0.22043883800506592,
-0.05338452011346817,
-0.2299772948026657,
0.498510479927063,
0.16433817148208618,
0.10475011169910431,
-0.16124173998832703,
-0.24683693051338196,
-0.01212095096707344,
-0.26214420795440674,
0.1873995065689087,
0.07107552886009216,
0.14513933658599854,
-0.0392087921500206,
0.4578879177570343,
-0.018080219626426697,
0.21010315418243408,
0.2579929530620575,
-0.12043268233537674,
-0.07497911155223846,
0.17497502267360687,
0.02024276740849018,
-0.3869597911834717,
0.030095282942056656,
-0.27282410860061646,
0.1551438868045807,
0.14995086193084717,
-0.4801875948905945,
-0.1718321591615677,
-0.1437615603208542,
0.21749815344810486,
0.25448888540267944,
-0.17817890644073486,
0.42193782329559326,
0.14999641478061676,
0.0740215927362442,
0.002369847148656845,
-0.16178257763385773,
0.1686212718486786,
0.09721677750349045,
0.15087054669857025,
-0.23809638619422913,
0.8383130431175232,
-0.1607450395822525,
0.1879289746284485,
0.006401782855391502,
0.1138460785150528,
-0.006091423332691193,
-0.19853587448596954,
0.36390817165374756,
-0.3666635751724243,
-0.22609993815422058,
0.01164262369275093,
-0.0881105363368988,
-0.30155712366104126,
0.06921713054180145,
0.010415254160761833,
0.19033756852149963,
0.03536292165517807,
-0.2140529751777649,
-0.08991047739982605,
-0.21351458132266998,
-0.041762575507164,
-0.7118522524833679,
0.17591732740402222,
0.07009513676166534,
0.5292387008666992,
0.0394795797765255,
0.25490885972976685,
-0.1517440527677536,
-0.10672532021999359,
0.32642310857772827,
-0.2735300064086914,
-0.05667870491743088,
0.30430108308792114,
-0.512057363986969,
0.2202846109867096,
0.1970493197441101,
0.3367712199687958,
-0.02412145957350731,
-0.4016510844230652,
0.08855656534433365,
-0.07690631598234177,
0.53094083070755,
0.11372897773981094,
-0.12953943014144897,
0.4088986814022064,
-0.3173501491546631,
-0.7256972789764404,
-0.22659353911876678,
0.24597162008285522,
0.22421181201934814,
0.3886505961418152,
0.25986093282699585,
-0.021536104381084442,
-0.00014339317567646503,
0.08749223500490189,
0.14859585464000702,
-0.28285476565361023,
0.0078101372346282005,
-0.1445838361978531,
0.015042100101709366,
-0.27414488792419434,
0.10820577293634415,
-0.16424600780010223,
0.42004817724227905,
-0.07408110797405243,
-0.014062784612178802,
-0.12962749600410461,
-0.4803597033023834,
0.04695206135511398,
0.2922235131263733,
0.286312997341156,
-0.33166757225990295,
0.4854395389556885,
0.14882513880729675,
-0.16107311844825745,
0.44793200492858887,
0.3197116553783417,
-0.2770639955997467,
-0.5654882192611694,
-0.027709607034921646,
-0.2570528984069824,
-0.007226109504699707,
0.21915745735168457,
-0.3018513321876526,
0.06654328852891922,
-0.2131388783454895,
0.050319865345954895,
-0.25429415702819824,
-0.0316832959651947,
0.28815025091171265,
-0.10497121512889862,
-0.2503787577152252,
-0.5019879341125488,
0.18302804231643677,
-0.03305500000715256,
-0.1571352779865265,
0.24767810106277466,
0.25333070755004883,
-0.35027429461479187,
0.3753392696380615,
-0.0456385537981987,
0.5138834118843079,
0.07821726053953171,
0.1963283270597458,
0.32703280448913574,
-0.18692420423030853,
0.28593769669532776,
0.4713436961174011,
-0.16695038974285126,
-0.5593075752258301,
0.03107822686433792,
0.07321400195360184,
-0.008419860154390335,
0.012314055114984512,
-0.07164201140403748,
-0.010216686874628067,
0.20018570125102997,
-0.3360553979873657,
-0.07873210310935974,
-0.21648335456848145,
-0.04845037683844566,
-0.368508905172348,
-0.13460388779640198,
-0.05339924246072769,
-0.009831877425312996,
0.10785470902919769,
-0.06270205974578857,
0.047378018498420715,
0.124947689473629,
0.05611686035990715,
-0.5773364901542664,
-0.5191038250923157,
0.18644458055496216,
0.012407517060637474,
0.2798271179199219,
0.15695872902870178,
-0.4211686849594116,
0.2148880511522293,
0.4210354685783386,
0.2126270830631256,
0.05780515447258949,
0.026429450139403343,
0.21528217196464539,
-0.16290169954299927,
0.26154619455337524,
0.1849476546049118,
0.1745564341545105,
0.16892720758914948,
0.20000019669532776,
-0.03434418886899948,
-0.20252510905265808,
-0.2521134912967682,
-0.14022499322891235,
-0.2798331379890442,
0.13777534663677216,
0.11221025139093399,
-0.4064467251300812,
-0.1236167699098587,
-0.3682805895805359,
-0.08926141262054443,
-0.44583186507225037,
0.021925171837210655,
0.20957684516906738,
0.03886761516332626,
0.2888244092464447,
-0.3310313820838928,
-0.34095773100852966,
-0.09853704273700714,
0.6794211268424988,
0.11869282275438309,
-0.2546367049217224,
0.4468011260032654,
-0.06459681689739227,
-0.16972701251506805,
-0.10959257185459137,
0.1290874481201172,
0.0709686279296875,
-0.12342363595962524,
0.5863439440727234,
0.0337744802236557,
-0.10739918053150177,
-0.14138099551200867,
0.20996125042438507,
0.08620588481426239,
0.24941089749336243,
0.016376156359910965,
-0.20510156452655792,
-0.45398271083831787,
0.22851154208183289,
-0.14333823323249817,
0.25095799565315247,
-0.025897471234202385,
-0.2127782702445984,
-0.17984023690223694,
0.04080306366086006,
-0.13101528584957123,
0.0869351178407669,
0.0704679936170578,
-0.10301955044269562,
0.2872184216976166,
0.017977070063352585,
0.14436259865760803,
-0.3273158073425293,
0.01150180958211422,
-0.04530031234025955,
0.19897615909576416,
0.009655777364969254,
-0.25773105025291443,
0.14021675288677216,
0.024085380136966705,
0.2856002449989319,
-0.127701997756958,
-0.19853004813194275,
-0.02832571044564247,
-0.1600259244441986,
0.27396804094314575,
0.4055114686489105,
-0.15980705618858337,
0.38405701518058777,
0.19126351177692413,
0.4256124198436737,
0.3323094844818115,
0.3920252323150635,
-0.2439402937889099,
0.35153019428253174,
0.09288812428712845,
0.25022441148757935,
-0.0984155610203743,
-0.02338547632098198,
-0.29629603028297424,
0.21660897135734558,
-0.3288668394088745,
-0.17698964476585388,
0.4108158051967621,
-0.1748904287815094,
0.15086208283901215,
0.27961525321006775,
0.36436352133750916,
0.5078281164169312,
-0.20819249749183655,
-0.06809035688638687,
-0.04107125103473663,
0.1387605369091034,
-0.18942062556743622,
-0.11471539735794067,
-0.06425915658473969,
-0.02859252691268921,
-0.22209720313549042,
0.04254962503910065,
-0.23164552450180054,
-0.3797184228897095,
-0.3542335629463196,
0.21234449744224548,
0.356144517660141,
-0.0657414123415947,
0.24006888270378113,
0.7909885048866272,
-0.13604134321212769,
0.10096617043018341,
0.4872325360774994,
0.03919044882059097,
0.07744640111923218,
0.7665311694145203,
-0.20250773429870605,
0.3737432062625885,
-0.04209452122449875,
0.10814495384693146,
0.03870772942900658,
-0.41055506467819214,
0.24885058403015137,
0.023793324828147888,
-0.3409568965435028,
-0.2944900691509247,
0.0886559933423996,
0.010492391884326935,
-0.1677713543176651,
-0.13091400265693665,
-0.22452792525291443,
0.08597281575202942,
-0.2627972960472107,
-0.22806629538536072,
0.06428687274456024,
-0.16565406322479248,
0.2334018349647522,
0.056870196014642715,
-0.12967680394649506,
-0.004338689148426056,
0.10786965489387512,
0.07195961475372314,
-0.14008378982543945,
-0.24260364472866058,
-0.035491593182086945,
-0.005139932036399841,
0.1530202478170395,
-0.34241166710853577,
-0.0518517792224884,
0.3579198122024536,
0.1775650680065155,
0.16343067586421967,
-0.13498154282569885,
0.5972633957862854,
0.37969017028808594,
-0.1333613246679306,
-0.1501367837190628,
0.0315365307033062,
-0.029125474393367767,
0.11529767513275146,
0.30553877353668213,
-0.13123485445976257,
0.5770278573036194,
0.21767105162143707,
-0.045781541615724564,
0.020842313766479492,
0.32467973232269287,
0.10053643584251404,
0.4056609570980072,
-0.09118592739105225,
0.6197231411933899,
-0.06999766826629639,
-0.048444993793964386,
-0.17394450306892395,
0.35658183693885803,
-0.08375216275453568,
-0.5131560564041138,
0.2515105605125427,
0.10666850209236145,
0.1350332796573639,
-0.15128973126411438,
0.01786673814058304,
0.22255556285381317,
0.268657922744751,
0.4711596369743347,
-0.13436147570610046,
-0.2690734267234802,
0.05074508488178253,
-0.511595606803894,
-0.12647473812103271,
-0.03561807796359062,
0.3229285478591919,
0.11365903913974762,
0.27079054713249207,
-0.1965159773826599,
-0.2451731115579605,
0.03462589532136917,
0.35832613706588745,
-0.3217097222805023,
0.14137864112854004,
-0.10820402204990387,
-0.10675327479839325,
0.10848572850227356,
-0.3638283610343933,
0.002901500090956688,
-0.2151777446269989,
0.17266936600208282,
-0.10262111574411392,
-0.06470132619142532,
0.018573161214590073,
-0.05720336362719536,
-0.04641638696193695,
-0.03124157339334488,
0.2724283039569855,
0.24845299124717712,
0.2172427773475647,
0.15459129214286804,
-0.13131697475910187,
-0.27477842569351196,
-0.28400304913520813,
-0.05270906537771225,
0.1469118744134903,
-0.09592987596988678,
0.5024646520614624,
-0.10467652976512909,
-0.20114485919475555,
-0.011319293640553951,
0.10620125383138657,
-0.10155096650123596,
-0.14855769276618958,
-0.4444882571697235,
0.2014974057674408,
0.009802401065826416,
0.3707433342933655,
0.03371839225292206,
0.14855435490608215,
-0.04488617926836014,
0.23991374671459198,
-0.07038164883852005,
-0.26028746366500854,
0.244888037443161,
-0.10229881852865219,
-0.25920039415359497,
-0.1338711977005005,
0.11957942694425583,
-0.07966158539056778,
-0.29675641655921936,
-0.4334023594856262,
-0.13713693618774414,
0.3991451859474182,
-0.08967053890228271,
-0.3050651252269745,
-0.026810213923454285,
-0.14464253187179565,
0.162164568901062,
-0.22347193956375122,
0.03260323777794838,
0.0031326450407505035,
-0.07134275883436203,
0.07496505975723267,
-0.3798719644546509
] |
https://github.com/huggingface/datasets/issues/5150 | Problems after upgrading to 2.6.1 | I am also receiving this error on Sagemaker but not locally, I have noticed that this occurs when the `.dataset/` folder does not contain a single file like:
`dataset.arrow`
but instead contains multiple files like:
`data-00000-of-00002.arrow`
`data-00001-of-00002.arrow`
I think that it may have something to do with this recent PR that updated the behaviour of `dataset.save_to_disk` by introducing sharding: https://github.com/huggingface/datasets/pull/5268
For now I can get around this by forcing datasets==2.8.0 on machine that creates dataset and in the huggingface instance for training (by running this at the start of training script `os.system("pip install datasets==2.8.0")`)
To ensure the dataset is a single shard when saving the dataset locally:
```python3
dataset.flatten_indices().save_to_disk('path/to/dataset', num_shards=1)
```
and then manually changing the name afterwards from `path/to/dataset/data-00000-of-00001.arrow` to `path/to/dataset/dataset.arrow` and updating the `path/to/dataset/state.json` to reflect this name change. i.e. by changing `state.json` to this:
```javascript
{
"_data_files": [
{
"filename": "dataset.arrow"
}
],
"_fingerprint": "420086f0636f8727",
"_format_columns": null,
"_format_kwargs": {},
"_format_type": null,
"_output_all_columns": false,
"_split": null
}
``` | ### Describe the bug
Loading a dataset_dict from disk with `load_from_disk` is now creating a `KeyError "length"` that was not occurring in v2.5.2.
Context:
- Each individual dataset in the dict is created with `Dataset.from_pandas`
- The dataset_dict is create from a dict of `Dataset`s, e.g., `DatasetDict({"train": train_ds, "validation": val_ds})
- The pandas dataframe, besides text columns, has a column with a dictionary inside and potentially different keys in each row. Correctly the `Dataset.from_pandas` function adds `key: None` to all dictionaries in each row so that the schema can be correctly inferred.
### Steps to reproduce the bug
Steps to reproduce:
- Upgrade to datasets==2.6.1
- Create a dataset from pandas dataframe with `Dataset.from_pandas`
- Create a dataset_dict from a dict of `Dataset`s, e.g., `DatasetDict({"train": train_ds, "validation": val_ds})
- Save to disk with the `save` function
### Expected behavior
Same as in v2.5.2, that is load from disk without errors
### Environment info
- `datasets` version: 2.6.1
- Platform: Linux-5.4.209-129.367.amzn2int.x86_64-x86_64-with-glibc2.26
- Python version: 3.9.13
- PyArrow version: 9.0.0
- Pandas version: 1.5.1 | 160 | Problems after upgrading to 2.6.1
### Describe the bug
Loading a dataset_dict from disk with `load_from_disk` is now creating a `KeyError "length"` that was not occurring in v2.5.2.
Context:
- Each individual dataset in the dict is created with `Dataset.from_pandas`
- The dataset_dict is create from a dict of `Dataset`s, e.g., `DatasetDict({"train": train_ds, "validation": val_ds})
- The pandas dataframe, besides text columns, has a column with a dictionary inside and potentially different keys in each row. Correctly the `Dataset.from_pandas` function adds `key: None` to all dictionaries in each row so that the schema can be correctly inferred.
### Steps to reproduce the bug
Steps to reproduce:
- Upgrade to datasets==2.6.1
- Create a dataset from pandas dataframe with `Dataset.from_pandas`
- Create a dataset_dict from a dict of `Dataset`s, e.g., `DatasetDict({"train": train_ds, "validation": val_ds})
- Save to disk with the `save` function
### Expected behavior
Same as in v2.5.2, that is load from disk without errors
### Environment info
- `datasets` version: 2.6.1
- Platform: Linux-5.4.209-129.367.amzn2int.x86_64-x86_64-with-glibc2.26
- Python version: 3.9.13
- PyArrow version: 9.0.0
- Pandas version: 1.5.1
I am also receiving this error on Sagemaker but not locally, I have noticed that this occurs when the `.dataset/` folder does not contain a single file like:
`dataset.arrow`
but instead contains multiple files like:
`data-00000-of-00002.arrow`
`data-00001-of-00002.arrow`
I think that it may have something to do with this recent PR that updated the behaviour of `dataset.save_to_disk` by introducing sharding: https://github.com/huggingface/datasets/pull/5268
For now I can get around this by forcing datasets==2.8.0 on machine that creates dataset and in the huggingface instance for training (by running this at the start of training script `os.system("pip install datasets==2.8.0")`)
To ensure the dataset is a single shard when saving the dataset locally:
```python3
dataset.flatten_indices().save_to_disk('path/to/dataset', num_shards=1)
```
and then manually changing the name afterwards from `path/to/dataset/data-00000-of-00001.arrow` to `path/to/dataset/dataset.arrow` and updating the `path/to/dataset/state.json` to reflect this name change. i.e. by changing `state.json` to this:
```javascript
{
"_data_files": [
{
"filename": "dataset.arrow"
}
],
"_fingerprint": "420086f0636f8727",
"_format_columns": null,
"_format_kwargs": {},
"_format_type": null,
"_output_all_columns": false,
"_split": null
}
``` | [
-0.07980580627918243,
0.24414852261543274,
0.05264817550778389,
0.5432548522949219,
0.21042606234550476,
0.1146877333521843,
0.36532264947891235,
0.3461959660053253,
0.160641610622406,
0.21888881921768188,
0.3294399380683899,
0.194667786359787,
-0.2083081752061844,
-0.0751354992389679,
-0.17615894973278046,
-0.015415698289871216,
0.2490946650505066,
0.02696501463651657,
-0.09728014469146729,
0.16977621614933014,
-0.3783060908317566,
0.26781636476516724,
-0.1457299292087555,
0.1823042631149292,
-0.4165806472301483,
-0.08536027371883392,
-0.38164082169532776,
0.22799301147460938,
0.027983389794826508,
-0.6785517334938049,
0.31947922706604004,
-0.16577467322349548,
0.10188117623329163,
0.29409387707710266,
-0.00012821471318602562,
0.018564939498901367,
0.17048197984695435,
-0.025873353704810143,
-0.456464022397995,
-0.3285163640975952,
-0.1451977789402008,
0.010871119797229767,
0.4595094621181488,
-0.07728245854377747,
0.2823624312877655,
-0.10963280498981476,
-0.32418152689933777,
-0.378377228975296,
0.15081657469272614,
0.48790866136550903,
0.10293169319629669,
-0.10990971326828003,
0.07928173243999481,
-0.4415024220943451,
-0.10614673048257828,
0.1381409466266632,
0.10144811123609543,
0.25748419761657715,
-0.09442700445652008,
-0.025300709530711174,
-0.1907157301902771,
0.2926710546016693,
0.19471898674964905,
-0.0172729529440403,
0.305325448513031,
-0.04651866480708122,
0.31168535351753235,
-0.3569556176662445,
0.312541127204895,
0.26278212666511536,
0.2020789384841919,
-0.25596433877944946,
-0.40778765082359314,
-0.40792185068130493,
0.31989622116088867,
0.17343473434448242,
0.4537722170352936,
-0.16994109749794006,
0.05560893192887306,
0.14585858583450317,
0.01587744988501072,
-0.27886825799942017,
-0.17880576848983765,
-0.23195989429950714,
-0.16335038840770721,
-0.3228869140148163,
0.0014769118279218674,
0.14464350044727325,
0.15490520000457764,
-0.16145801544189453,
0.2307446449995041,
-0.18930192291736603,
-0.3373154103755951,
0.18402312695980072,
-0.086763396859169,
0.03500889986753464,
0.25300443172454834,
-0.09958856552839279,
0.051238179206848145,
-0.46833866834640503,
-0.06330756098031998,
-0.29461055994033813,
0.07910379022359848,
-0.11745769530534744,
0.38605940341949463,
0.1355358213186264,
0.4725682735443115,
0.08215877413749695,
0.014842044562101364,
0.1305670589208603,
-0.01147821731865406,
0.017411619424819946,
-0.14627179503440857,
-0.23559007048606873,
0.24987198412418365,
-0.021126076579093933,
0.22495390474796295,
-0.06565660238265991,
-0.18846428394317627,
0.39143800735473633,
-0.06073598191142082,
-0.1332765370607376,
0.11615371704101562,
0.17607204616069794,
0.16412365436553955,
0.4878532588481903,
-0.02235289290547371,
0.14386790990829468,
-0.06658867001533508,
0.17665061354637146,
-0.21531730890274048,
0.31753912568092346,
-0.22060663998126984,
-0.22219237685203552,
-0.01680673658847809,
-0.30025815963745117,
0.02478198893368244,
0.07506901770830154,
0.17725160717964172,
-0.18670479953289032,
-0.5469076633453369,
-0.1098601371049881,
0.041570574045181274,
0.24082747101783752,
-0.1431003361940384,
0.17932242155075073,
0.20480002462863922,
-0.1173790767788887,
-0.22464674711227417,
0.25661391019821167,
-0.18271788954734802,
-0.08078201860189438,
-0.15284191071987152,
0.10200314223766327,
-0.1768433153629303,
0.10552641749382019,
-0.10138127952814102,
0.05536050349473953,
0.22833016514778137,
-0.318398654460907,
-0.12118998914957047,
-0.2502477765083313,
-0.25243625044822693,
-0.26241737604141235,
-0.06393014639616013,
0.5843073129653931,
-0.6615064740180969,
-0.12800538539886475,
-0.00004061823710799217,
-0.1128406822681427,
-0.10776115208864212,
0.02464250847697258,
-0.141947939991951,
0.11783024668693542,
-0.2900131940841675,
0.13518433272838593,
0.5519391298294067,
-0.21306519210338593,
-0.6281225085258484,
0.38708847761154175,
-0.1062036007642746,
0.14241153001785278,
0.08058851957321167,
-0.056876249611377716,
0.4561384320259094,
-0.040162838995456696,
0.309476375579834,
0.050106823444366455,
-0.09094379097223282,
0.060321077704429626,
-0.30880653858184814,
-0.347924143075943,
-0.007174354046583176,
-0.12996169924736023,
0.31388455629348755,
0.06770854443311691,
0.11090751737356186,
-0.0835239589214325,
0.15602996945381165,
-0.01814364269375801,
0.15525732934474945,
0.24863748252391815,
-0.016788307577371597,
-0.05184474587440491,
0.18297529220581055,
-0.23490795493125916,
-0.42556411027908325,
0.4078626334667206,
-0.028000470250844955,
0.0021267831325531006,
-0.10742820799350739,
0.032708168029785156,
-0.3399781584739685,
0.24407412111759186,
-0.31074288487434387,
-0.12917229533195496,
-0.09883680939674377,
-0.06616614758968353,
0.050326909869909286,
0.16786912083625793,
-0.17481985688209534,
-0.039737410843372345,
-0.15181204676628113,
0.13279566168785095,
-0.007665278390049934,
0.26262468099594116,
-0.1557554304599762,
-0.03808740898966789,
-0.2897648215293884,
0.041366010904312134,
0.1942409873008728,
0.05591471120715141,
-0.3480100929737091,
0.4197768568992615,
0.34849435091018677,
0.014854788780212402,
-0.20062047243118286,
-0.14381279051303864,
0.3946646451950073,
0.3698340654373169,
0.35998380184173584,
0.20997709035873413,
0.02691100910305977,
-0.0652095228433609,
-0.3533228039741516,
0.460202157497406,
0.11201322078704834,
0.54730224609375,
0.0928644984960556,
0.12369268387556076,
0.3193899095058441,
0.14152929186820984,
0.15874271094799042,
-0.3928588628768921,
-0.15408380329608917,
-0.044545602053403854,
0.020074889063835144,
0.2602786421775818,
0.17639465630054474,
0.05875925347208977,
0.4382992088794708,
0.066994309425354,
-0.01029670238494873,
0.3504716753959656,
-0.25928667187690735,
-0.3133634626865387,
-0.04540446400642395,
0.8372777700424194,
0.3512333631515503,
0.03728342428803444,
-0.0043947212398052216,
-0.214406356215477,
-0.07885555177927017,
-0.04014332965016365,
0.11077873408794403,
-0.004118494689464569,
0.28180402517318726,
0.3657850921154022,
0.04136160761117935,
0.135184645652771,
-0.1444544494152069,
-0.10012155771255493,
0.023285137489438057,
0.3185276985168457,
-0.4349052608013153,
0.014142313972115517,
-0.13722044229507446,
-0.043407343327999115,
0.14423760771751404,
-0.13508491218090057,
-0.0535849891602993,
-0.3965725898742676,
-0.13061729073524475,
-0.018626820296049118,
-0.16711686551570892,
0.1285342127084732,
0.005364991724491119,
0.14574968814849854,
0.23253856599330902,
0.12164874374866486,
0.05545195937156677,
-0.2324005514383316,
0.01016606017947197,
-0.055340930819511414,
-0.02883126214146614,
-0.23623968660831451,
0.024526482447981834,
0.09334561228752136,
-0.14232860505580902,
-0.18427933752536774,
-0.34031790494918823,
0.13220170140266418,
-0.05995716154575348,
0.09508390724658966,
0.3978758156299591,
0.11685550212860107,
0.151469424366951,
-0.1446714699268341,
0.22012928128242493,
0.02918401174247265,
-0.2796902656555176,
0.47637951374053955,
0.12848234176635742,
0.07462634891271591,
-0.17171373963356018,
-0.18438482284545898,
-0.0593448206782341,
-0.3605565130710602,
0.20312370359897614,
0.05961991474032402,
0.19184334576129913,
0.003691053483635187,
0.5255556702613831,
0.051020726561546326,
0.14523571729660034,
0.21302038431167603,
-0.046305205672979355,
-0.1017664223909378,
0.19153107702732086,
0.018684059381484985,
-0.3584250509738922,
0.05613791570067406,
-0.2538429796695709,
0.164387509226799,
0.18698778748512268,
-0.4282605051994324,
-0.20351117849349976,
-0.15934735536575317,
0.168300062417984,
0.20312944054603577,
-0.16767092049121857,
0.46846625208854675,
0.21159692108631134,
0.00024674832820892334,
0.0331885889172554,
-0.11457808315753937,
0.18080934882164001,
0.06814651936292648,
0.15429846942424774,
-0.24557378888130188,
0.8683451414108276,
-0.1456446498632431,
0.2743266820907593,
0.020682502537965775,
0.09320730715990067,
-0.06264014542102814,
-0.1707811951637268,
0.39260685443878174,
-0.32630792260169983,
-0.23414397239685059,
0.016837026923894882,
-0.10445711016654968,
-0.30261075496673584,
0.06247405335307121,
-0.03799910470843315,
0.23943553864955902,
0.10267086327075958,
-0.19313830137252808,
-0.06619353592395782,
-0.19422873854637146,
0.03997279703617096,
-0.6440856456756592,
0.24365204572677612,
-0.03533406928181648,
0.4161934554576874,
0.020477574318647385,
0.27800416946411133,
-0.14198847115039825,
-0.004805870354175568,
0.32101473212242126,
-0.2889019250869751,
-0.10715952515602112,
0.27611812949180603,
-0.4064864218235016,
0.24365922808647156,
0.27549028396606445,
0.2653704881668091,
-0.02394353225827217,
-0.4151376485824585,
0.03221147507429123,
-0.12531575560569763,
0.45066380500793457,
0.15106095373630524,
-0.14869679510593414,
0.4360508322715759,
-0.2536887228488922,
-0.7103555202484131,
-0.1436213105916977,
0.226315438747406,
0.25796157121658325,
0.30590248107910156,
0.3152337670326233,
-0.029299817979335785,
-0.0187551137059927,
0.14278815686702728,
0.1666933000087738,
-0.2989896237850189,
0.08316469192504883,
-0.10387133061885834,
0.002192191779613495,
-0.3418639898300171,
0.09746947884559631,
-0.17179083824157715,
0.40658068656921387,
-0.02119010128080845,
-0.012725699692964554,
-0.09612830728292465,
-0.48839402198791504,
-0.012899547815322876,
0.17036649584770203,
0.36882784962654114,
-0.2858799397945404,
0.39378368854522705,
0.1335170567035675,
-0.09513305127620697,
0.5230470299720764,
0.29115667939186096,
-0.3146604001522064,
-0.5918424725532532,
0.024014143273234367,
-0.28596338629722595,
0.014124415814876556,
0.3099745512008667,
-0.398335725069046,
0.05404633656144142,
-0.16968828439712524,
0.12552519142627716,
-0.2062724530696869,
0.022289032116532326,
0.30392953753471375,
-0.17844729125499725,
-0.2422078251838684,
-0.43732115626335144,
0.13342857360839844,
-0.05168706551194191,
-0.17668059468269348,
0.3005961775779724,
0.29718685150146484,
-0.316295862197876,
0.31841182708740234,
0.009063869714736938,
0.5782496929168701,
0.05869501084089279,
0.25884291529655457,
0.31817981600761414,
-0.21886666119098663,
0.2862585484981537,
0.5380403399467468,
-0.11742480099201202,
-0.5079488754272461,
0.06720834225416183,
0.10763756930828094,
-0.022520069032907486,
0.06252457946538925,
0.015040997415781021,
-0.055329579859972,
0.18499864637851715,
-0.3867456912994385,
-0.13934192061424255,
-0.2705393135547638,
0.05642102658748627,
-0.4096892476081848,
-0.13603389263153076,
0.018223358318209648,
-0.011323194950819016,
0.033052701503038406,
-0.11004781723022461,
-0.0017300723120570183,
0.08803952485322952,
0.040413837879896164,
-0.5686277151107788,
-0.46774226427078247,
0.18222099542617798,
-0.05071690306067467,
0.33483821153640747,
-0.003558240830898285,
-0.45049160718917847,
0.2581171989440918,
0.35112425684928894,
0.21298518776893616,
0.023898446932435036,
0.02612488344311714,
0.24511243402957916,
-0.22381389141082764,
0.17410783469676971,
0.09231259673833847,
0.1538403481245041,
0.14243896305561066,
0.21024683117866516,
0.03631629794836044,
-0.23524209856987,
-0.3049086034297943,
-0.10818475484848022,
-0.2730904817581177,
0.16767126321792603,
0.17493167519569397,
-0.3896750509738922,
-0.14734072983264923,
-0.3739931583404541,
-0.18555070459842682,
-0.41286587715148926,
0.002142166718840599,
0.1953764110803604,
0.01929502934217453,
0.23176619410514832,
-0.36984190344810486,
-0.35190850496292114,
-0.026030655950307846,
0.6432094573974609,
0.0905880331993103,
-0.29161423444747925,
0.47665876150131226,
-0.11550973355770111,
-0.1741485297679901,
-0.12766145169734955,
0.14138728380203247,
0.1286052167415619,
-0.2069949507713318,
0.5990029573440552,
-0.023417094722390175,
-0.08381052315235138,
-0.12483487278223038,
0.22479534149169922,
0.1850828230381012,
0.3052580952644348,
-0.03373075649142265,
-0.1889694333076477,
-0.4735651910305023,
0.3108583688735962,
-0.09791241586208344,
0.2984742522239685,
-0.10357164591550827,
-0.24732021987438202,
-0.10848608613014221,
0.025173628702759743,
-0.131710484623909,
0.15958452224731445,
0.07331030070781708,
-0.04110003262758255,
0.34247297048568726,
0.032179731875658035,
0.18698368966579437,
-0.262282133102417,
0.005135379731655121,
-0.06428217142820358,
0.17382803559303284,
-0.00001679360866546631,
-0.19962848722934723,
0.13798895478248596,
-0.019341997802257538,
0.25066110491752625,
-0.06913115829229355,
-0.2315235584974289,
-0.04110220447182655,
-0.13601264357566833,
0.20062676072120667,
0.31988319754600525,
-0.1355196088552475,
0.32358318567276,
0.20178399980068207,
0.27842703461647034,
0.28911375999450684,
0.3967416286468506,
-0.21343442797660828,
0.4350980520248413,
0.07967553287744522,
0.2645941972732544,
-0.13675114512443542,
-0.06447020173072815,
-0.2973159849643707,
0.3027666509151459,
-0.2663373351097107,
-0.08390071988105774,
0.33354324102401733,
-0.1518634855747223,
0.1373603492975235,
0.3179547190666199,
0.3840683102607727,
0.5309225916862488,
-0.23154814541339874,
-0.017320673912763596,
-0.05072567239403725,
0.12610268592834473,
-0.22036048769950867,
-0.23340068757534027,
-0.09030395746231079,
-0.043295565992593765,
-0.19258636236190796,
0.0031040459871292114,
-0.2841287851333618,
-0.3483264446258545,
-0.3157317042350769,
0.16791847348213196,
0.38974273204803467,
-0.05009370297193527,
0.1822442263364792,
0.8485047817230225,
-0.11528600752353668,
0.03992125391960144,
0.46582114696502686,
0.07973967492580414,
0.18806597590446472,
0.8142356276512146,
-0.24615240097045898,
0.3598431944847107,
-0.023009978234767914,
0.09458896517753601,
0.09670129418373108,
-0.4408531188964844,
0.24352306127548218,
0.06191988289356232,
-0.268571138381958,
-0.3577136993408203,
0.1535021960735321,
0.08560509979724884,
-0.1738649606704712,
-0.12466176599264145,
-0.154607892036438,
0.052506644278764725,
-0.24421685934066772,
-0.16766144335269928,
0.03837588429450989,
-0.19529353082180023,
0.15813259780406952,
0.03973633423447609,
-0.12064726650714874,
0.10190898925065994,
0.13478399813175201,
0.10847821086645126,
-0.07682155072689056,
-0.26945415139198303,
0.029126962646842003,
0.07639937847852707,
0.11771675944328308,
-0.39297446608543396,
-0.02259858138859272,
0.4084809422492981,
0.14150846004486084,
0.165296733379364,
-0.011722145602107048,
0.5649968981742859,
0.356055349111557,
-0.05760392174124718,
-0.12044926732778549,
0.0027078958228230476,
-0.03162017837166786,
0.098177969455719,
0.1442815363407135,
-0.09781953692436218,
0.5330822467803955,
0.2960086464881897,
-0.02826530486345291,
0.02724405750632286,
0.3374733626842499,
0.11796270310878754,
0.31195199489593506,
-0.09378276765346527,
0.5552687048912048,
-0.09148429334163666,
-0.13429591059684753,
-0.1570596992969513,
0.3588462769985199,
-0.190005362033844,
-0.5106353759765625,
0.3072076141834259,
0.05452217161655426,
0.10214661806821823,
-0.14680112898349762,
0.016131021082401276,
0.2064095437526703,
0.3104041516780853,
0.46887269616127014,
-0.13470086455345154,
-0.31845661997795105,
-0.04820416495203972,
-0.5645974278450012,
-0.16299968957901,
-0.07155586779117584,
0.3793625235557556,
0.07441113144159317,
0.3438977301120758,
-0.21752333641052246,
-0.2646111249923706,
0.13819025456905365,
0.32874253392219543,
-0.38050663471221924,
0.11593751609325409,
-0.14402835071086884,
-0.04704127088189125,
0.17550471425056458,
-0.3046211302280426,
0.06013088673353195,
-0.27935537695884705,
0.1554720401763916,
-0.04982282221317291,
-0.07883556187152863,
0.07552167028188705,
-0.12754371762275696,
-0.028215596452355385,
-0.11186103522777557,
0.304641991853714,
0.18071161210536957,
0.155156210064888,
0.12572914361953735,
-0.19809767603874207,
-0.2766568958759308,
-0.2763155400753021,
-0.049457818269729614,
0.263683557510376,
0.0009823814034461975,
0.48257890343666077,
-0.1900663822889328,
-0.12266866862773895,
-0.12035153806209564,
0.008472148329019547,
-0.14738275110721588,
-0.12134145200252533,
-0.4499727487564087,
0.23649534583091736,
-0.007051486521959305,
0.35776445269584656,
0.08444631099700928,
0.09457462280988693,
-0.03941559046506882,
0.17103223502635956,
-0.08962412178516388,
-0.2724657952785492,
0.2874932289123535,
-0.015466401353478432,
-0.2615470886230469,
-0.053143955767154694,
0.13463467359542847,
-0.10279443114995956,
-0.2060984969139099,
-0.3667773902416229,
-0.1481308490037918,
0.43343380093574524,
-0.0215349942445755,
-0.3576110303401947,
-0.1304834932088852,
-0.14343887567520142,
0.10697470605373383,
-0.2024407684803009,
0.04217036813497543,
-0.010400034487247467,
-0.052428875118494034,
0.03545244410634041,
-0.4325748085975647
] |
https://github.com/huggingface/datasets/issues/5148 | Cannot find the rvl_cdip dataset | Hi, @santule.
We have transferred all dataset scripts from GitHub to the Hugging Face Hub: https://huggingface.co/datasets
- Concretely, you have "rvl_cdip" here: https://huggingface.co/datasets/rvl_cdip
To be able to load them, you should update your `datasets` library:
```
pip install -U datasets
``` | Hi,
I am trying to use load_dataset to load the official "rvl_cdip" dataset but getting an error.
dataset = load_dataset("rvl_cdip")
Couldn't find 'rvl_cdip' on the Hugging Face Hub either: FileNotFoundError: Couldn't find the file at https://raw.githubusercontent.com/huggingface/datasets/master/datasets/rvl_cdip/rvl_cdip.py
Regards,
| 41 | Cannot find the rvl_cdip dataset
Hi,
I am trying to use load_dataset to load the official "rvl_cdip" dataset but getting an error.
dataset = load_dataset("rvl_cdip")
Couldn't find 'rvl_cdip' on the Hugging Face Hub either: FileNotFoundError: Couldn't find the file at https://raw.githubusercontent.com/huggingface/datasets/master/datasets/rvl_cdip/rvl_cdip.py
Regards,
Hi, @santule.
We have transferred all dataset scripts from GitHub to the Hugging Face Hub: https://huggingface.co/datasets
- Concretely, you have "rvl_cdip" here: https://huggingface.co/datasets/rvl_cdip
To be able to load them, you should update your `datasets` library:
```
pip install -U datasets
``` | [
-0.2679835259914398,
-0.46425873041152954,
-0.040703002363443375,
0.3554813265800476,
0.40039342641830444,
0.05472875386476517,
0.021672584116458893,
-0.02923392876982689,
0.08704401552677155,
0.1289827823638916,
-0.05772294104099274,
0.261880487203598,
-0.0781291276216507,
0.10516364127397537,
0.23702475428581238,
-0.20384341478347778,
-0.013956770300865173,
0.16149798035621643,
0.01056063175201416,
-0.12119781225919724,
-0.013119203969836235,
0.34880325198173523,
-0.07264019548892975,
0.21988627314567566,
-0.28033459186553955,
0.214769646525383,
0.09364758431911469,
0.3679593503475189,
-0.3703099489212036,
-0.38472655415534973,
0.5337104201316833,
0.11280994117259979,
0.3906915783882141,
0.41674551367759705,
-0.00011166978947585449,
-0.03128092363476753,
0.21326836943626404,
-0.06157015264034271,
-0.21776269376277924,
-0.5262987017631531,
-0.07259704917669296,
-0.3361768424510956,
0.1290559470653534,
0.01256505399942398,
-0.24238744378089905,
-0.4027717411518097,
0.06562519073486328,
0.0677403137087822,
0.26662176847457886,
0.13518008589744568,
0.23621965944766998,
0.47812631726264954,
0.05395084246993065,
-0.1681862473487854,
0.06155619025230408,
0.020327772945165634,
0.06857798248529434,
0.5057759284973145,
0.038856010884046555,
-0.14543993771076202,
0.2419431507587433,
0.26468050479888916,
0.031863220036029816,
-0.27315062284469604,
0.5666241645812988,
0.12492550164461136,
-0.27444028854370117,
-0.18815553188323975,
0.11905071884393692,
0.1459757387638092,
0.3788408935070038,
-0.305570513010025,
-0.17676864564418793,
-0.012717101722955704,
0.08671583235263824,
-0.30876949429512024,
0.009461238980293274,
0.08141522854566574,
-0.057011861354112625,
0.08851300179958344,
-0.39798855781555176,
-0.3758796751499176,
0.08757559955120087,
0.051669079810380936,
0.03616352379322052,
0.13505369424819946,
-0.11437901109457016,
-0.009294070303440094,
0.37562596797943115,
-0.09119860827922821,
-0.20207622647285461,
0.27572041749954224,
-0.13760995864868164,
0.12184068560600281,
-0.2215421050786972,
0.10261876881122589,
-0.0064079612493515015,
0.6094945073127747,
0.09739915281534195,
0.5149465799331665,
0.21384702622890472,
-0.12198164314031601,
-0.1918286234140396,
0.07512010633945465,
0.15341012179851532,
0.21703992784023285,
0.1178683191537857,
0.31024351716041565,
0.10263144969940186,
0.12160857766866684,
0.17961086332798004,
-0.09909570962190628,
-0.3086763024330139,
-0.03503107279539108,
-0.13917918503284454,
-0.09895201772451401,
0.022115103900432587,
-0.13171228766441345,
-0.2924990952014923,
-0.0682731568813324,
0.22330760955810547,
-0.03271113336086273,
0.33683499693870544,
0.5236921310424805,
0.1194484680891037,
0.24704769253730774,
0.06682000309228897,
0.10966941714286804,
-0.20584282279014587,
-0.1479126662015915,
-0.2998744249343872,
0.22305701673030853,
-0.10071504861116409,
-0.017949337139725685,
0.09115748107433319,
-0.5060257315635681,
0.4542795717716217,
-0.10589853674173355,
0.15400312840938568,
0.09000524878501892,
-0.24261212348937988,
0.20494699478149414,
-0.05741196125745773,
0.258735716342926,
0.05715078487992287,
-0.026218483224511147,
0.1870480179786682,
-0.08962060511112213,
-0.2327081859111786,
0.028197627514600754,
-0.2699732184410095,
-0.1322970986366272,
-0.04500769078731537,
0.18171268701553345,
-0.350802481174469,
-0.15599700808525085,
-0.24962455034255981,
-0.04427250102162361,
-0.25547394156455994,
-0.2666279673576355,
0.13061200082302094,
-0.04459656774997711,
-0.07620935887098312,
-0.04748748242855072,
0.3735294044017792,
0.44332355260849,
-0.1530517041683197,
-0.2563261389732361,
0.0331326425075531,
-0.16716596484184265,
-0.11946370452642441,
0.08709438890218735,
-0.13948149979114532,
0.07758589088916779,
-0.43803122639656067,
-0.3076372742652893,
0.18004406988620758,
-0.5738372802734375,
-0.5481203198432922,
0.016773631796240807,
-0.028498779982328415,
-0.06485386192798615,
-0.026531629264354706,
0.1355215162038803,
-0.24821415543556213,
0.032145049422979355,
-0.05224710702896118,
-0.06633474677801132,
-0.015855615958571434,
-0.08859805762767792,
-0.04334237053990364,
-0.1622759848833084,
-0.00021594762802124023,
0.1459893137216568,
-0.1274639219045639,
0.07088562846183777,
0.018760211765766144,
-0.2626509666442871,
0.2077939212322235,
0.1297840178012848,
-0.13144198060035706,
0.18023407459259033,
0.38219255208969116,
0.047598451375961304,
0.09420846402645111,
-0.11316326260566711,
-0.21973663568496704,
0.11508133262395859,
0.14078418910503387,
0.013889405876398087,
-0.05732929706573486,
-0.0954132080078125,
-0.5541045665740967,
-0.004482921212911606,
-0.1364588886499405,
-0.1230107992887497,
0.010782383382320404,
0.1434895247220993,
0.2899310290813446,
0.004141423851251602,
-0.40955594182014465,
0.5390599966049194,
-0.06369255483150482,
0.2153414636850357,
-0.667711615562439,
0.4096720218658447,
0.1262628585100174,
0.2175193876028061,
0.08248809725046158,
0.2971431314945221,
-0.046934738755226135,
0.018732130527496338,
0.1150004044175148,
0.4241754412651062,
-0.07258708029985428,
0.295230507850647,
0.43256571888923645,
-0.0018993914127349854,
0.14305227994918823,
-0.618382453918457,
-0.08303503692150116,
0.01590430736541748,
0.10476838797330856,
0.33911386132240295,
-0.08440462499856949,
0.12433458864688873,
-0.29064634442329407,
0.08189993351697922,
0.12036016583442688,
0.11035431176424026,
0.13100726902484894,
-0.00446295365691185,
-0.25765979290008545,
-0.2312481701374054,
0.3872198462486267,
0.18161922693252563,
0.6823829412460327,
-0.07771650701761246,
-0.1793191134929657,
-0.03427746146917343,
0.11455927044153214,
-0.1114901751279831,
0.10742847621440887,
0.14361724257469177,
-0.25033652782440186,
0.24164509773254395,
-0.11201377213001251,
0.29534631967544556,
0.2812790274620056,
0.26909303665161133,
-0.05562524124979973,
0.11093978583812714,
0.03793373331427574,
-0.05556285381317139,
0.15319529175758362,
-0.06346957385540009,
-0.24999861419200897,
0.09842710942029953,
-0.05459604039788246,
-0.11553920060396194,
-0.35589084029197693,
-0.14420229196548462,
-0.26202481985092163,
0.32719260454177856,
-0.09337106347084045,
0.10798906534910202,
-0.12918686866760254,
-0.039306413382291794,
-0.12509489059448242,
-0.5062012672424316,
-0.4611543118953705,
-0.31638261675834656,
-0.10499335825443268,
-0.13481365144252777,
0.24433711171150208,
0.11476602405309677,
-0.17916753888130188,
0.259944349527359,
-0.10579822212457657,
-0.0633011981844902,
-0.2738761305809021,
-0.2437688112258911,
-0.22790372371673584,
0.06009731814265251,
-0.014591822400689125,
0.007404017727822065,
0.33581674098968506,
-0.42140114307403564,
0.32257699966430664,
-0.22474566102027893,
-0.25295940041542053,
0.1790473610162735,
-0.15475788712501526,
0.3147532641887665,
0.39454907178878784,
0.044554632157087326,
-0.15042316913604736,
-0.04976322874426842,
0.2508961856365204,
-0.29051733016967773,
-0.13750001788139343,
-0.06633493304252625,
-0.14622549712657928,
0.004889362957328558,
-0.07787847518920898,
-0.2518536150455475,
-0.3574593663215637,
-0.35814809799194336,
0.1883975863456726,
0.023141968995332718,
-0.10006316006183624,
0.227757066488266,
0.013292917050421238,
0.06137888506054878,
-0.043218616396188736,
-0.18846873939037323,
-0.1924658715724945,
-0.5109874606132507,
0.3095073699951172,
-0.31363341212272644,
-0.20569314062595367,
0.03514258190989494,
-0.11759395152330399,
0.46136176586151123,
-0.07171998918056488,
-0.3497498631477356,
-0.25199219584465027,
-0.13231252133846283,
0.008525967597961426,
0.009128794074058533,
0.31216946244239807,
-0.08343780040740967,
-0.04198428988456726,
0.02784949727356434,
0.05591057986021042,
-0.2360185831785202,
-0.07173597067594528,
-0.08832678943872452,
0.2703996002674103,
0.015392852015793324,
0.011590352281928062,
-0.21032358705997467,
0.4102962017059326,
0.18856331706047058,
-0.056647177785634995,
0.33779045939445496,
-0.22426798939704895,
0.5860984325408936,
-0.10285774618387222,
-0.49487918615341187,
-0.30026012659072876,
0.24167536199092865,
0.17651931941509247,
0.280656099319458,
0.21324115991592407,
0.23572644591331482,
-0.35669979453086853,
-0.22519832849502563,
-0.19011586904525757,
-0.09353938698768616,
-0.1783430427312851,
0.19502253830432892,
0.15502101182937622,
0.02708112820982933,
0.13908568024635315,
-0.1952764093875885,
-0.28487253189086914,
0.07905995845794678,
0.42319589853286743,
0.08951202034950256,
0.24123021960258484,
-0.49837687611579895,
-0.170919269323349,
-0.40018534660339355,
0.3589508831501007,
-0.09508448094129562,
0.05122242495417595,
-0.041107214987277985,
-0.01086241751909256,
0.0504324808716774,
0.004355056677013636,
0.40819352865219116,
0.0015078447759151459,
0.06532582640647888,
-0.19226481020450592,
-0.16733810305595398,
-0.20570971071720123,
0.1714116930961609,
0.16937370598316193,
-0.057275719940662384,
-0.10787834227085114,
0.4305194616317749,
-0.26812049746513367,
-0.06602686643600464,
0.28648990392684937,
0.09221605211496353,
-0.2996542453765869,
-0.17258229851722717,
-0.4747198522090912,
-0.2593316435813904,
0.004818407818675041,
-0.1668933629989624,
-0.16684749722480774,
0.2588249742984772,
-0.11365138739347458,
0.42253440618515015,
0.17714308202266693,
-0.2880248725414276,
0.320528507232666,
0.20524513721466064,
0.6216826438903809,
-0.10400284826755524,
0.06032368913292885,
0.629296064376831,
0.09051314741373062,
-0.021298309788107872,
0.8736110925674438,
-0.0660429447889328,
-0.4565340280532837,
0.10229326039552689,
0.14659835398197174,
0.3943098485469818,
0.21586927771568298,
-0.12245909869670868,
-0.11035942286252975,
0.19310033321380615,
0.21703876554965973,
-0.4532241225242615,
-0.01168057881295681,
-0.013263989239931107,
0.10321131348609924,
-0.18101970851421356,
-0.5099681615829468,
0.2917487323284149,
0.034288618713617325,
0.166992649435997,
0.12894481420516968,
0.4322235584259033,
-0.096929632127285,
0.14281463623046875,
-0.2156704068183899,
1.0000050067901611,
0.06922220438718796,
0.10539425909519196,
0.1921752393245697,
0.009002983570098877,
0.6199789643287659,
-0.1710696518421173,
-0.0135489571839571,
-0.42000913619995117,
-0.0413348414003849,
-0.10100831836462021,
0.013442311435937881,
0.10523609071969986,
-0.0543292835354805,
-0.11662517488002777,
0.4679029583930969,
-0.017428845167160034,
-0.024712827056646347,
-0.11179810762405396,
0.29754897952079773,
-0.3847731649875641,
0.09697756171226501,
-0.21878297626972198,
0.11061108112335205,
-0.09401676058769226,
0.5139157176017761,
-0.13932397961616516,
-0.15328237414360046,
-0.29146599769592285,
-0.3367636799812317,
-0.16649116575717926,
-0.055079974234104156,
-0.0362173356115818,
0.1352270245552063,
0.21933859586715698,
-0.3837151527404785,
-0.21043570339679718,
0.6045549511909485,
0.5093808770179749,
-0.017321307212114334,
-0.4164964258670807,
0.41874125599861145,
-0.3293842375278473,
-0.24295713007450104,
-0.0817260816693306,
0.2527960240840912,
-0.09054990112781525,
0.016178954392671585,
-0.23642954230308533,
0.13957300782203674,
0.15650998055934906,
-0.06818800419569016,
-0.17469768226146698,
0.11605335772037506,
-0.07372556626796722,
-0.15563569962978363,
0.03870568051934242,
0.0003021508455276489,
0.16109830141067505,
0.00998365506529808,
0.07234732806682587,
0.170639768242836,
0.022797441110014915,
-0.38804951310157776,
0.2920849323272705,
-0.31632179021835327,
-0.1809839904308319,
0.20480328798294067,
-0.1488994061946869,
-0.16272872686386108,
0.24837356805801392,
-0.022152895107865334,
-0.03896114230155945,
-0.1834905445575714,
0.0009535551071166992,
0.46816715598106384,
-0.5418450832366943,
-0.08829186856746674,
0.1264609545469284,
0.07263833284378052,
0.20792439579963684,
-0.005795862525701523,
0.17841842770576477,
-0.3709167242050171,
-0.0009878762066364288,
-0.44303011894226074,
-0.4502028822898865,
0.46299970149993896,
0.040093645453453064,
0.11585596203804016,
-0.08965738117694855,
-0.10780884325504303,
-0.002670375630259514,
-0.03247445076704025,
-0.3024302124977112,
0.17894867062568665,
-0.19074039161205292,
-0.15259195864200592,
0.12534263730049133,
-0.1455487310886383,
0.3717291057109833,
-0.0604783333837986,
0.13816416263580322,
0.002974811941385269,
-0.39689141511917114,
-0.13648170232772827,
-0.23828142881393433,
0.11878784000873566,
-0.11664599925279617,
-0.04228900372982025,
-0.12358193099498749,
0.09705575555562973,
-0.012898169457912445,
-0.20775249600410461,
0.2107018083333969,
0.25053685903549194,
0.17074629664421082,
0.1253802329301834,
-0.09957174956798553,
0.02761317417025566,
-0.1469489485025406,
0.10244643688201904,
0.2751549780368805,
0.32826346158981323,
0.2851674556732178,
-0.06326088309288025,
-0.22622989118099213,
-0.027942568063735962,
-0.01485916506499052,
0.2398771047592163,
0.3223564028739929,
-0.07020660489797592,
0.30501553416252136,
0.029683219268918037,
0.25030675530433655,
-0.11103888601064682,
0.38770759105682373,
0.2454821616411209,
-0.3047029376029968,
0.3018849790096283,
0.2032889723777771,
0.14983466267585754,
-0.3683099150657654,
-0.06562916934490204,
0.17039315402507782,
0.18419374525547028,
-0.01752428337931633,
0.3514825105667114,
0.19499212503433228,
0.09937909245491028,
-0.10237161815166473,
-0.010370123200118542,
0.9083144664764404,
-0.16308872401714325,
-0.005414548330008984,
0.13437190651893616,
-0.022075269371271133,
0.10603536665439606,
0.05925397574901581,
0.24670635163784027,
0.17524325847625732,
0.3167734742164612,
-0.37157830595970154,
0.23449184000492096,
-0.2026696503162384,
0.13740193843841553,
0.2845797538757324,
-0.4941345751285553,
-0.03732777014374733,
0.12440811097621918,
-0.023441404104232788,
0.06194167211651802,
-0.259426087141037,
0.6426657438278198,
-0.32093799114227295,
0.2083352655172348,
-0.3589017689228058,
0.12850306928157806,
-0.09221003204584122,
-0.17223988473415375,
0.19469432532787323,
-0.29346993565559387,
-0.3267906904220581,
0.073508620262146,
0.14590804278850555,
-0.30205637216567993,
0.06403166055679321,
-0.10283197462558746,
-0.13600794970989227,
-0.2777114510536194,
-0.19125902652740479,
0.3311987817287445,
-0.08971288055181503,
-0.12946230173110962,
0.18977084755897522,
0.22504910826683044,
0.04014753922820091,
0.4020489752292633,
0.362231582403183,
0.35875874757766724,
0.15154695510864258,
0.2340247631072998,
0.030287865549325943,
-0.0326588898897171,
-0.029873978346586227,
-0.2867167294025421,
0.24759140610694885,
-0.08639609813690186,
0.34474843740463257,
0.05417971685528755,
0.19932107627391815,
-0.1649201661348343,
-0.19132982194423676,
-0.09553693234920502,
0.3919134736061096,
-0.23054002225399017,
0.22419455647468567,
-0.43964946269989014,
-0.017818011343479156,
-0.28887900710105896,
0.15791818499565125,
-0.5743067860603333,
0.06603504717350006,
0.011988400481641293,
0.3869113326072693,
0.0578957200050354,
-0.27305635809898376,
0.056127823889255524,
-0.08969339728355408,
0.32334449887275696,
0.6767731308937073,
0.2628777027130127,
-0.18204426765441895,
-0.43312931060791016,
-0.6766682863235474,
0.17123781144618988,
0.08007953315973282,
0.048189759254455566,
-0.002439146861433983,
-0.08426610380411148,
0.11871679127216339,
0.09096802771091461,
0.06691473722457886,
-0.09885656833648682,
0.09706109017133713,
-0.006698988378047943,
-0.07713218778371811,
-0.24501784145832062,
-0.055965080857276917,
0.1430307924747467,
-0.014103426598012447,
-0.07768373191356659,
-0.02242923155426979,
0.027486450970172882,
-0.02480805292725563,
0.04612869769334793,
0.12274467945098877,
-0.013371645472943783,
-0.012572824954986572,
0.2851991653442383,
-0.05354300141334534,
0.45311594009399414,
-0.018875006586313248,
-0.10198107361793518,
-0.16743671894073486,
-0.2231227457523346,
-0.10077188909053802,
0.17251615226268768,
0.052490413188934326,
0.24774602055549622,
-0.3893388509750366,
-0.45865193009376526,
-0.3042467534542084,
0.05411924049258232,
0.1530754268169403,
0.23111209273338318,
-0.3334082365036011,
-0.009078715927898884,
-0.06749026477336884,
0.03562675416469574,
0.10013895481824875,
0.33507177233695984,
-0.07982221245765686,
0.031680941581726074,
0.000559002161026001,
-0.06521391123533249,
0.6675047874450684,
-0.21326109766960144,
0.022321447730064392,
0.03716406598687172,
0.09161197394132614,
0.5033937692642212,
-0.20740728080272675,
-0.5419324636459351,
0.24369177222251892,
0.20594759285449982,
0.09542644768953323,
-0.06875455379486084,
0.16691085696220398,
-0.155269056558609,
0.09337803721427917,
0.05778016522526741,
0.5881036520004272,
0.18353280425071716,
-0.13980454206466675,
0.29695966839790344,
0.01680527627468109
] |
https://github.com/huggingface/datasets/issues/5147 | Allow ignoring kwargs inside fn_kwargs during dataset.map's fingerprinting | Hi ! In the `transformers` issue the object to not hash is a `Pool` - I think you can instantiate it inside your function instead of passing it as a parameter. It's good practice that your function and all its fn_kwargs are picklable, in case you want to parallelize `map` using `num_proc>1`
For the other case `def fn(example, verbose=False):` however, I agree it would be nice to let the user specify that "verbose" needs to be ignored.
Do you think providing a decorator could help ? Maybe
```python
@datasets.hashing.register(ignore_kwargs=["verbose"])
def func(example, verbose=False):
...
``` | ### Feature request
`dataset.map` accepts a `fn_kwargs` that is passed to `fn`. Currently, the whole `fn_kwargs` is used by `fingerprint_transform` to calculate the new fingerprint.
I'd like to be able to inform `fingerprint_transform` which `fn_kwargs` shoud/shouldn't be taken into account during hashing.
Of course, users should be aware to properly use this new feature, just like the internal usages of `fingerprint_transform` [does](https://github.com/huggingface/datasets/blob/2699593b33ee63d17aad2a2bfddedd38a8df57b8/src/datasets/arrow_dataset.py#L2700).
### Motivation
This is originally motivated by https://github.com/huggingface/transformers/pull/18351#issuecomment-1263588680.
Nonetheless, consider a more general processing function that accepts a kwarg that does not influence it's output:
```python
def fn(example, verbose=False):
...
```
Then `dataset.map(fn, verbose=True)` would not benefit from dataset caching.
I'm not sure if other methods in the `Dataset` API could benefit from this feature.
### Your contribution
Based on `fingerprint_transform `'s `wrapper` function [here](https://github.com/huggingface/datasets/blob/c59cc34fcd2a369d27b77cc678017f5976a926a9/src/datasets/fingerprint.py#L443), it seems to me that it should be possible to make `.map`/`._map_single` accept something like `fn_use_fingerprint_kwargs`/`fn_ignore_fingerprint_kwargs` (probably another arg name). This would then be used by `fingerprint_transform.wrapper` to better/more flexibly hash the transformation.
I could contribute with a PR if this feature and approach look good to you. | 94 | Allow ignoring kwargs inside fn_kwargs during dataset.map's fingerprinting
### Feature request
`dataset.map` accepts a `fn_kwargs` that is passed to `fn`. Currently, the whole `fn_kwargs` is used by `fingerprint_transform` to calculate the new fingerprint.
I'd like to be able to inform `fingerprint_transform` which `fn_kwargs` shoud/shouldn't be taken into account during hashing.
Of course, users should be aware to properly use this new feature, just like the internal usages of `fingerprint_transform` [does](https://github.com/huggingface/datasets/blob/2699593b33ee63d17aad2a2bfddedd38a8df57b8/src/datasets/arrow_dataset.py#L2700).
### Motivation
This is originally motivated by https://github.com/huggingface/transformers/pull/18351#issuecomment-1263588680.
Nonetheless, consider a more general processing function that accepts a kwarg that does not influence it's output:
```python
def fn(example, verbose=False):
...
```
Then `dataset.map(fn, verbose=True)` would not benefit from dataset caching.
I'm not sure if other methods in the `Dataset` API could benefit from this feature.
### Your contribution
Based on `fingerprint_transform `'s `wrapper` function [here](https://github.com/huggingface/datasets/blob/c59cc34fcd2a369d27b77cc678017f5976a926a9/src/datasets/fingerprint.py#L443), it seems to me that it should be possible to make `.map`/`._map_single` accept something like `fn_use_fingerprint_kwargs`/`fn_ignore_fingerprint_kwargs` (probably another arg name). This would then be used by `fingerprint_transform.wrapper` to better/more flexibly hash the transformation.
I could contribute with a PR if this feature and approach look good to you.
Hi ! In the `transformers` issue the object to not hash is a `Pool` - I think you can instantiate it inside your function instead of passing it as a parameter. It's good practice that your function and all its fn_kwargs are picklable, in case you want to parallelize `map` using `num_proc>1`
For the other case `def fn(example, verbose=False):` however, I agree it would be nice to let the user specify that "verbose" needs to be ignored.
Do you think providing a decorator could help ? Maybe
```python
@datasets.hashing.register(ignore_kwargs=["verbose"])
def func(example, verbose=False):
...
``` | [
-0.005865931510925293,
-0.06076231971383095,
-0.018343552947044373,
-0.19371993839740753,
-0.0050411708652973175,
0.1641051173210144,
0.3912358283996582,
0.16376887261867523,
0.20602382719516754,
0.034258365631103516,
0.12471693754196167,
0.36999616026878357,
-0.08079502731561661,
0.14987123012542725,
-0.1885683536529541,
0.3182225525379181,
0.09267837554216385,
0.1333041489124298,
-0.14327165484428406,
0.016390256583690643,
-0.3260578513145447,
-0.16084112226963043,
-0.04819091409444809,
0.07316616177558899,
-0.2230890691280365,
-0.17977017164230347,
0.020653320476412773,
-0.289815753698349,
-0.26830172538757324,
-0.2091381847858429,
0.10494671761989594,
0.4930146336555481,
-0.11240443587303162,
-0.03559652715921402,
-0.00012154686555732042,
0.21511073410511017,
0.28198909759521484,
-0.05450628697872162,
0.03692299500107765,
0.02176152914762497,
-0.3953632414340973,
-0.0087203998118639,
-0.14594918489456177,
-0.3048025071620941,
0.05383497476577759,
-0.18344929814338684,
-0.041958488523960114,
-0.25833454728126526,
0.16035529971122742,
-0.18406499922275543,
0.12748800218105316,
0.09863164275884628,
-0.3397107422351837,
0.3419038951396942,
-0.1479927897453308,
0.50718092918396,
-0.09250571578741074,
-0.09080705046653748,
-0.06634433567523956,
-0.2756352722644806,
-0.24176853895187378,
0.36419370770454407,
-0.21958771347999573,
-0.37261778116226196,
0.5514818429946899,
-0.1528361737728119,
0.25633206963539124,
-0.2664929926395416,
0.025272754952311516,
0.2092386782169342,
-0.0968354269862175,
-0.3318539261817932,
-0.4921858310699463,
-0.5865834355354309,
-0.10014338046312332,
0.12397675216197968,
0.0555436797440052,
-0.25222843885421753,
-0.1711578071117401,
0.19577033817768097,
-0.747734010219574,
-0.10958569496870041,
0.0275556743144989,
0.0015015974640846252,
0.2148817777633667,
0.11856328696012497,
0.2179485559463501,
0.04868171364068985,
0.2941719889640808,
0.015492158010601997,
-0.2442704439163208,
-0.27903294563293457,
0.04371373727917671,
0.24265602231025696,
-0.004095282405614853,
-0.09609895944595337,
0.13998407125473022,
0.1817147135734558,
0.45990005135536194,
0.07600989937782288,
0.09875810146331787,
0.2484849989414215,
0.07820126414299011,
0.30951040983200073,
0.1349792629480362,
0.0019933274015784264,
0.1388196349143982,
0.3611966073513031,
0.11944466829299927,
-0.11625214666128159,
-0.010847825556993484,
-0.0010515712201595306,
0.3486833870410919,
-0.15470528602600098,
0.039116475731134415,
-0.093839131295681,
0.15207114815711975,
0.028747666627168655,
0.28992944955825806,
-0.373025506734848,
-0.10257170349359512,
0.011207252740859985,
0.1739756464958191,
0.003649868071079254,
0.16442663967609406,
0.22275912761688232,
-0.1438068300485611,
0.1671743392944336,
0.11538886278867722,
0.2770242989063263,
-0.14145810902118683,
-0.09945116937160492,
-0.046494219452142715,
0.1580687314271927,
0.08473651111125946,
-0.2732619047164917,
0.27960577607154846,
0.29360583424568176,
0.2891462445259094,
0.32860320806503296,
0.07606012374162674,
-0.024582095444202423,
0.5082082748413086,
0.18371927738189697,
-0.5056420564651489,
0.11020482331514359,
-0.04848561808466911,
0.33946770429611206,
-0.33130231499671936,
0.31072068214416504,
-0.307517409324646,
-0.21846988797187805,
0.23685064911842346,
0.05437660217285156,
-0.5096779465675354,
-0.09475992619991302,
-0.4823932349681854,
0.2866712510585785,
0.10129471123218536,
-0.3018660247325897,
0.28999224305152893,
-0.11618702113628387,
-0.4545576572418213,
-0.31869444251060486,
0.15997572243213654,
0.14183452725410461,
0.33383089303970337,
-0.4758649468421936,
-0.1577541083097458,
-0.13811780512332916,
-0.026832304894924164,
0.06234478950500488,
-0.21016675233840942,
0.022564232349395752,
-0.35915571451187134,
0.5697404146194458,
0.14275547862052917,
-0.416191428899765,
-0.261448472738266,
0.2236405462026596,
0.05899067223072052,
0.4296763837337494,
0.0006550401449203491,
0.1685904711484909,
-0.15944983065128326,
-0.12316083908081055,
-0.3125994801521301,
0.3117021322250366,
-0.14907202124595642,
0.10675949603319168,
0.021055657416582108,
-0.5655102729797363,
0.43652987480163574,
-0.08498701453208923,
-0.08634422719478607,
0.15031631290912628,
-0.04734904319047928,
-0.25039753317832947,
0.2062424123287201,
-0.1512516289949417,
0.17371615767478943,
0.05230029672384262,
0.23588883876800537,
-0.2567746639251709,
0.03602102771401405,
-0.15197895467281342,
-0.47297585010528564,
0.2587464451789856,
-0.052615970373153687,
-0.28453391790390015,
-0.40761590003967285,
-0.42044776678085327,
0.22914278507232666,
-0.19500501453876495,
-0.16592121124267578,
-0.06553475558757782,
0.01335170865058899,
-0.1975710690021515,
0.011053856462240219,
-0.08459106087684631,
-0.16003115475177765,
-0.03667526692152023,
0.23904038965702057,
0.4272952377796173,
-0.2552259862422943,
-0.1185276061296463,
0.28300487995147705,
0.11088039726018906,
-0.1831376552581787,
0.3285030126571655,
0.2012096643447876,
-0.0992138609290123,
0.28562480211257935,
0.21445652842521667,
-0.010067839175462723,
0.4889296889305115,
-0.11607340723276138,
0.5613716840744019,
0.0015973113477230072,
0.04227609559893608,
-0.0743757113814354,
-0.05856427922844887,
0.020800601691007614,
-0.0741828978061676,
0.11049925535917282,
0.656276524066925,
-0.16003891825675964,
0.2627718150615692,
-0.19525131583213806,
-0.12395812571048737,
-0.21211878955364227,
-0.3490724563598633,
-0.12653496861457825,
-0.3698245584964752,
-0.23571310937404633,
-0.17703689634799957,
0.4889459013938904,
0.1676059514284134,
-0.056997958570718765,
-0.06997887045145035,
0.14581209421157837,
0.1586296409368515,
-0.0902261808514595,
0.1506028175354004,
0.11794711649417877,
-0.06953379511833191,
0.11597702652215958,
0.14960896968841553,
0.34216153621673584,
0.2898683547973633,
0.041597411036491394,
0.03227590397000313,
0.12288928776979446,
-0.032194290310144424,
0.22930434346199036,
0.16795694828033447,
-0.14560732245445251,
0.2087416648864746,
0.19996587932109833,
0.033669374883174896,
-0.2037314474582672,
0.08066724240779877,
0.10752015560865402,
-0.22758275270462036,
-0.2115435153245926,
0.2849781811237335,
-0.4110225737094879,
-0.24277490377426147,
0.08538977056741714,
-0.09591331332921982,
-0.5721999406814575,
-0.419053316116333,
0.1252937912940979,
0.1445099115371704,
-0.28171592950820923,
0.20491145551204681,
-0.4433339834213257,
0.04626065492630005,
-0.14397625625133514,
-0.7790395617485046,
-0.4334697127342224,
-0.11901722848415375,
0.21200349926948547,
0.004835512489080429,
0.1790800243616104,
0.020421307533979416,
0.29066982865333557,
0.32050612568855286,
-0.1621401160955429,
-0.14567215740680695,
-0.36436277627944946,
0.12440942227840424,
-0.37967103719711304,
0.02501966804265976,
0.2262081801891327,
-0.04525396227836609,
-0.22863999009132385,
-0.1993657499551773,
0.07676928490400314,
-0.1338016390800476,
-0.25214335322380066,
-0.08094698190689087,
0.2110636681318283,
0.49322617053985596,
-0.33782389760017395,
0.359566867351532,
-0.11904061585664749,
-0.23701995611190796,
0.44636982679367065,
-0.28056007623672485,
0.0572638064622879,
0.6393604874610901,
-0.20904500782489777,
-0.08308205008506775,
-0.2869742214679718,
-0.14969941973686218,
0.049379006028175354,
-0.3756115436553955,
0.6054432988166809,
-0.029563896358013153,
0.26661446690559387,
-0.09332812577486038,
-0.13749602437019348,
-0.03571874275803566,
0.31466370820999146,
-0.2534518241882324,
-0.6782355308532715,
-0.17555180191993713,
0.4206818640232086,
0.05550107732415199,
-0.23407481610774994,
0.23390434682369232,
0.0987517237663269,
0.05566754937171936,
-0.20260494947433472,
0.0036590322852134705,
0.15085642039775848,
0.053218595683574677,
-0.03163903206586838,
0.34534409642219543,
0.11333861947059631,
0.19832554459571838,
0.7146095633506775,
0.2261214703321457,
-0.20027092099189758,
-0.07989531755447388,
-0.1250164806842804,
0.18638600409030914,
0.2509688436985016,
-0.3187956213951111,
-0.06575531512498856,
-0.04147312045097351,
0.12129484117031097,
-0.10032740235328674,
-0.023670442402362823,
0.17264539003372192,
0.13916534185409546,
-0.2706490457057953,
-0.3733859956264496,
-0.4995579421520233,
0.33937591314315796,
-0.2292599380016327,
0.2211141586303711,
0.015166927129030228,
0.2653765380382538,
-0.17913557589054108,
-0.3521783649921417,
0.3053176701068878,
0.10398462414741516,
0.5926951169967651,
0.09738149493932724,
-0.23006343841552734,
-0.071681447327137,
-0.3673844039440155,
0.3071899116039276,
0.30367037653923035,
0.07281012833118439,
-0.06014251708984375,
-0.145073801279068,
0.042175065726041794,
0.17658790946006775,
0.6093446016311646,
-0.2984358072280884,
0.21977689862251282,
-0.09909392893314362,
-0.34294259548187256,
0.06549358367919922,
0.21119527518749237,
0.2288888692855835,
0.07879935204982758,
0.03640108183026314,
0.37078195810317993,
-0.26358288526535034,
-0.1680150330066681,
-0.24914631247520447,
0.36210235953330994,
0.06923754513263702,
-0.23618198931217194,
-0.09742633253335953,
-0.13460737466812134,
-0.10186712443828583,
0.06653697043657303,
0.283629834651947,
-0.13047972321510315,
-0.06250789761543274,
0.08684293925762177,
-0.1404028683900833,
-0.24021413922309875,
0.2096119225025177,
0.3041730225086212,
0.20485076308250427,
-0.03559674322605133,
-0.007042622193694115,
0.4576864242553711,
-0.074239581823349,
0.23457838594913483,
0.3466785252094269,
-0.02252073958516121,
-0.3508308529853821,
-0.4499824047088623,
-0.0635400265455246,
0.3645017445087433,
0.34724438190460205,
0.020692970603704453,
0.2559627294540405,
0.4041084945201874,
-0.05812631547451019,
-0.38709601759910583,
-0.08772332221269608,
0.015859613195061684,
-0.043532829731702805,
-0.3755565285682678,
-0.14540399610996246,
0.5071619749069214,
0.3441968262195587,
-0.1847454309463501,
0.37532997131347656,
0.13864785432815552,
-0.6144272685050964,
0.3338550925254822,
0.10468403249979019,
1.0846292972564697,
0.20238646864891052,
0.0454963818192482,
0.004499312490224838,
-0.10504962503910065,
0.26515787839889526,
0.2733190655708313,
0.14763887226581573,
-0.19721673429012299,
-0.2763172388076782,
-0.03770807012915611,
-0.18941818177700043,
0.18481335043907166,
0.41104573011398315,
-0.004258383065462112,
-0.07632662355899811,
-0.11117072403430939,
0.26693275570869446,
-0.21997997164726257,
0.1891232281923294,
0.06397191435098648,
-0.24830198287963867,
0.032756563276052475,
0.013141937553882599,
0.137749582529068,
-0.05855864658951759,
0.22733163833618164,
-0.46858054399490356,
-0.09021001309156418,
-0.3865967392921448,
0.11599385738372803,
-0.1790982484817505,
-0.49522069096565247,
0.20229434967041016,
0.16887609660625458,
0.0933733582496643,
0.3243081867694855,
0.40969038009643555,
0.4482523202896118,
-0.021383564919233322,
-0.19910050928592682,
0.05093558132648468,
0.25166162848472595,
0.28995686769485474,
-0.27635815739631653,
-0.2253386676311493,
0.14510394632816315,
0.16957241296768188,
-0.13506755232810974,
-0.02546759694814682,
-0.10666440427303314,
-0.5109802484512329,
-0.2677409052848816,
0.01676945388317108,
-0.1710326224565506,
-0.14476163685321808,
0.02396697923541069,
-0.3638383448123932,
0.18440718948841095,
0.00040265917778015137,
0.010729294270277023,
0.282972127199173,
-0.06863001734018326,
0.3702602982521057,
-0.09383463859558105,
-0.2008073627948761,
-0.0006593111902475357,
0.5502467751502991,
-0.24377822875976562,
-0.13937100768089294,
0.2838761806488037,
-0.4520204961299896,
-0.33465272188186646,
-0.02436005510389805,
0.038051851093769073,
0.05942238122224808,
-0.20817622542381287,
-0.13069993257522583,
0.34414413571357727,
-0.010957673192024231,
-0.14743652939796448,
0.19695478677749634,
-0.2527156472206116,
0.09506990015506744,
-0.25903967022895813,
-0.20560075342655182,
-0.3202750086784363,
0.44752001762390137,
-0.20744477212429047,
0.26800963282585144,
0.06767988204956055,
0.2469547986984253,
-0.1681741327047348,
0.30825337767601013,
-0.23713922500610352,
-0.1566781848669052,
0.04913482069969177,
-0.015391025692224503,
0.19917914271354675,
0.21195679903030396,
0.29022613167762756,
-0.35152724385261536,
-0.017464112490415573,
0.3003374934196472,
-0.19307202100753784,
-0.09721758961677551,
-0.168826624751091,
0.18711450695991516,
0.05539313703775406,
0.1523609310388565,
0.08083595335483551,
0.09882623702287674,
-0.03775234892964363,
-0.08604343235492706,
0.3203052282333374,
0.277845174074173,
0.21141457557678223,
0.2680683135986328,
-0.015347424894571304,
0.23727473616600037,
-0.020121676847338676,
-0.10319085419178009,
-0.30617496371269226,
0.0019702687859535217,
0.12702041864395142,
0.25171178579330444,
-0.11323902755975723,
0.22987741231918335,
0.36674660444259644,
-0.0034114643931388855,
0.18911072611808777,
-0.059663839638233185,
0.06758381426334381,
0.2660598158836365,
-0.24454092979431152,
0.43847358226776123,
-0.0005028583109378815,
0.0615597628057003,
-0.34195712208747864,
-0.16921564936637878,
0.34724339842796326,
0.09260087460279465,
-0.23609237372875214,
-0.055795054882764816,
0.447112500667572,
-0.022807396948337555,
0.21827873587608337,
0.4467543661594391,
0.1963842660188675,
-0.0070260316133499146,
0.025418341159820557,
-0.08065857738256454,
0.24866317212581635,
-0.49292731285095215,
0.311759889125824,
0.5924936532974243,
-0.043873269110918045,
-0.1298116147518158,
0.2424229085445404,
0.35167908668518066,
0.29512086510658264,
0.30316388607025146,
-0.07494428008794785,
0.47746288776397705,
-0.14886480569839478,
0.14217925071716309,
0.051088616251945496,
-0.24623854458332062,
0.0714740976691246,
0.26646432280540466,
-0.13331447541713715,
0.1797264665365219,
0.11646179854869843,
0.5413593053817749,
-0.0005812402814626694,
-0.143794983625412,
0.16055426001548767,
0.2837647497653961,
-0.03494642674922943,
-0.11682556569576263,
-0.003360707312822342,
-0.030897140502929688,
-0.3566071391105652,
-0.30199939012527466,
0.05048634111881256,
-0.22921709716320038,
0.7687065601348877,
-0.02555975317955017,
0.05303684249520302,
0.19080547988414764,
-0.194097638130188,
0.09112001955509186,
0.5008471608161926,
-0.23026372492313385,
-0.3083011507987976,
-0.050893306732177734,
-0.16331695020198822,
0.46508097648620605,
0.3216260075569153,
0.16628962755203247,
-0.24390935897827148,
0.13489960134029388,
0.2224023938179016,
-0.40559256076812744,
0.010888760909438133,
-0.21528831124305725,
0.38894951343536377,
-0.11065930128097534,
-0.05919748917222023,
0.2203221172094345,
0.05520402640104294,
-0.011100404895842075,
-0.24170567095279694,
-0.10731925070285797,
0.15932245552539825,
-0.1853065937757492,
0.7003715634346008,
0.1826300323009491,
-0.023270871490240097,
0.1638111025094986,
-0.0807659849524498,
0.2369101643562317,
-0.26434406638145447,
0.22204074263572693,
-0.013768656179308891,
-0.021752066910266876,
0.03198252618312836,
0.0069145821034908295,
0.05470234900712967,
0.16089683771133423,
0.15023009479045868,
-0.25715774297714233,
-0.1957240253686905,
0.1820225864648819,
-0.5043073892593384,
-0.10165619105100632,
0.09414052963256836,
-0.08637538552284241,
0.24059027433395386,
-0.2988082468509674,
0.16859489679336548,
0.05675509572029114,
-0.280500590801239,
-0.0026632994413375854,
0.10835839062929153,
0.07464341074228287,
-0.023287860676646233,
0.4016994535923004,
-0.3002462387084961,
-0.018861765041947365,
0.25695306062698364,
-0.1555439531803131,
0.2561566233634949,
0.07368805259466171,
-0.03453759476542473,
-0.1054416298866272,
-0.04847127944231033,
-0.02194141410291195,
0.15036863088607788,
0.3085595369338989,
0.268496572971344,
0.16219043731689453,
-0.13819122314453125,
-0.16153040528297424,
0.05097102373838425,
0.14524637162685394,
-0.33040571212768555,
0.17333538830280304,
0.004185909405350685,
0.21272438764572144,
-0.2617456316947937,
-0.22955243289470673,
-0.19334766268730164,
0.08044485747814178,
-0.11794795095920563,
-0.19864952564239502,
-0.09923318028450012,
0.34386390447616577,
-0.3364426791667938,
0.17713573575019836,
-0.07419785112142563,
0.21191859245300293,
0.11357267200946808,
0.009758871048688889,
-0.02431919425725937,
-0.4720761179924011,
0.5437831878662109,
-0.6424936056137085,
-0.1682508885860443,
0.026503536850214005,
0.10854557156562805,
-0.10377288609743118,
-0.19017307460308075,
-0.6735650897026062,
-0.18871888518333435,
0.25198259949684143,
0.09958456456661224,
0.288252055644989,
0.06857208907604218,
-0.0019896039739251137,
-0.14196668565273285,
-0.22816599905490875,
-0.20432955026626587,
0.06263455748558044,
0.08956029266119003,
-0.006231699138879776,
-0.20354081690311432
] |
https://github.com/huggingface/datasets/issues/5147 | Allow ignoring kwargs inside fn_kwargs during dataset.map's fingerprinting | Hi @lhoestq! Thanks for your response.
A `Pool` shouldn't be instantiated within the function, because there's a huge overhead in doing so. The main idea is that the same `Pool` should be used across all function calls. Parallel `map` is not helpful/desired in that specific scenario, because the heavy parallel computation is done by another lib (`pyctcdecode`, called within `transformer`'s model inference code).
But yes, it makes sense to be able to leverage parallel processing by just doing `num_proc>1` when possible.
Your decorator suggestions seems like a pretty clean API to me. I didn't find a `datasets.hashing` module though. Would it be created for this specific purpose? Any downsides in just using `datasets.fingerprint`?
And would `datasets.hashing.register` just add some metadata to `func` in your approach (so it could be inspected from `fingerprint_transform`)?
And looking to the `datasets.Dataset` API, `.filter` would also benefited from this. | ### Feature request
`dataset.map` accepts a `fn_kwargs` that is passed to `fn`. Currently, the whole `fn_kwargs` is used by `fingerprint_transform` to calculate the new fingerprint.
I'd like to be able to inform `fingerprint_transform` which `fn_kwargs` shoud/shouldn't be taken into account during hashing.
Of course, users should be aware to properly use this new feature, just like the internal usages of `fingerprint_transform` [does](https://github.com/huggingface/datasets/blob/2699593b33ee63d17aad2a2bfddedd38a8df57b8/src/datasets/arrow_dataset.py#L2700).
### Motivation
This is originally motivated by https://github.com/huggingface/transformers/pull/18351#issuecomment-1263588680.
Nonetheless, consider a more general processing function that accepts a kwarg that does not influence it's output:
```python
def fn(example, verbose=False):
...
```
Then `dataset.map(fn, verbose=True)` would not benefit from dataset caching.
I'm not sure if other methods in the `Dataset` API could benefit from this feature.
### Your contribution
Based on `fingerprint_transform `'s `wrapper` function [here](https://github.com/huggingface/datasets/blob/c59cc34fcd2a369d27b77cc678017f5976a926a9/src/datasets/fingerprint.py#L443), it seems to me that it should be possible to make `.map`/`._map_single` accept something like `fn_use_fingerprint_kwargs`/`fn_ignore_fingerprint_kwargs` (probably another arg name). This would then be used by `fingerprint_transform.wrapper` to better/more flexibly hash the transformation.
I could contribute with a PR if this feature and approach look good to you. | 144 | Allow ignoring kwargs inside fn_kwargs during dataset.map's fingerprinting
### Feature request
`dataset.map` accepts a `fn_kwargs` that is passed to `fn`. Currently, the whole `fn_kwargs` is used by `fingerprint_transform` to calculate the new fingerprint.
I'd like to be able to inform `fingerprint_transform` which `fn_kwargs` shoud/shouldn't be taken into account during hashing.
Of course, users should be aware to properly use this new feature, just like the internal usages of `fingerprint_transform` [does](https://github.com/huggingface/datasets/blob/2699593b33ee63d17aad2a2bfddedd38a8df57b8/src/datasets/arrow_dataset.py#L2700).
### Motivation
This is originally motivated by https://github.com/huggingface/transformers/pull/18351#issuecomment-1263588680.
Nonetheless, consider a more general processing function that accepts a kwarg that does not influence it's output:
```python
def fn(example, verbose=False):
...
```
Then `dataset.map(fn, verbose=True)` would not benefit from dataset caching.
I'm not sure if other methods in the `Dataset` API could benefit from this feature.
### Your contribution
Based on `fingerprint_transform `'s `wrapper` function [here](https://github.com/huggingface/datasets/blob/c59cc34fcd2a369d27b77cc678017f5976a926a9/src/datasets/fingerprint.py#L443), it seems to me that it should be possible to make `.map`/`._map_single` accept something like `fn_use_fingerprint_kwargs`/`fn_ignore_fingerprint_kwargs` (probably another arg name). This would then be used by `fingerprint_transform.wrapper` to better/more flexibly hash the transformation.
I could contribute with a PR if this feature and approach look good to you.
Hi @lhoestq! Thanks for your response.
A `Pool` shouldn't be instantiated within the function, because there's a huge overhead in doing so. The main idea is that the same `Pool` should be used across all function calls. Parallel `map` is not helpful/desired in that specific scenario, because the heavy parallel computation is done by another lib (`pyctcdecode`, called within `transformer`'s model inference code).
But yes, it makes sense to be able to leverage parallel processing by just doing `num_proc>1` when possible.
Your decorator suggestions seems like a pretty clean API to me. I didn't find a `datasets.hashing` module though. Would it be created for this specific purpose? Any downsides in just using `datasets.fingerprint`?
And would `datasets.hashing.register` just add some metadata to `func` in your approach (so it could be inspected from `fingerprint_transform`)?
And looking to the `datasets.Dataset` API, `.filter` would also benefited from this. | [
-0.005865931510925293,
-0.06076231971383095,
-0.018343552947044373,
-0.19371993839740753,
-0.0050411708652973175,
0.1641051173210144,
0.3912358283996582,
0.16376887261867523,
0.20602382719516754,
0.034258365631103516,
0.12471693754196167,
0.36999616026878357,
-0.08079502731561661,
0.14987123012542725,
-0.1885683536529541,
0.3182225525379181,
0.09267837554216385,
0.1333041489124298,
-0.14327165484428406,
0.016390256583690643,
-0.3260578513145447,
-0.16084112226963043,
-0.04819091409444809,
0.07316616177558899,
-0.2230890691280365,
-0.17977017164230347,
0.020653320476412773,
-0.289815753698349,
-0.26830172538757324,
-0.2091381847858429,
0.10494671761989594,
0.4930146336555481,
-0.11240443587303162,
-0.03559652715921402,
-0.00012154686555732042,
0.21511073410511017,
0.28198909759521484,
-0.05450628697872162,
0.03692299500107765,
0.02176152914762497,
-0.3953632414340973,
-0.0087203998118639,
-0.14594918489456177,
-0.3048025071620941,
0.05383497476577759,
-0.18344929814338684,
-0.041958488523960114,
-0.25833454728126526,
0.16035529971122742,
-0.18406499922275543,
0.12748800218105316,
0.09863164275884628,
-0.3397107422351837,
0.3419038951396942,
-0.1479927897453308,
0.50718092918396,
-0.09250571578741074,
-0.09080705046653748,
-0.06634433567523956,
-0.2756352722644806,
-0.24176853895187378,
0.36419370770454407,
-0.21958771347999573,
-0.37261778116226196,
0.5514818429946899,
-0.1528361737728119,
0.25633206963539124,
-0.2664929926395416,
0.025272754952311516,
0.2092386782169342,
-0.0968354269862175,
-0.3318539261817932,
-0.4921858310699463,
-0.5865834355354309,
-0.10014338046312332,
0.12397675216197968,
0.0555436797440052,
-0.25222843885421753,
-0.1711578071117401,
0.19577033817768097,
-0.747734010219574,
-0.10958569496870041,
0.0275556743144989,
0.0015015974640846252,
0.2148817777633667,
0.11856328696012497,
0.2179485559463501,
0.04868171364068985,
0.2941719889640808,
0.015492158010601997,
-0.2442704439163208,
-0.27903294563293457,
0.04371373727917671,
0.24265602231025696,
-0.004095282405614853,
-0.09609895944595337,
0.13998407125473022,
0.1817147135734558,
0.45990005135536194,
0.07600989937782288,
0.09875810146331787,
0.2484849989414215,
0.07820126414299011,
0.30951040983200073,
0.1349792629480362,
0.0019933274015784264,
0.1388196349143982,
0.3611966073513031,
0.11944466829299927,
-0.11625214666128159,
-0.010847825556993484,
-0.0010515712201595306,
0.3486833870410919,
-0.15470528602600098,
0.039116475731134415,
-0.093839131295681,
0.15207114815711975,
0.028747666627168655,
0.28992944955825806,
-0.373025506734848,
-0.10257170349359512,
0.011207252740859985,
0.1739756464958191,
0.003649868071079254,
0.16442663967609406,
0.22275912761688232,
-0.1438068300485611,
0.1671743392944336,
0.11538886278867722,
0.2770242989063263,
-0.14145810902118683,
-0.09945116937160492,
-0.046494219452142715,
0.1580687314271927,
0.08473651111125946,
-0.2732619047164917,
0.27960577607154846,
0.29360583424568176,
0.2891462445259094,
0.32860320806503296,
0.07606012374162674,
-0.024582095444202423,
0.5082082748413086,
0.18371927738189697,
-0.5056420564651489,
0.11020482331514359,
-0.04848561808466911,
0.33946770429611206,
-0.33130231499671936,
0.31072068214416504,
-0.307517409324646,
-0.21846988797187805,
0.23685064911842346,
0.05437660217285156,
-0.5096779465675354,
-0.09475992619991302,
-0.4823932349681854,
0.2866712510585785,
0.10129471123218536,
-0.3018660247325897,
0.28999224305152893,
-0.11618702113628387,
-0.4545576572418213,
-0.31869444251060486,
0.15997572243213654,
0.14183452725410461,
0.33383089303970337,
-0.4758649468421936,
-0.1577541083097458,
-0.13811780512332916,
-0.026832304894924164,
0.06234478950500488,
-0.21016675233840942,
0.022564232349395752,
-0.35915571451187134,
0.5697404146194458,
0.14275547862052917,
-0.416191428899765,
-0.261448472738266,
0.2236405462026596,
0.05899067223072052,
0.4296763837337494,
0.0006550401449203491,
0.1685904711484909,
-0.15944983065128326,
-0.12316083908081055,
-0.3125994801521301,
0.3117021322250366,
-0.14907202124595642,
0.10675949603319168,
0.021055657416582108,
-0.5655102729797363,
0.43652987480163574,
-0.08498701453208923,
-0.08634422719478607,
0.15031631290912628,
-0.04734904319047928,
-0.25039753317832947,
0.2062424123287201,
-0.1512516289949417,
0.17371615767478943,
0.05230029672384262,
0.23588883876800537,
-0.2567746639251709,
0.03602102771401405,
-0.15197895467281342,
-0.47297585010528564,
0.2587464451789856,
-0.052615970373153687,
-0.28453391790390015,
-0.40761590003967285,
-0.42044776678085327,
0.22914278507232666,
-0.19500501453876495,
-0.16592121124267578,
-0.06553475558757782,
0.01335170865058899,
-0.1975710690021515,
0.011053856462240219,
-0.08459106087684631,
-0.16003115475177765,
-0.03667526692152023,
0.23904038965702057,
0.4272952377796173,
-0.2552259862422943,
-0.1185276061296463,
0.28300487995147705,
0.11088039726018906,
-0.1831376552581787,
0.3285030126571655,
0.2012096643447876,
-0.0992138609290123,
0.28562480211257935,
0.21445652842521667,
-0.010067839175462723,
0.4889296889305115,
-0.11607340723276138,
0.5613716840744019,
0.0015973113477230072,
0.04227609559893608,
-0.0743757113814354,
-0.05856427922844887,
0.020800601691007614,
-0.0741828978061676,
0.11049925535917282,
0.656276524066925,
-0.16003891825675964,
0.2627718150615692,
-0.19525131583213806,
-0.12395812571048737,
-0.21211878955364227,
-0.3490724563598633,
-0.12653496861457825,
-0.3698245584964752,
-0.23571310937404633,
-0.17703689634799957,
0.4889459013938904,
0.1676059514284134,
-0.056997958570718765,
-0.06997887045145035,
0.14581209421157837,
0.1586296409368515,
-0.0902261808514595,
0.1506028175354004,
0.11794711649417877,
-0.06953379511833191,
0.11597702652215958,
0.14960896968841553,
0.34216153621673584,
0.2898683547973633,
0.041597411036491394,
0.03227590397000313,
0.12288928776979446,
-0.032194290310144424,
0.22930434346199036,
0.16795694828033447,
-0.14560732245445251,
0.2087416648864746,
0.19996587932109833,
0.033669374883174896,
-0.2037314474582672,
0.08066724240779877,
0.10752015560865402,
-0.22758275270462036,
-0.2115435153245926,
0.2849781811237335,
-0.4110225737094879,
-0.24277490377426147,
0.08538977056741714,
-0.09591331332921982,
-0.5721999406814575,
-0.419053316116333,
0.1252937912940979,
0.1445099115371704,
-0.28171592950820923,
0.20491145551204681,
-0.4433339834213257,
0.04626065492630005,
-0.14397625625133514,
-0.7790395617485046,
-0.4334697127342224,
-0.11901722848415375,
0.21200349926948547,
0.004835512489080429,
0.1790800243616104,
0.020421307533979416,
0.29066982865333557,
0.32050612568855286,
-0.1621401160955429,
-0.14567215740680695,
-0.36436277627944946,
0.12440942227840424,
-0.37967103719711304,
0.02501966804265976,
0.2262081801891327,
-0.04525396227836609,
-0.22863999009132385,
-0.1993657499551773,
0.07676928490400314,
-0.1338016390800476,
-0.25214335322380066,
-0.08094698190689087,
0.2110636681318283,
0.49322617053985596,
-0.33782389760017395,
0.359566867351532,
-0.11904061585664749,
-0.23701995611190796,
0.44636982679367065,
-0.28056007623672485,
0.0572638064622879,
0.6393604874610901,
-0.20904500782489777,
-0.08308205008506775,
-0.2869742214679718,
-0.14969941973686218,
0.049379006028175354,
-0.3756115436553955,
0.6054432988166809,
-0.029563896358013153,
0.26661446690559387,
-0.09332812577486038,
-0.13749602437019348,
-0.03571874275803566,
0.31466370820999146,
-0.2534518241882324,
-0.6782355308532715,
-0.17555180191993713,
0.4206818640232086,
0.05550107732415199,
-0.23407481610774994,
0.23390434682369232,
0.0987517237663269,
0.05566754937171936,
-0.20260494947433472,
0.0036590322852134705,
0.15085642039775848,
0.053218595683574677,
-0.03163903206586838,
0.34534409642219543,
0.11333861947059631,
0.19832554459571838,
0.7146095633506775,
0.2261214703321457,
-0.20027092099189758,
-0.07989531755447388,
-0.1250164806842804,
0.18638600409030914,
0.2509688436985016,
-0.3187956213951111,
-0.06575531512498856,
-0.04147312045097351,
0.12129484117031097,
-0.10032740235328674,
-0.023670442402362823,
0.17264539003372192,
0.13916534185409546,
-0.2706490457057953,
-0.3733859956264496,
-0.4995579421520233,
0.33937591314315796,
-0.2292599380016327,
0.2211141586303711,
0.015166927129030228,
0.2653765380382538,
-0.17913557589054108,
-0.3521783649921417,
0.3053176701068878,
0.10398462414741516,
0.5926951169967651,
0.09738149493932724,
-0.23006343841552734,
-0.071681447327137,
-0.3673844039440155,
0.3071899116039276,
0.30367037653923035,
0.07281012833118439,
-0.06014251708984375,
-0.145073801279068,
0.042175065726041794,
0.17658790946006775,
0.6093446016311646,
-0.2984358072280884,
0.21977689862251282,
-0.09909392893314362,
-0.34294259548187256,
0.06549358367919922,
0.21119527518749237,
0.2288888692855835,
0.07879935204982758,
0.03640108183026314,
0.37078195810317993,
-0.26358288526535034,
-0.1680150330066681,
-0.24914631247520447,
0.36210235953330994,
0.06923754513263702,
-0.23618198931217194,
-0.09742633253335953,
-0.13460737466812134,
-0.10186712443828583,
0.06653697043657303,
0.283629834651947,
-0.13047972321510315,
-0.06250789761543274,
0.08684293925762177,
-0.1404028683900833,
-0.24021413922309875,
0.2096119225025177,
0.3041730225086212,
0.20485076308250427,
-0.03559674322605133,
-0.007042622193694115,
0.4576864242553711,
-0.074239581823349,
0.23457838594913483,
0.3466785252094269,
-0.02252073958516121,
-0.3508308529853821,
-0.4499824047088623,
-0.0635400265455246,
0.3645017445087433,
0.34724438190460205,
0.020692970603704453,
0.2559627294540405,
0.4041084945201874,
-0.05812631547451019,
-0.38709601759910583,
-0.08772332221269608,
0.015859613195061684,
-0.043532829731702805,
-0.3755565285682678,
-0.14540399610996246,
0.5071619749069214,
0.3441968262195587,
-0.1847454309463501,
0.37532997131347656,
0.13864785432815552,
-0.6144272685050964,
0.3338550925254822,
0.10468403249979019,
1.0846292972564697,
0.20238646864891052,
0.0454963818192482,
0.004499312490224838,
-0.10504962503910065,
0.26515787839889526,
0.2733190655708313,
0.14763887226581573,
-0.19721673429012299,
-0.2763172388076782,
-0.03770807012915611,
-0.18941818177700043,
0.18481335043907166,
0.41104573011398315,
-0.004258383065462112,
-0.07632662355899811,
-0.11117072403430939,
0.26693275570869446,
-0.21997997164726257,
0.1891232281923294,
0.06397191435098648,
-0.24830198287963867,
0.032756563276052475,
0.013141937553882599,
0.137749582529068,
-0.05855864658951759,
0.22733163833618164,
-0.46858054399490356,
-0.09021001309156418,
-0.3865967392921448,
0.11599385738372803,
-0.1790982484817505,
-0.49522069096565247,
0.20229434967041016,
0.16887609660625458,
0.0933733582496643,
0.3243081867694855,
0.40969038009643555,
0.4482523202896118,
-0.021383564919233322,
-0.19910050928592682,
0.05093558132648468,
0.25166162848472595,
0.28995686769485474,
-0.27635815739631653,
-0.2253386676311493,
0.14510394632816315,
0.16957241296768188,
-0.13506755232810974,
-0.02546759694814682,
-0.10666440427303314,
-0.5109802484512329,
-0.2677409052848816,
0.01676945388317108,
-0.1710326224565506,
-0.14476163685321808,
0.02396697923541069,
-0.3638383448123932,
0.18440718948841095,
0.00040265917778015137,
0.010729294270277023,
0.282972127199173,
-0.06863001734018326,
0.3702602982521057,
-0.09383463859558105,
-0.2008073627948761,
-0.0006593111902475357,
0.5502467751502991,
-0.24377822875976562,
-0.13937100768089294,
0.2838761806488037,
-0.4520204961299896,
-0.33465272188186646,
-0.02436005510389805,
0.038051851093769073,
0.05942238122224808,
-0.20817622542381287,
-0.13069993257522583,
0.34414413571357727,
-0.010957673192024231,
-0.14743652939796448,
0.19695478677749634,
-0.2527156472206116,
0.09506990015506744,
-0.25903967022895813,
-0.20560075342655182,
-0.3202750086784363,
0.44752001762390137,
-0.20744477212429047,
0.26800963282585144,
0.06767988204956055,
0.2469547986984253,
-0.1681741327047348,
0.30825337767601013,
-0.23713922500610352,
-0.1566781848669052,
0.04913482069969177,
-0.015391025692224503,
0.19917914271354675,
0.21195679903030396,
0.29022613167762756,
-0.35152724385261536,
-0.017464112490415573,
0.3003374934196472,
-0.19307202100753784,
-0.09721758961677551,
-0.168826624751091,
0.18711450695991516,
0.05539313703775406,
0.1523609310388565,
0.08083595335483551,
0.09882623702287674,
-0.03775234892964363,
-0.08604343235492706,
0.3203052282333374,
0.277845174074173,
0.21141457557678223,
0.2680683135986328,
-0.015347424894571304,
0.23727473616600037,
-0.020121676847338676,
-0.10319085419178009,
-0.30617496371269226,
0.0019702687859535217,
0.12702041864395142,
0.25171178579330444,
-0.11323902755975723,
0.22987741231918335,
0.36674660444259644,
-0.0034114643931388855,
0.18911072611808777,
-0.059663839638233185,
0.06758381426334381,
0.2660598158836365,
-0.24454092979431152,
0.43847358226776123,
-0.0005028583109378815,
0.0615597628057003,
-0.34195712208747864,
-0.16921564936637878,
0.34724339842796326,
0.09260087460279465,
-0.23609237372875214,
-0.055795054882764816,
0.447112500667572,
-0.022807396948337555,
0.21827873587608337,
0.4467543661594391,
0.1963842660188675,
-0.0070260316133499146,
0.025418341159820557,
-0.08065857738256454,
0.24866317212581635,
-0.49292731285095215,
0.311759889125824,
0.5924936532974243,
-0.043873269110918045,
-0.1298116147518158,
0.2424229085445404,
0.35167908668518066,
0.29512086510658264,
0.30316388607025146,
-0.07494428008794785,
0.47746288776397705,
-0.14886480569839478,
0.14217925071716309,
0.051088616251945496,
-0.24623854458332062,
0.0714740976691246,
0.26646432280540466,
-0.13331447541713715,
0.1797264665365219,
0.11646179854869843,
0.5413593053817749,
-0.0005812402814626694,
-0.143794983625412,
0.16055426001548767,
0.2837647497653961,
-0.03494642674922943,
-0.11682556569576263,
-0.003360707312822342,
-0.030897140502929688,
-0.3566071391105652,
-0.30199939012527466,
0.05048634111881256,
-0.22921709716320038,
0.7687065601348877,
-0.02555975317955017,
0.05303684249520302,
0.19080547988414764,
-0.194097638130188,
0.09112001955509186,
0.5008471608161926,
-0.23026372492313385,
-0.3083011507987976,
-0.050893306732177734,
-0.16331695020198822,
0.46508097648620605,
0.3216260075569153,
0.16628962755203247,
-0.24390935897827148,
0.13489960134029388,
0.2224023938179016,
-0.40559256076812744,
0.010888760909438133,
-0.21528831124305725,
0.38894951343536377,
-0.11065930128097534,
-0.05919748917222023,
0.2203221172094345,
0.05520402640104294,
-0.011100404895842075,
-0.24170567095279694,
-0.10731925070285797,
0.15932245552539825,
-0.1853065937757492,
0.7003715634346008,
0.1826300323009491,
-0.023270871490240097,
0.1638111025094986,
-0.0807659849524498,
0.2369101643562317,
-0.26434406638145447,
0.22204074263572693,
-0.013768656179308891,
-0.021752066910266876,
0.03198252618312836,
0.0069145821034908295,
0.05470234900712967,
0.16089683771133423,
0.15023009479045868,
-0.25715774297714233,
-0.1957240253686905,
0.1820225864648819,
-0.5043073892593384,
-0.10165619105100632,
0.09414052963256836,
-0.08637538552284241,
0.24059027433395386,
-0.2988082468509674,
0.16859489679336548,
0.05675509572029114,
-0.280500590801239,
-0.0026632994413375854,
0.10835839062929153,
0.07464341074228287,
-0.023287860676646233,
0.4016994535923004,
-0.3002462387084961,
-0.018861765041947365,
0.25695306062698364,
-0.1555439531803131,
0.2561566233634949,
0.07368805259466171,
-0.03453759476542473,
-0.1054416298866272,
-0.04847127944231033,
-0.02194141410291195,
0.15036863088607788,
0.3085595369338989,
0.268496572971344,
0.16219043731689453,
-0.13819122314453125,
-0.16153040528297424,
0.05097102373838425,
0.14524637162685394,
-0.33040571212768555,
0.17333538830280304,
0.004185909405350685,
0.21272438764572144,
-0.2617456316947937,
-0.22955243289470673,
-0.19334766268730164,
0.08044485747814178,
-0.11794795095920563,
-0.19864952564239502,
-0.09923318028450012,
0.34386390447616577,
-0.3364426791667938,
0.17713573575019836,
-0.07419785112142563,
0.21191859245300293,
0.11357267200946808,
0.009758871048688889,
-0.02431919425725937,
-0.4720761179924011,
0.5437831878662109,
-0.6424936056137085,
-0.1682508885860443,
0.026503536850214005,
0.10854557156562805,
-0.10377288609743118,
-0.19017307460308075,
-0.6735650897026062,
-0.18871888518333435,
0.25198259949684143,
0.09958456456661224,
0.288252055644989,
0.06857208907604218,
-0.0019896039739251137,
-0.14196668565273285,
-0.22816599905490875,
-0.20432955026626587,
0.06263455748558044,
0.08956029266119003,
-0.006231699138879776,
-0.20354081690311432
] |
https://github.com/huggingface/datasets/issues/5147 | Allow ignoring kwargs inside fn_kwargs during dataset.map's fingerprinting | > Would it be created for this specific purpose? Any downsides in just using datasets.fingerprint?
This can also go in datasets.fingerprint indeed - but maybe datasets.hashing tells more about what the register function does (i.e. register this function to have a custom hashing) ?
> And would datasets.hashing.register just add some metadata to func in your approach (so it could be inspected from fingerprint_transform)?
Yup that's the idea :)
> And looking to the datasets.Dataset API, .filter would also benefited from this.
Indeed !
-----
If you would like to contribute this you can assign yourself to this issue by posting #self-assign
And of course if you have questions or if I can help, feel free to ping me ! | ### Feature request
`dataset.map` accepts a `fn_kwargs` that is passed to `fn`. Currently, the whole `fn_kwargs` is used by `fingerprint_transform` to calculate the new fingerprint.
I'd like to be able to inform `fingerprint_transform` which `fn_kwargs` shoud/shouldn't be taken into account during hashing.
Of course, users should be aware to properly use this new feature, just like the internal usages of `fingerprint_transform` [does](https://github.com/huggingface/datasets/blob/2699593b33ee63d17aad2a2bfddedd38a8df57b8/src/datasets/arrow_dataset.py#L2700).
### Motivation
This is originally motivated by https://github.com/huggingface/transformers/pull/18351#issuecomment-1263588680.
Nonetheless, consider a more general processing function that accepts a kwarg that does not influence it's output:
```python
def fn(example, verbose=False):
...
```
Then `dataset.map(fn, verbose=True)` would not benefit from dataset caching.
I'm not sure if other methods in the `Dataset` API could benefit from this feature.
### Your contribution
Based on `fingerprint_transform `'s `wrapper` function [here](https://github.com/huggingface/datasets/blob/c59cc34fcd2a369d27b77cc678017f5976a926a9/src/datasets/fingerprint.py#L443), it seems to me that it should be possible to make `.map`/`._map_single` accept something like `fn_use_fingerprint_kwargs`/`fn_ignore_fingerprint_kwargs` (probably another arg name). This would then be used by `fingerprint_transform.wrapper` to better/more flexibly hash the transformation.
I could contribute with a PR if this feature and approach look good to you. | 120 | Allow ignoring kwargs inside fn_kwargs during dataset.map's fingerprinting
### Feature request
`dataset.map` accepts a `fn_kwargs` that is passed to `fn`. Currently, the whole `fn_kwargs` is used by `fingerprint_transform` to calculate the new fingerprint.
I'd like to be able to inform `fingerprint_transform` which `fn_kwargs` shoud/shouldn't be taken into account during hashing.
Of course, users should be aware to properly use this new feature, just like the internal usages of `fingerprint_transform` [does](https://github.com/huggingface/datasets/blob/2699593b33ee63d17aad2a2bfddedd38a8df57b8/src/datasets/arrow_dataset.py#L2700).
### Motivation
This is originally motivated by https://github.com/huggingface/transformers/pull/18351#issuecomment-1263588680.
Nonetheless, consider a more general processing function that accepts a kwarg that does not influence it's output:
```python
def fn(example, verbose=False):
...
```
Then `dataset.map(fn, verbose=True)` would not benefit from dataset caching.
I'm not sure if other methods in the `Dataset` API could benefit from this feature.
### Your contribution
Based on `fingerprint_transform `'s `wrapper` function [here](https://github.com/huggingface/datasets/blob/c59cc34fcd2a369d27b77cc678017f5976a926a9/src/datasets/fingerprint.py#L443), it seems to me that it should be possible to make `.map`/`._map_single` accept something like `fn_use_fingerprint_kwargs`/`fn_ignore_fingerprint_kwargs` (probably another arg name). This would then be used by `fingerprint_transform.wrapper` to better/more flexibly hash the transformation.
I could contribute with a PR if this feature and approach look good to you.
> Would it be created for this specific purpose? Any downsides in just using datasets.fingerprint?
This can also go in datasets.fingerprint indeed - but maybe datasets.hashing tells more about what the register function does (i.e. register this function to have a custom hashing) ?
> And would datasets.hashing.register just add some metadata to func in your approach (so it could be inspected from fingerprint_transform)?
Yup that's the idea :)
> And looking to the datasets.Dataset API, .filter would also benefited from this.
Indeed !
-----
If you would like to contribute this you can assign yourself to this issue by posting #self-assign
And of course if you have questions or if I can help, feel free to ping me ! | [
-0.005865931510925293,
-0.06076231971383095,
-0.018343552947044373,
-0.19371993839740753,
-0.0050411708652973175,
0.1641051173210144,
0.3912358283996582,
0.16376887261867523,
0.20602382719516754,
0.034258365631103516,
0.12471693754196167,
0.36999616026878357,
-0.08079502731561661,
0.14987123012542725,
-0.1885683536529541,
0.3182225525379181,
0.09267837554216385,
0.1333041489124298,
-0.14327165484428406,
0.016390256583690643,
-0.3260578513145447,
-0.16084112226963043,
-0.04819091409444809,
0.07316616177558899,
-0.2230890691280365,
-0.17977017164230347,
0.020653320476412773,
-0.289815753698349,
-0.26830172538757324,
-0.2091381847858429,
0.10494671761989594,
0.4930146336555481,
-0.11240443587303162,
-0.03559652715921402,
-0.00012154686555732042,
0.21511073410511017,
0.28198909759521484,
-0.05450628697872162,
0.03692299500107765,
0.02176152914762497,
-0.3953632414340973,
-0.0087203998118639,
-0.14594918489456177,
-0.3048025071620941,
0.05383497476577759,
-0.18344929814338684,
-0.041958488523960114,
-0.25833454728126526,
0.16035529971122742,
-0.18406499922275543,
0.12748800218105316,
0.09863164275884628,
-0.3397107422351837,
0.3419038951396942,
-0.1479927897453308,
0.50718092918396,
-0.09250571578741074,
-0.09080705046653748,
-0.06634433567523956,
-0.2756352722644806,
-0.24176853895187378,
0.36419370770454407,
-0.21958771347999573,
-0.37261778116226196,
0.5514818429946899,
-0.1528361737728119,
0.25633206963539124,
-0.2664929926395416,
0.025272754952311516,
0.2092386782169342,
-0.0968354269862175,
-0.3318539261817932,
-0.4921858310699463,
-0.5865834355354309,
-0.10014338046312332,
0.12397675216197968,
0.0555436797440052,
-0.25222843885421753,
-0.1711578071117401,
0.19577033817768097,
-0.747734010219574,
-0.10958569496870041,
0.0275556743144989,
0.0015015974640846252,
0.2148817777633667,
0.11856328696012497,
0.2179485559463501,
0.04868171364068985,
0.2941719889640808,
0.015492158010601997,
-0.2442704439163208,
-0.27903294563293457,
0.04371373727917671,
0.24265602231025696,
-0.004095282405614853,
-0.09609895944595337,
0.13998407125473022,
0.1817147135734558,
0.45990005135536194,
0.07600989937782288,
0.09875810146331787,
0.2484849989414215,
0.07820126414299011,
0.30951040983200073,
0.1349792629480362,
0.0019933274015784264,
0.1388196349143982,
0.3611966073513031,
0.11944466829299927,
-0.11625214666128159,
-0.010847825556993484,
-0.0010515712201595306,
0.3486833870410919,
-0.15470528602600098,
0.039116475731134415,
-0.093839131295681,
0.15207114815711975,
0.028747666627168655,
0.28992944955825806,
-0.373025506734848,
-0.10257170349359512,
0.011207252740859985,
0.1739756464958191,
0.003649868071079254,
0.16442663967609406,
0.22275912761688232,
-0.1438068300485611,
0.1671743392944336,
0.11538886278867722,
0.2770242989063263,
-0.14145810902118683,
-0.09945116937160492,
-0.046494219452142715,
0.1580687314271927,
0.08473651111125946,
-0.2732619047164917,
0.27960577607154846,
0.29360583424568176,
0.2891462445259094,
0.32860320806503296,
0.07606012374162674,
-0.024582095444202423,
0.5082082748413086,
0.18371927738189697,
-0.5056420564651489,
0.11020482331514359,
-0.04848561808466911,
0.33946770429611206,
-0.33130231499671936,
0.31072068214416504,
-0.307517409324646,
-0.21846988797187805,
0.23685064911842346,
0.05437660217285156,
-0.5096779465675354,
-0.09475992619991302,
-0.4823932349681854,
0.2866712510585785,
0.10129471123218536,
-0.3018660247325897,
0.28999224305152893,
-0.11618702113628387,
-0.4545576572418213,
-0.31869444251060486,
0.15997572243213654,
0.14183452725410461,
0.33383089303970337,
-0.4758649468421936,
-0.1577541083097458,
-0.13811780512332916,
-0.026832304894924164,
0.06234478950500488,
-0.21016675233840942,
0.022564232349395752,
-0.35915571451187134,
0.5697404146194458,
0.14275547862052917,
-0.416191428899765,
-0.261448472738266,
0.2236405462026596,
0.05899067223072052,
0.4296763837337494,
0.0006550401449203491,
0.1685904711484909,
-0.15944983065128326,
-0.12316083908081055,
-0.3125994801521301,
0.3117021322250366,
-0.14907202124595642,
0.10675949603319168,
0.021055657416582108,
-0.5655102729797363,
0.43652987480163574,
-0.08498701453208923,
-0.08634422719478607,
0.15031631290912628,
-0.04734904319047928,
-0.25039753317832947,
0.2062424123287201,
-0.1512516289949417,
0.17371615767478943,
0.05230029672384262,
0.23588883876800537,
-0.2567746639251709,
0.03602102771401405,
-0.15197895467281342,
-0.47297585010528564,
0.2587464451789856,
-0.052615970373153687,
-0.28453391790390015,
-0.40761590003967285,
-0.42044776678085327,
0.22914278507232666,
-0.19500501453876495,
-0.16592121124267578,
-0.06553475558757782,
0.01335170865058899,
-0.1975710690021515,
0.011053856462240219,
-0.08459106087684631,
-0.16003115475177765,
-0.03667526692152023,
0.23904038965702057,
0.4272952377796173,
-0.2552259862422943,
-0.1185276061296463,
0.28300487995147705,
0.11088039726018906,
-0.1831376552581787,
0.3285030126571655,
0.2012096643447876,
-0.0992138609290123,
0.28562480211257935,
0.21445652842521667,
-0.010067839175462723,
0.4889296889305115,
-0.11607340723276138,
0.5613716840744019,
0.0015973113477230072,
0.04227609559893608,
-0.0743757113814354,
-0.05856427922844887,
0.020800601691007614,
-0.0741828978061676,
0.11049925535917282,
0.656276524066925,
-0.16003891825675964,
0.2627718150615692,
-0.19525131583213806,
-0.12395812571048737,
-0.21211878955364227,
-0.3490724563598633,
-0.12653496861457825,
-0.3698245584964752,
-0.23571310937404633,
-0.17703689634799957,
0.4889459013938904,
0.1676059514284134,
-0.056997958570718765,
-0.06997887045145035,
0.14581209421157837,
0.1586296409368515,
-0.0902261808514595,
0.1506028175354004,
0.11794711649417877,
-0.06953379511833191,
0.11597702652215958,
0.14960896968841553,
0.34216153621673584,
0.2898683547973633,
0.041597411036491394,
0.03227590397000313,
0.12288928776979446,
-0.032194290310144424,
0.22930434346199036,
0.16795694828033447,
-0.14560732245445251,
0.2087416648864746,
0.19996587932109833,
0.033669374883174896,
-0.2037314474582672,
0.08066724240779877,
0.10752015560865402,
-0.22758275270462036,
-0.2115435153245926,
0.2849781811237335,
-0.4110225737094879,
-0.24277490377426147,
0.08538977056741714,
-0.09591331332921982,
-0.5721999406814575,
-0.419053316116333,
0.1252937912940979,
0.1445099115371704,
-0.28171592950820923,
0.20491145551204681,
-0.4433339834213257,
0.04626065492630005,
-0.14397625625133514,
-0.7790395617485046,
-0.4334697127342224,
-0.11901722848415375,
0.21200349926948547,
0.004835512489080429,
0.1790800243616104,
0.020421307533979416,
0.29066982865333557,
0.32050612568855286,
-0.1621401160955429,
-0.14567215740680695,
-0.36436277627944946,
0.12440942227840424,
-0.37967103719711304,
0.02501966804265976,
0.2262081801891327,
-0.04525396227836609,
-0.22863999009132385,
-0.1993657499551773,
0.07676928490400314,
-0.1338016390800476,
-0.25214335322380066,
-0.08094698190689087,
0.2110636681318283,
0.49322617053985596,
-0.33782389760017395,
0.359566867351532,
-0.11904061585664749,
-0.23701995611190796,
0.44636982679367065,
-0.28056007623672485,
0.0572638064622879,
0.6393604874610901,
-0.20904500782489777,
-0.08308205008506775,
-0.2869742214679718,
-0.14969941973686218,
0.049379006028175354,
-0.3756115436553955,
0.6054432988166809,
-0.029563896358013153,
0.26661446690559387,
-0.09332812577486038,
-0.13749602437019348,
-0.03571874275803566,
0.31466370820999146,
-0.2534518241882324,
-0.6782355308532715,
-0.17555180191993713,
0.4206818640232086,
0.05550107732415199,
-0.23407481610774994,
0.23390434682369232,
0.0987517237663269,
0.05566754937171936,
-0.20260494947433472,
0.0036590322852134705,
0.15085642039775848,
0.053218595683574677,
-0.03163903206586838,
0.34534409642219543,
0.11333861947059631,
0.19832554459571838,
0.7146095633506775,
0.2261214703321457,
-0.20027092099189758,
-0.07989531755447388,
-0.1250164806842804,
0.18638600409030914,
0.2509688436985016,
-0.3187956213951111,
-0.06575531512498856,
-0.04147312045097351,
0.12129484117031097,
-0.10032740235328674,
-0.023670442402362823,
0.17264539003372192,
0.13916534185409546,
-0.2706490457057953,
-0.3733859956264496,
-0.4995579421520233,
0.33937591314315796,
-0.2292599380016327,
0.2211141586303711,
0.015166927129030228,
0.2653765380382538,
-0.17913557589054108,
-0.3521783649921417,
0.3053176701068878,
0.10398462414741516,
0.5926951169967651,
0.09738149493932724,
-0.23006343841552734,
-0.071681447327137,
-0.3673844039440155,
0.3071899116039276,
0.30367037653923035,
0.07281012833118439,
-0.06014251708984375,
-0.145073801279068,
0.042175065726041794,
0.17658790946006775,
0.6093446016311646,
-0.2984358072280884,
0.21977689862251282,
-0.09909392893314362,
-0.34294259548187256,
0.06549358367919922,
0.21119527518749237,
0.2288888692855835,
0.07879935204982758,
0.03640108183026314,
0.37078195810317993,
-0.26358288526535034,
-0.1680150330066681,
-0.24914631247520447,
0.36210235953330994,
0.06923754513263702,
-0.23618198931217194,
-0.09742633253335953,
-0.13460737466812134,
-0.10186712443828583,
0.06653697043657303,
0.283629834651947,
-0.13047972321510315,
-0.06250789761543274,
0.08684293925762177,
-0.1404028683900833,
-0.24021413922309875,
0.2096119225025177,
0.3041730225086212,
0.20485076308250427,
-0.03559674322605133,
-0.007042622193694115,
0.4576864242553711,
-0.074239581823349,
0.23457838594913483,
0.3466785252094269,
-0.02252073958516121,
-0.3508308529853821,
-0.4499824047088623,
-0.0635400265455246,
0.3645017445087433,
0.34724438190460205,
0.020692970603704453,
0.2559627294540405,
0.4041084945201874,
-0.05812631547451019,
-0.38709601759910583,
-0.08772332221269608,
0.015859613195061684,
-0.043532829731702805,
-0.3755565285682678,
-0.14540399610996246,
0.5071619749069214,
0.3441968262195587,
-0.1847454309463501,
0.37532997131347656,
0.13864785432815552,
-0.6144272685050964,
0.3338550925254822,
0.10468403249979019,
1.0846292972564697,
0.20238646864891052,
0.0454963818192482,
0.004499312490224838,
-0.10504962503910065,
0.26515787839889526,
0.2733190655708313,
0.14763887226581573,
-0.19721673429012299,
-0.2763172388076782,
-0.03770807012915611,
-0.18941818177700043,
0.18481335043907166,
0.41104573011398315,
-0.004258383065462112,
-0.07632662355899811,
-0.11117072403430939,
0.26693275570869446,
-0.21997997164726257,
0.1891232281923294,
0.06397191435098648,
-0.24830198287963867,
0.032756563276052475,
0.013141937553882599,
0.137749582529068,
-0.05855864658951759,
0.22733163833618164,
-0.46858054399490356,
-0.09021001309156418,
-0.3865967392921448,
0.11599385738372803,
-0.1790982484817505,
-0.49522069096565247,
0.20229434967041016,
0.16887609660625458,
0.0933733582496643,
0.3243081867694855,
0.40969038009643555,
0.4482523202896118,
-0.021383564919233322,
-0.19910050928592682,
0.05093558132648468,
0.25166162848472595,
0.28995686769485474,
-0.27635815739631653,
-0.2253386676311493,
0.14510394632816315,
0.16957241296768188,
-0.13506755232810974,
-0.02546759694814682,
-0.10666440427303314,
-0.5109802484512329,
-0.2677409052848816,
0.01676945388317108,
-0.1710326224565506,
-0.14476163685321808,
0.02396697923541069,
-0.3638383448123932,
0.18440718948841095,
0.00040265917778015137,
0.010729294270277023,
0.282972127199173,
-0.06863001734018326,
0.3702602982521057,
-0.09383463859558105,
-0.2008073627948761,
-0.0006593111902475357,
0.5502467751502991,
-0.24377822875976562,
-0.13937100768089294,
0.2838761806488037,
-0.4520204961299896,
-0.33465272188186646,
-0.02436005510389805,
0.038051851093769073,
0.05942238122224808,
-0.20817622542381287,
-0.13069993257522583,
0.34414413571357727,
-0.010957673192024231,
-0.14743652939796448,
0.19695478677749634,
-0.2527156472206116,
0.09506990015506744,
-0.25903967022895813,
-0.20560075342655182,
-0.3202750086784363,
0.44752001762390137,
-0.20744477212429047,
0.26800963282585144,
0.06767988204956055,
0.2469547986984253,
-0.1681741327047348,
0.30825337767601013,
-0.23713922500610352,
-0.1566781848669052,
0.04913482069969177,
-0.015391025692224503,
0.19917914271354675,
0.21195679903030396,
0.29022613167762756,
-0.35152724385261536,
-0.017464112490415573,
0.3003374934196472,
-0.19307202100753784,
-0.09721758961677551,
-0.168826624751091,
0.18711450695991516,
0.05539313703775406,
0.1523609310388565,
0.08083595335483551,
0.09882623702287674,
-0.03775234892964363,
-0.08604343235492706,
0.3203052282333374,
0.277845174074173,
0.21141457557678223,
0.2680683135986328,
-0.015347424894571304,
0.23727473616600037,
-0.020121676847338676,
-0.10319085419178009,
-0.30617496371269226,
0.0019702687859535217,
0.12702041864395142,
0.25171178579330444,
-0.11323902755975723,
0.22987741231918335,
0.36674660444259644,
-0.0034114643931388855,
0.18911072611808777,
-0.059663839638233185,
0.06758381426334381,
0.2660598158836365,
-0.24454092979431152,
0.43847358226776123,
-0.0005028583109378815,
0.0615597628057003,
-0.34195712208747864,
-0.16921564936637878,
0.34724339842796326,
0.09260087460279465,
-0.23609237372875214,
-0.055795054882764816,
0.447112500667572,
-0.022807396948337555,
0.21827873587608337,
0.4467543661594391,
0.1963842660188675,
-0.0070260316133499146,
0.025418341159820557,
-0.08065857738256454,
0.24866317212581635,
-0.49292731285095215,
0.311759889125824,
0.5924936532974243,
-0.043873269110918045,
-0.1298116147518158,
0.2424229085445404,
0.35167908668518066,
0.29512086510658264,
0.30316388607025146,
-0.07494428008794785,
0.47746288776397705,
-0.14886480569839478,
0.14217925071716309,
0.051088616251945496,
-0.24623854458332062,
0.0714740976691246,
0.26646432280540466,
-0.13331447541713715,
0.1797264665365219,
0.11646179854869843,
0.5413593053817749,
-0.0005812402814626694,
-0.143794983625412,
0.16055426001548767,
0.2837647497653961,
-0.03494642674922943,
-0.11682556569576263,
-0.003360707312822342,
-0.030897140502929688,
-0.3566071391105652,
-0.30199939012527466,
0.05048634111881256,
-0.22921709716320038,
0.7687065601348877,
-0.02555975317955017,
0.05303684249520302,
0.19080547988414764,
-0.194097638130188,
0.09112001955509186,
0.5008471608161926,
-0.23026372492313385,
-0.3083011507987976,
-0.050893306732177734,
-0.16331695020198822,
0.46508097648620605,
0.3216260075569153,
0.16628962755203247,
-0.24390935897827148,
0.13489960134029388,
0.2224023938179016,
-0.40559256076812744,
0.010888760909438133,
-0.21528831124305725,
0.38894951343536377,
-0.11065930128097534,
-0.05919748917222023,
0.2203221172094345,
0.05520402640104294,
-0.011100404895842075,
-0.24170567095279694,
-0.10731925070285797,
0.15932245552539825,
-0.1853065937757492,
0.7003715634346008,
0.1826300323009491,
-0.023270871490240097,
0.1638111025094986,
-0.0807659849524498,
0.2369101643562317,
-0.26434406638145447,
0.22204074263572693,
-0.013768656179308891,
-0.021752066910266876,
0.03198252618312836,
0.0069145821034908295,
0.05470234900712967,
0.16089683771133423,
0.15023009479045868,
-0.25715774297714233,
-0.1957240253686905,
0.1820225864648819,
-0.5043073892593384,
-0.10165619105100632,
0.09414052963256836,
-0.08637538552284241,
0.24059027433395386,
-0.2988082468509674,
0.16859489679336548,
0.05675509572029114,
-0.280500590801239,
-0.0026632994413375854,
0.10835839062929153,
0.07464341074228287,
-0.023287860676646233,
0.4016994535923004,
-0.3002462387084961,
-0.018861765041947365,
0.25695306062698364,
-0.1555439531803131,
0.2561566233634949,
0.07368805259466171,
-0.03453759476542473,
-0.1054416298866272,
-0.04847127944231033,
-0.02194141410291195,
0.15036863088607788,
0.3085595369338989,
0.268496572971344,
0.16219043731689453,
-0.13819122314453125,
-0.16153040528297424,
0.05097102373838425,
0.14524637162685394,
-0.33040571212768555,
0.17333538830280304,
0.004185909405350685,
0.21272438764572144,
-0.2617456316947937,
-0.22955243289470673,
-0.19334766268730164,
0.08044485747814178,
-0.11794795095920563,
-0.19864952564239502,
-0.09923318028450012,
0.34386390447616577,
-0.3364426791667938,
0.17713573575019836,
-0.07419785112142563,
0.21191859245300293,
0.11357267200946808,
0.009758871048688889,
-0.02431919425725937,
-0.4720761179924011,
0.5437831878662109,
-0.6424936056137085,
-0.1682508885860443,
0.026503536850214005,
0.10854557156562805,
-0.10377288609743118,
-0.19017307460308075,
-0.6735650897026062,
-0.18871888518333435,
0.25198259949684143,
0.09958456456661224,
0.288252055644989,
0.06857208907604218,
-0.0019896039739251137,
-0.14196668565273285,
-0.22816599905490875,
-0.20432955026626587,
0.06263455748558044,
0.08956029266119003,
-0.006231699138879776,
-0.20354081690311432
] |
https://github.com/huggingface/datasets/issues/5147 | Allow ignoring kwargs inside fn_kwargs during dataset.map's fingerprinting | > This can also go in datasets.fingerprint indeed - but maybe datasets.hashing tells more about what the register function does (i.e. register this function to have a custom hashing) ?
Sure, it makes sense.
---
I don't plan to work on it right now, so I'll let it unassigned in case somebody wants to join. I'll get back at it as soon as possible though.
| ### Feature request
`dataset.map` accepts a `fn_kwargs` that is passed to `fn`. Currently, the whole `fn_kwargs` is used by `fingerprint_transform` to calculate the new fingerprint.
I'd like to be able to inform `fingerprint_transform` which `fn_kwargs` shoud/shouldn't be taken into account during hashing.
Of course, users should be aware to properly use this new feature, just like the internal usages of `fingerprint_transform` [does](https://github.com/huggingface/datasets/blob/2699593b33ee63d17aad2a2bfddedd38a8df57b8/src/datasets/arrow_dataset.py#L2700).
### Motivation
This is originally motivated by https://github.com/huggingface/transformers/pull/18351#issuecomment-1263588680.
Nonetheless, consider a more general processing function that accepts a kwarg that does not influence it's output:
```python
def fn(example, verbose=False):
...
```
Then `dataset.map(fn, verbose=True)` would not benefit from dataset caching.
I'm not sure if other methods in the `Dataset` API could benefit from this feature.
### Your contribution
Based on `fingerprint_transform `'s `wrapper` function [here](https://github.com/huggingface/datasets/blob/c59cc34fcd2a369d27b77cc678017f5976a926a9/src/datasets/fingerprint.py#L443), it seems to me that it should be possible to make `.map`/`._map_single` accept something like `fn_use_fingerprint_kwargs`/`fn_ignore_fingerprint_kwargs` (probably another arg name). This would then be used by `fingerprint_transform.wrapper` to better/more flexibly hash the transformation.
I could contribute with a PR if this feature and approach look good to you. | 65 | Allow ignoring kwargs inside fn_kwargs during dataset.map's fingerprinting
### Feature request
`dataset.map` accepts a `fn_kwargs` that is passed to `fn`. Currently, the whole `fn_kwargs` is used by `fingerprint_transform` to calculate the new fingerprint.
I'd like to be able to inform `fingerprint_transform` which `fn_kwargs` shoud/shouldn't be taken into account during hashing.
Of course, users should be aware to properly use this new feature, just like the internal usages of `fingerprint_transform` [does](https://github.com/huggingface/datasets/blob/2699593b33ee63d17aad2a2bfddedd38a8df57b8/src/datasets/arrow_dataset.py#L2700).
### Motivation
This is originally motivated by https://github.com/huggingface/transformers/pull/18351#issuecomment-1263588680.
Nonetheless, consider a more general processing function that accepts a kwarg that does not influence it's output:
```python
def fn(example, verbose=False):
...
```
Then `dataset.map(fn, verbose=True)` would not benefit from dataset caching.
I'm not sure if other methods in the `Dataset` API could benefit from this feature.
### Your contribution
Based on `fingerprint_transform `'s `wrapper` function [here](https://github.com/huggingface/datasets/blob/c59cc34fcd2a369d27b77cc678017f5976a926a9/src/datasets/fingerprint.py#L443), it seems to me that it should be possible to make `.map`/`._map_single` accept something like `fn_use_fingerprint_kwargs`/`fn_ignore_fingerprint_kwargs` (probably another arg name). This would then be used by `fingerprint_transform.wrapper` to better/more flexibly hash the transformation.
I could contribute with a PR if this feature and approach look good to you.
> This can also go in datasets.fingerprint indeed - but maybe datasets.hashing tells more about what the register function does (i.e. register this function to have a custom hashing) ?
Sure, it makes sense.
---
I don't plan to work on it right now, so I'll let it unassigned in case somebody wants to join. I'll get back at it as soon as possible though.
| [
-0.005865931510925293,
-0.06076231971383095,
-0.018343552947044373,
-0.19371993839740753,
-0.0050411708652973175,
0.1641051173210144,
0.3912358283996582,
0.16376887261867523,
0.20602382719516754,
0.034258365631103516,
0.12471693754196167,
0.36999616026878357,
-0.08079502731561661,
0.14987123012542725,
-0.1885683536529541,
0.3182225525379181,
0.09267837554216385,
0.1333041489124298,
-0.14327165484428406,
0.016390256583690643,
-0.3260578513145447,
-0.16084112226963043,
-0.04819091409444809,
0.07316616177558899,
-0.2230890691280365,
-0.17977017164230347,
0.020653320476412773,
-0.289815753698349,
-0.26830172538757324,
-0.2091381847858429,
0.10494671761989594,
0.4930146336555481,
-0.11240443587303162,
-0.03559652715921402,
-0.00012154686555732042,
0.21511073410511017,
0.28198909759521484,
-0.05450628697872162,
0.03692299500107765,
0.02176152914762497,
-0.3953632414340973,
-0.0087203998118639,
-0.14594918489456177,
-0.3048025071620941,
0.05383497476577759,
-0.18344929814338684,
-0.041958488523960114,
-0.25833454728126526,
0.16035529971122742,
-0.18406499922275543,
0.12748800218105316,
0.09863164275884628,
-0.3397107422351837,
0.3419038951396942,
-0.1479927897453308,
0.50718092918396,
-0.09250571578741074,
-0.09080705046653748,
-0.06634433567523956,
-0.2756352722644806,
-0.24176853895187378,
0.36419370770454407,
-0.21958771347999573,
-0.37261778116226196,
0.5514818429946899,
-0.1528361737728119,
0.25633206963539124,
-0.2664929926395416,
0.025272754952311516,
0.2092386782169342,
-0.0968354269862175,
-0.3318539261817932,
-0.4921858310699463,
-0.5865834355354309,
-0.10014338046312332,
0.12397675216197968,
0.0555436797440052,
-0.25222843885421753,
-0.1711578071117401,
0.19577033817768097,
-0.747734010219574,
-0.10958569496870041,
0.0275556743144989,
0.0015015974640846252,
0.2148817777633667,
0.11856328696012497,
0.2179485559463501,
0.04868171364068985,
0.2941719889640808,
0.015492158010601997,
-0.2442704439163208,
-0.27903294563293457,
0.04371373727917671,
0.24265602231025696,
-0.004095282405614853,
-0.09609895944595337,
0.13998407125473022,
0.1817147135734558,
0.45990005135536194,
0.07600989937782288,
0.09875810146331787,
0.2484849989414215,
0.07820126414299011,
0.30951040983200073,
0.1349792629480362,
0.0019933274015784264,
0.1388196349143982,
0.3611966073513031,
0.11944466829299927,
-0.11625214666128159,
-0.010847825556993484,
-0.0010515712201595306,
0.3486833870410919,
-0.15470528602600098,
0.039116475731134415,
-0.093839131295681,
0.15207114815711975,
0.028747666627168655,
0.28992944955825806,
-0.373025506734848,
-0.10257170349359512,
0.011207252740859985,
0.1739756464958191,
0.003649868071079254,
0.16442663967609406,
0.22275912761688232,
-0.1438068300485611,
0.1671743392944336,
0.11538886278867722,
0.2770242989063263,
-0.14145810902118683,
-0.09945116937160492,
-0.046494219452142715,
0.1580687314271927,
0.08473651111125946,
-0.2732619047164917,
0.27960577607154846,
0.29360583424568176,
0.2891462445259094,
0.32860320806503296,
0.07606012374162674,
-0.024582095444202423,
0.5082082748413086,
0.18371927738189697,
-0.5056420564651489,
0.11020482331514359,
-0.04848561808466911,
0.33946770429611206,
-0.33130231499671936,
0.31072068214416504,
-0.307517409324646,
-0.21846988797187805,
0.23685064911842346,
0.05437660217285156,
-0.5096779465675354,
-0.09475992619991302,
-0.4823932349681854,
0.2866712510585785,
0.10129471123218536,
-0.3018660247325897,
0.28999224305152893,
-0.11618702113628387,
-0.4545576572418213,
-0.31869444251060486,
0.15997572243213654,
0.14183452725410461,
0.33383089303970337,
-0.4758649468421936,
-0.1577541083097458,
-0.13811780512332916,
-0.026832304894924164,
0.06234478950500488,
-0.21016675233840942,
0.022564232349395752,
-0.35915571451187134,
0.5697404146194458,
0.14275547862052917,
-0.416191428899765,
-0.261448472738266,
0.2236405462026596,
0.05899067223072052,
0.4296763837337494,
0.0006550401449203491,
0.1685904711484909,
-0.15944983065128326,
-0.12316083908081055,
-0.3125994801521301,
0.3117021322250366,
-0.14907202124595642,
0.10675949603319168,
0.021055657416582108,
-0.5655102729797363,
0.43652987480163574,
-0.08498701453208923,
-0.08634422719478607,
0.15031631290912628,
-0.04734904319047928,
-0.25039753317832947,
0.2062424123287201,
-0.1512516289949417,
0.17371615767478943,
0.05230029672384262,
0.23588883876800537,
-0.2567746639251709,
0.03602102771401405,
-0.15197895467281342,
-0.47297585010528564,
0.2587464451789856,
-0.052615970373153687,
-0.28453391790390015,
-0.40761590003967285,
-0.42044776678085327,
0.22914278507232666,
-0.19500501453876495,
-0.16592121124267578,
-0.06553475558757782,
0.01335170865058899,
-0.1975710690021515,
0.011053856462240219,
-0.08459106087684631,
-0.16003115475177765,
-0.03667526692152023,
0.23904038965702057,
0.4272952377796173,
-0.2552259862422943,
-0.1185276061296463,
0.28300487995147705,
0.11088039726018906,
-0.1831376552581787,
0.3285030126571655,
0.2012096643447876,
-0.0992138609290123,
0.28562480211257935,
0.21445652842521667,
-0.010067839175462723,
0.4889296889305115,
-0.11607340723276138,
0.5613716840744019,
0.0015973113477230072,
0.04227609559893608,
-0.0743757113814354,
-0.05856427922844887,
0.020800601691007614,
-0.0741828978061676,
0.11049925535917282,
0.656276524066925,
-0.16003891825675964,
0.2627718150615692,
-0.19525131583213806,
-0.12395812571048737,
-0.21211878955364227,
-0.3490724563598633,
-0.12653496861457825,
-0.3698245584964752,
-0.23571310937404633,
-0.17703689634799957,
0.4889459013938904,
0.1676059514284134,
-0.056997958570718765,
-0.06997887045145035,
0.14581209421157837,
0.1586296409368515,
-0.0902261808514595,
0.1506028175354004,
0.11794711649417877,
-0.06953379511833191,
0.11597702652215958,
0.14960896968841553,
0.34216153621673584,
0.2898683547973633,
0.041597411036491394,
0.03227590397000313,
0.12288928776979446,
-0.032194290310144424,
0.22930434346199036,
0.16795694828033447,
-0.14560732245445251,
0.2087416648864746,
0.19996587932109833,
0.033669374883174896,
-0.2037314474582672,
0.08066724240779877,
0.10752015560865402,
-0.22758275270462036,
-0.2115435153245926,
0.2849781811237335,
-0.4110225737094879,
-0.24277490377426147,
0.08538977056741714,
-0.09591331332921982,
-0.5721999406814575,
-0.419053316116333,
0.1252937912940979,
0.1445099115371704,
-0.28171592950820923,
0.20491145551204681,
-0.4433339834213257,
0.04626065492630005,
-0.14397625625133514,
-0.7790395617485046,
-0.4334697127342224,
-0.11901722848415375,
0.21200349926948547,
0.004835512489080429,
0.1790800243616104,
0.020421307533979416,
0.29066982865333557,
0.32050612568855286,
-0.1621401160955429,
-0.14567215740680695,
-0.36436277627944946,
0.12440942227840424,
-0.37967103719711304,
0.02501966804265976,
0.2262081801891327,
-0.04525396227836609,
-0.22863999009132385,
-0.1993657499551773,
0.07676928490400314,
-0.1338016390800476,
-0.25214335322380066,
-0.08094698190689087,
0.2110636681318283,
0.49322617053985596,
-0.33782389760017395,
0.359566867351532,
-0.11904061585664749,
-0.23701995611190796,
0.44636982679367065,
-0.28056007623672485,
0.0572638064622879,
0.6393604874610901,
-0.20904500782489777,
-0.08308205008506775,
-0.2869742214679718,
-0.14969941973686218,
0.049379006028175354,
-0.3756115436553955,
0.6054432988166809,
-0.029563896358013153,
0.26661446690559387,
-0.09332812577486038,
-0.13749602437019348,
-0.03571874275803566,
0.31466370820999146,
-0.2534518241882324,
-0.6782355308532715,
-0.17555180191993713,
0.4206818640232086,
0.05550107732415199,
-0.23407481610774994,
0.23390434682369232,
0.0987517237663269,
0.05566754937171936,
-0.20260494947433472,
0.0036590322852134705,
0.15085642039775848,
0.053218595683574677,
-0.03163903206586838,
0.34534409642219543,
0.11333861947059631,
0.19832554459571838,
0.7146095633506775,
0.2261214703321457,
-0.20027092099189758,
-0.07989531755447388,
-0.1250164806842804,
0.18638600409030914,
0.2509688436985016,
-0.3187956213951111,
-0.06575531512498856,
-0.04147312045097351,
0.12129484117031097,
-0.10032740235328674,
-0.023670442402362823,
0.17264539003372192,
0.13916534185409546,
-0.2706490457057953,
-0.3733859956264496,
-0.4995579421520233,
0.33937591314315796,
-0.2292599380016327,
0.2211141586303711,
0.015166927129030228,
0.2653765380382538,
-0.17913557589054108,
-0.3521783649921417,
0.3053176701068878,
0.10398462414741516,
0.5926951169967651,
0.09738149493932724,
-0.23006343841552734,
-0.071681447327137,
-0.3673844039440155,
0.3071899116039276,
0.30367037653923035,
0.07281012833118439,
-0.06014251708984375,
-0.145073801279068,
0.042175065726041794,
0.17658790946006775,
0.6093446016311646,
-0.2984358072280884,
0.21977689862251282,
-0.09909392893314362,
-0.34294259548187256,
0.06549358367919922,
0.21119527518749237,
0.2288888692855835,
0.07879935204982758,
0.03640108183026314,
0.37078195810317993,
-0.26358288526535034,
-0.1680150330066681,
-0.24914631247520447,
0.36210235953330994,
0.06923754513263702,
-0.23618198931217194,
-0.09742633253335953,
-0.13460737466812134,
-0.10186712443828583,
0.06653697043657303,
0.283629834651947,
-0.13047972321510315,
-0.06250789761543274,
0.08684293925762177,
-0.1404028683900833,
-0.24021413922309875,
0.2096119225025177,
0.3041730225086212,
0.20485076308250427,
-0.03559674322605133,
-0.007042622193694115,
0.4576864242553711,
-0.074239581823349,
0.23457838594913483,
0.3466785252094269,
-0.02252073958516121,
-0.3508308529853821,
-0.4499824047088623,
-0.0635400265455246,
0.3645017445087433,
0.34724438190460205,
0.020692970603704453,
0.2559627294540405,
0.4041084945201874,
-0.05812631547451019,
-0.38709601759910583,
-0.08772332221269608,
0.015859613195061684,
-0.043532829731702805,
-0.3755565285682678,
-0.14540399610996246,
0.5071619749069214,
0.3441968262195587,
-0.1847454309463501,
0.37532997131347656,
0.13864785432815552,
-0.6144272685050964,
0.3338550925254822,
0.10468403249979019,
1.0846292972564697,
0.20238646864891052,
0.0454963818192482,
0.004499312490224838,
-0.10504962503910065,
0.26515787839889526,
0.2733190655708313,
0.14763887226581573,
-0.19721673429012299,
-0.2763172388076782,
-0.03770807012915611,
-0.18941818177700043,
0.18481335043907166,
0.41104573011398315,
-0.004258383065462112,
-0.07632662355899811,
-0.11117072403430939,
0.26693275570869446,
-0.21997997164726257,
0.1891232281923294,
0.06397191435098648,
-0.24830198287963867,
0.032756563276052475,
0.013141937553882599,
0.137749582529068,
-0.05855864658951759,
0.22733163833618164,
-0.46858054399490356,
-0.09021001309156418,
-0.3865967392921448,
0.11599385738372803,
-0.1790982484817505,
-0.49522069096565247,
0.20229434967041016,
0.16887609660625458,
0.0933733582496643,
0.3243081867694855,
0.40969038009643555,
0.4482523202896118,
-0.021383564919233322,
-0.19910050928592682,
0.05093558132648468,
0.25166162848472595,
0.28995686769485474,
-0.27635815739631653,
-0.2253386676311493,
0.14510394632816315,
0.16957241296768188,
-0.13506755232810974,
-0.02546759694814682,
-0.10666440427303314,
-0.5109802484512329,
-0.2677409052848816,
0.01676945388317108,
-0.1710326224565506,
-0.14476163685321808,
0.02396697923541069,
-0.3638383448123932,
0.18440718948841095,
0.00040265917778015137,
0.010729294270277023,
0.282972127199173,
-0.06863001734018326,
0.3702602982521057,
-0.09383463859558105,
-0.2008073627948761,
-0.0006593111902475357,
0.5502467751502991,
-0.24377822875976562,
-0.13937100768089294,
0.2838761806488037,
-0.4520204961299896,
-0.33465272188186646,
-0.02436005510389805,
0.038051851093769073,
0.05942238122224808,
-0.20817622542381287,
-0.13069993257522583,
0.34414413571357727,
-0.010957673192024231,
-0.14743652939796448,
0.19695478677749634,
-0.2527156472206116,
0.09506990015506744,
-0.25903967022895813,
-0.20560075342655182,
-0.3202750086784363,
0.44752001762390137,
-0.20744477212429047,
0.26800963282585144,
0.06767988204956055,
0.2469547986984253,
-0.1681741327047348,
0.30825337767601013,
-0.23713922500610352,
-0.1566781848669052,
0.04913482069969177,
-0.015391025692224503,
0.19917914271354675,
0.21195679903030396,
0.29022613167762756,
-0.35152724385261536,
-0.017464112490415573,
0.3003374934196472,
-0.19307202100753784,
-0.09721758961677551,
-0.168826624751091,
0.18711450695991516,
0.05539313703775406,
0.1523609310388565,
0.08083595335483551,
0.09882623702287674,
-0.03775234892964363,
-0.08604343235492706,
0.3203052282333374,
0.277845174074173,
0.21141457557678223,
0.2680683135986328,
-0.015347424894571304,
0.23727473616600037,
-0.020121676847338676,
-0.10319085419178009,
-0.30617496371269226,
0.0019702687859535217,
0.12702041864395142,
0.25171178579330444,
-0.11323902755975723,
0.22987741231918335,
0.36674660444259644,
-0.0034114643931388855,
0.18911072611808777,
-0.059663839638233185,
0.06758381426334381,
0.2660598158836365,
-0.24454092979431152,
0.43847358226776123,
-0.0005028583109378815,
0.0615597628057003,
-0.34195712208747864,
-0.16921564936637878,
0.34724339842796326,
0.09260087460279465,
-0.23609237372875214,
-0.055795054882764816,
0.447112500667572,
-0.022807396948337555,
0.21827873587608337,
0.4467543661594391,
0.1963842660188675,
-0.0070260316133499146,
0.025418341159820557,
-0.08065857738256454,
0.24866317212581635,
-0.49292731285095215,
0.311759889125824,
0.5924936532974243,
-0.043873269110918045,
-0.1298116147518158,
0.2424229085445404,
0.35167908668518066,
0.29512086510658264,
0.30316388607025146,
-0.07494428008794785,
0.47746288776397705,
-0.14886480569839478,
0.14217925071716309,
0.051088616251945496,
-0.24623854458332062,
0.0714740976691246,
0.26646432280540466,
-0.13331447541713715,
0.1797264665365219,
0.11646179854869843,
0.5413593053817749,
-0.0005812402814626694,
-0.143794983625412,
0.16055426001548767,
0.2837647497653961,
-0.03494642674922943,
-0.11682556569576263,
-0.003360707312822342,
-0.030897140502929688,
-0.3566071391105652,
-0.30199939012527466,
0.05048634111881256,
-0.22921709716320038,
0.7687065601348877,
-0.02555975317955017,
0.05303684249520302,
0.19080547988414764,
-0.194097638130188,
0.09112001955509186,
0.5008471608161926,
-0.23026372492313385,
-0.3083011507987976,
-0.050893306732177734,
-0.16331695020198822,
0.46508097648620605,
0.3216260075569153,
0.16628962755203247,
-0.24390935897827148,
0.13489960134029388,
0.2224023938179016,
-0.40559256076812744,
0.010888760909438133,
-0.21528831124305725,
0.38894951343536377,
-0.11065930128097534,
-0.05919748917222023,
0.2203221172094345,
0.05520402640104294,
-0.011100404895842075,
-0.24170567095279694,
-0.10731925070285797,
0.15932245552539825,
-0.1853065937757492,
0.7003715634346008,
0.1826300323009491,
-0.023270871490240097,
0.1638111025094986,
-0.0807659849524498,
0.2369101643562317,
-0.26434406638145447,
0.22204074263572693,
-0.013768656179308891,
-0.021752066910266876,
0.03198252618312836,
0.0069145821034908295,
0.05470234900712967,
0.16089683771133423,
0.15023009479045868,
-0.25715774297714233,
-0.1957240253686905,
0.1820225864648819,
-0.5043073892593384,
-0.10165619105100632,
0.09414052963256836,
-0.08637538552284241,
0.24059027433395386,
-0.2988082468509674,
0.16859489679336548,
0.05675509572029114,
-0.280500590801239,
-0.0026632994413375854,
0.10835839062929153,
0.07464341074228287,
-0.023287860676646233,
0.4016994535923004,
-0.3002462387084961,
-0.018861765041947365,
0.25695306062698364,
-0.1555439531803131,
0.2561566233634949,
0.07368805259466171,
-0.03453759476542473,
-0.1054416298866272,
-0.04847127944231033,
-0.02194141410291195,
0.15036863088607788,
0.3085595369338989,
0.268496572971344,
0.16219043731689453,
-0.13819122314453125,
-0.16153040528297424,
0.05097102373838425,
0.14524637162685394,
-0.33040571212768555,
0.17333538830280304,
0.004185909405350685,
0.21272438764572144,
-0.2617456316947937,
-0.22955243289470673,
-0.19334766268730164,
0.08044485747814178,
-0.11794795095920563,
-0.19864952564239502,
-0.09923318028450012,
0.34386390447616577,
-0.3364426791667938,
0.17713573575019836,
-0.07419785112142563,
0.21191859245300293,
0.11357267200946808,
0.009758871048688889,
-0.02431919425725937,
-0.4720761179924011,
0.5437831878662109,
-0.6424936056137085,
-0.1682508885860443,
0.026503536850214005,
0.10854557156562805,
-0.10377288609743118,
-0.19017307460308075,
-0.6735650897026062,
-0.18871888518333435,
0.25198259949684143,
0.09958456456661224,
0.288252055644989,
0.06857208907604218,
-0.0019896039739251137,
-0.14196668565273285,
-0.22816599905490875,
-0.20432955026626587,
0.06263455748558044,
0.08956029266119003,
-0.006231699138879776,
-0.20354081690311432
] |
https://github.com/huggingface/datasets/issues/5145 | Dataset order is not deterministic with ZIP archives and `iter_files` | Thanks for reporting ! The issue doesn't come from shuffling, but from `beans` row order not being deterministic:
https://huggingface.co/datasets/beans/blob/main/beans.py uses `dl_manager.iter_files` on ZIP archives and the file order doesn't seen to be deterministic and changes across machines | ### Describe the bug
For the `beans` dataset (did not try on other), the order of samples is not the same on different machines. Tested on my local laptop, github actions machine, and ec2 instance. The three yield a different order.
### Steps to reproduce the bug
In a clean docker container or conda environment with datasets==2.6.1, run
```python
from datasets import load_dataset
from pprint import pprint
data = load_dataset("beans", split="validation")
pprint(data["image_file_path"])
```
### Expected behavior
The order of the images is the same on all machines.
### Environment info
On the EC2 instance:
```
- `datasets` version: 2.6.1
- Platform: Linux-4.14.291-218.527.amzn2.x86_64-x86_64-with-glibc2.2.5
- Python version: 3.7.10
- PyArrow version: 9.0.0
- Pandas version: 1.3.5
- Numpy version: not checked
```
On my local laptop:
```
- `datasets` version: 2.6.1
- Platform: Linux-5.15.0-50-generic-x86_64-with-glibc2.35
- Python version: 3.9.12
- PyArrow version: 7.0.0
- Pandas version: 1.3.5
- Numpy version: 1.23.1
```
On github actions:
```
- `datasets` version: 2.6.1
- Platform: Linux-5.15.0-1022-azure-x86_64-with-glibc2.2.5
- Python version: 3.8.14
- PyArrow version: 9.0.0
- Pandas version: 1.5.1
- Numpy version: 1.23.4
``` | 37 | Dataset order is not deterministic with ZIP archives and `iter_files`
### Describe the bug
For the `beans` dataset (did not try on other), the order of samples is not the same on different machines. Tested on my local laptop, github actions machine, and ec2 instance. The three yield a different order.
### Steps to reproduce the bug
In a clean docker container or conda environment with datasets==2.6.1, run
```python
from datasets import load_dataset
from pprint import pprint
data = load_dataset("beans", split="validation")
pprint(data["image_file_path"])
```
### Expected behavior
The order of the images is the same on all machines.
### Environment info
On the EC2 instance:
```
- `datasets` version: 2.6.1
- Platform: Linux-4.14.291-218.527.amzn2.x86_64-x86_64-with-glibc2.2.5
- Python version: 3.7.10
- PyArrow version: 9.0.0
- Pandas version: 1.3.5
- Numpy version: not checked
```
On my local laptop:
```
- `datasets` version: 2.6.1
- Platform: Linux-5.15.0-50-generic-x86_64-with-glibc2.35
- Python version: 3.9.12
- PyArrow version: 7.0.0
- Pandas version: 1.3.5
- Numpy version: 1.23.1
```
On github actions:
```
- `datasets` version: 2.6.1
- Platform: Linux-5.15.0-1022-azure-x86_64-with-glibc2.2.5
- Python version: 3.8.14
- PyArrow version: 9.0.0
- Pandas version: 1.5.1
- Numpy version: 1.23.4
```
Thanks for reporting ! The issue doesn't come from shuffling, but from `beans` row order not being deterministic:
https://huggingface.co/datasets/beans/blob/main/beans.py uses `dl_manager.iter_files` on ZIP archives and the file order doesn't seen to be deterministic and changes across machines | [
-0.021393075585365295,
0.04600512981414795,
0.010777506977319717,
0.38831663131713867,
0.00418979674577713,
-0.22980961203575134,
0.29644787311553955,
0.07253146171569824,
-0.31240716576576233,
0.24717368185520172,
0.1733967512845993,
0.6337769627571106,
0.19716888666152954,
-0.007713990285992622,
-0.14281971752643585,
0.1171020120382309,
0.16976076364517212,
0.14106976985931396,
-0.30348625779151917,
-0.13793650269508362,
-0.1573272943496704,
-0.02163788489997387,
-0.33266472816467285,
-0.46938836574554443,
-0.04971342161297798,
0.0632314383983612,
-0.059070661664009094,
-0.047453634440898895,
-0.21786583960056305,
-0.13110525906085968,
0.26971545815467834,
0.20431168377399445,
0.16992981731891632,
0.6261695623397827,
-0.00012702196545433253,
0.06484246253967285,
-0.09684357047080994,
-0.042165499180555344,
-0.3019898235797882,
-0.2895187735557556,
-0.014414224773645401,
0.11321938037872314,
-0.2360968142747879,
-0.1986149549484253,
-0.4109468162059784,
0.2235347181558609,
0.00982506014406681,
-0.1421196162700653,
0.06920450925827026,
-0.022237006574869156,
0.05284174159169197,
0.3707706034183502,
-0.17155617475509644,
0.056031499058008194,
0.48113545775413513,
0.1953197717666626,
-0.24010290205478668,
0.09382040798664093,
0.022680263966321945,
0.24944853782653809,
-0.03994492441415787,
0.29121434688568115,
0.050385504961013794,
0.49545541405677795,
0.090983547270298,
0.14700894057750702,
0.022203076630830765,
-0.14160804450511932,
-0.2512180209159851,
0.18846997618675232,
0.6212460994720459,
-0.10381696373224258,
-0.4255642890930176,
-0.2114628553390503,
0.07605055719614029,
-0.04663686081767082,
0.30137914419174194,
0.23572398722171783,
0.093656525015831,
-0.1175067126750946,
-0.055018577724695206,
0.6686441898345947,
-0.30110424757003784,
0.13012990355491638,
-0.17426906526088715,
0.6491427421569824,
0.10797812044620514,
-0.03739899396896362,
-0.0023754946887493134,
-0.0870867595076561,
0.6807780861854553,
-0.03512619435787201,
-0.05117368325591087,
-0.06929895281791687,
-0.07051090896129608,
-0.15795618295669556,
-0.014388605952262878,
0.1408359259366989,
0.0067510828375816345,
0.5168381929397583,
0.06312325596809387,
-0.11282149702310562,
0.271850049495697,
-0.10391142219305038,
0.17315573990345,
0.26288336515426636,
-0.044510483741760254,
0.5701096653938293,
0.1794462502002716,
0.3519824147224426,
-0.06428585201501846,
0.07749161869287491,
0.19398565590381622,
-0.3080982565879822,
0.0712909996509552,
0.016164204105734825,
-0.09947389364242554,
-0.19763197004795074,
-0.333431214094162,
-0.32070663571357727,
-0.25416630506515503,
-0.18644534051418304,
0.09428855031728745,
0.06876511126756668,
-0.07405414432287216,
-0.04154115915298462,
-0.02924560382962227,
0.2908225655555725,
-0.02133203111588955,
0.16590726375579834,
-0.01501527987420559,
-0.29035457968711853,
-0.19356469810009003,
-0.0007913718000054359,
-0.02021656185388565,
0.13014981150627136,
0.11526445299386978,
0.22209423780441284,
0.38752537965774536,
0.10402676463127136,
0.17632511258125305,
-0.17474409937858582,
0.31130164861679077,
0.40950438380241394,
0.009665064513683319,
0.09545990824699402,
-0.06584091484546661,
0.14198823273181915,
-0.26991140842437744,
0.13631263375282288,
-0.2637110948562622,
0.13451018929481506,
0.3664948046207428,
0.057330597192049026,
-0.1687999963760376,
-0.1615491807460785,
-0.454698771238327,
-0.30757129192352295,
0.3865237534046173,
-0.3245789110660553,
0.21742184460163116,
-0.171041801571846,
-0.41143110394477844,
-0.2138013392686844,
-0.32598674297332764,
0.24724099040031433,
-0.009315285831689835,
0.06470370292663574,
0.008620459586381912,
0.20877724885940552,
0.34806185960769653,
0.20271383225917816,
0.04294328764081001,
0.07251424342393875,
-0.1621357500553131,
0.11286666989326477,
-0.14041319489479065,
-0.22943782806396484,
-0.5547727346420288,
0.06485582143068314,
-0.16096137464046478,
0.4296567738056183,
0.08110566437244415,
0.11973421275615692,
0.5293900966644287,
-0.31841862201690674,
0.050401389598846436,
0.3909415006637573,
0.2818179428577423,
0.27627354860305786,
-0.28527212142944336,
-0.1555221974849701,
0.2556972801685333,
0.10441558063030243,
-0.24017877876758575,
0.1840769648551941,
0.028558485209941864,
-0.29454508423805237,
0.14828196167945862,
0.004861883819103241,
-0.2687973082065582,
0.1274474412202835,
0.27558383345603943,
0.09897574037313461,
0.23797564208507538,
-0.055582236498594284,
-0.09015465527772903,
0.2669382393360138,
-0.16610781848430634,
0.040634527802467346,
-0.11424162983894348,
-0.028611306101083755,
-0.00345477182418108,
-0.21978908777236938,
-0.410230427980423,
-0.2714388966560364,
-0.0060078054666519165,
0.214009627699852,
0.20142406225204468,
0.018485523760318756,
0.23310323059558868,
0.1301204264163971,
0.038844890892505646,
0.12584234774112701,
-0.24978859722614288,
0.46628519892692566,
0.021374929696321487,
-0.20224632322788239,
0.04834502190351486,
0.05140814930200577,
0.03883178532123566,
-0.27369505167007446,
-0.19278818368911743,
0.25400036573410034,
0.30970636010169983,
-0.11245286464691162,
-0.0975131168961525,
0.11817461252212524,
0.23818443715572357,
0.25408563017845154,
-0.12627242505550385,
0.2700149714946747,
-0.25544723868370056,
0.11439531296491623,
-0.03572860360145569,
0.6960225105285645,
-0.5386706590652466,
0.30604857206344604,
-0.19469434022903442,
-0.15326450765132904,
0.1901703178882599,
0.10749390721321106,
-0.07489994168281555,
-0.0391257181763649,
0.46875619888305664,
0.22251377999782562,
0.2995646595954895,
0.19162413477897644,
-0.08176440000534058,
0.33067402243614197,
0.3264775574207306,
0.13849589228630066,
-0.22088295221328735,
0.13378092646598816,
0.25205883383750916,
0.10164501518011093,
0.3747946619987488,
0.3963192403316498,
0.6373698115348816,
0.19227629899978638,
-0.048822078853845596,
-0.3046839237213135,
-0.0863916203379631,
-0.2040882557630539,
-0.13852226734161377,
-0.21851636469364166,
0.484814316034317,
0.11283621191978455,
0.3348820209503174,
0.22252844274044037,
-0.2370518147945404,
0.039298925548791885,
0.007256150245666504,
0.10002879798412323,
-0.1864076554775238,
0.2697697579860687,
-0.3935298025608063,
-0.2601619362831116,
-0.13616296648979187,
-0.032677240669727325,
-0.36893174052238464,
0.14901313185691833,
0.12130691856145859,
0.31084057688713074,
-0.02491046115756035,
0.017595600336790085,
0.3477071523666382,
0.3041459619998932,
0.10151700675487518,
-0.1858229637145996,
-0.250796377658844,
0.27334073185920715,
-0.1386982798576355,
-0.06922157108783722,
0.13119278848171234,
0.08335494250059128,
0.48441269993782043,
-0.4041064381599426,
-0.2997754216194153,
-0.0312531515955925,
-0.5034867525100708,
0.015322167426347733,
0.11994241178035736,
0.2350645214319229,
0.03233145549893379,
0.1036999374628067,
-0.027375809848308563,
-0.13211539387702942,
0.1492425948381424,
0.15299338102340698,
-0.33498433232307434,
0.14177365601062775,
-0.09972210228443146,
-0.0735824704170227,
-0.15802991390228271,
-0.30893662571907043,
-0.2439022809267044,
-0.09101733565330505,
0.3590972423553467,
0.3260478377342224,
0.2022072672843933,
-0.27038922905921936,
0.09350094944238663,
-0.7308164834976196,
0.00027523189783096313,
-0.06592195481061935,
-0.21815776824951172,
-0.5205907225608826,
0.22266456484794617,
-0.11770404875278473,
-0.10339009761810303,
-0.5479891896247864,
0.06744684278964996,
-0.025537710636854172,
0.37046897411346436,
-0.2511495351791382,
-0.19069091975688934,
-0.25952574610710144,
0.41947269439697266,
0.06751499325037003,
0.008908433839678764,
0.6502869129180908,
-0.24110858142375946,
0.15304677188396454,
-0.1423671543598175,
-0.10892331600189209,
0.3864138424396515,
0.09061871469020844,
0.31204915046691895,
0.09051083773374557,
0.1722089946269989,
0.19861853122711182,
0.5020013451576233,
0.12581311166286469,
-0.33310696482658386,
0.18405607342720032,
-0.1317768394947052,
0.13256925344467163,
-0.20239678025245667,
0.03343842178583145,
0.2966352105140686,
0.32139527797698975,
-0.13245996832847595,
0.12222830951213837,
0.025447292253375053,
-0.16245891153812408,
0.014529813081026077,
0.1505972445011139,
-0.18051007390022278,
-0.14773911237716675,
0.024169985204935074,
-0.033477820456027985,
-0.19438040256500244,
0.04870506748557091,
0.13824203610420227,
-0.18317517638206482,
-0.25305625796318054,
-0.21356309950351715,
0.21105588972568512,
0.025701984763145447,
-0.017235981300473213,
-0.3107563555240631,
-0.09013525396585464,
-0.21161764860153198,
0.06920943409204483,
0.13731664419174194,
0.10148090124130249,
0.23348863422870636,
0.07209170609712601,
0.2366626262664795,
-0.11565401405096054,
0.7772952318191528,
-0.20164376497268677,
0.25641220808029175,
-0.020295221358537674,
-0.2299959808588028,
-0.026963818818330765,
-0.5139660239219666,
-0.28119808435440063,
-0.14565496146678925,
0.48091286420822144,
0.4568440318107605,
-0.48889800906181335,
0.1349995881319046,
-0.0955062061548233,
-0.11613374203443527,
0.04710829630494118,
-0.5146318078041077,
-0.49122801423072815,
0.0866013839840889,
-0.04876750707626343,
0.1164565160870552,
0.06660337746143341,
-0.07728104293346405,
-0.36037203669548035,
-0.2921234369277954,
-0.17779748141765594,
-0.12026514858007431,
-0.09876358509063721,
0.27388355135917664,
0.32909974455833435,
-0.24956047534942627,
0.10234948992729187,
0.5295301675796509,
0.1321866810321808,
0.6934340000152588,
0.18669664859771729,
-0.4219994843006134,
-0.26444709300994873,
-0.02196187525987625,
-0.3321917653083801,
-0.32066839933395386,
0.38205331563949585,
-0.05617412179708481,
-0.12516260147094727,
-0.23282486200332642,
0.17711132764816284,
-0.2156878560781479,
-0.29066309332847595,
0.35610273480415344,
-0.03567294776439667,
0.07503140717744827,
-0.4777320921421051,
0.19183406233787537,
0.15540412068367004,
-0.13923843204975128,
0.478954017162323,
-0.2282828837633133,
-0.09888263791799545,
0.3990941643714905,
0.2990413308143616,
0.7797704935073853,
-0.06891132891178131,
0.1833576112985611,
0.38932058215141296,
0.032704368233680725,
0.2923077642917633,
-0.2073773741722107,
0.3809947967529297,
-0.4839751422405243,
-0.5612928867340088,
-0.17535868287086487,
-0.2945394814014435,
-0.13621646165847778,
0.3337705135345459,
-0.10698996484279633,
0.29555296897888184,
-0.24975137412548065,
-0.12114450335502625,
-0.37068480253219604,
-0.22916598618030548,
-0.14423955976963043,
-0.02351158857345581,
-0.23350608348846436,
-0.013153858482837677,
0.07986927777528763,
0.4474891126155853,
-0.153420090675354,
0.030967749655246735,
-0.2777467668056488,
-0.11255790293216705,
-0.2791053056716919,
0.27385133504867554,
-0.3212951421737671,
0.08799637109041214,
0.3690832257270813,
-0.050098903477191925,
-0.27585363388061523,
0.06946060061454773,
0.1953069120645523,
0.06754915416240692,
0.12134887278079987,
0.1612524390220642,
0.3849770724773407,
0.13461732864379883,
0.2284417748451233,
-0.27864810824394226,
0.35390207171440125,
-0.06321384012699127,
-0.11079335957765579,
-0.5446944832801819,
0.06991995126008987,
-0.6101601719856262,
0.09095820784568787,
0.2216002196073532,
0.0943526178598404,
-0.011783687397837639,
0.0913485586643219,
0.2751525640487671,
0.08882303535938263,
-0.10098297148942947,
0.06230667233467102,
-0.09265510737895966,
0.18473924696445465,
0.5904722809791565,
-0.30154943466186523,
-0.3806300759315491,
-0.15865938365459442,
0.6273613572120667,
0.01095557026565075,
-0.0362941138446331,
0.038584087044000626,
-0.18467208743095398,
-0.2855772376060486,
-0.09864966571331024,
0.1726388931274414,
-0.3082624673843384,
-0.4202693998813629,
0.35210520029067993,
-0.2178838700056076,
-0.1312233954668045,
0.07133631408214569,
-0.02305706962943077,
0.23495198786258698,
0.22039437294006348,
-0.20899847149848938,
-0.4121361970901489,
0.4307253062725067,
-0.16219161450862885,
0.18710988759994507,
-0.0013870149850845337,
-0.10375986993312836,
0.14973819255828857,
-0.16825510561466217,
-0.2104840874671936,
-0.1859668642282486,
0.06444405019283295,
-0.004369070753455162,
0.043003298342227936,
-0.17782559990882874,
0.06115790456533432,
0.0915386751294136,
-0.032930776476860046,
-0.05369451269507408,
0.20550541579723358,
-0.03823510929942131,
-0.04348760470747948,
-0.26564836502075195,
0.1410680115222931,
-0.08584713190793991,
-0.14437754452228546,
0.12253684550523758,
-0.37811535596847534,
-0.21273288130760193,
-0.25276777148246765,
0.022110510617494583,
0.069651298224926,
0.024248719215393066,
-0.11589134484529495,
0.24320964515209198,
0.3140481114387512,
0.02203669771552086,
0.366031676530838,
-0.4197898209095001,
-0.20314566791057587,
0.12337137758731842,
0.350009024143219,
-0.27672410011291504,
0.07316572964191437,
-0.24094408750534058,
-0.21895483136177063,
-0.028290100395679474,
0.016301197931170464,
0.23643025755882263,
-0.32080239057540894,
0.04228001460433006,
0.15694813430309296,
0.19210760295391083,
0.4011097848415375,
-0.07857098430395126,
-0.6275277137756348,
0.004290432669222355,
0.08654632419347763,
-0.12830045819282532,
-0.12884128093719482,
-0.2210165411233902,
0.6625779271125793,
-0.09484586119651794,
0.21520179510116577,
0.10579133033752441,
-0.16616690158843994,
-0.04285302013158798,
0.11182936280965805,
0.3738834857940674,
-0.316794753074646,
0.25714775919914246,
0.31566134095191956,
0.07277396321296692,
0.2678500711917877,
0.1367645263671875,
-0.21309725940227509,
0.015810005366802216,
0.1255612075328827,
0.2940898537635803,
0.33246946334838867,
0.06553462147712708,
-0.2212020754814148,
-0.014224134385585785,
-0.20322902500629425,
-0.061148691922426224,
0.6216474771499634,
0.3183276057243347,
0.22239303588867188,
0.6004233956336975,
0.20976638793945312,
-0.15771956741809845,
-0.026584606617689133,
-0.4438011646270752,
-0.04148310795426369,
-0.007863134145736694,
0.1446601152420044,
-0.15562376379966736,
-0.2594849169254303,
-0.18460074067115784,
-0.07578513771295547,
-0.2685125470161438,
0.12502078711986542,
0.4745553135871887,
0.24019008874893188,
-0.25978314876556396,
-0.6637812256813049,
0.13766878843307495,
-0.1983480453491211,
0.3139820992946625,
-0.011221647262573242,
0.24791868031024933,
0.2684406638145447,
-0.2936277985572815,
0.28755274415016174,
0.2182847410440445,
0.33370253443717957,
0.48612600564956665,
0.3270016312599182,
-0.1624162644147873,
-0.14629989862442017,
0.03431333601474762,
-0.038469161838293076,
0.15436969697475433,
-0.14697174727916718,
-0.2708073556423187,
0.18650874495506287,
0.02352507971227169,
-0.1392054259777069,
0.20240622758865356,
0.24788691103458405,
0.46025773882865906,
0.019499268382787704,
0.15637828409671783,
-0.2422834038734436,
0.1342284381389618,
0.17601898312568665,
0.06935716420412064,
-0.19833683967590332,
0.2529696226119995,
-0.39810270071029663,
-0.04743533208966255,
-0.03470602631568909,
-0.012142163701355457,
0.011920228600502014,
-0.011991370469331741,
0.1509782373905182,
0.2534519135951996,
-0.16386020183563232,
-0.20113646984100342,
-0.18608203530311584,
-0.3663559854030609,
0.21065156161785126,
-0.35214895009994507,
-0.06632566452026367,
-0.08272238820791245,
0.4039347171783447,
-0.17581653594970703,
-0.25699782371520996,
0.37004220485687256,
-0.26520630717277527,
-0.0928291529417038,
0.49040457606315613,
-0.6109384894371033,
0.10547782480716705,
-0.17036880552768707,
-0.02438339777290821,
-0.027816275134682655,
-0.37390393018722534,
-0.15999799966812134,
-0.07815495133399963,
-0.08996234834194183,
-0.03803803771734238,
0.14097921550273895,
-0.027537686750292778,
0.010232523083686829,
-0.008114509284496307,
0.21644283831119537,
0.17945969104766846,
-0.024369776248931885,
-0.1909448653459549,
-0.029576178640127182,
-0.08732330054044724,
-0.5204659700393677,
0.2537049353122711,
0.0495123565196991,
0.22652539610862732,
-0.10482428967952728,
-0.08476445078849792,
-0.2101731300354004,
0.339665949344635,
-0.0411553792655468,
-0.04461299628019333,
-0.4747295677661896,
0.21740372478961945,
-0.045008767396211624,
0.1187954768538475,
-0.1441856324672699,
0.14987218379974365,
0.068754643201828,
-0.07572975754737854,
-0.1419455111026764,
-0.061601728200912476,
0.31584686040878296,
-0.32117602229118347,
-0.007312389090657234,
-0.3002992272377014,
0.1624080091714859,
0.01033782958984375,
-0.0923900157213211,
-0.045701757073402405,
-0.00525549054145813,
0.245332270860672,
0.047330841422080994,
0.2626643776893616,
0.24160732328891754,
0.16184072196483612,
0.16581198573112488,
-0.18198679387569427,
0.2946397066116333,
0.0568542405962944,
-0.5806889533996582,
0.1551639437675476,
-0.17692390084266663
] |
https://github.com/huggingface/datasets/issues/5145 | Dataset order is not deterministic with ZIP archives and `iter_files` | This is still a bug, so I'd keep this one open if you don't mind ;) | ### Describe the bug
For the `beans` dataset (did not try on other), the order of samples is not the same on different machines. Tested on my local laptop, github actions machine, and ec2 instance. The three yield a different order.
### Steps to reproduce the bug
In a clean docker container or conda environment with datasets==2.6.1, run
```python
from datasets import load_dataset
from pprint import pprint
data = load_dataset("beans", split="validation")
pprint(data["image_file_path"])
```
### Expected behavior
The order of the images is the same on all machines.
### Environment info
On the EC2 instance:
```
- `datasets` version: 2.6.1
- Platform: Linux-4.14.291-218.527.amzn2.x86_64-x86_64-with-glibc2.2.5
- Python version: 3.7.10
- PyArrow version: 9.0.0
- Pandas version: 1.3.5
- Numpy version: not checked
```
On my local laptop:
```
- `datasets` version: 2.6.1
- Platform: Linux-5.15.0-50-generic-x86_64-with-glibc2.35
- Python version: 3.9.12
- PyArrow version: 7.0.0
- Pandas version: 1.3.5
- Numpy version: 1.23.1
```
On github actions:
```
- `datasets` version: 2.6.1
- Platform: Linux-5.15.0-1022-azure-x86_64-with-glibc2.2.5
- Python version: 3.8.14
- PyArrow version: 9.0.0
- Pandas version: 1.5.1
- Numpy version: 1.23.4
``` | 16 | Dataset order is not deterministic with ZIP archives and `iter_files`
### Describe the bug
For the `beans` dataset (did not try on other), the order of samples is not the same on different machines. Tested on my local laptop, github actions machine, and ec2 instance. The three yield a different order.
### Steps to reproduce the bug
In a clean docker container or conda environment with datasets==2.6.1, run
```python
from datasets import load_dataset
from pprint import pprint
data = load_dataset("beans", split="validation")
pprint(data["image_file_path"])
```
### Expected behavior
The order of the images is the same on all machines.
### Environment info
On the EC2 instance:
```
- `datasets` version: 2.6.1
- Platform: Linux-4.14.291-218.527.amzn2.x86_64-x86_64-with-glibc2.2.5
- Python version: 3.7.10
- PyArrow version: 9.0.0
- Pandas version: 1.3.5
- Numpy version: not checked
```
On my local laptop:
```
- `datasets` version: 2.6.1
- Platform: Linux-5.15.0-50-generic-x86_64-with-glibc2.35
- Python version: 3.9.12
- PyArrow version: 7.0.0
- Pandas version: 1.3.5
- Numpy version: 1.23.1
```
On github actions:
```
- `datasets` version: 2.6.1
- Platform: Linux-5.15.0-1022-azure-x86_64-with-glibc2.2.5
- Python version: 3.8.14
- PyArrow version: 9.0.0
- Pandas version: 1.5.1
- Numpy version: 1.23.4
```
This is still a bug, so I'd keep this one open if you don't mind ;) | [
-0.18312685191631317,
0.15040865540504456,
-0.027092019096016884,
0.2876850962638855,
0.014623738825321198,
-0.2844901978969574,
0.2627815902233124,
0.09335668385028839,
-0.24766014516353607,
0.2108018696308136,
0.26034781336784363,
0.6107097864151001,
0.19777531921863556,
-0.0646839588880539,
-0.16056478023529053,
-0.00867806002497673,
0.037380896508693695,
0.1458633840084076,
-0.32043635845184326,
-0.19782522320747375,
-0.1364881992340088,
0.08500499278306961,
-0.2712908983230591,
-0.42046356201171875,
-0.026017148047685623,
0.0173916257917881,
-0.06611216068267822,
-0.05699750781059265,
-0.20045338571071625,
-0.32344672083854675,
0.3328777849674225,
0.044114261865615845,
0.24710530042648315,
0.5214294195175171,
-0.0001192568161059171,
0.06069935858249664,
0.0339522585272789,
0.03506080061197281,
-0.24442987143993378,
-0.41995304822921753,
-0.17396819591522217,
-0.019999589771032333,
-0.16711123287677765,
-0.22890591621398926,
-0.3244936168193817,
0.22809530794620514,
0.1270248293876648,
-0.1415877342224121,
0.1466861069202423,
0.09779166430234909,
0.14300468564033508,
0.36031851172447205,
-0.19353196024894714,
-0.005996781401336193,
0.33285313844680786,
0.14492839574813843,
-0.13569965958595276,
0.03550151735544205,
0.06031055748462677,
0.26445272564888,
-0.0868888571858406,
0.22422000765800476,
0.06404677033424377,
0.47074416279792786,
0.030231567099690437,
0.19746626913547516,
0.11280980706214905,
-0.2789769470691681,
-0.34828290343284607,
0.12043670564889908,
0.6446049809455872,
0.0070304907858371735,
-0.41551125049591064,
-0.17434102296829224,
0.014511664398014545,
-0.04874558001756668,
0.2791190445423126,
0.2844414710998535,
0.024588949978351593,
0.003907773643732071,
-0.044777851551771164,
0.6357280611991882,
-0.3749642074108124,
0.18214114010334015,
-0.27901703119277954,
0.5670313239097595,
0.07881905138492584,
-0.006751000881195068,
-0.10592442750930786,
0.005822660401463509,
0.4655536711215973,
-0.06759297847747803,
-0.07519799470901489,
-0.1750917136669159,
0.06207577884197235,
-0.1805831640958786,
-0.020778894424438477,
0.04279977083206177,
0.013474613428115845,
0.6825217008590698,
-0.04001796618103981,
-0.22888270020484924,
0.17996303737163544,
-0.10767409950494766,
0.21521681547164917,
0.29104283452033997,
-0.1610056757926941,
0.5373227596282959,
0.2647519111633301,
0.2321881502866745,
-0.11494328081607819,
0.008837340399622917,
0.2961016297340393,
-0.3598344922065735,
0.15945576131343842,
0.03607667237520218,
0.017067447304725647,
-0.28119006752967834,
-0.27379998564720154,
-0.2839876413345337,
-0.1625034213066101,
-0.19469676911830902,
0.05068312957882881,
0.11341927945613861,
-0.18163910508155823,
0.045217365026474,
-0.091520756483078,
0.3802047371864319,
-0.016053900122642517,
0.12730441987514496,
-0.04635656997561455,
-0.31037652492523193,
-0.16185349225997925,
-0.045943185687065125,
-0.0057922713458538055,
0.15094313025474548,
0.21938928961753845,
0.20934729278087616,
0.18292294442653656,
0.0782964825630188,
0.33560091257095337,
-0.2685064971446991,
0.34722399711608887,
0.45673197507858276,
0.017262224107980728,
0.19672426581382751,
-0.1182551383972168,
0.04965285211801529,
-0.3012004792690277,
0.011949416249990463,
-0.24143248796463013,
0.05411432310938835,
0.2867174744606018,
0.10932817310094833,
-0.26074153184890747,
-0.16863539814949036,
-0.3201085329055786,
-0.2911434471607208,
0.34998467564582825,
-0.23455828428268433,
0.10788515210151672,
-0.10954391956329346,
-0.34884899854660034,
-0.2027096003293991,
-0.362392395734787,
0.3148287534713745,
-0.015253495424985886,
0.05193836987018585,
-0.049657873809337616,
0.2220413088798523,
0.3166372776031494,
-0.03523903712630272,
0.003344411263242364,
0.15103492140769958,
-0.1475403755903244,
0.13809600472450256,
-0.12412384897470474,
-0.36560335755348206,
-0.5831577181816101,
0.2594197690486908,
-0.10478383302688599,
0.3805482089519501,
0.0816333070397377,
0.15613257884979248,
0.49615055322647095,
-0.27675962448120117,
-0.13874712586402893,
0.47391271591186523,
0.22692859172821045,
0.20600980520248413,
-0.25826865434646606,
-0.21063315868377686,
0.13598047196865082,
-0.02645774558186531,
-0.15116780996322632,
0.2244102954864502,
-0.0013332739472389221,
-0.2428564727306366,
0.14787894487380981,
0.06823518127202988,
-0.30100977420806885,
0.21100041270256042,
0.39282822608947754,
-0.032735347747802734,
0.1902337670326233,
-0.018053535372018814,
0.07057900726795197,
0.3353372812271118,
-0.15649817883968353,
0.05972404032945633,
-0.16522331535816193,
0.05657089501619339,
-0.02611604332923889,
-0.12616784870624542,
-0.41293251514434814,
-0.35601940751075745,
0.08276666700839996,
0.41172438859939575,
0.13138020038604736,
0.027263812720775604,
0.14579923450946808,
0.29815322160720825,
0.14962740242481232,
0.07668468356132507,
-0.2534908950328827,
0.4809528589248657,
-0.008779780939221382,
-0.039429761469364166,
0.0618724599480629,
-0.10702400654554367,
0.021692726761102676,
-0.22518686950206757,
-0.2257145643234253,
0.2847233712673187,
0.23697546124458313,
0.01374083012342453,
0.01773647591471672,
0.060929074883461,
0.23252853751182556,
0.11741305887699127,
-0.09185384213924408,
0.41858839988708496,
-0.3157632648944855,
0.10429496318101883,
-0.026725798845291138,
0.585800290107727,
-0.28709009289741516,
0.4121260344982147,
-0.24461179971694946,
-0.07652626186609268,
0.2458791732788086,
0.05764402821660042,
-0.1915987730026245,
-0.08432323485612869,
0.2809460759162903,
0.21931514143943787,
0.4271408021450043,
0.12935788929462433,
-0.0424371212720871,
0.3275434374809265,
0.3487147390842438,
0.12127755582332611,
-0.19696062803268433,
0.17876896262168884,
0.14683973789215088,
0.16520428657531738,
0.41142570972442627,
0.48345300555229187,
0.7048937678337097,
0.20285478234291077,
-0.10561153292655945,
-0.40012192726135254,
-0.17472945153713226,
-0.19272229075431824,
-0.06919344514608383,
-0.08715561032295227,
0.5128862261772156,
0.09711149334907532,
0.3563880920410156,
0.25748053193092346,
-0.18560859560966492,
0.002398259937763214,
-0.12537053227424622,
-0.03419390320777893,
-0.07078921794891357,
0.40825411677360535,
-0.376255065202713,
-0.2568090856075287,
-0.0672781839966774,
0.03372819349169731,
-0.26111018657684326,
0.05702847242355347,
0.05664335936307907,
0.13602933287620544,
-0.049953773617744446,
0.017259784042835236,
0.29257887601852417,
0.29242444038391113,
0.08900650590658188,
-0.22107891738414764,
-0.18398790061473846,
0.31674274802207947,
-0.24488353729248047,
-0.01494480948895216,
0.12308387458324432,
0.02410750277340412,
0.46866539120674133,
-0.2939002513885498,
-0.2549772560596466,
-0.043078623712062836,
-0.49549591541290283,
0.08141027390956879,
0.18887634575366974,
0.48567497730255127,
0.1284164935350418,
0.11723214387893677,
0.10846389830112457,
-0.10457893460988998,
0.0752858817577362,
0.23005110025405884,
-0.29567721486091614,
0.04044825956225395,
-0.15459086000919342,
-0.037015680223703384,
-0.08286316692829132,
-0.43781736493110657,
-0.2791237235069275,
-0.08317042887210846,
0.30321013927459717,
0.48070523142814636,
0.13566651940345764,
-0.11589168757200241,
0.13843509554862976,
-0.7132041454315186,
0.18215931951999664,
-0.046153612434864044,
-0.13707765936851501,
-0.4172573685646057,
0.3035247325897217,
-0.19578330218791962,
-0.12527988851070404,
-0.5283596515655518,
-0.029951680451631546,
0.12285278737545013,
0.1670282483100891,
-0.4204629063606262,
-0.16495859622955322,
-0.29663681983947754,
0.5083974003791809,
0.005498822778463364,
-0.05901592969894409,
0.49295881390571594,
-0.17410869896411896,
0.06361163407564163,
-0.21113190054893494,
-0.09513780474662781,
0.3494468033313751,
0.04350532963871956,
0.3565232753753662,
0.1495445966720581,
0.11733631044626236,
0.2213139832019806,
0.3975915312767029,
0.16466616094112396,
-0.3832699656486511,
0.16782516241073608,
-0.0591905415058136,
0.043440766632556915,
-0.18720296025276184,
-0.011599437333643436,
0.19955743849277496,
0.19657699763774872,
-0.11444930732250214,
0.08329575508832932,
0.06492052227258682,
-0.17990127205848694,
0.01031569391489029,
0.1504831165075302,
-0.22876811027526855,
-0.1471823751926422,
-0.03601018339395523,
-0.011710964143276215,
-0.17043980956077576,
0.09028151631355286,
0.17875918745994568,
-0.22868484258651733,
-0.18461483716964722,
-0.12767384946346283,
0.18058425188064575,
0.025770559906959534,
0.037017401307821274,
-0.2526378631591797,
0.06696908175945282,
-0.3421332836151123,
0.07218453288078308,
-0.001880384748801589,
-0.07408658415079117,
0.25060781836509705,
0.043345578014850616,
0.12245974689722061,
-0.19453921914100647,
0.6313573122024536,
-0.23484598100185394,
0.1780097484588623,
0.012431208044290543,
-0.29959118366241455,
0.0048023853451013565,
-0.43155357241630554,
-0.30058181285858154,
0.04335660859942436,
0.4075481593608856,
0.46966657042503357,
-0.3641946613788605,
0.043910060077905655,
-0.03918812423944473,
-0.007942091673612595,
0.02635158970952034,
-0.4401001036167145,
-0.39840203523635864,
0.04212285578250885,
-0.07233832776546478,
0.07567085325717926,
0.07313884794712067,
-0.043952006846666336,
-0.47062137722969055,
-0.3625448942184448,
-0.2789323925971985,
-0.07399749010801315,
-0.052669182419776917,
0.19985687732696533,
0.35918542742729187,
-0.3284699022769928,
0.2303185760974884,
0.4096108078956604,
0.13524183630943298,
0.6175588965415955,
0.15796396136283875,
-0.3407237231731415,
-0.20069503784179688,
0.024090709164738655,
-0.2736809253692627,
-0.2764059603214264,
0.3603322505950928,
-0.09830790758132935,
-0.12837854027748108,
-0.2510341703891754,
0.19952639937400818,
-0.2040921300649643,
-0.10422234237194061,
0.4400044083595276,
-0.0563785582780838,
0.033879317343235016,
-0.4565719962120056,
0.32513871788978577,
0.12994100153446198,
-0.2476898431777954,
0.5289872288703918,
-0.3731635808944702,
-0.1414446234703064,
0.41754263639450073,
0.407359778881073,
0.7605094313621521,
0.095510333776474,
0.15361517667770386,
0.30612319707870483,
0.11036945879459381,
0.3934415578842163,
-0.20267736911773682,
0.27140355110168457,
-0.45450568199157715,
-0.46836057305336,
-0.1547924131155014,
-0.2893502116203308,
-0.16399657726287842,
0.3566977381706238,
-0.23213744163513184,
0.20909559726715088,
-0.200829416513443,
-0.14320902526378632,
-0.2240874171257019,
-0.046137720346450806,
-0.10965854674577713,
-0.055986758321523666,
-0.13724741339683533,
0.07085268944501877,
0.05201147869229317,
0.5277873277664185,
-0.22811514139175415,
-0.09391530603170395,
-0.17581070959568024,
-0.13850942254066467,
-0.26383474469184875,
0.30378445982933044,
-0.3900047242641449,
0.1693388670682907,
0.38374993205070496,
-0.11073294281959534,
-0.3764374554157257,
0.28483596444129944,
0.22722448408603668,
0.09911240637302399,
0.08608505874872208,
0.21082860231399536,
0.3576274514198303,
0.1273488700389862,
0.19986771047115326,
-0.3194447457790375,
0.3441733419895172,
-0.15954101085662842,
-0.12551826238632202,
-0.5336691737174988,
-0.010246526449918747,
-0.5135027170181274,
0.26051536202430725,
0.25348591804504395,
0.16458642482757568,
0.04589936137199402,
0.08880585432052612,
0.31583553552627563,
0.025411076843738556,
-0.14770331978797913,
0.10794508457183838,
-0.03945700824260712,
0.21064472198486328,
0.6014334559440613,
-0.289803147315979,
-0.4456743597984314,
-0.2141532301902771,
0.4748646318912506,
0.01002049632370472,
-0.1084238812327385,
0.05374990031123161,
-0.23948131501674652,
-0.2010534405708313,
-0.17468789219856262,
0.24067848920822144,
-0.3748461604118347,
-0.4340037405490875,
0.3087405860424042,
-0.2295488864183426,
-0.04567951709032059,
0.11022485792636871,
0.04227951169013977,
0.1881229728460312,
0.12654756009578705,
-0.2002067118883133,
-0.41506367921829224,
0.3406372666358948,
-0.15724754333496094,
0.0009278133511543274,
0.0056931860744953156,
-0.23640835285186768,
-0.0529182069003582,
-0.12622924149036407,
-0.19447681307792664,
-0.25367140769958496,
-0.041260331869125366,
-0.06327321380376816,
-0.03635793924331665,
-0.18130874633789062,
0.14986924827098846,
0.18146808445453644,
0.04123877361416817,
0.015322482213377953,
0.19845855236053467,
-0.04086007922887802,
-0.13397225737571716,
-0.2950233221054077,
0.1382676661014557,
-0.1306564211845398,
-0.22345373034477234,
0.12818028032779694,
-0.19156065583229065,
-0.1288541555404663,
-0.2439608871936798,
0.0018871873617172241,
0.05922965705394745,
-0.02361871302127838,
-0.14751864969730377,
0.09816984832286835,
0.2926212549209595,
0.010345950722694397,
0.2794988751411438,
-0.3169512152671814,
-0.04732970893383026,
0.16198699176311493,
0.4482351541519165,
-0.17974425852298737,
0.06031744182109833,
-0.20817339420318604,
-0.21475225687026978,
-0.014190681278705597,
0.11298331618309021,
0.20443522930145264,
-0.29047149419784546,
-0.0055563971400260925,
0.16895756125450134,
0.10564864426851273,
0.31097447872161865,
-0.20439158380031586,
-0.4797947406768799,
-0.08265045285224915,
0.20822416245937347,
-0.09565627574920654,
-0.13377626240253448,
-0.36969414353370667,
0.5885508060455322,
-0.0809086337685585,
0.25348761677742004,
0.2532411515712738,
-0.06274864077568054,
0.14767996966838837,
0.15853485465049744,
0.3892630338668823,
-0.1951301544904709,
0.330037921667099,
0.3661036789417267,
0.05080247297883034,
0.2724760174751282,
0.04789268970489502,
-0.19435086846351624,
0.09300839155912399,
0.039467453956604004,
0.24026954174041748,
0.3256547152996063,
0.12527860701084137,
-0.32897472381591797,
0.05106154456734657,
-0.21873193979263306,
-0.06195475533604622,
0.3696776032447815,
0.2842886745929718,
0.18339607119560242,
0.5142143964767456,
0.19452159106731415,
-0.1667664796113968,
-0.178108811378479,
-0.5116642713546753,
-0.11644776165485382,
0.027590034529566765,
0.09170781075954437,
-0.3384816646575928,
-0.18174509704113007,
-0.2079629749059677,
-0.10200218856334686,
-0.17775055766105652,
0.024858389049768448,
0.36326634883880615,
0.25930550694465637,
-0.2725032567977905,
-0.6290541291236877,
0.19211578369140625,
-0.21877267956733704,
0.20325493812561035,
0.00605715811252594,
0.3304157257080078,
0.27171576023101807,
-0.2821010947227478,
0.14691102504730225,
0.3274191915988922,
0.38018476963043213,
0.5336669683456421,
0.22202032804489136,
-0.10136263072490692,
-0.09669533371925354,
-0.055209700018167496,
-0.1275767832994461,
0.05063293129205704,
-0.32055073976516724,
-0.2675687074661255,
0.281477153301239,
0.11500184237957001,
-0.1458859145641327,
0.33270251750946045,
0.20384638011455536,
0.4614093601703644,
-0.027332477271556854,
0.13654936850070953,
-0.18793445825576782,
0.17851218581199646,
0.17134293913841248,
0.0240391343832016,
-0.2635577917098999,
0.1339346021413803,
-0.10700498521327972,
-0.09981468319892883,
-0.012635390274226665,
-0.009419988840818405,
0.04081468656659126,
-0.18440884351730347,
0.060073692351579666,
0.19024290144443512,
-0.00026626884937286377,
-0.2576863467693329,
-0.19332730770111084,
-0.38242486119270325,
0.19790354371070862,
-0.34420689940452576,
-0.02254260703921318,
-0.13209868967533112,
0.31710726022720337,
-0.26185691356658936,
-0.18644961714744568,
0.3036181926727295,
-0.3800264596939087,
-0.09001483023166656,
0.5626859664916992,
-0.7062516212463379,
0.001442689448595047,
-0.07940730452537537,
0.09412874281406403,
0.04184076935052872,
-0.4001582860946655,
-0.24990315735340118,
-0.18069930374622345,
0.03237175941467285,
0.023130863904953003,
-0.03738544136285782,
0.14477579295635223,
0.16399700939655304,
0.2818544805049896,
0.2964799404144287,
0.17889097332954407,
-0.10848119854927063,
-0.1995447427034378,
-0.0558105893433094,
-0.11767933517694473,
-0.4448261857032776,
0.19958117604255676,
0.0045751966536045074,
0.34104159474372864,
-0.14667807519435883,
0.10567471385002136,
-0.20520685613155365,
0.1891222596168518,
0.08065663278102875,
-0.05741458013653755,
-0.439175009727478,
0.0634724572300911,
-0.11909591406583786,
0.1280938982963562,
-0.07162290066480637,
0.18207022547721863,
0.04210435226559639,
-0.05066058784723282,
-0.11648744344711304,
-0.15805472433567047,
0.29443562030792236,
-0.315947949886322,
0.014363285154104233,
-0.2773037254810333,
0.18206056952476501,
-0.002695314586162567,
0.028374522924423218,
-0.07284397631883621,
-0.08840516209602356,
0.33211246132850647,
0.01512516476213932,
0.08532308042049408,
0.168426051735878,
0.2573918402194977,
0.16228626668453217,
-0.14198748767375946,
0.3906235694885254,
0.0017365571111440659,
-0.6012335419654846,
0.13911882042884827,
-0.15531787276268005
] |
https://github.com/huggingface/datasets/issues/5145 | Dataset order is not deterministic with ZIP archives and `iter_files` | Besides the linked PR, to make the loading process fully deterministic, I believe we should also sort the data files [here](https://github.com/huggingface/datasets/blob/df4bdd365f2abb695f113cbf8856a925bc70901b/src/datasets/data_files.py#L276) and [here](https://github.com/huggingface/datasets/blob/df4bdd365f2abb695f113cbf8856a925bc70901b/src/datasets/data_files.py#L485) (e.g. fsspec's `LocalFileSystem.glob` relies on `os.scandir`, which yields the contents in arbitrary order). My concern is the overhead of these sorts... Maybe we could introduce a new flag to `load_dataset` similar to TFDS' [`shuffle_files`](https://www.tensorflow.org/datasets/determinism#determinism_when_reading) or sort only if the number of data files is small? | ### Describe the bug
For the `beans` dataset (did not try on other), the order of samples is not the same on different machines. Tested on my local laptop, github actions machine, and ec2 instance. The three yield a different order.
### Steps to reproduce the bug
In a clean docker container or conda environment with datasets==2.6.1, run
```python
from datasets import load_dataset
from pprint import pprint
data = load_dataset("beans", split="validation")
pprint(data["image_file_path"])
```
### Expected behavior
The order of the images is the same on all machines.
### Environment info
On the EC2 instance:
```
- `datasets` version: 2.6.1
- Platform: Linux-4.14.291-218.527.amzn2.x86_64-x86_64-with-glibc2.2.5
- Python version: 3.7.10
- PyArrow version: 9.0.0
- Pandas version: 1.3.5
- Numpy version: not checked
```
On my local laptop:
```
- `datasets` version: 2.6.1
- Platform: Linux-5.15.0-50-generic-x86_64-with-glibc2.35
- Python version: 3.9.12
- PyArrow version: 7.0.0
- Pandas version: 1.3.5
- Numpy version: 1.23.1
```
On github actions:
```
- `datasets` version: 2.6.1
- Platform: Linux-5.15.0-1022-azure-x86_64-with-glibc2.2.5
- Python version: 3.8.14
- PyArrow version: 9.0.0
- Pandas version: 1.5.1
- Numpy version: 1.23.4
``` | 68 | Dataset order is not deterministic with ZIP archives and `iter_files`
### Describe the bug
For the `beans` dataset (did not try on other), the order of samples is not the same on different machines. Tested on my local laptop, github actions machine, and ec2 instance. The three yield a different order.
### Steps to reproduce the bug
In a clean docker container or conda environment with datasets==2.6.1, run
```python
from datasets import load_dataset
from pprint import pprint
data = load_dataset("beans", split="validation")
pprint(data["image_file_path"])
```
### Expected behavior
The order of the images is the same on all machines.
### Environment info
On the EC2 instance:
```
- `datasets` version: 2.6.1
- Platform: Linux-4.14.291-218.527.amzn2.x86_64-x86_64-with-glibc2.2.5
- Python version: 3.7.10
- PyArrow version: 9.0.0
- Pandas version: 1.3.5
- Numpy version: not checked
```
On my local laptop:
```
- `datasets` version: 2.6.1
- Platform: Linux-5.15.0-50-generic-x86_64-with-glibc2.35
- Python version: 3.9.12
- PyArrow version: 7.0.0
- Pandas version: 1.3.5
- Numpy version: 1.23.1
```
On github actions:
```
- `datasets` version: 2.6.1
- Platform: Linux-5.15.0-1022-azure-x86_64-with-glibc2.2.5
- Python version: 3.8.14
- PyArrow version: 9.0.0
- Pandas version: 1.5.1
- Numpy version: 1.23.4
```
Besides the linked PR, to make the loading process fully deterministic, I believe we should also sort the data files [here](https://github.com/huggingface/datasets/blob/df4bdd365f2abb695f113cbf8856a925bc70901b/src/datasets/data_files.py#L276) and [here](https://github.com/huggingface/datasets/blob/df4bdd365f2abb695f113cbf8856a925bc70901b/src/datasets/data_files.py#L485) (e.g. fsspec's `LocalFileSystem.glob` relies on `os.scandir`, which yields the contents in arbitrary order). My concern is the overhead of these sorts... Maybe we could introduce a new flag to `load_dataset` similar to TFDS' [`shuffle_files`](https://www.tensorflow.org/datasets/determinism#determinism_when_reading) or sort only if the number of data files is small? | [
-0.17855557799339294,
0.14124345779418945,
-0.026052795350551605,
0.3417036533355713,
0.032715920358896255,
-0.29017287492752075,
0.23596049845218658,
0.09723290801048279,
-0.214439257979393,
0.1838478147983551,
0.21164555847644806,
0.6462437510490417,
0.2167438417673111,
-0.08832013607025146,
-0.15404504537582397,
0.0025034360587596893,
0.03429223597049713,
0.16312432289123535,
-0.31453096866607666,
-0.17214158177375793,
-0.13624516129493713,
0.0836910754442215,
-0.27101731300354004,
-0.4385717511177063,
-0.04325639456510544,
0.04691893234848976,
-0.04550686478614807,
-0.00726667046546936,
-0.1618969440460205,
-0.37685486674308777,
0.3822981119155884,
0.10860687494277954,
0.26323258876800537,
0.5137677192687988,
-0.00012067315401509404,
0.10672329366207123,
0.08538646250963211,
0.013852404430508614,
-0.25981467962265015,
-0.42047542333602905,
-0.1246153712272644,
-0.017128469422459602,
-0.12337924540042877,
-0.23332464694976807,
-0.3407153785228729,
0.21637071669101715,
0.10568668693304062,
-0.14298628270626068,
0.20098264515399933,
0.03790025785565376,
0.12056612968444824,
0.34659072756767273,
-0.16791296005249023,
0.02762128971517086,
0.29895344376564026,
0.1214132308959961,
-0.12142245471477509,
0.0721430853009224,
0.050459492951631546,
0.27409446239471436,
-0.14304661750793457,
0.19828057289123535,
0.06568894535303116,
0.4650110900402069,
0.09355952590703964,
0.1621975153684616,
0.1260952204465866,
-0.23953068256378174,
-0.3736775815486908,
0.11747996509075165,
0.694433331489563,
-0.003855910152196884,
-0.42077428102493286,
-0.1717839241027832,
0.042719997465610504,
-0.02220725081861019,
0.2714400887489319,
0.23516777157783508,
-0.0035393107682466507,
-0.01169300451874733,
-0.026741476729512215,
0.6049683690071106,
-0.41364410519599915,
0.19127656519412994,
-0.23988789319992065,
0.540766179561615,
0.08470147103071213,
-0.005500100553035736,
-0.10561388731002808,
0.03010929375886917,
0.495577335357666,
-0.06601224839687347,
-0.05816405639052391,
-0.14190083742141724,
0.010353915393352509,
-0.16474390029907227,
-0.05673018842935562,
0.024247057735919952,
-0.015127905644476414,
0.6505503058433533,
0.019762996584177017,
-0.22559475898742676,
0.24250507354736328,
-0.0880884900689125,
0.20890803635120392,
0.2874424457550049,
-0.13053962588310242,
0.4694793224334717,
0.28306978940963745,
0.22394071519374847,
-0.1401250660419464,
0.05640257149934769,
0.1938350945711136,
-0.3469705879688263,
0.17947614192962646,
0.06057034060359001,
0.002099227160215378,
-0.29218772053718567,
-0.3233829438686371,
-0.29615673422813416,
-0.11199872195720673,
-0.1922251284122467,
0.05423446372151375,
0.15542766451835632,
-0.19641172885894775,
0.05372605472803116,
-0.034569162875413895,
0.32690805196762085,
-0.03895983099937439,
0.12202807515859604,
-0.04029126092791557,
-0.30254796147346497,
-0.16451822221279144,
-0.06167005002498627,
0.02117949351668358,
0.10521560907363892,
0.21576808393001556,
0.2070499211549759,
0.17977909743785858,
0.038564056158065796,
0.3063994348049164,
-0.214699387550354,
0.2723315358161926,
0.4642907977104187,
0.029791217297315598,
0.1370706707239151,
-0.12233878672122955,
0.07182435691356659,
-0.2903152406215668,
0.06458283215761185,
-0.2523019313812256,
0.00046397745609283447,
0.2862606346607208,
0.09076452255249023,
-0.23660099506378174,
-0.13049712777137756,
-0.3840658366680145,
-0.2686294615268707,
0.3568667471408844,
-0.25871703028678894,
0.05821974202990532,
-0.10651230812072754,
-0.3672164976596832,
-0.18090680241584778,
-0.32120659947395325,
0.3830143213272095,
-0.027203816920518875,
0.018208272755146027,
-0.02814396843314171,
0.18974177539348602,
0.33534637093544006,
-0.04891129955649376,
-0.020621683448553085,
0.18370342254638672,
-0.15462586283683777,
0.06721726059913635,
-0.1510777771472931,
-0.3539476692676544,
-0.5748002529144287,
0.3017597198486328,
-0.13508760929107666,
0.4038386344909668,
0.08747544884681702,
0.15972904860973358,
0.4900113344192505,
-0.3126814365386963,
-0.10320185124874115,
0.482516348361969,
0.26235175132751465,
0.20293503999710083,
-0.2721554636955261,
-0.2220839262008667,
0.13648131489753723,
0.0678800642490387,
-0.16063185036182404,
0.22288045287132263,
0.06483393162488937,
-0.17152079939842224,
0.11401546001434326,
0.1030648797750473,
-0.3314051032066345,
0.22943173348903656,
0.2837316691875458,
-0.014145776629447937,
0.17839315533638,
0.010878149420022964,
-0.04603808373212814,
0.34424546360969543,
-0.1719728410243988,
0.03880948945879936,
-0.16864539682865143,
0.0379229411482811,
-0.02828195132315159,
-0.12255605310201645,
-0.46965786814689636,
-0.286511093378067,
0.06954987347126007,
0.4024674594402313,
0.11966545879840851,
0.03814438357949257,
0.1785823255777359,
0.3212772011756897,
0.1028905063867569,
0.09481783211231232,
-0.263899564743042,
0.467185914516449,
0.02992454171180725,
-0.027727127075195312,
0.09203183650970459,
-0.08715727180242538,
0.014942668378353119,
-0.28028032183647156,
-0.27748996019363403,
0.27766284346580505,
0.2267741858959198,
0.05391491949558258,
-0.00859120488166809,
0.05904637277126312,
0.2366827428340912,
0.13162873685359955,
-0.10753027349710464,
0.41356161236763,
-0.30188149213790894,
0.0838853195309639,
-0.020424969494342804,
0.5998998880386353,
-0.31753331422805786,
0.39978480339050293,
-0.24135717749595642,
-0.14065539836883545,
0.26636385917663574,
0.06775093078613281,
-0.14008112251758575,
-0.06831281632184982,
0.3044773042201996,
0.2802320122718811,
0.4856948256492615,
0.19036826491355896,
-0.025712639093399048,
0.28793132305145264,
0.2808320224285126,
0.09826022386550903,
-0.193781316280365,
0.1730310618877411,
0.1968686282634735,
0.1458284854888916,
0.3944166898727417,
0.4581321179866791,
0.6740409731864929,
0.1805899441242218,
-0.11598120629787445,
-0.3734950125217438,
-0.10714612901210785,
-0.1584913581609726,
-0.048384033143520355,
-0.05725489556789398,
0.5532582998275757,
0.17754071950912476,
0.31003472208976746,
0.2539765536785126,
-0.22365078330039978,
-0.031031368300318718,
-0.0753558799624443,
-0.021971935406327248,
-0.0929420068860054,
0.37094825506210327,
-0.32793158292770386,
-0.2061648964881897,
-0.0322650671005249,
0.06108085438609123,
-0.23307785391807556,
0.11210405081510544,
0.021380135789513588,
0.1839340478181839,
-0.053765248507261276,
-0.031426362693309784,
0.27302634716033936,
0.28935810923576355,
0.10926438868045807,
-0.27297940850257874,
-0.23389555513858795,
0.31104153394699097,
-0.26848703622817993,
-0.05413039028644562,
0.18289275467395782,
0.03430315479636192,
0.4844267964363098,
-0.339383065700531,
-0.22658640146255493,
0.053613029420375824,
-0.46831104159355164,
0.07053102552890778,
0.19227293133735657,
0.4416469931602478,
0.07845553010702133,
0.11805696040391922,
0.09029404819011688,
-0.0977112203836441,
0.07058080285787582,
0.20592810213565826,
-0.3171069025993347,
0.05694893002510071,
-0.13861508667469025,
-0.05594855919480324,
-0.06087607890367508,
-0.4614010751247406,
-0.3219459056854248,
-0.09532271325588226,
0.2345236986875534,
0.4361543655395508,
0.15001100301742554,
-0.18229728937149048,
0.1315721869468689,
-0.6779850125312805,
0.2526642978191376,
0.009223222732543945,
-0.10141654312610626,
-0.45588162541389465,
0.29703983664512634,
-0.1693144291639328,
-0.07824742794036865,
-0.5375950932502747,
-0.03171303868293762,
0.09811544418334961,
0.18929791450500488,
-0.40881919860839844,
-0.1401360183954239,
-0.2270617038011551,
0.5193159580230713,
-0.03997103124856949,
-0.07943975180387497,
0.4920124411582947,
-0.15675216913223267,
0.08309800922870636,
-0.1495402455329895,
-0.0653032660484314,
0.3316871225833893,
-0.0446949228644371,
0.31505048274993896,
0.15874695777893066,
0.1549333930015564,
0.20983296632766724,
0.44177818298339844,
0.1666572242975235,
-0.39754146337509155,
0.20769356191158295,
-0.030762648209929466,
0.044782593846321106,
-0.2111322581768036,
0.00781489908695221,
0.19696375727653503,
0.19303832948207855,
-0.10764871537685394,
0.12811502814292908,
0.05862274020910263,
-0.16673928499221802,
-0.0014264993369579315,
0.09214994311332703,
-0.2693881690502167,
-0.13252249360084534,
-0.022430257871747017,
-0.03079238533973694,
-0.16820645332336426,
0.05253005400300026,
0.20275217294692993,
-0.18899402022361755,
-0.18307146430015564,
-0.06303908675909042,
0.25189679861068726,
0.011001907289028168,
0.06239821016788483,
-0.2130882441997528,
0.10440902411937714,
-0.3756624758243561,
0.05260596051812172,
-0.00574727077037096,
-0.03323637321591377,
0.2576632797718048,
0.07346562296152115,
0.14828959107398987,
-0.2311510592699051,
0.6481767296791077,
-0.19107556343078613,
0.2372039407491684,
0.021583523601293564,
-0.31001290678977966,
0.04831315577030182,
-0.45391592383384705,
-0.2659948766231537,
0.05964471399784088,
0.43172839283943176,
0.4210170805454254,
-0.463881254196167,
-0.0013206569710746408,
-0.13446995615959167,
0.003201891202479601,
-0.011199995875358582,
-0.5152257084846497,
-0.43349361419677734,
0.047609344124794006,
-0.09137099981307983,
0.05966462194919586,
0.05606703460216522,
-0.01723974011838436,
-0.5077282190322876,
-0.38492947816848755,
-0.3465011715888977,
-0.052770018577575684,
-0.03508356213569641,
0.208208829164505,
0.3736732602119446,
-0.30015209317207336,
0.2532747685909271,
0.4401797950267792,
0.12299879640340805,
0.6033756136894226,
0.20854352414608002,
-0.36165595054626465,
-0.2417066991329193,
0.008598141372203827,
-0.25936827063560486,
-0.3385351896286011,
0.31141549348831177,
-0.0967106968164444,
-0.21664214134216309,
-0.2565813958644867,
0.16156812012195587,
-0.19153404235839844,
-0.0816940888762474,
0.3874659836292267,
-0.044092316180467606,
0.004825027193874121,
-0.4759698808193207,
0.33984726667404175,
0.09430401027202606,
-0.2589854598045349,
0.5133119821548462,
-0.394875168800354,
-0.1493162214756012,
0.454508900642395,
0.43331587314605713,
0.730514407157898,
0.028491076081991196,
0.144118994474411,
0.30967625975608826,
0.16061392426490784,
0.3576647639274597,
-0.24356725811958313,
0.24210625886917114,
-0.48212820291519165,
-0.4368923306465149,
-0.15455737709999084,
-0.256699800491333,
-0.1802438497543335,
0.38790464401245117,
-0.19335423409938812,
0.23717562854290009,
-0.19196617603302002,
-0.19403602182865143,
-0.19948647916316986,
-0.0015426278114318848,
-0.06863700598478317,
-0.10965102910995483,
-0.14539794623851776,
0.039680592715740204,
0.010180607438087463,
0.5360829830169678,
-0.25924980640411377,
-0.0654350146651268,
-0.08862803876399994,
-0.11870701611042023,
-0.19132834672927856,
0.32694366574287415,
-0.3941519558429718,
0.2009682059288025,
0.31428539752960205,
-0.09641312062740326,
-0.3555481731891632,
0.31214961409568787,
0.18617956340312958,
0.08076053112745285,
0.07858893275260925,
0.2200554758310318,
0.31833022832870483,
0.15215228497982025,
0.17428243160247803,
-0.32758277654647827,
0.35000738501548767,
-0.11898435652256012,
-0.07421901822090149,
-0.5617334842681885,
-0.03655441850423813,
-0.5320625901222229,
0.3245603144168854,
0.2498851865530014,
0.17558690905570984,
0.1009996235370636,
0.04829928278923035,
0.2933560609817505,
0.02594994753599167,
-0.1411965787410736,
0.09324309229850769,
-0.005420565605163574,
0.18668879568576813,
0.5396794080734253,
-0.26123300194740295,
-0.47794678807258606,
-0.16222862899303436,
0.49835672974586487,
0.029748326167464256,
-0.12199696153402328,
0.08547680079936981,
-0.2880062162876129,
-0.2036549299955368,
-0.15825460851192474,
0.2137334942817688,
-0.4013892710208893,
-0.44930970668792725,
0.31542351841926575,
-0.1895490139722824,
-0.05383045971393585,
0.11054475605487823,
-0.0025675632059574127,
0.21012473106384277,
0.11815577000379562,
-0.15974900126457214,
-0.4870411157608032,
0.3301692605018616,
-0.18727554380893707,
0.028235821053385735,
0.016537506133317947,
-0.1478707492351532,
-0.053307440131902695,
-0.18488197028636932,
-0.1998325139284134,
-0.2349269539117813,
-0.01602870598435402,
-0.03484858572483063,
-0.07050345093011856,
-0.19522202014923096,
0.14186206459999084,
0.17489664256572723,
0.07624222338199615,
-0.0030448343604803085,
0.1758914440870285,
-0.04974273219704628,
-0.1154363602399826,
-0.2970674932003021,
0.15158376097679138,
-0.1410301923751831,
-0.17090360820293427,
0.07882242649793625,
-0.24013759195804596,
-0.10509355366230011,
-0.25538837909698486,
0.03940679505467415,
0.018518716096878052,
-0.02498401701450348,
-0.14459361135959625,
0.10825075209140778,
0.3632020652294159,
-0.011349329724907875,
0.318331778049469,
-0.3176633417606354,
-0.04281581938266754,
0.18139643967151642,
0.4591968059539795,
-0.20312365889549255,
0.08537916839122772,
-0.21688582003116608,
-0.23012995719909668,
0.04696350544691086,
0.10504130274057388,
0.24307814240455627,
-0.31478506326675415,
0.004948653280735016,
0.14012764394283295,
0.04655483365058899,
0.3689742088317871,
-0.21679474413394928,
-0.4991272985935211,
-0.10200481116771698,
0.19736029207706451,
-0.09982158243656158,
-0.11660553514957428,
-0.39771196246147156,
0.5694321393966675,
-0.10622365772724152,
0.21644319593906403,
0.25557392835617065,
-0.07526755332946777,
0.12282995134592056,
0.12878403067588806,
0.39494314789772034,
-0.1799049824476242,
0.31005367636680603,
0.3773053288459778,
0.08903826773166656,
0.28720399737358093,
0.053992096334695816,
-0.15926679968833923,
0.017717599868774414,
0.04009076580405235,
0.19614091515541077,
0.3633640706539154,
0.08076043426990509,
-0.21860459446907043,
-0.06362069398164749,
-0.2531903088092804,
-0.039582591503858566,
0.44534438848495483,
0.281919002532959,
0.18927641212940216,
0.5435522794723511,
0.18301065266132355,
-0.11819753795862198,
-0.2004041224718094,
-0.5634931325912476,
-0.1513538509607315,
-0.009978312999010086,
0.04250343143939972,
-0.30711629986763,
-0.1823960244655609,
-0.1581660658121109,
-0.057563938200473785,
-0.19932644069194794,
-0.0028520748019218445,
0.31415170431137085,
0.30929824709892273,
-0.2659740447998047,
-0.6740136742591858,
0.18585702776908875,
-0.16575196385383606,
0.200117826461792,
0.022367272526025772,
0.3702758550643921,
0.2915235757827759,
-0.26241230964660645,
0.1353415697813034,
0.2476462572813034,
0.37472882866859436,
0.5771986246109009,
0.2088358998298645,
-0.14576038718223572,
-0.04874632880091667,
-0.019002828747034073,
-0.14605391025543213,
0.06983991712331772,
-0.3233085572719574,
-0.2327452152967453,
0.30331677198410034,
0.09101225435733795,
-0.15253403782844543,
0.3056827485561371,
0.22514566779136658,
0.42541781067848206,
0.0013972455635666847,
0.1515451967716217,
-0.1639016717672348,
0.19139936566352844,
0.19651439785957336,
0.07208002358675003,
-0.27852532267570496,
0.12491548806428909,
-0.1173958033323288,
-0.10503058135509491,
-0.036382779479026794,
-0.015141698531806469,
0.0341731421649456,
-0.1819898933172226,
0.08366058766841888,
0.16307052969932556,
0.02184002846479416,
-0.27615225315093994,
-0.15025290846824646,
-0.44160905480384827,
0.21194510161876678,
-0.2767639756202698,
-0.035996951162815094,
-0.08512547612190247,
0.302760511636734,
-0.2508714199066162,
-0.1744866520166397,
0.21397972106933594,
-0.35889169573783875,
-0.029366474598646164,
0.550823450088501,
-0.6972349882125854,
0.030837740749120712,
-0.07995130121707916,
0.10176321864128113,
0.015075579285621643,
-0.4544987082481384,
-0.2637740671634674,
-0.13903141021728516,
0.010790269821882248,
-0.014810342341661453,
0.0196729376912117,
0.14357149600982666,
0.21017715334892273,
0.27123910188674927,
0.2462574541568756,
0.19832442700862885,
-0.13795343041419983,
-0.20695383846759796,
-0.021708715707063675,
-0.11503580212593079,
-0.4205465316772461,
0.23199057579040527,
0.023934856057167053,
0.29837566614151,
-0.12332702428102493,
0.1306440830230713,
-0.1932072937488556,
0.14527110755443573,
0.019071422517299652,
-0.07193342596292496,
-0.4656428396701813,
0.0522296205163002,
-0.15090319514274597,
0.15675531327724457,
-0.09006112813949585,
0.1909237802028656,
0.08023949712514877,
-0.06531137228012085,
-0.12137085199356079,
-0.12717542052268982,
0.2989822030067444,
-0.3459168076515198,
0.04335547611117363,
-0.24397577345371246,
0.1793564110994339,
0.040397439152002335,
0.03731784224510193,
-0.04644818603992462,
-0.030653201043605804,
0.3089255094528198,
-0.029914483428001404,
0.07038860023021698,
0.1987815648317337,
0.21832150220870972,
0.21680639684200287,
-0.18008729815483093,
0.3625589609146118,
-0.02009446546435356,
-0.6076036691665649,
0.07402819395065308,
-0.20048882067203522
] |
https://github.com/huggingface/datasets/issues/5145 | Dataset order is not deterministic with ZIP archives and `iter_files` | We already return the result sorted at the end of `_resolve_single_pattern_locally` and `_resolve_single_pattern_in_dataset_repository` if I'm not mistaken | ### Describe the bug
For the `beans` dataset (did not try on other), the order of samples is not the same on different machines. Tested on my local laptop, github actions machine, and ec2 instance. The three yield a different order.
### Steps to reproduce the bug
In a clean docker container or conda environment with datasets==2.6.1, run
```python
from datasets import load_dataset
from pprint import pprint
data = load_dataset("beans", split="validation")
pprint(data["image_file_path"])
```
### Expected behavior
The order of the images is the same on all machines.
### Environment info
On the EC2 instance:
```
- `datasets` version: 2.6.1
- Platform: Linux-4.14.291-218.527.amzn2.x86_64-x86_64-with-glibc2.2.5
- Python version: 3.7.10
- PyArrow version: 9.0.0
- Pandas version: 1.3.5
- Numpy version: not checked
```
On my local laptop:
```
- `datasets` version: 2.6.1
- Platform: Linux-5.15.0-50-generic-x86_64-with-glibc2.35
- Python version: 3.9.12
- PyArrow version: 7.0.0
- Pandas version: 1.3.5
- Numpy version: 1.23.1
```
On github actions:
```
- `datasets` version: 2.6.1
- Platform: Linux-5.15.0-1022-azure-x86_64-with-glibc2.2.5
- Python version: 3.8.14
- PyArrow version: 9.0.0
- Pandas version: 1.5.1
- Numpy version: 1.23.4
``` | 17 | Dataset order is not deterministic with ZIP archives and `iter_files`
### Describe the bug
For the `beans` dataset (did not try on other), the order of samples is not the same on different machines. Tested on my local laptop, github actions machine, and ec2 instance. The three yield a different order.
### Steps to reproduce the bug
In a clean docker container or conda environment with datasets==2.6.1, run
```python
from datasets import load_dataset
from pprint import pprint
data = load_dataset("beans", split="validation")
pprint(data["image_file_path"])
```
### Expected behavior
The order of the images is the same on all machines.
### Environment info
On the EC2 instance:
```
- `datasets` version: 2.6.1
- Platform: Linux-4.14.291-218.527.amzn2.x86_64-x86_64-with-glibc2.2.5
- Python version: 3.7.10
- PyArrow version: 9.0.0
- Pandas version: 1.3.5
- Numpy version: not checked
```
On my local laptop:
```
- `datasets` version: 2.6.1
- Platform: Linux-5.15.0-50-generic-x86_64-with-glibc2.35
- Python version: 3.9.12
- PyArrow version: 7.0.0
- Pandas version: 1.3.5
- Numpy version: 1.23.1
```
On github actions:
```
- `datasets` version: 2.6.1
- Platform: Linux-5.15.0-1022-azure-x86_64-with-glibc2.2.5
- Python version: 3.8.14
- PyArrow version: 9.0.0
- Pandas version: 1.5.1
- Numpy version: 1.23.4
```
We already return the result sorted at the end of `_resolve_single_pattern_locally` and `_resolve_single_pattern_in_dataset_repository` if I'm not mistaken | [
-0.1806086152791977,
0.14462769031524658,
-0.01702861115336418,
0.31182602047920227,
0.037609945982694626,
-0.3084612786769867,
0.27209702134132385,
0.1429557353258133,
-0.3288835287094116,
0.21146509051322937,
0.23483237624168396,
0.6990677714347839,
0.19552943110466003,
-0.08474083989858627,
-0.15324093401432037,
-0.03305622935295105,
0.009770013391971588,
0.12306906282901764,
-0.28364959359169006,
-0.21022893488407135,
-0.10388736426830292,
0.06364098936319351,
-0.24322457611560822,
-0.36787593364715576,
-0.07452463358640671,
0.004937628284096718,
-0.027550702914595604,
-0.059585265815258026,
-0.17760980129241943,
-0.321311354637146,
0.3924383521080017,
0.021966947242617607,
0.22184400260448456,
0.4652615189552307,
-0.00012169477122370154,
0.10506318509578705,
0.07622339576482773,
0.026382582262158394,
-0.17449918389320374,
-0.3616027235984802,
-0.24703723192214966,
0.037516213953495026,
-0.17433713376522064,
-0.25327619910240173,
-0.3395371735095978,
0.22466206550598145,
0.08889005333185196,
-0.1638198047876358,
0.13867023587226868,
0.09458823502063751,
0.12419481575489044,
0.3156655430793762,
-0.21708358824253082,
-0.008984021842479706,
0.29727229475975037,
0.1493622064590454,
-0.12626010179519653,
0.06505278497934341,
0.06301264464855194,
0.28862133622169495,
-0.1152021661400795,
0.2581557333469391,
0.05682835727930069,
0.45394444465637207,
-0.02250795066356659,
0.20957955718040466,
0.1281440258026123,
-0.20796707272529602,
-0.31226053833961487,
0.0952562540769577,
0.6002830266952515,
-0.014128878712654114,
-0.43871814012527466,
-0.16937746107578278,
0.0020678951404988766,
0.018187841400504112,
0.2605767250061035,
0.25666338205337524,
0.046036411076784134,
0.04486151412129402,
-0.02569490112364292,
0.6224205493927002,
-0.380328893661499,
0.17963910102844238,
-0.3364691734313965,
0.5709315538406372,
0.10087717324495316,
0.023446086794137955,
-0.15702469646930695,
-0.0065240152180194855,
0.45648643374443054,
-0.05244226008653641,
0.01163097470998764,
-0.18481659889221191,
0.0010553672909736633,
-0.17784516513347626,
0.061970584094524384,
0.06407356262207031,
0.022082757204771042,
0.6517776250839233,
-0.03557523712515831,
-0.1590714156627655,
0.23169958591461182,
-0.1352505385875702,
0.16376647353172302,
0.30225738883018494,
-0.15766644477844238,
0.5733035206794739,
0.32691460847854614,
0.21418620645999908,
-0.17577049136161804,
0.06834679841995239,
0.25320538878440857,
-0.3810248374938965,
0.13901855051517487,
0.04791151359677315,
0.036448270082473755,
-0.30167457461357117,
-0.3307324945926666,
-0.25680723786354065,
-0.1547737717628479,
-0.1898874193429947,
0.07971837371587753,
0.1447526216506958,
-0.16048552095890045,
0.05232500284910202,
-0.10189801454544067,
0.3292614817619324,
-0.02519823983311653,
0.14613723754882812,
-0.03732012212276459,
-0.31309106945991516,
-0.14897938072681427,
-0.04283420741558075,
0.0074822865426540375,
0.07470518350601196,
0.20326849818229675,
0.2173738330602646,
0.15941399335861206,
0.07447728514671326,
0.2738755941390991,
-0.25579145550727844,
0.3011687099933624,
0.42424631118774414,
-0.038747187703847885,
0.1787642240524292,
-0.09813129901885986,
0.09396463632583618,
-0.2976096272468567,
0.026300597935914993,
-0.22784096002578735,
-0.0362308993935585,
0.3008970320224762,
0.08951859176158905,
-0.232980877161026,
-0.0937272310256958,
-0.3020114004611969,
-0.2804744243621826,
0.39928898215293884,
-0.21692810952663422,
0.07116314768791199,
-0.14372238516807556,
-0.41451385617256165,
-0.21030135452747345,
-0.3412429690361023,
0.2803674340248108,
-0.08296647667884827,
0.06182904541492462,
-0.048453439027071,
0.21707653999328613,
0.3222641944885254,
0.023483801633119583,
0.02001306787133217,
0.16430698335170746,
-0.17198224365711212,
0.17715908586978912,
-0.11476706713438034,
-0.3883935511112213,
-0.6164759993553162,
0.26045191287994385,
-0.13886421918869019,
0.3572724759578705,
0.10517053306102753,
0.10875080525875092,
0.5238978862762451,
-0.294935017824173,
-0.07406337559223175,
0.45765382051467896,
0.22656451165676117,
0.20977744460105896,
-0.3059956431388855,
-0.17572340369224548,
0.1026870459318161,
-0.014637215062975883,
-0.14107781648635864,
0.18269497156143188,
0.0881379172205925,
-0.2391054332256317,
0.12415412068367004,
0.06405304372310638,
-0.27959463000297546,
0.19152246415615082,
0.3770248591899872,
-0.035384975373744965,
0.253091424703598,
-0.056367259472608566,
0.045775435864925385,
0.3646063804626465,
-0.1981750726699829,
0.05472690612077713,
-0.2843397855758667,
0.004745051264762878,
-0.05830308049917221,
-0.1212812140583992,
-0.3847791254520416,
-0.2962886691093445,
0.04603700339794159,
0.39508378505706787,
0.17034514248371124,
0.04142875596880913,
0.14620636403560638,
0.35040009021759033,
0.09028748422861099,
0.057256098836660385,
-0.26614370942115784,
0.5434497594833374,
-0.014268217608332634,
-0.07775063812732697,
0.07781805098056793,
-0.069304920732975,
0.016533996909856796,
-0.24713324010372162,
-0.21761277318000793,
0.24196738004684448,
0.2211952954530716,
-0.003540508449077606,
-0.010409686714410782,
0.02739754319190979,
0.21025978028774261,
0.04761387035250664,
-0.15424467623233795,
0.41817906498908997,
-0.30069395899772644,
0.14772117137908936,
-0.0575394481420517,
0.5982930660247803,
-0.20053799450397491,
0.40053415298461914,
-0.21447063982486725,
-0.1087913066148758,
0.2819513976573944,
0.04190659150481224,
-0.14942246675491333,
-0.13422374427318573,
0.308545857667923,
0.2427402287721634,
0.44495221972465515,
0.16064096987247467,
-0.05580651015043259,
0.3646494150161743,
0.42284438014030457,
0.062089454382658005,
-0.16092795133590698,
0.1703786551952362,
0.2254244089126587,
0.15330442786216736,
0.3998841345310211,
0.5245171189308167,
0.7114040851593018,
0.1877727061510086,
-0.08998312056064606,
-0.3598337769508362,
-0.16252972185611725,
-0.15951934456825256,
-0.10295837372541428,
-0.0944036990404129,
0.506523072719574,
0.1944139003753662,
0.36667612195014954,
0.2556658089160919,
-0.21426621079444885,
-0.02907179668545723,
-0.07792197912931442,
-0.020175514742732048,
-0.09637536853551865,
0.37271758913993835,
-0.4617389738559723,
-0.25481900572776794,
-0.057695984840393066,
0.07823163270950317,
-0.24561113119125366,
0.08992138504981995,
0.042587343603372574,
0.096695676445961,
-0.03223412483930588,
0.037355728447437286,
0.3040318787097931,
0.29318156838417053,
0.11762389540672302,
-0.25438106060028076,
-0.1866556704044342,
0.32579222321510315,
-0.2655620276927948,
-0.0483822301030159,
0.11939786374568939,
0.03598712757229805,
0.46437644958496094,
-0.30016160011291504,
-0.2708774209022522,
-0.033063843846321106,
-0.5336471199989319,
0.08550666272640228,
0.18647189438343048,
0.47770437598228455,
0.16792792081832886,
0.07579328864812851,
0.036027535796165466,
-0.1109943687915802,
0.09102262556552887,
0.24615103006362915,
-0.3154606819152832,
0.005082400515675545,
-0.16938936710357666,
-0.011663822457194328,
-0.09720666706562042,
-0.4683654010295868,
-0.3148787319660187,
-0.09870783984661102,
0.26581573486328125,
0.41619980335235596,
0.1582055538892746,
-0.18358086049556732,
0.02908763661980629,
-0.6556481719017029,
0.14645496010780334,
-0.0295302364975214,
-0.13077649474143982,
-0.3414122462272644,
0.3208934962749481,
-0.15852950513362885,
-0.1118893027305603,
-0.5853595733642578,
-0.09257501363754272,
0.12415030598640442,
0.19962188601493835,
-0.3745265007019043,
-0.1595689058303833,
-0.29402852058410645,
0.5300639271736145,
0.0028571560978889465,
-0.06327269971370697,
0.5402848720550537,
-0.161790132522583,
0.08955392986536026,
-0.22359299659729004,
-0.09119388461112976,
0.33728650212287903,
0.04951315373182297,
0.28659185767173767,
0.1688283085823059,
0.1653149127960205,
0.2632709741592407,
0.4092520475387573,
0.16501715779304504,
-0.378663033246994,
0.18123862147331238,
-0.04952871799468994,
-0.025205735117197037,
-0.18968549370765686,
0.02307749353349209,
0.22699344158172607,
0.23301410675048828,
-0.08647841215133667,
0.11547253280878067,
0.1260058879852295,
-0.1338922530412674,
0.02872016280889511,
0.07111047208309174,
-0.20585954189300537,
-0.18283803761005402,
-0.04374614357948303,
0.02131405659019947,
-0.09479131549596786,
0.08937935531139374,
0.1870408058166504,
-0.18836745619773865,
-0.14529716968536377,
-0.09208029508590698,
0.20323586463928223,
0.005960248410701752,
0.013979659415781498,
-0.25458279252052307,
0.09342698752880096,
-0.35340508818626404,
0.06959637254476547,
0.09721402078866959,
-0.0479612872004509,
0.22764892876148224,
0.0817338153719902,
0.132958322763443,
-0.2087675780057907,
0.6220940947532654,
-0.2326851636171341,
0.2849161624908447,
0.023420456796884537,
-0.2870974838733673,
-0.032030101865530014,
-0.42489466071128845,
-0.27404239773750305,
0.0629509910941124,
0.3862994611263275,
0.4981979727745056,
-0.41353046894073486,
0.05389941483736038,
-0.06870455294847488,
-0.004425404127687216,
0.022224832326173782,
-0.4449099004268646,
-0.37398815155029297,
0.009112488478422165,
-0.06473260372877121,
0.08528949320316315,
0.06884033232927322,
-0.020651763305068016,
-0.44749194383621216,
-0.4097507894039154,
-0.31631097197532654,
-0.11623825877904892,
-0.0811656266450882,
0.22143180668354034,
0.3793497085571289,
-0.32486116886138916,
0.22203987836837769,
0.36348310112953186,
0.14320051670074463,
0.5746424794197083,
0.16386204957962036,
-0.3342207968235016,
-0.2129225730895996,
0.025399796664714813,
-0.26837876439094543,
-0.2699386775493622,
0.3285815417766571,
-0.18676385283470154,
-0.14162009954452515,
-0.252474308013916,
0.19047898054122925,
-0.19464614987373352,
-0.09743695706129074,
0.4335769712924957,
-0.04720986634492874,
-0.03169674798846245,
-0.458710640668869,
0.3297552168369293,
0.16102224588394165,
-0.2405521720647812,
0.5202378034591675,
-0.3213205337524414,
-0.16209517419338226,
0.40959906578063965,
0.3677535355091095,
0.7216392755508423,
0.05916973575949669,
0.11994290351867676,
0.3309522867202759,
0.13358110189437866,
0.38111671805381775,
-0.1606931984424591,
0.3063938021659851,
-0.44328606128692627,
-0.46433427929878235,
-0.15222439169883728,
-0.2921620011329651,
-0.12893646955490112,
0.3829061985015869,
-0.2353425920009613,
0.204622283577919,
-0.17103125154972076,
-0.19243532419204712,
-0.19991233944892883,
-0.06828697770833969,
-0.0752953439950943,
-0.022267606109380722,
-0.22203557193279266,
0.040876515209674835,
0.00814007967710495,
0.5251242518424988,
-0.2297845184803009,
-0.03962608799338341,
-0.1660023182630539,
-0.15046066045761108,
-0.22680000960826874,
0.29153311252593994,
-0.382706880569458,
0.21435295045375824,
0.3811425268650055,
-0.10840115696191788,
-0.3450186848640442,
0.27195581793785095,
0.16564282774925232,
0.09418201446533203,
0.09562467038631439,
0.20193690061569214,
0.3479042053222656,
0.17171664535999298,
0.27573254704475403,
-0.36588841676712036,
0.37014344334602356,
-0.1463187038898468,
-0.11281437426805496,
-0.5694761872291565,
-0.008745506405830383,
-0.5263931155204773,
0.2948469817638397,
0.2509942650794983,
0.15833330154418945,
0.08978032320737839,
0.07395130395889282,
0.2965976595878601,
0.03416900709271431,
-0.13723443448543549,
0.08777515590190887,
-0.01388084888458252,
0.1576082855463028,
0.613591730594635,
-0.33290231227874756,
-0.43454721570014954,
-0.16406282782554626,
0.5148798823356628,
0.05746844783425331,
-0.08340760320425034,
0.017053736373782158,
-0.2308724969625473,
-0.215549036860466,
-0.16599120199680328,
0.21553242206573486,
-0.35019007325172424,
-0.45659059286117554,
0.32892245054244995,
-0.2309342324733734,
-0.0416596457362175,
0.1075475662946701,
0.010202106088399887,
0.1806219518184662,
0.10264112055301666,
-0.21653038263320923,
-0.4488362967967987,
0.31824201345443726,
-0.16039831936359406,
0.037189070135354996,
-0.04686916247010231,
-0.1917041540145874,
-0.024740181863307953,
-0.1568487584590912,
-0.21351782977581024,
-0.2325456440448761,
-0.03151259571313858,
-0.09415864944458008,
-0.008594073355197906,
-0.16102799773216248,
0.149311363697052,
0.19724631309509277,
0.07143527269363403,
0.005050878971815109,
0.20808933675289154,
-0.006293494254350662,
-0.11909522116184235,
-0.31401944160461426,
0.14796382188796997,
-0.15265733003616333,
-0.1713966578245163,
0.15025685727596283,
-0.23669512569904327,
-0.1161135584115982,
-0.2198100984096527,
0.0627637505531311,
0.11635344475507736,
-0.007599569857120514,
-0.15251339972019196,
0.05748508870601654,
0.26826879382133484,
0.03631632775068283,
0.2536211609840393,
-0.35347849130630493,
-0.054868727922439575,
0.18671764433383942,
0.4826482832431793,
-0.20297327637672424,
0.07018819451332092,
-0.1801203191280365,
-0.249973863363266,
0.01779472827911377,
0.10894805192947388,
0.1971231997013092,
-0.3160513639450073,
-0.09440068900585175,
0.15029434859752655,
0.13259904086589813,
0.27124184370040894,
-0.21748614311218262,
-0.5193086862564087,
-0.07436760514974594,
0.1858585923910141,
-0.12727752327919006,
-0.17879343032836914,
-0.30333220958709717,
0.5726608633995056,
-0.062134068459272385,
0.23680251836776733,
0.25563517212867737,
-0.09748649597167969,
0.10596336424350739,
0.13399729132652283,
0.377103328704834,
-0.19231858849525452,
0.3928450047969818,
0.4189719259738922,
0.11351269483566284,
0.26669561862945557,
0.07255654782056808,
-0.23640009760856628,
0.08945305645465851,
0.09899823367595673,
0.2028118371963501,
0.40011775493621826,
0.06697342544794083,
-0.2344258427619934,
0.07898612320423126,
-0.20596091449260712,
-0.054387401789426804,
0.3750324845314026,
0.243557408452034,
0.18637806177139282,
0.511084794998169,
0.1973528116941452,
-0.1566639542579651,
-0.15594357252120972,
-0.5002604126930237,
-0.1033286303281784,
-0.0020875968039035797,
0.054220426827669144,
-0.26585274934768677,
-0.19917002320289612,
-0.1466604769229889,
-0.07223781198263168,
-0.1985669881105423,
0.05768902599811554,
0.3913898169994354,
0.2542785406112671,
-0.267497181892395,
-0.6360933780670166,
0.1816076934337616,
-0.21316850185394287,
0.2420881688594818,
0.06139840558171272,
0.4019099175930023,
0.2694520354270935,
-0.2986210882663727,
0.12483245134353638,
0.33396610617637634,
0.3528341054916382,
0.5519140362739563,
0.2404487133026123,
-0.1377386748790741,
-0.10066287219524384,
-0.01132932212203741,
-0.1373806744813919,
0.05446532741189003,
-0.39527177810668945,
-0.2883247435092926,
0.3049435019493103,
0.07424712181091309,
-0.13542279601097107,
0.3183985650539398,
0.19765903055667877,
0.45871925354003906,
-0.01727532595396042,
0.1766921579837799,
-0.24296939373016357,
0.19141513109207153,
0.2222338765859604,
0.06648784130811691,
-0.28794798254966736,
0.11676366627216339,
-0.032991472631692886,
-0.07857129722833633,
-0.010877624154090881,
-0.017397064715623856,
0.030750233680009842,
-0.18404611945152283,
0.05858366936445236,
0.11188711225986481,
0.011312417685985565,
-0.22130434215068817,
-0.19337807595729828,
-0.36964738368988037,
0.2201056033372879,
-0.29945504665374756,
-0.030404893681406975,
-0.11742453277111053,
0.28166839480400085,
-0.3010016977787018,
-0.21581755578517914,
0.30103057622909546,
-0.4038524925708771,
-0.038910895586013794,
0.5420354604721069,
-0.6767687201499939,
0.001179974526166916,
-0.10682888329029083,
0.03746616095304489,
-0.0017074327915906906,
-0.46140772104263306,
-0.26527321338653564,
-0.16147242486476898,
0.010152917355298996,
0.0029394496232271194,
-0.03841660916805267,
0.14594101905822754,
0.09813719987869263,
0.282881498336792,
0.3493756949901581,
0.1726464331150055,
-0.09253109991550446,
-0.163658007979393,
-0.039477843791246414,
-0.0947977751493454,
-0.4281020164489746,
0.2506841719150543,
0.011783182621002197,
0.3430606424808502,
-0.1399424523115158,
0.09106871485710144,
-0.2098027467727661,
0.15155696868896484,
0.06216409057378769,
-0.023170286789536476,
-0.3975043296813965,
0.0809113085269928,
-0.16500486433506012,
0.11283650994300842,
-0.09263179451227188,
0.16042140126228333,
0.0590980127453804,
-0.06946202367544174,
-0.10809094458818436,
-0.19763268530368805,
0.29460710287094116,
-0.3864207863807678,
-0.026935581117868423,
-0.276330828666687,
0.19676905870437622,
-0.012999415397644043,
0.029668495059013367,
-0.04165215790271759,
-0.11306938529014587,
0.35544365644454956,
0.02107960730791092,
0.08279159665107727,
0.16878369450569153,
0.26267069578170776,
0.13774196803569794,
-0.15053853392601013,
0.3330973982810974,
0.035612426698207855,
-0.6089969277381897,
0.13679733872413635,
-0.1908172219991684
] |
https://github.com/huggingface/datasets/issues/5144 | Inconsistent documentation on map remove_columns | Thanks for reporting, @zhaowei-wang-nlp.
You are right, the documentation is confusing on the behavior of `remove_columns`. We should better explain it. | ### Describe the bug
The page [process](https://huggingface.co/docs/datasets/process) says this about the parameter `remove_columns` of the function `map`:
When you remove a column, it is only removed after the example has been provided to the mapped function.
So it seems that the `remove_columns` parameter removes after the mapped functions.
However, another page, [the documentation of the function map](https://huggingface.co/docs/datasets/v2.6.1/en/package_reference/main_classes#datasets.Dataset.map.remove_columns) says:
Columns will be removed before updating the examples with the output of `function`, i.e. if `function` is adding columns with names in remove_columns, these columns will be kept.
So one page says "after the mapped function" and another says "before the mapped function."
Is there something wrong?
### Steps to reproduce the bug
Not about code.
### Expected behavior
consistent about the descriptions of the behavior of the parameter `remove_columns` in the function `map`.
### Environment info
datasets V2.6.0 | 21 | Inconsistent documentation on map remove_columns
### Describe the bug
The page [process](https://huggingface.co/docs/datasets/process) says this about the parameter `remove_columns` of the function `map`:
When you remove a column, it is only removed after the example has been provided to the mapped function.
So it seems that the `remove_columns` parameter removes after the mapped functions.
However, another page, [the documentation of the function map](https://huggingface.co/docs/datasets/v2.6.1/en/package_reference/main_classes#datasets.Dataset.map.remove_columns) says:
Columns will be removed before updating the examples with the output of `function`, i.e. if `function` is adding columns with names in remove_columns, these columns will be kept.
So one page says "after the mapped function" and another says "before the mapped function."
Is there something wrong?
### Steps to reproduce the bug
Not about code.
### Expected behavior
consistent about the descriptions of the behavior of the parameter `remove_columns` in the function `map`.
### Environment info
datasets V2.6.0
Thanks for reporting, @zhaowei-wang-nlp.
You are right, the documentation is confusing on the behavior of `remove_columns`. We should better explain it. | [
0.2784156799316406,
-0.29798218607902527,
0.022663231939077377,
0.33704590797424316,
0.1380022168159485,
0.03696826845407486,
0.283779501914978,
-0.08477602899074554,
0.33134761452674866,
0.1609838902950287,
-0.00917185191065073,
0.3571145534515381,
0.03383171185851097,
-0.14182783663272858,
-0.10909825563430786,
-0.24765941500663757,
0.41172873973846436,
-0.10384754836559296,
-0.4035370647907257,
-0.09753460437059402,
-0.44039463996887207,
0.13614128530025482,
-0.5699275135993958,
0.09938523173332214,
0.28912630677223206,
-0.32482320070266724,
-0.3262236416339874,
-0.022527426481246948,
-0.013018276542425156,
-0.04371469467878342,
-0.008929476141929626,
0.03772715851664543,
-0.0900266245007515,
0.4987218976020813,
-0.00012182007048977539,
-0.07840011268854141,
0.06659548729658127,
0.06528828293085098,
0.12706343829631805,
0.04749192297458649,
-0.2723791003227234,
0.2528037130832672,
0.03748258203268051,
-0.1833808273077011,
0.30979177355766296,
-0.06697436422109604,
-0.34820741415023804,
-0.2931888997554779,
0.18917341530323029,
0.1728406548500061,
0.18295051157474518,
0.127149760723114,
0.005582727491855621,
0.1686018854379654,
0.1483566015958786,
0.31244152784347534,
-0.08427432179450989,
0.010316993109881878,
0.017125435173511505,
-0.16696028411388397,
0.07024399191141129,
0.35985758900642395,
-0.2579302489757538,
0.007418185472488403,
0.2997048497200012,
0.3059808313846588,
0.13694898784160614,
-0.386557400226593,
0.15400996804237366,
0.17628642916679382,
0.3873520493507385,
-0.31658780574798584,
-0.12011405825614929,
-0.16085310280323029,
-0.08089414238929749,
-0.07962752133607864,
0.28627538681030273,
-0.0505964532494545,
0.0726785659790039,
0.12096872925758362,
-0.4328176975250244,
-0.2554734945297241,
0.12018682062625885,
0.09691391885280609,
0.11781610548496246,
-0.1958831250667572,
-0.29776719212532043,
0.179122656583786,
0.03595000505447388,
-0.06552110612392426,
-0.24388214945793152,
-0.27206701040267944,
0.052682165056467056,
0.605180561542511,
-0.14819902181625366,
-0.014461729675531387,
0.13655993342399597,
0.3418194055557251,
0.1790342926979065,
-0.18046969175338745,
-0.11127132177352905,
-0.07263834774494171,
-0.06443444639444351,
0.24566730856895447,
0.44801661372184753,
0.19558122754096985,
0.011881455779075623,
0.4187146723270416,
0.03523975610733032,
0.29890725016593933,
-0.0005040839314460754,
-0.02864883840084076,
0.5774063467979431,
0.01343133207410574,
0.013323284685611725,
-0.1596851646900177,
0.39082860946655273,
-0.17830300331115723,
-0.3012913763523102,
0.3559560179710388,
-0.11899600923061371,
-0.1605081409215927,
-0.052079830318689346,
0.15198689699172974,
-0.012035869993269444,
-0.06942307949066162,
0.011738274246454239,
-0.006404094398021698,
-0.16355672478675842,
0.27312007546424866,
-0.26580867171287537,
0.0666818618774414,
-0.2985961437225342,
-0.0033106058835983276,
-0.07684113830327988,
-0.1175917387008667,
0.2743821144104004,
0.41143089532852173,
0.17066694796085358,
-0.01191166415810585,
-0.3459133505821228,
-0.13978096842765808,
0.522279679775238,
0.14594171941280365,
-0.4317989945411682,
0.2101936936378479,
-0.016731899231672287,
0.11301642656326294,
-0.2535732090473175,
0.19603419303894043,
-0.38018861413002014,
0.0591452531516552,
-0.21660055220127106,
0.05875236168503761,
0.18879811465740204,
0.2637227475643158,
-0.2415473759174347,
0.10904796421527863,
0.037386275827884674,
-0.23556694388389587,
0.237410306930542,
-0.03261282294988632,
-0.27494004368782043,
-0.3043031692504883,
0.037448666989803314,
0.5176045894622803,
-0.024904374033212662,
-0.13412193953990936,
0.05908472463488579,
-0.021500680595636368,
0.15592792630195618,
0.24256524443626404,
-0.0798419862985611,
0.0480199009180069,
-0.3943188488483429,
0.030183516442775726,
-0.005356095731258392,
-0.15422047674655914,
0.008528199978172779,
0.4724300503730774,
0.10802820324897766,
0.2930222153663635,
-0.3723885416984558,
-0.2929762303829193,
0.18763470649719238,
-0.092013880610466,
-0.1959560513496399,
-0.18101872503757477,
0.11176394671201706,
0.14237642288208008,
-0.031085822731256485,
-0.055476367473602295,
0.16340333223342896,
-0.3029150664806366,
-0.2308012694120407,
0.421576589345932,
0.2535969614982605,
-0.25472429394721985,
0.4458966553211212,
0.3402278423309326,
0.31613919138908386,
0.6106655597686768,
0.3127197027206421,
0.17919227480888367,
-0.02675621584057808,
-0.21019628643989563,
-0.6580168604850769,
0.013386968523263931,
0.2647983729839325,
-0.13806965947151184,
-0.03909669816493988,
-0.25264400243759155,
-0.07927237451076508,
-0.03716535121202469,
-0.024909671396017075,
-0.04428977891802788,
-0.019757172092795372,
-0.2297413945198059,
0.14431333541870117,
-0.1458616554737091,
-0.46294546127319336,
0.40776440501213074,
-0.5576462149620056,
0.28560522198677063,
-0.34236782789230347,
-0.0643719956278801,
0.10807754844427109,
-0.041247401386499405,
-0.14639374613761902,
0.11733009666204453,
0.2660604417324066,
-0.147574782371521,
-0.1593019962310791,
0.621296226978302,
0.18317759037017822,
0.10880692303180695,
-0.3728170394897461,
0.2562301754951477,
0.2758687138557434,
0.3588058352470398,
0.07168368250131607,
-0.0177101269364357,
0.08473847806453705,
0.2242056131362915,
-0.41153639554977417,
0.00008713454008102417,
-0.0931704044342041,
0.21905267238616943,
0.04533892869949341,
-0.0923280119895935,
-0.07290686666965485,
0.015247512608766556,
-0.19161704182624817,
-0.4487789571285248,
-0.092617467045784,
0.15662236511707306,
0.004917625337839127,
0.08046875894069672,
-0.2861770987510681,
0.05030218884348869,
0.477487176656723,
-0.10751506686210632,
-0.22480016946792603,
0.0829448401927948,
-0.0023410245776176453,
-0.10708656162023544,
0.31489264965057373,
0.25852954387664795,
0.6609360575675964,
-0.10895003378391266,
0.05964438617229462,
0.16063962876796722,
0.12950782477855682,
0.08723579347133636,
0.12362851947546005,
0.12344066053628922,
0.06000407412648201,
-0.07900246232748032,
0.11971106380224228,
0.27172622084617615,
-0.17813017964363098,
0.09294906258583069,
-0.0545215830206871,
0.22127343714237213,
-0.37182724475860596,
-0.056698985397815704,
-0.20771753787994385,
-0.14917054772377014,
-0.14861497282981873,
0.00794931873679161,
-0.3537234663963318,
-0.24589896202087402,
-0.10472235083580017,
0.023304514586925507,
-0.3494996726512909,
0.23261013627052307,
-0.14664503931999207,
0.11683974415063858,
-0.20956368744373322,
0.1323925256729126,
-0.17197729647159576,
0.11929474025964737,
0.08225003629922867,
-0.036095380783081055,
-0.2078196257352829,
-0.010052977129817009,
-0.01902106963098049,
0.00480266846716404,
-0.2793732285499573,
-0.25408467650413513,
-0.39581790566444397,
0.24991674721240997,
-0.3910970091819763,
-0.0036978870630264282,
0.3213745951652527,
0.17217308282852173,
-0.35256797075271606,
-0.01662413775920868,
0.032426416873931885,
-0.6052895188331604,
-0.26406341791152954,
-0.12337704747915268,
0.16810119152069092,
0.03153257071971893,
-0.36316195130348206,
-0.15595439076423645,
0.3794684112071991,
-0.24315664172172546,
0.23744745552539825,
-0.14930924773216248,
0.12406785041093826,
-0.029134739190340042,
-0.04261530563235283,
-0.0796915665268898,
-0.34895333647727966,
0.20634841918945312,
-0.36090120673179626,
-0.5495460033416748,
-0.018275391310453415,
-0.21195147931575775,
-0.1486007273197174,
0.03785048797726631,
0.30336928367614746,
0.006043881177902222,
0.15569031238555908,
-0.22572851181030273,
-0.36936235427856445,
-0.11526387929916382,
0.10365147888660431,
-0.10145321488380432,
0.3906290829181671,
0.4225342273712158,
0.017438888549804688,
0.1170409619808197,
-0.2736794352531433,
-0.3833507001399994,
0.05696878954768181,
0.5402917861938477,
-0.02751045674085617,
0.20766717195510864,
0.4247087836265564,
-0.22539320588111877,
0.22511152923107147,
0.37671342492103577,
-0.06787547469139099,
-0.0010575056076049805,
-0.06494984775781631,
0.458397775888443,
-0.10780800133943558,
-0.09408419579267502,
0.16660957038402557,
0.07681836187839508,
-0.20116503536701202,
0.17357930541038513,
0.14758220314979553,
-0.05652501434087753,
0.13360489904880524,
0.20069177448749542,
-0.38038840889930725,
-0.33824190497398376,
-0.09052816778421402,
0.039100028574466705,
0.49940377473831177,
0.13859990239143372,
0.07677643746137619,
-0.0975845456123352,
-0.09263750165700912,
0.08833053708076477,
0.06020781770348549,
0.7440919280052185,
-0.15583622455596924,
-0.3318330645561218,
0.22023163735866547,
-0.4862016439437866,
0.2712266445159912,
0.0728713721036911,
-0.030447982251644135,
-0.039610035717487335,
-0.34957095980644226,
0.14548297226428986,
0.3433237373828888,
0.33757340908050537,
-0.14893049001693726,
-0.2870297431945801,
-0.09754154086112976,
-0.07389524579048157,
-0.6054075360298157,
-0.06872900575399399,
-0.1512589305639267,
0.2497057467699051,
0.16360116004943848,
0.6130778193473816,
-0.30517446994781494,
-0.3951910734176636,
0.28053349256515503,
0.11538533866405487,
0.009832572191953659,
-0.05348777398467064,
-0.26923948526382446,
-0.31740352511405945,
-0.10130567103624344,
-0.07934293895959854,
0.23594222962856293,
0.043684929609298706,
-0.040901556611061096,
0.12639865279197693,
0.3880572021007538,
-0.044360801577568054,
-0.015435367822647095,
-0.132850781083107,
0.41063374280929565,
-0.00014793119044043124,
0.14264549314975739,
0.3788691461086273,
0.19425278902053833,
-0.10585135221481323,
0.18286237120628357,
-0.41402918100357056,
0.030772950500249863,
0.08048059046268463,
-0.4148859977722168,
0.3875614404678345,
0.29721057415008545,
0.005028342828154564,
0.4261084496974945,
-0.1481778621673584,
0.14115554094314575,
-0.29015111923217773,
-0.3630029261112213,
0.5745235085487366,
0.05986766517162323,
0.08540059626102448,
-0.32719194889068604,
0.06172742694616318,
0.26619377732276917,
-0.36415207386016846,
0.641140341758728,
0.4765262007713318,
-0.21154062449932098,
0.2851220369338989,
-0.039593882858753204,
0.869399905204773,
0.14411765336990356,
-0.066340371966362,
0.02629278041422367,
-0.15197423100471497,
0.2749719023704529,
0.06529346108436584,
0.20065242052078247,
-0.3459138572216034,
-0.05643747001886368,
-0.10872704535722733,
0.008971165865659714,
0.3186069130897522,
0.06279028952121735,
0.15926991403102875,
0.0638125017285347,
-0.28084513545036316,
0.8009747862815857,
-0.25723710656166077,
-0.33979716897010803,
0.1101863756775856,
-0.11218559741973877,
-0.2276635617017746,
0.00400606170296669,
0.14225834608078003,
0.16924108564853668,
-0.15263676643371582,
0.3106399178504944,
0.17238017916679382,
-0.36300504207611084,
0.11940841376781464,
-0.1240653321146965,
-0.070958212018013,
0.0777977705001831,
0.2615327835083008,
-0.08327845484018326,
0.03318758308887482,
0.4999251961708069,
0.2140897661447525,
-0.24246545135974884,
0.0031453613191843033,
0.11706438660621643,
0.31751376390457153,
0.3116971552371979,
-0.18803787231445312,
0.157476544380188,
-0.19498494267463684,
0.13891896605491638,
-0.15210337936878204,
-0.05422426015138626,
-0.2574160397052765,
-0.43519753217697144,
-0.5170369744300842,
0.16723331809043884,
-0.2329263836145401,
-0.39385685324668884,
-0.03651979938149452,
0.02748621627688408,
0.16434027254581451,
-0.0534420982003212,
0.01935865357518196,
0.17221665382385254,
-0.03224870190024376,
0.4727414846420288,
0.014517687261104584,
-0.1483309119939804,
-0.1521725207567215,
0.3487449288368225,
-0.1944294273853302,
0.03990890085697174,
0.15260720252990723,
-0.12679952383041382,
-0.2180309146642685,
-0.10736127942800522,
-0.18673229217529297,
0.009718204848468304,
-0.26313385367393494,
0.12305755168199539,
-0.09622671455144882,
0.3004423975944519,
0.04234256222844124,
0.2864038646221161,
-0.43141812086105347,
0.018231555819511414,
-0.09774114191532135,
-0.21320027112960815,
-0.18679308891296387,
0.40455466508865356,
-0.035893764346838,
0.09015140682458878,
0.013587743043899536,
-0.19297891855239868,
0.021195070818066597,
-0.05205376446247101,
-0.2209433913230896,
0.19669948518276215,
0.21377508342266083,
0.12147452682256699,
0.7400979995727539,
0.4445284605026245,
0.18475183844566345,
-0.30078577995300293,
-0.0012804754078388214,
0.08628028631210327,
0.10688088834285736,
-0.055086344480514526,
-0.17348764836788177,
0.20754066109657288,
-0.04913309961557388,
-0.14677324891090393,
-0.11102498322725296,
-0.08321700990200043,
-0.241251140832901,
-0.2841079831123352,
0.42409586906433105,
0.3490452468395233,
0.04628484696149826,
0.2018560767173767,
-0.2671990394592285,
0.05880158394575119,
-0.004352118819952011,
0.13622327148914337,
0.018438227474689484,
0.13537144660949707,
0.17558202147483826,
-0.11495150625705719,
-0.031136639416217804,
-0.11379174888134003,
0.1585247665643692,
0.23980510234832764,
-0.1219380646944046,
0.007947256788611412,
0.4115545451641083,
0.07827216386795044,
0.19204963743686676,
0.0019460986368358135,
0.5545170307159424,
-0.11133350431919098,
-0.2183363288640976,
-0.15371114015579224,
-0.03455045819282532,
0.10019811242818832,
-0.16961336135864258,
-0.009979823604226112,
0.3787074089050293,
0.1872595101594925,
0.1890479475259781,
0.3449229598045349,
0.22710245847702026,
0.15511514246463776,
-0.006523072719573975,
0.04074184596538544,
0.3907373547554016,
-0.23814918100833893,
0.106636181473732,
0.5475938320159912,
-0.1225595474243164,
0.27656716108322144,
0.5591934323310852,
0.185515895485878,
-0.017069131135940552,
0.17054906487464905,
0.3629973232746124,
0.10301101952791214,
0.01233491487801075,
0.2351144552230835,
0.20327800512313843,
-0.6123127937316895,
0.2784910202026367,
0.2735004425048828,
-0.1483103632926941,
-0.03440292924642563,
0.15421250462532043,
0.09329907596111298,
-0.09259539842605591,
-0.22665488719940186,
-0.12506358325481415,
0.1717885136604309,
-0.2617078721523285,
-0.10691218078136444,
-0.18008559942245483,
-0.2416769564151764,
0.16363954544067383,
-0.002692054957151413,
-0.06773775815963745,
-0.06352914869785309,
1.0105617046356201,
-0.2289588302373886,
0.01559370756149292,
-0.20144176483154297,
-0.2140381634235382,
-0.23165282607078552,
0.412063330411911,
0.08773219585418701,
-0.05928535759449005,
-0.2977054715156555,
0.04264532029628754,
0.047117818146944046,
0.18482841551303864,
-0.005684182047843933,
-0.02794380858540535,
0.2213190197944641,
0.09141840785741806,
0.10462915897369385,
0.006087483838200569,
0.15662816166877747,
0.5216857194900513,
-0.1668229103088379,
0.04826315492391586,
-0.06965990364551544,
0.013994120061397552,
-0.06797809153795242,
0.06258389353752136,
0.12675034999847412,
0.6737968921661377,
-0.4127219617366791,
0.4928625524044037,
-0.2839764654636383,
-0.22394618391990662,
-0.07390157133340836,
-0.0525876060128212,
0.12342735379934311,
-0.15421980619430542,
0.2526521682739258,
0.017645809799432755,
0.10394322127103806,
-0.192212775349617,
0.03840000554919243,
0.2699843645095825,
0.05989370122551918,
0.41734570264816284,
-0.29488009214401245,
-0.2884286642074585,
-0.5646713376045227,
-0.6148843765258789,
-0.04144266992807388,
-0.03759496286511421,
0.1262662708759308,
0.1831657588481903,
-0.04279924929141998,
0.10376136749982834,
-0.05146399140357971,
0.13931752741336823,
-0.38831838965415955,
-0.2529817521572113,
0.014090511947870255,
-0.09699729084968567,
-0.1164051741361618,
-0.30811840295791626,
-0.02825530804693699,
0.11870341002941132,
-0.17028915882110596,
0.23254281282424927,
0.1455700546503067,
-0.058874450623989105,
-0.26149696111679077,
0.37849295139312744,
-0.22889655828475952,
-0.13239988684654236,
0.32160401344299316,
0.2579740583896637,
-0.16830623149871826,
-0.2656424045562744,
-0.4485413730144501,
-0.11271826922893524,
0.034047238528728485,
-0.11213938146829605,
0.24227017164230347,
-0.452034056186676,
0.09575559198856354,
-0.07892041653394699,
-0.27564293146133423,
-0.3069906532764435,
0.07205047458410263,
0.02925429493188858,
0.06435342878103256,
-0.3524881601333618,
0.009847084060311317,
-0.13466212153434753,
-0.10514255613088608,
0.32698750495910645,
0.39430731534957886,
-0.0023101381957530975,
0.10815742611885071,
-0.15623946487903595,
-0.13310973346233368,
0.5492530465126038,
-0.6271211504936218,
-0.23345232009887695,
-0.02139110490679741,
0.29447200894355774,
-0.0863908901810646,
-0.6546050906181335,
-0.7782138586044312,
0.015056610107421875,
0.19895905256271362,
-0.22506621479988098,
-0.0012461058795452118,
0.14655481278896332,
-0.4727363884449005,
-0.025543440133333206,
0.0970812439918518,
0.46095484495162964,
0.25912222266197205,
0.004670413210988045,
0.31761959195137024,
-0.0011616237461566925
] |
https://github.com/huggingface/datasets/issues/5144 | Inconsistent documentation on map remove_columns | I'm closing this issue because as @mariosasko pointed out, it is a duplicate of:
- #2343 | ### Describe the bug
The page [process](https://huggingface.co/docs/datasets/process) says this about the parameter `remove_columns` of the function `map`:
When you remove a column, it is only removed after the example has been provided to the mapped function.
So it seems that the `remove_columns` parameter removes after the mapped functions.
However, another page, [the documentation of the function map](https://huggingface.co/docs/datasets/v2.6.1/en/package_reference/main_classes#datasets.Dataset.map.remove_columns) says:
Columns will be removed before updating the examples with the output of `function`, i.e. if `function` is adding columns with names in remove_columns, these columns will be kept.
So one page says "after the mapped function" and another says "before the mapped function."
Is there something wrong?
### Steps to reproduce the bug
Not about code.
### Expected behavior
consistent about the descriptions of the behavior of the parameter `remove_columns` in the function `map`.
### Environment info
datasets V2.6.0 | 16 | Inconsistent documentation on map remove_columns
### Describe the bug
The page [process](https://huggingface.co/docs/datasets/process) says this about the parameter `remove_columns` of the function `map`:
When you remove a column, it is only removed after the example has been provided to the mapped function.
So it seems that the `remove_columns` parameter removes after the mapped functions.
However, another page, [the documentation of the function map](https://huggingface.co/docs/datasets/v2.6.1/en/package_reference/main_classes#datasets.Dataset.map.remove_columns) says:
Columns will be removed before updating the examples with the output of `function`, i.e. if `function` is adding columns with names in remove_columns, these columns will be kept.
So one page says "after the mapped function" and another says "before the mapped function."
Is there something wrong?
### Steps to reproduce the bug
Not about code.
### Expected behavior
consistent about the descriptions of the behavior of the parameter `remove_columns` in the function `map`.
### Environment info
datasets V2.6.0
I'm closing this issue because as @mariosasko pointed out, it is a duplicate of:
- #2343 | [
0.2650564908981323,
-0.2812565565109253,
0.024679332971572876,
0.33554911613464355,
0.14320142567157745,
0.03953517973423004,
0.27158570289611816,
-0.05271774157881737,
0.36217960715293884,
0.14966340363025665,
0.035073958337306976,
0.34748587012290955,
0.04819265380501747,
-0.16127856075763702,
-0.1157001256942749,
-0.24512678384780884,
0.4104467034339905,
-0.08763062953948975,
-0.38557443022727966,
-0.06763904541730881,
-0.44627949595451355,
0.14370037615299225,
-0.5731208324432373,
0.07393503934144974,
0.29082751274108887,
-0.32371702790260315,
-0.3053846061229706,
-0.06431179493665695,
-0.02790565975010395,
-0.033497318625450134,
-0.002052564173936844,
0.030774317681789398,
-0.1197943389415741,
0.5020936131477356,
-0.00012345387949608266,
-0.07270143926143646,
0.07847581803798676,
0.08644571155309677,
0.1115037351846695,
0.02688680589199066,
-0.2897428870201111,
0.27111637592315674,
0.038527123630046844,
-0.13411466777324677,
0.29065191745758057,
-0.0574149526655674,
-0.3608497381210327,
-0.27957069873809814,
0.19538246095180511,
0.18804211914539337,
0.17246627807617188,
0.11193446815013885,
-0.025854021310806274,
0.13170522451400757,
0.15749695897102356,
0.34922969341278076,
-0.09078184515237808,
-0.0012659374624490738,
0.022053271532058716,
-0.2011396586894989,
0.07919652760028839,
0.35283708572387695,
-0.27844783663749695,
0.01261013001203537,
0.2917810380458832,
0.31048786640167236,
0.14411747455596924,
-0.34707269072532654,
0.16661402583122253,
0.18177548050880432,
0.3588683307170868,
-0.29843655228614807,
-0.1354447305202484,
-0.19218385219573975,
-0.10943938791751862,
-0.06762759387493134,
0.2843615710735321,
-0.06635430455207825,
0.07958908379077911,
0.11328378319740295,
-0.45288601517677307,
-0.24667930603027344,
0.17023581266403198,
0.10304823517799377,
0.08893081545829773,
-0.1931038498878479,
-0.27232062816619873,
0.16927549242973328,
0.030655598267912865,
-0.04781263321638107,
-0.2434142827987671,
-0.286121129989624,
0.026392873376607895,
0.6059476733207703,
-0.11362919211387634,
0.02232571691274643,
0.16457515954971313,
0.3140474855899811,
0.17228323221206665,
-0.1762974113225937,
-0.10664359480142593,
-0.094675712287426,
-0.06798374652862549,
0.21996021270751953,
0.45090892910957336,
0.2024700790643692,
-0.008943654596805573,
0.42703235149383545,
0.020682450383901596,
0.3306533098220825,
-0.012223722413182259,
-0.01875396817922592,
0.6057231426239014,
-0.0044825137592852116,
0.0057704634964466095,
-0.151536762714386,
0.36748743057250977,
-0.18253231048583984,
-0.31306523084640503,
0.3718438446521759,
-0.10847598314285278,
-0.16933655738830566,
-0.05854785814881325,
0.11948084086179733,
0.011283179745078087,
-0.025204923003911972,
0.042104244232177734,
0.029763882979750633,
-0.1761295050382614,
0.2884843945503235,
-0.26020458340644836,
0.04647158458828926,
-0.302525132894516,
0.02491394430398941,
-0.05487661808729172,
-0.07813760638237,
0.2502290904521942,
0.4381050169467926,
0.16688218712806702,
-0.03368409723043442,
-0.33218279480934143,
-0.12516072392463684,
0.5083563923835754,
0.17354145646095276,
-0.4203284978866577,
0.2533978819847107,
0.0102451853454113,
0.11029724776744843,
-0.2545945346355438,
0.18422912061214447,
-0.363068550825119,
0.05867272987961769,
-0.2124381959438324,
0.0545002818107605,
0.2073478400707245,
0.25866633653640747,
-0.2167971432209015,
0.10061489045619965,
0.056686270982027054,
-0.24829396605491638,
0.2332969605922699,
-0.055577121675014496,
-0.3257872760295868,
-0.29590749740600586,
0.02699735201895237,
0.5287055373191833,
-0.02068963460624218,
-0.13841989636421204,
0.03915495425462723,
0.016261683776974678,
0.14763838052749634,
0.23942285776138306,
-0.09635905921459198,
0.06129608303308487,
-0.36858657002449036,
0.05459490418434143,
-0.026173241436481476,
-0.1536843478679657,
0.010998961515724659,
0.5208004713058472,
0.1139569878578186,
0.29634004831314087,
-0.36977776885032654,
-0.32378026843070984,
0.19014951586723328,
-0.078641876578331,
-0.13937993347644806,
-0.17888417840003967,
0.10317830741405487,
0.15190637111663818,
-0.03282056003808975,
-0.07558552920818329,
0.14908280968666077,
-0.2561992406845093,
-0.22632600367069244,
0.3904786705970764,
0.21050496399402618,
-0.2542417645454407,
0.4422243535518646,
0.33723723888397217,
0.30540192127227783,
0.6259415745735168,
0.321934312582016,
0.17062070965766907,
-0.06276243180036545,
-0.20586541295051575,
-0.6362770199775696,
0.022339262068271637,
0.3014933168888092,
-0.13827510178089142,
-0.020593591034412384,
-0.2566949725151062,
-0.07031390815973282,
-0.033126670867204666,
-0.03883540257811546,
-0.05956706777215004,
-0.03330870345234871,
-0.21621888875961304,
0.1137700229883194,
-0.12246161699295044,
-0.44042694568634033,
0.40378502011299133,
-0.49348753690719604,
0.27876198291778564,
-0.31746917963027954,
-0.08179976791143417,
0.10647854954004288,
-0.04691678285598755,
-0.11137101799249649,
0.1055251955986023,
0.27370747923851013,
-0.10781413316726685,
-0.16605764627456665,
0.5921549201011658,
0.1917811632156372,
0.09688842296600342,
-0.3598966598510742,
0.24838033318519592,
0.24900729954242706,
0.3887612223625183,
0.033359039574861526,
-0.01622343808412552,
0.06568339467048645,
0.19074726104736328,
-0.4462185800075531,
0.010965116322040558,
-0.08287611603736877,
0.2304190695285797,
0.036815352737903595,
-0.08703119307756424,
-0.07117906212806702,
0.014331098645925522,
-0.1919718235731125,
-0.46924227476119995,
-0.02854764088988304,
0.1338869333267212,
-0.031794242560863495,
0.08165714144706726,
-0.24621720612049103,
0.08245860785245895,
0.5022382736206055,
-0.10162770748138428,
-0.2205842137336731,
0.06089019030332565,
0.014574550092220306,
-0.11860156059265137,
0.30286821722984314,
0.26391488313674927,
0.6630279421806335,
-0.12112979590892792,
0.03959610313177109,
0.14287441968917847,
0.09958901256322861,
0.10605231672525406,
0.11429687589406967,
0.09222648292779922,
0.07246872782707214,
-0.043619975447654724,
0.1292574256658554,
0.2701796889305115,
-0.18303871154785156,
0.11325287818908691,
-0.06401857733726501,
0.200992614030838,
-0.34287723898887634,
-0.04656253010034561,
-0.22235631942749023,
-0.09479784965515137,
-0.14521464705467224,
-0.008011971600353718,
-0.3766331374645233,
-0.29863908886909485,
-0.0902547612786293,
0.0618632473051548,
-0.32620906829833984,
0.22553159296512604,
-0.19021303951740265,
0.11281443387269974,
-0.20190927386283875,
0.07043429464101791,
-0.1659194529056549,
0.09457293897867203,
0.08571863174438477,
-0.05232243984937668,
-0.2028210461139679,
-0.021065356209874153,
-0.007501905784010887,
0.025063058361411095,
-0.2753140926361084,
-0.25071385502815247,
-0.40419304370880127,
0.2504747211933136,
-0.388222336769104,
-0.004940234124660492,
0.3330863118171692,
0.1625274121761322,
-0.36017370223999023,
-0.003376214299350977,
0.08463733643293381,
-0.5819571614265442,
-0.24336770176887512,
-0.11846348643302917,
0.14158262312412262,
0.012637987732887268,
-0.37390637397766113,
-0.1261374056339264,
0.4386766850948334,
-0.23728351294994354,
0.20656222105026245,
-0.1733316034078598,
0.0761488676071167,
-0.0459991917014122,
-0.038440775126218796,
-0.1265154480934143,
-0.3449617028236389,
0.20404230058193207,
-0.38548895716667175,
-0.5092224478721619,
-0.03183484449982643,
-0.20067143440246582,
-0.12045994400978088,
-0.005738299340009689,
0.2935991883277893,
-0.003213707357645035,
0.17682711780071259,
-0.26436448097229004,
-0.34661218523979187,
-0.1478431671857834,
0.07709746062755585,
-0.11303117871284485,
0.3430003225803375,
0.47584038972854614,
0.025554727762937546,
0.11473456025123596,
-0.28561872243881226,
-0.4390055239200592,
0.047517627477645874,
0.5540915131568909,
-0.024009667336940765,
0.1941227912902832,
0.44439515471458435,
-0.21462382376194,
0.24496516585350037,
0.38029706478118896,
-0.06802240014076233,
-0.011238932609558105,
-0.08347960561513901,
0.4412566125392914,
-0.13083848357200623,
-0.09643097221851349,
0.1574430614709854,
0.07275529205799103,
-0.2204536646604538,
0.15291136503219604,
0.1413603127002716,
-0.09142989665269852,
0.13287413120269775,
0.22919213771820068,
-0.39557382464408875,
-0.3386339247226715,
-0.09122063219547272,
0.03398153930902481,
0.49859508872032166,
0.14780572056770325,
0.1480180025100708,
-0.12285386025905609,
-0.09436529874801636,
0.07972048223018646,
0.053222522139549255,
0.7557898759841919,
-0.15538282692432404,
-0.29819172620773315,
0.2345597743988037,
-0.5034751296043396,
0.26353567838668823,
0.09250829368829727,
-0.04153672233223915,
-0.060287605971097946,
-0.3607228696346283,
0.12880484759807587,
0.30061349272727966,
0.34344199299812317,
-0.1760650873184204,
-0.2811312675476074,
-0.07784469425678253,
-0.08039043098688126,
-0.6145394444465637,
-0.08357971906661987,
-0.11693970859050751,
0.2536727488040924,
0.15061859786510468,
0.6057306528091431,
-0.3063889443874359,
-0.35515743494033813,
0.28668832778930664,
0.09717921912670135,
0.0014007128775119781,
-0.04370461776852608,
-0.27537816762924194,
-0.30493277311325073,
-0.09103748202323914,
-0.09233700484037399,
0.24161885678768158,
0.03703824058175087,
-0.01990760862827301,
0.16332727670669556,
0.3788263499736786,
-0.03732544183731079,
-0.009240269660949707,
-0.14291955530643463,
0.4241475462913513,
-0.020547090098261833,
0.1699795424938202,
0.3847426176071167,
0.19262808561325073,
-0.12000462412834167,
0.19693653285503387,
-0.4395061731338501,
0.03455374017357826,
0.07242262363433838,
-0.42064324021339417,
0.35098129510879517,
0.3055166006088257,
0.01590239256620407,
0.39464959502220154,
-0.11212944984436035,
0.12969718873500824,
-0.29937267303466797,
-0.368905633687973,
0.6090272068977356,
0.05564761161804199,
0.04566837474703789,
-0.29933398962020874,
0.03718283027410507,
0.2899181842803955,
-0.35837167501449585,
0.683344304561615,
0.45253056287765503,
-0.1965637505054474,
0.3041979670524597,
-0.05850142985582352,
0.8506060838699341,
0.13111642003059387,
-0.03541255369782448,
0.028721721842885017,
-0.14798901975154877,
0.22208207845687866,
0.08468945324420929,
0.24750155210494995,
-0.33779650926589966,
-0.062405601143836975,
-0.11777251213788986,
-0.0025352202355861664,
0.2608831524848938,
0.07843342423439026,
0.14630192518234253,
0.040784094482660294,
-0.27672141790390015,
0.8392084240913391,
-0.24003981053829193,
-0.3367747664451599,
0.11086816340684891,
-0.09634131193161011,
-0.17253929376602173,
-0.006952837109565735,
0.12794511020183563,
0.1914861500263214,
-0.15088745951652527,
0.303907573223114,
0.1787824183702469,
-0.35715997219085693,
0.07044064998626709,
-0.10774993896484375,
-0.08051504194736481,
0.08479432761669159,
0.2576093375682831,
-0.03573795408010483,
0.014880992472171783,
0.469582736492157,
0.1905149221420288,
-0.25182536244392395,
-0.015878060832619667,
0.15713906288146973,
0.32549795508384705,
0.3072463274002075,
-0.2038852870464325,
0.13738898932933807,
-0.2007119506597519,
0.1425924301147461,
-0.14574339985847473,
-0.09786441177129745,
-0.2297302484512329,
-0.44636327028274536,
-0.5698776841163635,
0.19172993302345276,
-0.23830623924732208,
-0.41173285245895386,
-0.010275023058056831,
0.04440741986036301,
0.2002602070569992,
-0.0716421827673912,
0.009405408054590225,
0.14477947354316711,
0.025241777300834656,
0.45164915919303894,
0.002629552036523819,
-0.14969581365585327,
-0.15675124526023865,
0.3630259037017822,
-0.21982526779174805,
0.011694580316543579,
0.13877016305923462,
-0.13573914766311646,
-0.21909216046333313,
-0.11023002117872238,
-0.18407797813415527,
-0.019982479512691498,
-0.24670514464378357,
0.15101855993270874,
-0.1464834362268448,
0.2762075662612915,
0.08005590736865997,
0.2884354889392853,
-0.42224782705307007,
0.00392431765794754,
-0.06793531030416489,
-0.21729306876659393,
-0.14571581780910492,
0.38824522495269775,
-0.01086745411157608,
0.10428410023450851,
0.002977043390274048,
-0.1881498098373413,
0.026704037562012672,
-0.08831562101840973,
-0.2031150758266449,
0.20714005827903748,
0.2514753043651581,
0.08225229382514954,
0.7338587045669556,
0.42185452580451965,
0.22221510112285614,
-0.3052043318748474,
-0.0075230710208415985,
0.08636677265167236,
0.09772767871618271,
-0.042787134647369385,
-0.19047114253044128,
0.21529130637645721,
-0.04388076066970825,
-0.13364703953266144,
-0.10582117736339569,
-0.07173126190900803,
-0.2190137654542923,
-0.30445578694343567,
0.41114601492881775,
0.37264394760131836,
0.04122404754161835,
0.15744560956954956,
-0.2642011344432831,
0.07888781279325485,
0.008730806410312653,
0.12274236232042313,
0.011973462998867035,
0.15599653124809265,
0.1928476244211197,
-0.11421620845794678,
0.02093878574669361,
-0.1046246811747551,
0.17647340893745422,
0.22337353229522705,
-0.1238165944814682,
0.03529021516442299,
0.3786277770996094,
0.03568142652511597,
0.17951266467571259,
0.014938471838831902,
0.5977689027786255,
-0.10190214216709137,
-0.22956252098083496,
-0.1423637866973877,
-0.08882857114076614,
0.08970844745635986,
-0.15577007830142975,
-0.01616589166224003,
0.4085925817489624,
0.20584933459758759,
0.18702970445156097,
0.3161498010158539,
0.20721116662025452,
0.1543509066104889,
0.005598977208137512,
0.04620789736509323,
0.40309709310531616,
-0.24979569017887115,
0.11213341355323792,
0.5792524814605713,
-0.11199295520782471,
0.26333558559417725,
0.5219406485557556,
0.17312242090702057,
-0.011905334889888763,
0.17980390787124634,
0.37845176458358765,
0.06810908019542694,
0.020968642085790634,
0.2044881284236908,
0.2206866443157196,
-0.6019421219825745,
0.28955209255218506,
0.26174330711364746,
-0.1326870620250702,
-0.02000456303358078,
0.1529412418603897,
0.1134585440158844,
-0.12650805711746216,
-0.24520139396190643,
-0.162122905254364,
0.15835778415203094,
-0.2625318467617035,
-0.1287047266960144,
-0.1798364222049713,
-0.23935368657112122,
0.15204401314258575,
0.03223850950598717,
-0.06933708488941193,
-0.047006756067276,
1.0283589363098145,
-0.22006221115589142,
0.003656834363937378,
-0.20929399132728577,
-0.2202494740486145,
-0.2817594110965729,
0.41611719131469727,
0.08588981628417969,
-0.0717833861708641,
-0.31477171182632446,
0.008601203560829163,
0.08415490388870239,
0.1620200127363205,
0.019386708736419678,
-0.031273253262043,
0.18986037373542786,
0.08693623542785645,
0.08586227893829346,
0.02104778029024601,
0.15148960053920746,
0.5211731195449829,
-0.178806871175766,
0.0508783683180809,
-0.03099842369556427,
0.0064271558076143265,
-0.06265497952699661,
0.06545823812484741,
0.09418587386608124,
0.661715567111969,
-0.3922785222530365,
0.49608728289604187,
-0.2966021001338959,
-0.18940585851669312,
-0.06620924919843674,
-0.018830016255378723,
0.16058385372161865,
-0.16610147058963776,
0.2736874520778656,
0.036928869783878326,
0.11363165825605392,
-0.17980128526687622,
0.030231039971113205,
0.2709159255027771,
0.020908277481794357,
0.3992037773132324,
-0.3256837725639343,
-0.2797902524471283,
-0.559803307056427,
-0.5997732281684875,
-0.059800975024700165,
-0.07555291056632996,
0.13872689008712769,
0.16214421391487122,
-0.029367532581090927,
0.11616142094135284,
-0.041899435222148895,
0.1700473129749298,
-0.3883843719959259,
-0.2568041980266571,
0.018010087311267853,
-0.1042560487985611,
-0.11051169037818909,
-0.27591627836227417,
-0.06517954170703888,
0.1477801352739334,
-0.2059331238269806,
0.2234984040260315,
0.16323469579219818,
-0.05247454717755318,
-0.2728886008262634,
0.35340428352355957,
-0.22887584567070007,
-0.11601980030536652,
0.31974923610687256,
0.2822725772857666,
-0.16049820184707642,
-0.25701844692230225,
-0.48395973443984985,
-0.12796731293201447,
0.049745187163352966,
-0.11760372668504715,
0.2497340440750122,
-0.4718594253063202,
0.09220385551452637,
-0.0986848846077919,
-0.252415269613266,
-0.3461073338985443,
0.06903865933418274,
0.03659823536872864,
0.053718000650405884,
-0.38244810700416565,
-0.005708673037588596,
-0.13280189037322998,
-0.0729261040687561,
0.32686176896095276,
0.3932558596134186,
-0.0018506869673728943,
0.13708168268203735,
-0.12824773788452148,
-0.16739438474178314,
0.5767436027526855,
-0.6377100944519043,
-0.21624931693077087,
-0.01526598259806633,
0.2604793310165405,
-0.10587199777364731,
-0.6179702877998352,
-0.7680074572563171,
0.0006651356816291809,
0.19296984374523163,
-0.22051537036895752,
0.0032325424253940582,
0.14119359850883484,
-0.4534754753112793,
-0.02123109996318817,
0.1034834235906601,
0.4733803868293762,
0.26139456033706665,
-0.008028959855437279,
0.3272750973701477,
0.025877516716718674
] |
https://github.com/huggingface/datasets/issues/5143 | DownloadManager Git LFS support | Hey ! Actually it works, just pass the right URL ;)
The URL must be the one with “/resolve/”
e.g. https://huggingface.co/datasets/imagenet-1k/resolve/main/data/test_images.tar.gz
You can even pass a relative path to the dl_manager instead, like `dl_manager.download("data/test_images.tar.gz")` | ### Feature request
Maybe I'm mistaken but the `DownloadManager` does not support extracting git lfs files out of the box right?
Using `dl_manager.download()` or `dl_manager.download_and_extract()` still returns lfs files afaict.
Is there a good way to write a dataset loading script for a repo with lfs files?
### Motivation
/
### Your contribution
/ | 34 | DownloadManager Git LFS support
### Feature request
Maybe I'm mistaken but the `DownloadManager` does not support extracting git lfs files out of the box right?
Using `dl_manager.download()` or `dl_manager.download_and_extract()` still returns lfs files afaict.
Is there a good way to write a dataset loading script for a repo with lfs files?
### Motivation
/
### Your contribution
/
Hey ! Actually it works, just pass the right URL ;)
The URL must be the one with “/resolve/”
e.g. https://huggingface.co/datasets/imagenet-1k/resolve/main/data/test_images.tar.gz
You can even pass a relative path to the dl_manager instead, like `dl_manager.download("data/test_images.tar.gz")` | [
-0.5225303769111633,
0.3553297817707062,
-0.04971427842974663,
0.4681498408317566,
0.256860613822937,
-0.08727490901947021,
0.16220106184482574,
0.3804178237915039,
0.48680031299591064,
0.1062220111489296,
-0.2246224731206894,
0.13744805753231049,
-0.18170994520187378,
0.15916064381599426,
0.23883254826068878,
-0.10083870589733124,
-0.32853105664253235,
0.16391512751579285,
-0.27473390102386475,
-0.10207713395357132,
-0.0836457759141922,
0.2126837819814682,
0.3240286707878113,
-0.11985635757446289,
0.2133883535861969,
0.19831439852714539,
-0.01317465677857399,
0.32041043043136597,
-0.2178381085395813,
-0.10085637867450714,
0.2314964085817337,
0.3307211995124817,
0.5268995761871338,
0.4119565188884735,
-0.00012280081864446402,
0.036806970834732056,
0.32998013496398926,
-0.2601413428783417,
-0.32367950677871704,
-0.36936384439468384,
-0.324188232421875,
-0.4263501465320587,
0.3217313885688782,
-0.2552332580089569,
0.01073671504855156,
0.1154295951128006,
0.12836354970932007,
-0.15042757987976074,
0.17426058650016785,
0.06146511062979698,
0.1139034777879715,
-0.02272328920662403,
-0.01397106796503067,
0.011281685903668404,
0.6273823976516724,
0.38468289375305176,
-0.04515528678894043,
0.3348395526409149,
0.4841652810573578,
-0.20340587198734283,
-0.053358294069767,
-0.000012898584827780724,
-0.0875372439622879,
-0.06970514357089996,
0.3970740735530853,
0.19557929039001465,
0.1664973348379135,
-0.4046812355518341,
-0.28232017159461975,
0.3796139657497406,
0.6634566187858582,
-0.050778232514858246,
-0.3544204831123352,
-0.33721378445625305,
-0.057820744812488556,
-0.06785137206315994,
-0.018640674650669098,
0.1922326385974884,
-0.2128608524799347,
0.18463817238807678,
-0.3514746427536011,
-0.5792211890220642,
-0.21626965701580048,
0.1352674663066864,
-0.28412196040153503,
0.27216026186943054,
0.08073282986879349,
-0.11118555814027786,
0.4525279402732849,
0.07132160663604736,
-0.339107483625412,
-0.21549774706363678,
-0.4617573916912079,
0.38507750630378723,
0.003139559179544449,
-0.18831130862236023,
0.051207441836595535,
0.008815392851829529,
0.25539863109588623,
0.6176633834838867,
-0.24391843378543854,
-0.03581957519054413,
-0.309309720993042,
0.09197397530078888,
0.20914186537265778,
0.40643343329429626,
-0.03346695005893707,
0.32223621010780334,
0.2206876128911972,
-0.05036461725831032,
0.1905640810728073,
-0.0892205461859703,
-0.3163483440876007,
0.04489186033606529,
-0.2052336037158966,
-0.14925900101661682,
0.021033726632595062,
-0.17905449867248535,
0.1563490927219391,
-0.1505846232175827,
0.09717143326997757,
-0.40796053409576416,
-0.1486983448266983,
0.05670367553830147,
0.06377742439508438,
0.03676146641373634,
-0.03637976199388504,
0.27986565232276917,
0.23732270300388336,
-0.10956843942403793,
-0.05748418718576431,
0.06639783084392548,
-0.10342386364936829,
-0.11902640014886856,
0.19799238443374634,
-0.15922777354717255,
0.09875603020191193,
-0.29148486256599426,
-0.20740218460559845,
-0.05595656484365463,
0.03305145353078842,
-0.050704147666692734,
-0.09467152506113052,
0.40306058526039124,
0.38881975412368774,
-0.06819869577884674,
-0.012925978749990463,
-0.3380104899406433,
-0.26791512966156006,
0.4681164026260376,
-0.20861926674842834,
-0.3175325393676758,
-0.23491217195987701,
0.03944933041930199,
-0.2585843801498413,
-0.07196824997663498,
-0.9981456398963928,
0.14542360603809357,
-0.2695358693599701,
0.06497770547866821,
0.13843226432800293,
0.1350233554840088,
-0.04606085643172264,
0.01375783421099186,
0.2570245862007141,
0.5608036518096924,
-0.18071037530899048,
-0.15083134174346924,
-0.28893887996673584,
-0.32547828555107117,
0.3343752324581146,
-0.07845160365104675,
-0.02134033478796482,
0.4243710935115814,
-0.31580108404159546,
0.35948646068573,
0.7984201908111572,
-0.5993692278862,
-0.02052977867424488,
0.7403581738471985,
-0.19230341911315918,
0.1700384020805359,
0.23271527886390686,
0.24716155230998993,
0.18896454572677612,
-0.246731698513031,
-0.6367192268371582,
0.5675578713417053,
-0.30023789405822754,
0.15212178230285645,
0.21250756084918976,
-0.53550124168396,
-0.03741207718849182,
0.30853989720344543,
0.1809305101633072,
0.2662819027900696,
0.30972686409950256,
-0.19443771243095398,
0.3272680938243866,
0.03506528586149216,
0.00370112806558609,
-0.022016175091266632,
0.2270074486732483,
0.2942218482494354,
-0.2341272085905075,
-0.14995601773262024,
-0.7453705072402954,
0.16152742505073547,
0.2533662021160126,
-0.0328780859708786,
-0.10591365396976471,
0.06589684635400772,
-0.07791614532470703,
-0.06056150048971176,
-0.017557289451360703,
0.26343199610710144,
-0.08200636506080627,
0.09310223162174225,
0.003582902252674103,
0.065278559923172,
-0.10695086419582367,
0.2705993950366974,
0.3552175760269165,
0.450393408536911,
0.006651032716035843,
0.2080184370279312,
0.11867222934961319,
-0.12212833762168884,
0.16032202541828156,
-0.21920174360275269,
-0.023725204169750214,
-0.5451167225837708,
-0.004900907166302204,
0.24331483244895935,
0.14044919610023499,
0.2646859288215637,
0.468387246131897,
0.23604214191436768,
0.06502529233694077,
0.4466268718242645,
0.09248271584510803,
-0.010997053235769272,
0.04989638179540634,
-0.09765078127384186,
-0.17961063981056213,
0.2907716631889343,
-0.0007396042346954346,
0.22607243061065674,
-0.07198955863714218,
0.038137294352054596,
0.1683620810508728,
-0.13092537224292755,
0.10873601585626602,
-0.25498223304748535,
0.17463639378547668,
0.4236549139022827,
0.2902079224586487,
-0.18186379969120026,
-0.2017810195684433,
-0.026825733482837677,
0.2359577715396881,
-0.2160395085811615,
0.03201941400766373,
0.2946445941925049,
0.1927015632390976,
0.19820621609687805,
-0.1740153729915619,
0.5081326365470886,
0.15585336089134216,
0.004885420668870211,
-0.17344099283218384,
-0.10418582707643509,
0.33507925271987915,
-0.15361319482326508,
0.33979395031929016,
-0.14160950481891632,
0.10812067985534668,
0.1623803973197937,
-0.17860212922096252,
-0.04350317642092705,
0.03379786014556885,
-0.14212363958358765,
-0.1130872592329979,
0.264991819858551,
-0.04923393204808235,
-0.06728947162628174,
-0.2870009243488312,
-0.3744371235370636,
0.03283148258924484,
-0.183492049574852,
-0.29851585626602173,
-0.12396339327096939,
-0.16459563374519348,
0.3212057054042816,
-0.0035562515258789062,
-0.020162442699074745,
-0.16742964088916779,
0.22289985418319702,
-0.05969822034239769,
-0.11368883401155472,
-0.16478419303894043,
0.0010005817748606205,
0.011823441833257675,
-0.009576212614774704,
0.4617807865142822,
-0.478272408246994,
0.07848600298166275,
-0.22380325198173523,
0.25333696603775024,
-0.420185387134552,
0.03556600213050842,
0.39650338888168335,
-0.13913431763648987,
-0.007720718160271645,
0.21139965951442719,
0.028483375906944275,
0.4581224322319031,
0.28244584798812866,
-0.12551459670066833,
0.21808306872844696,
-0.23180513083934784,
-0.05049958452582359,
0.33433714509010315,
0.1322801560163498,
-0.47541430592536926,
0.1667041927576065,
-0.27220115065574646,
-0.33324238657951355,
0.016264256089925766,
0.3317166566848755,
0.376021146774292,
-0.20180918276309967,
0.04262176528573036,
0.047384366393089294,
-0.006638821680098772,
-0.3576120138168335,
0.11207273602485657,
-0.25944778323173523,
0.2887468636035919,
0.008946256712079048,
-0.2041383534669876,
0.258969247341156,
0.30251240730285645,
-0.25707119703292847,
0.19724544882774353,
-0.6771281361579895,
-0.2801395654678345,
0.10859056562185287,
0.07526153326034546,
0.034429021179676056,
0.24319587647914886,
0.16565173864364624,
0.05354408919811249,
0.19779720902442932,
-0.02741244249045849,
-0.031684521585702896,
0.31919798254966736,
0.09367246925830841,
0.03297518193721771,
0.0008176956325769424,
0.5836556553840637,
-0.41405022144317627,
0.37843120098114014,
-0.32981207966804504,
0.1292690634727478,
0.2492382824420929,
-0.1649121344089508,
0.2588384449481964,
0.07410179823637009,
0.1396118849515915,
-0.1556907296180725,
0.07329096645116806,
0.0468246266245842,
0.5157802700996399,
0.09492198377847672,
-0.23851735889911652,
-0.3320617079734802,
0.1863158792257309,
0.08058211952447891,
-0.20817683637142181,
0.06841355562210083,
-0.32831332087516785,
-0.3061014711856842,
-0.14936934411525726,
0.11098579317331314,
-0.019525442272424698,
-0.12091720849275589,
-0.11787286400794983,
0.5673206448554993,
0.5417311191558838,
0.06990866363048553,
-0.08031062036752701,
0.00269936746917665,
-0.3299867808818817,
0.17796996235847473,
0.0387851744890213,
-0.2833288311958313,
0.07751946151256561,
-0.019512595608830452,
-0.13995780050754547,
-0.13443534076213837,
0.2947424650192261,
-0.005884433165192604,
0.323233962059021,
0.036502111703157425,
-0.30025073885917664,
0.22823502123355865,
-0.32077768445014954,
-0.2420385479927063,
0.2084469497203827,
-0.07435718178749084,
0.215200275182724,
-0.498460590839386,
-0.36860552430152893,
0.03887731954455376,
-0.09703642129898071,
-0.2440430074930191,
-0.2748527228832245,
0.09871833026409149,
-0.1020817756652832,
-0.4701025187969208,
-0.20308277010917664,
0.02763250283896923,
-0.08729007840156555,
-0.17107804119586945,
0.1131247878074646,
-0.014058398082852364,
0.055231258273124695,
0.15184320509433746,
-0.10570305585861206,
0.07153423875570297,
0.14861862361431122,
0.11307045817375183,
-0.03155473619699478,
0.2982306480407715,
0.20517928898334503,
0.3500403165817261,
-0.057808343321084976,
0.016193464398384094,
0.07906022667884827,
-0.40442872047424316,
0.1253381073474884,
-0.07400533556938171,
0.1159733384847641,
-0.22272682189941406,
-0.0972127690911293,
0.058272555470466614,
-0.4544965922832489,
-0.06504292041063309,
0.19536785781383514,
-0.16951465606689453,
-0.24059785902500153,
-0.475078284740448,
0.5048573613166809,
0.00804559700191021,
-0.04314505308866501,
0.16053614020347595,
-0.02145296335220337,
-0.28914862871170044,
-0.1818477213382721,
-0.22429117560386658,
0.6377329230308533,
-0.2053615301847458,
-0.00048187002539634705,
0.2680106461048126,
-0.03243686258792877,
0.26180633902549744,
-0.27725473046302795,
-0.1854696273803711,
-0.2803718149662018,
0.2114238291978836,
-0.15842409431934357,
-0.03789044916629791,
-0.24301087856292725,
0.31637245416641235,
-0.09706541895866394,
0.3114277720451355,
-0.23657502233982086,
0.07130385935306549,
0.08240976184606552,
0.4995083212852478,
0.06479934602975845,
-0.1665063202381134,
0.13636872172355652,
0.028511997312307358,
-0.029991567134857178,
0.2768571972846985,
-0.12605449557304382,
-0.37037789821624756,
-0.15631981194019318,
0.01681266725063324,
-0.35659295320510864,
0.14291086792945862,
-0.022005591541528702,
-0.09027213603258133,
0.0760490745306015,
-0.09218359738588333,
0.07596826553344727,
-0.02118447795510292,
-0.3039661645889282,
0.026011036708950996,
-0.1710205078125,
-0.12695525586605072,
-0.19764140248298645,
0.1608729213476181,
-0.04375740513205528,
0.13509820401668549,
0.15105287730693817,
-0.13480830192565918,
-0.06307511031627655,
-0.08963214606046677,
-0.09478957951068878,
-0.5501145720481873,
0.416348397731781,
-0.1412138044834137,
-0.01374749094247818,
-0.06725940108299255,
-0.2915339767932892,
0.18502148985862732,
-0.001647699624300003,
0.2125491350889206,
-0.013748783618211746,
0.47500085830688477,
-0.01033847127109766,
0.16626012325286865,
0.007896147668361664,
-0.058309152722358704,
-0.07772919535636902,
-0.10222520679235458,
-0.17263853549957275,
-0.2761980891227722,
0.223748117685318,
0.25806403160095215,
0.03865712881088257,
-0.17424044013023376,
-0.21890422701835632,
0.1409538984298706,
-0.36680135130882263,
0.11264844983816147,
-0.25006231665611267,
-0.22455954551696777,
0.08932904899120331,
0.17454500496387482,
0.05563252419233322,
-0.3094474673271179,
-0.011775217950344086,
-0.38649919629096985,
-0.12222900986671448,
0.06766535341739655,
-0.17190931737422943,
0.07255048304796219,
-0.2809419333934784,
-0.36013489961624146,
-0.1498730629682541,
0.05734121799468994,
-0.17520441114902496,
0.015364520251750946,
0.03862251341342926,
0.05358263850212097,
0.4950869083404541,
0.3188318610191345,
0.13704423606395721,
-0.10668914020061493,
-0.12553814053535461,
-0.20939387381076813,
-0.3589988350868225,
0.0019228272140026093,
-0.22303862869739532,
0.1793711632490158,
-0.008706003427505493,
-0.09149745106697083,
0.003192901611328125,
-0.19427868723869324,
-0.3423463702201843,
-0.04549362137913704,
0.08356449007987976,
-0.29104137420654297,
-0.021652057766914368,
-0.13449029624462128,
0.3944549858570099,
0.03864012286067009,
-0.3133887052536011,
0.22739024460315704,
0.18761126697063446,
0.6386151313781738,
-0.22757068276405334,
0.20579980313777924,
-0.0015582528430968523,
-0.10770581662654877,
-0.11479360610246658,
0.10044609010219574,
0.3957967162132263,
0.4483718276023865,
0.5697872638702393,
0.0734555572271347,
0.22043174505233765,
0.2499358206987381,
0.3650171458721161,
0.045187775045633316,
-0.04723739251494408,
-0.03009733185172081,
0.06408660113811493,
0.10997149348258972,
-0.11906877160072327,
-0.08651062846183777,
0.2884296476840973,
0.07943932712078094,
-0.02278684824705124,
0.5125153660774231,
-0.0420374795794487,
0.4014144241809845,
-0.016903162002563477,
0.0807991772890091,
0.8569626808166504,
0.473039448261261,
-0.12448117136955261,
0.27798616886138916,
-0.21496103703975677,
0.28781184554100037,
0.2175477296113968,
0.4086582660675049,
0.2930773198604584,
-0.13631707429885864,
-0.21167805790901184,
-0.0671965703368187,
0.2542704939842224,
-0.0135662741959095,
0.14090430736541748,
-0.48617643117904663,
0.100674569606781,
0.4010773301124573,
0.19532009959220886,
0.08142746239900589,
-0.024126097559928894,
0.06415494531393051,
-0.04085130617022514,
-0.1105598583817482,
-0.15107259154319763,
0.48617178201675415,
0.2204257845878601,
0.13367784023284912,
-0.14637693762779236,
-0.06228015571832657,
-0.4079846441745758,
0.20417332649230957,
-0.14617152512073517,
-0.17296265065670013,
-0.08375151455402374,
0.34076422452926636,
0.12580037117004395,
0.09318718314170837,
-0.051556773483753204,
-0.26357805728912354,
0.009715072810649872,
-0.24922801554203033,
0.27250364422798157,
-0.061603084206581116,
-0.11801972985267639,
0.2169802486896515,
0.32977885007858276,
0.11030101776123047,
0.3235427737236023,
0.16764305531978607,
-0.03580008074641228,
-0.11046439409255981,
0.04433153569698334,
-0.14341026544570923,
0.13300850987434387,
-0.17016154527664185,
-0.0028224922716617584,
-0.10561421513557434,
0.03256402164697647,
0.005707413889467716,
0.19282807409763336,
0.0776444748044014,
-0.23628801107406616,
0.1000901460647583,
0.631203830242157,
0.28360098600387573,
-0.029709413647651672,
-0.22238537669181824,
0.026309698820114136,
-0.04476515203714371,
0.19160784780979156,
0.32189881801605225,
0.02201121486723423,
-0.0115060955286026,
-0.05681765079498291,
-0.006299293600022793,
0.07054110616445541,
0.4073714315891266,
0.38108813762664795,
0.14625442028045654,
-0.01815061643719673,
-0.19083015620708466,
-0.5277517437934875,
0.08631907403469086,
0.021593093872070312,
-0.4055320918560028,
-0.03974268585443497,
0.2395370751619339,
0.19754597544670105,
0.22851797938346863,
0.18859724700450897,
-0.07335566729307175,
0.35135701298713684,
-0.12870757281780243,
-0.2665727138519287,
-0.29166820645332336,
-0.16025662422180176,
0.2901137173175812,
-0.09827011078596115,
-0.35795339941978455,
0.11768974363803864,
-0.3772372603416443,
-0.05869555473327637,
-0.12068918347358704,
0.072746142745018,
0.029768329113721848,
0.2524903416633606,
0.4935106635093689,
-0.21713964641094208,
0.06221489608287811,
0.0832320898771286,
-0.12048745900392532,
-0.005551647394895554,
0.1509971171617508,
-0.309700071811676,
-0.363849937915802,
-0.1848699301481247,
-0.0122893201187253,
-0.31282010674476624,
0.4409314692020416,
-0.4873008131980896,
0.0018125541973859072,
-0.15266236662864685,
0.21491852402687073,
-0.24842990934848785,
-0.2904849648475647,
-0.3109043538570404,
-0.34664759039878845,
0.3552079200744629,
0.0859723836183548,
-0.059035710990428925,
0.1408662647008896,
-0.3055965304374695,
0.12343528866767883,
0.2851664125919342,
-0.09916409850120544,
-0.09329719841480255,
-0.09757279604673386,
-0.06934663653373718,
-0.13355708122253418,
0.07114537805318832,
-0.3342494070529938,
0.2514307200908661,
0.18513253331184387,
-0.029876455664634705,
0.025057632476091385,
0.20174336433410645,
0.17647892236709595,
-0.16767463088035583,
0.07332786917686462,
-0.0031353384256362915,
0.1408291608095169,
-0.30050185322761536,
-0.4521105885505676,
0.07457513362169266
] |
https://github.com/huggingface/datasets/issues/5137 | Align task tags in dataset metadata | I have opened PRs to fix the task_ids in all datasets within a namespace as well.
Working on task_categories... | ## Describe
Once we have agreed on a common naming for task tags for all open source projects, we should align on them.
## Steps
- [x] Align task tags in canonical datasets
- [x] task_categories: 4 datasets
- [x] task_ids (by @lhoestq)
- [x] Open PRs in community datasets
- [x] task_categories: 451 datasets
- [x] task_ids: 556 datasets
| 19 | Align task tags in dataset metadata
## Describe
Once we have agreed on a common naming for task tags for all open source projects, we should align on them.
## Steps
- [x] Align task tags in canonical datasets
- [x] task_categories: 4 datasets
- [x] task_ids (by @lhoestq)
- [x] Open PRs in community datasets
- [x] task_categories: 451 datasets
- [x] task_ids: 556 datasets
I have opened PRs to fix the task_ids in all datasets within a namespace as well.
Working on task_categories... | [
-0.4368460774421692,
0.016752511262893677,
-0.2623390853404999,
0.06745804846286774,
0.17841649055480957,
-0.17061728239059448,
0.2457362562417984,
0.2065170854330063,
0.015394385904073715,
0.2156161069869995,
-0.037551023066043854,
0.29545581340789795,
0.013874136842787266,
0.39105141162872314,
-0.21484896540641785,
0.05499858036637306,
0.11431409418582916,
0.06882847100496292,
0.054250165820121765,
0.1615111082792282,
-0.32136616110801697,
-0.0822685956954956,
-0.06900814920663834,
0.050071731209754944,
-0.06758033484220505,
-0.21665680408477783,
-0.10622163116931915,
-0.27000829577445984,
-0.0513124093413353,
-0.08076604455709457,
0.2742883265018463,
0.2032279372215271,
-0.02840876579284668,
0.40494975447654724,
-0.00009415776003152132,
-0.1454389989376068,
0.2428683489561081,
0.04210355132818222,
-0.20991677045822144,
-0.0055746883153915405,
-0.3342926800251007,
-0.16543671488761902,
-0.11000654846429825,
-0.09602568298578262,
-0.07453633844852448,
-0.17752335965633392,
0.16032516956329346,
-0.1753811240196228,
0.03565603494644165,
-0.06259368360042572,
0.3467680513858795,
0.22099322080612183,
0.11911678314208984,
-0.21121658384799957,
-0.08449017256498337,
0.24610622227191925,
-0.10791584849357605,
0.11156488955020905,
0.42383989691734314,
-0.09171683341264725,
0.21720734238624573,
0.2562410235404968,
-0.05560598522424698,
0.24303610622882843,
0.498961865901947,
-0.1340019255876541,
-0.09357615560293198,
-0.3274802565574646,
-0.03088326007127762,
0.14411523938179016,
0.7013716697692871,
-0.18729901313781738,
-0.24796533584594727,
-0.22662565112113953,
-0.20087958872318268,
-0.22950713336467743,
-0.029292777180671692,
0.2576982378959656,
0.2460031807422638,
0.10555104911327362,
0.1626703292131424,
-0.019912172108888626,
0.04291532188653946,
-0.014566563069820404,
0.09685510396957397,
0.4140767455101013,
-0.09065500646829605,
-0.06174180656671524,
-0.010296281427145004,
-0.3202870488166809,
0.031084824353456497,
0.042237430810928345,
-0.08054184913635254,
-0.08280156552791595,
-0.4163818061351776,
-0.017586324363946915,
-0.04414612054824829,
-0.23140403628349304,
0.2031809687614441,
0.23544128239154816,
-0.014177161268889904,
-0.014413062483072281,
0.07498996704816818,
0.18368178606033325,
0.05195367708802223,
0.20286287367343903,
0.19506917893886566,
0.2251230776309967,
0.14523857831954956,
-0.04875646159052849,
-0.048379216343164444,
0.08612515777349472,
-0.28935208916664124,
-0.23863457143306732,
-0.1893688291311264,
0.15747416019439697,
0.20180244743824005,
0.12947387993335724,
-0.5120335817337036,
0.014926537871360779,
0.18849846720695496,
-0.03796805068850517,
-0.13336385786533356,
-0.05398281663656235,
-0.09433984756469727,
0.16412246227264404,
-0.0677560567855835,
0.08049972355365753,
-0.18183180689811707,
-0.04204319417476654,
-0.27788272500038147,
-0.09832267463207245,
-0.23134373128414154,
-0.03940029442310333,
0.14927804470062256,
-0.05789337679743767,
0.1378096342086792,
0.07824984937906265,
-0.08269108831882477,
-0.20506536960601807,
0.017061380669474602,
0.030002359300851822,
0.019705161452293396,
0.1526821255683899,
0.006700154393911362,
-0.05532175302505493,
-0.1360977590084076,
-0.038482844829559326,
-0.3286389410495758,
0.055841054767370224,
-0.3121795654296875,
-0.17757518589496613,
-0.22877807915210724,
0.4595024883747101,
-0.09575404971837997,
-0.037071339786052704,
-0.35135313868522644,
0.16215158998966217,
0.02420351654291153,
0.008207246661186218,
0.09819867461919785,
0.08520972728729248,
0.06311620771884918,
-0.02439504861831665,
-0.07732479274272919,
0.069029301404953,
0.27759498357772827,
0.023491330444812775,
0.20913247764110565,
0.05516860634088516,
0.09976282715797424,
0.011534517630934715,
0.12404351681470871,
0.3496304452419281,
-0.27170565724372864,
0.0772511214017868,
0.05583348870277405,
-0.5257469415664673,
-0.24659323692321777,
0.05765122175216675,
-0.1896422803401947,
-0.26066845655441284,
0.19018873572349548,
0.07735907286405563,
0.42734062671661377,
-0.07378535717725754,
0.1296340376138687,
0.3454660177230835,
-0.1313176155090332,
0.08960413187742233,
-0.16177867352962494,
-0.035277679562568665,
0.11335452646017075,
0.17935462296009064,
0.07142573595046997,
-0.16187122464179993,
0.008839748799800873,
0.02849510684609413,
-0.07285083085298538,
0.04210541024804115,
-0.03941698372364044,
0.1009804829955101,
0.2666051387786865,
0.014008600264787674,
0.04617810621857643,
-0.32675644755363464,
-0.6048688888549805,
-0.09609431028366089,
0.34302330017089844,
0.05427049472928047,
0.23285426199436188,
-0.2796589136123657,
-0.18320032954216003,
-0.07267604023218155,
-0.30310267210006714,
-0.17082224786281586,
0.24234801530838013,
-0.011104896664619446,
-0.19167159497737885,
-0.5918180346488953,
-0.17134198546409607,
0.3403157591819763,
-0.07903696596622467,
0.2044556438922882,
0.1075587272644043,
0.08422871679067612,
-0.25532132387161255,
-0.023361075669527054,
0.21261879801750183,
0.233061283826828,
0.0401088148355484,
0.16452369093894958,
0.05358105152845383,
0.11973538249731064,
0.12241696566343307,
0.12121307849884033,
0.3839362859725952,
0.5354416966438293,
0.11500400304794312,
-0.3154870867729187,
-0.11417422443628311,
0.2037983238697052,
0.007008779793977737,
0.004228927195072174,
-0.1286400556564331,
0.23502802848815918,
-0.1181308776140213,
0.20352789759635925,
-0.1505468785762787,
-0.11563044786453247,
0.2678893208503723,
-0.08407586812973022,
-0.21424828469753265,
0.2200811207294464,
0.1767590492963791,
-0.060258712619543076,
0.07581198215484619,
0.16467832028865814,
-0.3373909592628479,
0.22852376103401184,
0.2515040636062622,
0.08024418354034424,
0.1558244824409485,
0.023272523656487465,
-0.11599840968847275,
0.06871011108160019,
0.08390003442764282,
-0.21311131119728088,
0.04103575646877289,
0.34859174489974976,
0.021027766168117523,
0.03358318284153938,
-0.07579582184553146,
-0.1317352056503296,
0.03798888623714447,
0.1589701771736145,
0.057941704988479614,
0.262529581785202,
0.15902772545814514,
0.19694510102272034,
0.028538033366203308,
-0.22431141138076782,
-0.05869925022125244,
0.11658623814582825,
-0.24631428718566895,
-0.10084708034992218,
-0.14804840087890625,
-0.3617130219936371,
-0.15666459500789642,
-0.06321293115615845,
-0.3274472653865814,
-0.27853524684906006,
0.2125253528356552,
-0.12526792287826538,
-0.2710534632205963,
0.5165380835533142,
0.3133499026298523,
0.18293265998363495,
-0.1994628608226776,
0.14975738525390625,
-0.18372412025928497,
-0.4214269518852234,
-0.01447628065943718,
0.20120637118816376,
0.20456328988075256,
-0.1774788349866867,
0.4558899700641632,
-0.3600928783416748,
0.35308921337127686,
-0.33620375394821167,
-0.37433600425720215,
0.04741693660616875,
-0.06289432942867279,
0.09784542769193649,
-0.0517851859331131,
0.07580702006816864,
0.03451024740934372,
-0.24568581581115723,
0.04597599059343338,
-0.06353917717933655,
-0.24347467720508575,
-0.14574258029460907,
-0.22284440696239471,
-0.007625714875757694,
-0.29386505484580994,
-0.4423324167728424,
-0.11759153753519058,
-0.5855597853660583,
0.1342632919549942,
-0.24005714058876038,
0.17479446530342102,
0.6372132301330566,
-0.357322633266449,
-0.31719309091567993,
0.1671920120716095,
0.18928653001785278,
-0.15471649169921875,
0.031225081533193588,
-0.014397572726011276,
-0.08987130969762802,
-0.09166394174098969,
-0.05864109471440315,
-0.1040375828742981,
0.15677307546138763,
-0.03239325433969498,
0.17600005865097046,
-0.054135337471961975,
0.1256159543991089,
0.1660461276769638,
0.06647073477506638,
0.0770496353507042,
-0.07163265347480774,
0.19253487884998322,
-0.18948271870613098,
-0.1578226089477539,
-0.36106860637664795,
0.04890048876404762,
0.14107078313827515,
0.024759255349636078,
0.1681126356124878,
-0.36752572655677795,
-0.1448407918214798,
0.40699124336242676,
0.07388201355934143,
-0.2802870571613312,
0.002623811364173889,
-0.059024155139923096,
0.2195340096950531,
0.01858104020357132,
-0.1667417734861374,
0.40084028244018555,
0.2588650584220886,
-0.00034975074231624603,
0.22452686727046967,
0.06303028762340546,
0.25024521350860596,
-0.013100650161504745,
0.08244408667087555,
-0.5179026126861572,
-0.1069411188364029,
-0.22644171118736267,
-0.03295955806970596,
0.2701621949672699,
0.17322447896003723,
-0.09927109628915787,
-0.19835087656974792,
0.011158816516399384,
0.261774480342865,
0.5084207653999329,
-0.06485409289598465,
0.006365223787724972,
-0.2190294861793518,
0.07733038067817688,
-0.06676209717988968,
0.2749001681804657,
-0.15468676388263702,
0.011836168356239796,
0.03814681991934776,
-0.07498005032539368,
-0.1025826632976532,
0.11255429685115814,
0.49945318698883057,
-0.10277312248945236,
-0.00020571425557136536,
-0.21844202280044556,
0.47115832567214966,
0.21081963181495667,
-0.15822437405586243,
0.06650485098361969,
-0.16818445920944214,
0.23084819316864014,
0.6350580453872681,
-0.4020173251628876,
-0.10976952314376831,
-0.10574488341808319,
-0.09554455429315567,
0.026463720947504044,
-0.20637062191963196,
-0.1122770756483078,
-0.36869946122169495,
-0.11866365373134613,
0.1921370029449463,
0.3395249843597412,
0.24798418581485748,
0.2280960977077484,
-0.11471135914325714,
-0.2143433690071106,
0.1280539631843567,
0.18007990717887878,
-0.07314532995223999,
0.40487825870513916,
0.07791709899902344,
0.24477392435073853,
-0.21678289771080017,
0.175883486866951,
0.5159357786178589,
0.29052823781967163,
-0.23812544345855713,
-0.1450580656528473,
0.30655285716056824,
-0.25700730085372925,
0.30173319578170776,
-0.017861858010292053,
0.31928589940071106,
-0.03252068907022476,
-0.12877888977527618,
0.17716684937477112,
-0.5369219779968262,
0.3170616626739502,
0.0006999615579843521,
0.2233210802078247,
-0.2950466573238373,
-0.5157718658447266,
0.05126647651195526,
0.3156778812408447,
-0.1753951758146286,
0.3017144203186035,
-0.3315896987915039,
-0.019092824310064316,
-0.15329794585704803,
0.16438162326812744,
0.7893825769424438,
-0.11927604675292969,
-0.18481598794460297,
0.17845869064331055,
-0.697688102722168,
0.2929106652736664,
-0.3709849715232849,
0.09030541777610779,
-0.23593778908252716,
-0.2662588655948639,
0.08481939882040024,
-0.026132581755518913,
-0.1119549497961998,
0.05783557519316673,
-0.1351720690727234,
0.4178719222545624,
0.22899548709392548,
0.27288582921028137,
0.04968439042568207,
0.23019224405288696,
0.04365472123026848,
-0.19283798336982727,
-0.10774953663349152,
0.23460441827774048,
-0.3768485188484192,
0.26619333028793335,
-0.17343449592590332,
-0.06212855130434036,
0.11893676221370697,
-0.0052264779806137085,
-0.2225588858127594,
0.07697436958551407,
0.1668015718460083,
-0.10849601030349731,
0.2379140853881836,
-0.1826901137828827,
-0.11020922660827637,
-0.14041459560394287,
0.2934882640838623,
-0.03459243103861809,
-0.04625067114830017,
0.24791409075260162,
0.0756995677947998,
0.2785988450050354,
-0.08820775151252747,
-0.03979966789484024,
0.2681378424167633,
-0.1727924942970276,
0.12334498018026352,
-0.2451585829257965,
0.1323486715555191,
0.08183017373085022,
-0.33815181255340576,
0.05997538939118385,
0.14197281002998352,
0.02012762613594532,
0.28746533393859863,
0.06590878963470459,
0.16246533393859863,
-0.13246563076972961,
0.29683151841163635,
0.015825863927602768,
-0.014224098064005375,
0.2566268742084503,
0.017238013446331024,
-0.26506227254867554,
-0.13813352584838867,
-0.09742806106805801,
0.06547615677118301,
-0.3344903588294983,
-0.08914156258106232,
0.08110421895980835,
-0.22198563814163208,
-0.29774853587150574,
-0.059207819402217865,
0.1329650580883026,
-0.12601740658283234,
-0.10889395326375961,
-0.16048835217952728,
-0.17158745229244232,
0.4112532436847687,
0.47658368945121765,
0.334309458732605,
-0.07022794336080551,
-0.03576134890317917,
-0.10768944025039673,
-0.18606072664260864,
0.2710270881652832,
-0.4603242576122284,
0.10610989481210709,
0.20090609788894653,
-0.13228739798069,
0.1135401725769043,
-0.025316724553704262,
-0.5227005481719971,
-0.23830464482307434,
-0.2019411325454712,
0.13269080221652985,
-0.044130854308605194,
-0.11159821599721909,
-0.02882990427315235,
-0.1255677193403244,
0.20998930931091309,
-0.08038356155157089,
-0.19679075479507446,
-0.3776637613773346,
-0.13995671272277832,
0.019707515835762024,
-0.012234319001436234,
0.4055585265159607,
-0.3103443682193756,
-0.04510415345430374,
-0.1119389683008194,
-0.17290936410427094,
-0.0052945539355278015,
-0.15509018301963806,
-0.041620053350925446,
0.3815320134162903,
0.16879253089427948,
0.3036818206310272,
0.25278180837631226,
0.08505935966968536,
0.1685146987438202,
0.2843066155910492,
-0.026593469083309174,
0.02886541746556759,
-0.07728229463100433,
0.03257773071527481,
-0.01404996495693922,
0.08934963494539261,
0.3065232038497925,
0.03826209157705307,
0.216232031583786,
-0.0626874640583992,
0.04300915077328682,
0.17304840683937073,
0.2972956597805023,
0.1647445559501648,
0.07986157387495041,
-0.2549612820148468,
0.15515145659446716,
0.4384692907333374,
-0.23069900274276733,
0.012640455737709999,
0.029160451143980026,
0.0799325555562973,
0.00620713084936142,
0.24522271752357483,
0.264880508184433,
-0.015464343130588531,
-0.09172797203063965,
0.3190629184246063,
0.6029947400093079,
-0.12166377902030945,
0.09219202399253845,
0.00010547414422035217,
0.1288742572069168,
0.05000279098749161,
0.4534060060977936,
0.11170035600662231,
0.15950383245944977,
-0.014240704476833344,
0.08094485104084015,
0.3678540885448456,
0.5101163983345032,
0.05628948658704758,
0.2663782238960266,
0.006103437393903732,
-0.07692496478557587,
-0.01637965440750122,
0.24494026601314545,
0.03561647981405258,
0.1977022886276245,
0.010500602424144745,
-0.15895810723304749,
-0.26954787969589233,
0.18415488302707672,
0.0786224901676178,
-0.1435801088809967,
0.1472550481557846,
-0.21030844748020172,
-0.10089356452226639,
0.04148224741220474,
-0.1280898153781891,
0.09390577673912048,
0.04664676636457443,
0.31158122420310974,
-0.04516167193651199,
-0.03408166766166687,
-0.0920763611793518,
-0.11647286266088486,
0.3890548050403595,
0.15984570980072021,
-0.23385919630527496,
0.21373510360717773,
-0.25715166330337524,
-0.1425851583480835,
0.1483939290046692,
0.5654052495956421,
0.36295920610427856,
0.11765953153371811,
-0.2123871147632599,
-0.1434318721294403,
-0.028776731342077255,
-0.035295043140649796,
-0.17412830889225006,
-0.016816139221191406,
0.011628061532974243,
-0.022945567965507507,
0.1765560507774353,
0.33155855536460876,
-0.23669983446598053,
0.20379860699176788,
-0.32252129912376404,
-0.12547728419303894,
-0.1712634265422821,
0.08544197678565979,
0.15584269165992737,
-0.18561653792858124,
0.20725955069065094,
0.175273597240448,
-0.4038971960544586,
-0.16243204474449158,
0.12352101504802704,
0.1430232971906662,
-0.04040515795350075,
-0.26681283116340637,
0.1995570957660675,
0.07716421782970428,
0.12611743807792664,
0.4066421389579773,
0.27484387159347534,
-0.1533474326133728,
-0.19463270902633667,
-0.33883029222488403,
0.3253938555717468,
-0.03330628201365471,
-0.14346018433570862,
0.2211124300956726,
-0.23226165771484375,
0.06236647069454193,
-0.11145055294036865,
0.07075680792331696,
-0.12787963449954987,
0.3643767535686493,
0.09071323275566101,
-0.5432780385017395,
0.1936846524477005,
0.06735946238040924,
-0.18073801696300507,
0.24709022045135498,
0.006538838148117065,
-0.003024239093065262,
-0.10644019395112991,
0.19535499811172485,
-0.1780412495136261,
0.0033586695790290833,
0.5635932087898254,
0.1481436938047409,
0.2914011776447296,
-0.2391064167022705,
0.1692574918270111,
-0.17353567481040955,
-0.07965832948684692,
-0.10534362494945526,
-0.21027500927448273,
-0.2984291613101959,
0.07191885262727737,
-0.4131030738353729,
-0.09465581178665161,
-0.12893164157867432,
0.012703027576208115,
-0.2781243324279785,
-0.271891713142395,
-0.08490873873233795,
0.19669948518276215,
-0.11296411603689194,
0.09781467914581299,
-0.07855266332626343,
-0.14268380403518677,
0.05781688913702965,
0.04361337050795555,
0.22711025178432465,
-0.05496184527873993,
-0.2699667811393738,
-0.3817733824253082,
0.09855999052524567,
0.13146260380744934,
-0.32871776819229126,
-0.2172686755657196,
0.22939558327198029,
0.042142633348703384,
0.28921398520469666,
-0.5066817402839661,
-0.03401652351021767,
0.3382396996021271,
-0.11045544594526291,
-0.11562241613864899,
0.006492979824542999,
0.046500105410814285,
-0.07831171900033951,
0.005476236343383789,
-0.18251743912696838,
0.22290998697280884,
-0.28295284509658813,
-0.12959161400794983,
-0.1623651683330536
] |
https://github.com/huggingface/datasets/issues/5137 | Align task tags in dataset metadata | For future reference: this fix had some complications
When trying to open a PR to fix the task tags, an exception was thrown if:
- the metadata contained "languages" or "licenses" (instead of "language" or "license")
- the metadata contained a non-valid language: `en-US` (instead of `en`), `no` (instead of `'no'`),...
- the metadata contained a non-valid license
- either `task_categories` or `task_ids` was not an array (a dict for each config)
- the metadata contained non-valid tag names
Errors:
```
ValueError: - Error: "languages" is deprecated. Use "language" instead.
```
```
ValueError: - Error: "licenses" is deprecated. Use "license" instead.
```
```
ValueError: - Error: "language[17]" must only contain lowercase characters
```
```
ValueError: - Error: "language[0]" with value "cz, de, it" is not valid. It must be an ISO 639-1, 639-2 or 639-3 code (two/three letters), or a special value like "code", "multilingual". If you want to use BCP-47 identifiers, you can specify them in language_bcp47.
```
```
ValueError: - Error: "task_ids" must be an array
``` | ## Describe
Once we have agreed on a common naming for task tags for all open source projects, we should align on them.
## Steps
- [x] Align task tags in canonical datasets
- [x] task_categories: 4 datasets
- [x] task_ids (by @lhoestq)
- [x] Open PRs in community datasets
- [x] task_categories: 451 datasets
- [x] task_ids: 556 datasets
| 169 | Align task tags in dataset metadata
## Describe
Once we have agreed on a common naming for task tags for all open source projects, we should align on them.
## Steps
- [x] Align task tags in canonical datasets
- [x] task_categories: 4 datasets
- [x] task_ids (by @lhoestq)
- [x] Open PRs in community datasets
- [x] task_categories: 451 datasets
- [x] task_ids: 556 datasets
For future reference: this fix had some complications
When trying to open a PR to fix the task tags, an exception was thrown if:
- the metadata contained "languages" or "licenses" (instead of "language" or "license")
- the metadata contained a non-valid language: `en-US` (instead of `en`), `no` (instead of `'no'`),...
- the metadata contained a non-valid license
- either `task_categories` or `task_ids` was not an array (a dict for each config)
- the metadata contained non-valid tag names
Errors:
```
ValueError: - Error: "languages" is deprecated. Use "language" instead.
```
```
ValueError: - Error: "licenses" is deprecated. Use "license" instead.
```
```
ValueError: - Error: "language[17]" must only contain lowercase characters
```
```
ValueError: - Error: "language[0]" with value "cz, de, it" is not valid. It must be an ISO 639-1, 639-2 or 639-3 code (two/three letters), or a special value like "code", "multilingual". If you want to use BCP-47 identifiers, you can specify them in language_bcp47.
```
```
ValueError: - Error: "task_ids" must be an array
``` | [
-0.5523923635482788,
0.08546960353851318,
-0.17715725302696228,
0.08637500554323196,
0.18943241238594055,
-0.14889079332351685,
0.24858936667442322,
0.23581744730472565,
0.099764883518219,
0.2163870930671692,
-0.09413597732782364,
0.45032989978790283,
-0.009858478792011738,
0.3813338577747345,
-0.257802814245224,
0.09058578312397003,
0.1075468510389328,
0.07311587035655975,
0.10672168433666229,
0.18085415661334991,
-0.3688981235027313,
0.0622953400015831,
-0.0031469687819480896,
0.1792767345905304,
-0.007250618655234575,
-0.1560666710138321,
-0.11662764847278595,
-0.1903184950351715,
-0.1304749697446823,
-0.08510592579841614,
0.2346619814634323,
0.24098607897758484,
-0.046409670263528824,
0.2979082465171814,
-0.00009666230471339077,
-0.11783438175916672,
0.2195155918598175,
-0.025905536487698555,
-0.18923839926719666,
-0.12223167717456818,
-0.270229697227478,
-0.11038029938936234,
-0.2917526364326477,
-0.05580175295472145,
-0.11798714846372604,
-0.12848059833049774,
0.16136500239372253,
-0.2520740330219269,
-0.008180268108844757,
0.009108462370932102,
0.3189585208892822,
0.14965809881687164,
0.2124098688364029,
-0.2596583962440491,
-0.08708363026380539,
0.1894523799419403,
-0.07161276787519455,
0.22857579588890076,
0.4002881348133087,
-0.04929231107234955,
0.24455267190933228,
0.21420186758041382,
-0.03734416887164116,
0.2336263209581375,
0.41281598806381226,
-0.14018458127975464,
-0.005727142095565796,
-0.3888358473777771,
0.04777858406305313,
0.16953635215759277,
0.6886677145957947,
-0.21114739775657654,
-0.2869724631309509,
-0.13243325054645538,
-0.17944835126399994,
-0.24413275718688965,
-0.045285582542419434,
0.3667431175708771,
0.2693706154823303,
0.18712855875492096,
0.1710449904203415,
-0.005712767131626606,
0.023032762110233307,
-0.04510536789894104,
0.04285997897386551,
0.4310615658760071,
0.012627191841602325,
-0.032619722187519073,
0.06502044200897217,
-0.34025710821151733,
0.05680069327354431,
0.09020955115556717,
-0.14196938276290894,
-0.031667474657297134,
-0.24137692153453827,
-0.08103059232234955,
-0.059919752180576324,
-0.26346153020858765,
0.2532154619693756,
0.1851370483636856,
0.023283155634999275,
0.006577266380190849,
0.003161459229886532,
0.3019110858440399,
-0.040970493108034134,
0.10053521394729614,
0.27457526326179504,
0.24138326942920685,
0.14213955402374268,
-0.09898532181978226,
0.1048390120267868,
0.09446752071380615,
-0.3646346628665924,
-0.3096410632133484,
-0.30598169565200806,
0.27481117844581604,
0.15443971753120422,
0.07227510213851929,
-0.5794410705566406,
0.020605377852916718,
0.17624059319496155,
-0.024834923446178436,
-0.16945643723011017,
0.02177157998085022,
-0.04838000237941742,
0.08981725573539734,
-0.13589483499526978,
0.054762810468673706,
-0.14511123299598694,
-0.031174778938293457,
-0.1999627947807312,
-0.028497818857431412,
-0.21195343136787415,
-0.05556993931531906,
0.15812882781028748,
-0.09759378433227539,
0.11873594671487808,
0.12464959174394608,
-0.16770435869693756,
-0.14510446786880493,
-0.03140901029109955,
-0.08339153230190277,
-0.015720009803771973,
0.11857663094997406,
0.0029848292469978333,
-0.1408337950706482,
-0.18273261189460754,
-0.14816051721572876,
-0.3981621563434601,
0.13994735479354858,
-0.2982650399208069,
-0.15484075248241425,
-0.298836886882782,
0.42836272716522217,
-0.11764810234308243,
-0.03654278814792633,
-0.3024034798145294,
0.2436128854751587,
-0.0030772238969802856,
-0.07869237661361694,
0.023336440324783325,
0.022145448252558708,
-0.06039511039853096,
-0.009331966750323772,
-0.07202509790658951,
0.12873943150043488,
0.09434753656387329,
-0.02694733440876007,
0.4206228256225586,
-0.009922537952661514,
0.08671395480632782,
0.001467723399400711,
0.08828693628311157,
0.3007100522518158,
-0.3068568706512451,
0.07116559147834778,
-0.04926646500825882,
-0.5258548259735107,
-0.23802468180656433,
0.0416150763630867,
-0.20153148472309113,
-0.28226613998413086,
0.1700548380613327,
0.01796536333858967,
0.5138163566589355,
-0.10848280042409897,
0.09097526222467422,
0.3598652482032776,
-0.16379033029079437,
0.11310798674821854,
-0.19699180126190186,
-0.06356318295001984,
0.16498276591300964,
0.19004695117473602,
0.08574073761701584,
-0.18947768211364746,
0.16272783279418945,
0.17682236433029175,
-0.09289581328630447,
-0.03779364004731178,
-0.03671742230653763,
0.1296907365322113,
0.2384660542011261,
-0.030915208160877228,
-0.016657885164022446,
-0.27890682220458984,
-0.5334855318069458,
-0.03806667774915695,
0.30274471640586853,
0.1576848030090332,
0.2246445119380951,
-0.21486257016658783,
-0.21190199255943298,
-0.11410168558359146,
-0.2828461527824402,
-0.15790261328220367,
0.220632404088974,
0.02205674722790718,
-0.22640059888362885,
-0.5607123970985413,
-0.06988143920898438,
0.47722893953323364,
-0.06668146699666977,
0.1271042674779892,
0.1451752483844757,
0.1026841327548027,
-0.3258208930492401,
0.006029647774994373,
0.18745088577270508,
0.23970133066177368,
0.09331557154655457,
0.11620702594518661,
0.10389505326747894,
0.1669454276561737,
0.19047901034355164,
0.09289523214101791,
0.3935662508010864,
0.4566255211830139,
0.19818192720413208,
-0.2755590081214905,
-0.09689096361398697,
0.10858961939811707,
-0.000910585280507803,
0.0002029314637184143,
-0.15663409233093262,
0.33553624153137207,
-0.019910376518964767,
0.194982647895813,
-0.03754141181707382,
-0.13187351822853088,
0.3473135232925415,
-0.07412810623645782,
-0.26976966857910156,
0.16051222383975983,
0.1776212900876999,
0.022638682276010513,
-0.10353727638721466,
0.2387928068637848,
-0.3414595127105713,
0.22367440164089203,
0.4560149013996124,
0.11689071357250214,
0.09147612005472183,
0.08827964961528778,
0.025524456053972244,
0.10890799015760422,
0.12833639979362488,
-0.16609875857830048,
0.14222761988639832,
0.337914377450943,
-0.049481067806482315,
0.11135022342205048,
-0.14627675712108612,
-0.11903050541877747,
0.042430371046066284,
0.03344174847006798,
0.050018310546875,
0.2333190143108368,
0.18028728663921356,
0.14206631481647491,
0.0035382285714149475,
-0.33757492899894714,
0.00956120528280735,
0.11115793883800507,
-0.23694545030593872,
-0.06586789339780807,
-0.17454318702220917,
-0.2928653061389923,
-0.21987931430339813,
-0.03058277815580368,
-0.3548418879508972,
-0.24823318421840668,
0.21631518006324768,
-0.04740751162171364,
-0.28041672706604004,
0.5300518274307251,
0.3870343565940857,
0.19499757885932922,
-0.3345927894115448,
0.12080581486225128,
-0.18710607290267944,
-0.49724096059799194,
-0.07317216694355011,
0.18288758397102356,
0.22008337080478668,
-0.2111683487892151,
0.43300679326057434,
-0.42216193675994873,
0.22780011594295502,
-0.4169274866580963,
-0.4298335909843445,
0.12771573662757874,
-0.06958052515983582,
0.07029756903648376,
-0.07409213483333588,
-0.0009592324495315552,
0.006297659128904343,
-0.2857845723628998,
0.0664462298154831,
0.03011232428252697,
-0.26594075560569763,
-0.0542922168970108,
-0.23797649145126343,
-0.034205611795186996,
-0.3633832633495331,
-0.4925480782985687,
-0.21722787618637085,
-0.6286636590957642,
0.14199906587600708,
-0.21086165308952332,
0.1975623071193695,
0.6346501708030701,
-0.30455195903778076,
-0.30727192759513855,
0.09208378195762634,
0.1837085336446762,
-0.20166350901126862,
0.1635783463716507,
-0.0009868033230304718,
-0.12064550071954727,
-0.1524922251701355,
0.00020094215869903564,
-0.06292876601219177,
0.2605505585670471,
-0.017214497551321983,
0.24294398725032806,
0.01877211034297943,
0.20585878193378448,
0.12447765469551086,
0.08278503268957138,
0.03675379231572151,
-0.042170166969299316,
0.26236164569854736,
-0.1544809192419052,
-0.08749121427536011,
-0.4253171384334564,
0.019735537469387054,
0.13814368844032288,
0.0471530556678772,
0.14676257967948914,
-0.33846908807754517,
-0.15599755942821503,
0.4268512725830078,
-0.012178880162537098,
-0.20822639763355255,
-0.01241961121559143,
-0.041536860167980194,
0.28369733691215515,
-0.03214485943317413,
-0.09585363417863846,
0.43853458762168884,
0.22719374299049377,
0.06762336194515228,
0.2575286030769348,
0.011608412489295006,
0.15089286863803864,
-0.09481582045555115,
0.13607925176620483,
-0.4209960997104645,
-0.06035970523953438,
-0.15697234869003296,
-0.09215547144412994,
0.24014908075332642,
0.15206865966320038,
-0.08722814172506332,
-0.18016953766345978,
-0.017304060980677605,
0.2611426115036011,
0.51552414894104,
-0.09862113744020462,
0.0649537518620491,
-0.1348455846309662,
0.11308496445417404,
-0.09289278835058212,
0.2875717878341675,
-0.16988901793956757,
0.12552286684513092,
-0.08297374844551086,
-0.07080891728401184,
-0.11548139154911041,
0.05322863906621933,
0.36167681217193604,
-0.14388509094715118,
-0.07509241998195648,
-0.12756656110286713,
0.4765163064002991,
0.1670100837945938,
-0.17750442028045654,
-0.015965502709150314,
-0.2071518748998642,
0.23802262544631958,
0.60371333360672,
-0.46062061190605164,
-0.11666116863489151,
-0.1608962118625641,
-0.08393798768520355,
0.02238907292485237,
-0.10665939748287201,
-0.1256425976753235,
-0.47345563769340515,
-0.2675914764404297,
0.19895732402801514,
0.4191488027572632,
0.23024186491966248,
0.19517135620117188,
-0.08975788950920105,
-0.11727435886859894,
0.09453624486923218,
0.21656322479248047,
0.046340350061655045,
0.36675453186035156,
0.12137553840875626,
0.1962287425994873,
-0.2788163125514984,
0.12110089510679245,
0.5994167327880859,
0.28618112206459045,
-0.21122439205646515,
-0.15702256560325623,
0.32302460074424744,
-0.42755842208862305,
0.2988097071647644,
0.0025372207164764404,
0.3340241014957428,
-0.05664198845624924,
-0.09300688654184341,
0.0878421813249588,
-0.45098820328712463,
0.26958999037742615,
-0.011820079758763313,
0.220506951212883,
-0.2632560133934021,
-0.5007269382476807,
-0.13278278708457947,
0.3237125873565674,
-0.16970303654670715,
0.2722967267036438,
-0.44400882720947266,
-0.04696851968765259,
-0.001392072532325983,
0.1645563542842865,
0.8006071448326111,
-0.11912491917610168,
-0.24886152148246765,
0.13047316670417786,
-0.809359073638916,
0.270677775144577,
-0.41667044162750244,
0.10635844618082047,
-0.22999879717826843,
-0.23236441612243652,
0.06942964345216751,
-0.0005079321563243866,
-0.02948182076215744,
0.19084665179252625,
-0.20626963675022125,
0.3884165287017822,
0.2874246835708618,
0.19805298745632172,
0.11751703917980194,
0.34134766459465027,
-0.008380623534321785,
-0.24075478315353394,
-0.01702112704515457,
0.20128054916858673,
-0.4431338906288147,
0.2552257478237152,
-0.18562662601470947,
-0.056544505059719086,
0.07509417831897736,
-0.08635599166154861,
-0.3213821053504944,
0.14325636625289917,
0.1415950357913971,
-0.12330301105976105,
0.15531010925769806,
-0.07425842434167862,
0.023416519165039062,
-0.1717958003282547,
0.3014463782310486,
-0.060693662613630295,
-0.014198606833815575,
0.2093081772327423,
0.2294975221157074,
0.29064440727233887,
-0.011583937332034111,
-0.09602268785238266,
0.2940713167190552,
-0.18832314014434814,
0.13947582244873047,
-0.22630012035369873,
0.12149316072463989,
0.10548673570156097,
-0.3047599196434021,
0.11325156688690186,
0.10308583080768585,
0.1156555563211441,
0.2601284980773926,
0.03421018645167351,
0.13049905002117157,
-0.15142036974430084,
0.2789425849914551,
-0.048014722764492035,
-0.03410056233406067,
0.19806084036827087,
0.009255468845367432,
-0.30572009086608887,
-0.14005601406097412,
-0.10928551107645035,
0.03242738917469978,
-0.2660982012748718,
-0.07970527559518814,
0.06276194751262665,
-0.2579475939273834,
-0.24859705567359924,
-0.06031263619661331,
0.08631040900945663,
-0.2774554193019867,
-0.1575649380683899,
-0.0744258463382721,
-0.28932642936706543,
0.3384799659252167,
0.4846764802932739,
0.3232942819595337,
-0.002155683934688568,
-0.029035387560725212,
-0.14125365018844604,
-0.2217383235692978,
0.19803684949874878,
-0.4334234595298767,
0.06389833986759186,
0.23895883560180664,
-0.0783192366361618,
0.09401698410511017,
-0.1412353366613388,
-0.5101837515830994,
-0.23383286595344543,
-0.2779948115348816,
0.13361379504203796,
0.003649255260825157,
-0.055076226592063904,
-0.13004985451698303,
-0.19533729553222656,
0.17489151656627655,
-0.09484890103340149,
-0.24016615748405457,
-0.3297283947467804,
-0.21155232191085815,
0.027163967490196228,
-0.002277495339512825,
0.3862764537334442,
-0.35728320479393005,
-0.04691102355718613,
-0.0715760588645935,
-0.13782960176467896,
-0.0074722059071063995,
-0.08293463289737701,
-0.08532539010047913,
0.4320541322231293,
0.07549945265054703,
0.3908580243587494,
0.32747119665145874,
0.01501474343240261,
0.1531829982995987,
0.3946598172187805,
0.032237693667411804,
0.11696108430624008,
-0.12179236114025116,
0.06614601612091064,
-0.016683228313922882,
0.10688935220241547,
0.26583486795425415,
0.050491876900196075,
0.21908971667289734,
-0.041219741106033325,
0.11210808157920837,
0.15709295868873596,
0.2888090908527374,
0.11970467865467072,
0.0894540473818779,
-0.31853076815605164,
0.23857423663139343,
0.3984473645687103,
-0.3142296075820923,
-0.0413612499833107,
0.1353863626718521,
0.019330352544784546,
-0.012100905179977417,
0.2178860902786255,
0.3885681927204132,
0.015387892723083496,
-0.05032755434513092,
0.29742273688316345,
0.6008419394493103,
-0.13628153502941132,
0.060201939195394516,
0.09369245916604996,
0.14156779646873474,
0.16281580924987793,
0.46920159459114075,
0.11245575547218323,
0.16573986411094666,
-0.0966263860464096,
0.026502598077058792,
0.3046136200428009,
0.47875580191612244,
0.11485138535499573,
0.2864314615726471,
-0.011801129207015038,
-0.028172824531793594,
-0.09320923686027527,
0.34725967049598694,
0.023457039147615433,
0.25573402643203735,
0.0887824147939682,
-0.13877183198928833,
-0.3348848819732666,
0.19837583601474762,
0.07590879499912262,
-0.15987327694892883,
0.20219050347805023,
-0.21484486758708954,
-0.022035036236047745,
-0.04045873135328293,
-0.12483292818069458,
0.05617178976535797,
0.07757137715816498,
0.29845696687698364,
-0.06519128382205963,
-0.04668088257312775,
-0.06154399365186691,
-0.11780884116888046,
0.22059693932533264,
0.0888989269733429,
-0.24792887270450592,
0.25518667697906494,
-0.3186640739440918,
-0.14429236948490143,
0.10872747004032135,
0.5266380310058594,
0.3581683337688446,
0.1535743623971939,
-0.12996502220630646,
-0.14628899097442627,
-0.0816894918680191,
-0.006318172439932823,
-0.1492227017879486,
0.04446401819586754,
0.1409042775630951,
0.07148035615682602,
0.20187921822071075,
0.3045598864555359,
-0.19179968535900116,
0.1649857461452484,
-0.2320999950170517,
-0.14649374783039093,
-0.053315795958042145,
0.0514429546892643,
0.22111572325229645,
-0.16502225399017334,
0.215193971991539,
0.14757564663887024,
-0.32867735624313354,
-0.16351233422756195,
0.07077507674694061,
0.2112514227628708,
0.004856269806623459,
-0.24356354773044586,
0.1827504187822342,
0.20341911911964417,
0.08296480029821396,
0.34085047245025635,
0.30488836765289307,
-0.21676146984100342,
-0.11216453462839127,
-0.39874932169914246,
0.3089525103569031,
-0.09927672147750854,
-0.07999511063098907,
0.16261258721351624,
-0.21955884993076324,
0.21385611593723297,
-0.007901832461357117,
0.035090990364551544,
0.003504939842969179,
0.2837059497833252,
0.023436695337295532,
-0.5070130228996277,
0.20573264360427856,
0.16092431545257568,
-0.065801702439785,
0.19803586602210999,
0.0010517612099647522,
-0.03091813251376152,
-0.0185609832406044,
0.16834017634391785,
-0.26611828804016113,
-0.07524920254945755,
0.4699806869029999,
0.08292844146490097,
0.20584920048713684,
-0.18577979505062103,
0.23474079370498657,
-0.17344436049461365,
0.006654629483819008,
-0.06554673612117767,
-0.15619070827960968,
-0.2856175899505615,
0.11035291850566864,
-0.3698672354221344,
-0.10276710987091064,
-0.07245129346847534,
-0.05769697204232216,
-0.30931636691093445,
-0.14373522996902466,
-0.09185341745615005,
0.19590455293655396,
-0.18620242178440094,
0.14149506390094757,
-0.019669126719236374,
-0.25364717841148376,
-0.10798510909080505,
-0.021163560450077057,
0.24978475272655487,
-0.08997193723917007,
-0.2973380386829376,
-0.3397981822490692,
0.14652034640312195,
0.20832249522209167,
-0.3114464282989502,
-0.10255476832389832,
0.1950431615114212,
0.11583709716796875,
0.27231839299201965,
-0.47576653957366943,
0.022928312420845032,
0.25441351532936096,
-0.06420858949422836,
-0.1781994253396988,
-0.06440892815589905,
-0.07870209217071533,
-0.09816397726535797,
-0.021715600043535233,
-0.22685325145721436,
0.17129579186439514,
-0.3188244700431824,
-0.18354469537734985,
-0.13516390323638916
] |
https://github.com/huggingface/datasets/issues/5137 | Align task tags in dataset metadata | Yes, @julien-c. These are some of the feedbacks:
- Most people just thank for the fix: [cahya/librivox-indonesia](https://huggingface.co/datasets/cahya/librivox-indonesia/discussions/1#6357cd8a292a050ebd705f84), [TurkuNLP/xlsum-fi](https://huggingface.co/datasets/TurkuNLP/xlsum-fi/discussions/1#6357828aa1f8ad1c31bcbe46), [coastalcph/fairlex](https://huggingface.co/datasets/coastalcph/fairlex/discussions/4#6351a527a8e595171ab1aef2)
- Why are we changing their task names? [joelito/lextreme](https://huggingface.co/datasets/joelito/lextreme/discussions/1#6351b576fe367c0d9b12041b)
- I take note of this for the next bulk operation; besides the PR title, we should also add a description to explain the reason for the change and also maybe putting a link to some pertinent GH Issue page
- Some of them ask where to find the list of the supported task values is: [dennlinger/klexikon](https://huggingface.co/datasets/dennlinger/klexikon/discussions/3#6356b3ea80f8cb3ab777ac5c), [lmqg/qg_jaquad](https://huggingface.co/datasets/lmqg/qg_jaquad/discussions/1#635262467e4cc3135fd09f58)
- Currently, the list is here: https://github.com/huggingface/hub-docs/blob/main/js/src/lib/interfaces/Types.ts#L85
- Maybe we could made them more easily accessible
- Some people do not agree about current "hierarchy":
- text-scoring: [emrecan/nli_tr_for_simcse](https://huggingface.co/datasets/emrecan/nli_tr_for_simcse/discussions/1#6357c1b128792d8cdd51e9f9) (but referring to [emrecan/nli_tr_for_simcse](https://huggingface.co/datasets/emrecan/nli_tr_for_simcse/discussions/2/files))
- Before "text-scoring" was a task_category, with task_ids ["semantic-similarity-scoring", "sentiment-scoring"]
- Now all three are task_ids ["text-scoring", "semantic-similarity-scoring", "sentiment-scoring"] under the task_category "text-classification"
- People complain that their scoring tasks are not classification task
- binary-classification: why don't we have binary-classification? We have multi-class-classification, multi-label-classification and sentiment-classification, but not binary-classification
- symbolic-regression: [yoshitomo-matsubara/srsd-feynman_hard](https://huggingface.co/datasets/yoshitomo-matsubara/srsd-feynman_hard/discussions/2#63614194c12a09b8a31457cc), [yoshitomo-matsubara/srsd-feynman_medium](https://huggingface.co/datasets/yoshitomo-matsubara/srsd-feynman_medium/discussions/2#6361418aeee0d27f04379e43), [yoshitomo-matsubara/srsd-feynman_easy](https://huggingface.co/datasets/yoshitomo-matsubara/srsd-feynman_easy/discussions/2#6361416e00905b1ffb8d0112)
- Why don't we have symbolic-regression task?
NOTE: I'm editing this comment to add more feedback | ## Describe
Once we have agreed on a common naming for task tags for all open source projects, we should align on them.
## Steps
- [x] Align task tags in canonical datasets
- [x] task_categories: 4 datasets
- [x] task_ids (by @lhoestq)
- [x] Open PRs in community datasets
- [x] task_categories: 451 datasets
- [x] task_ids: 556 datasets
| 189 | Align task tags in dataset metadata
## Describe
Once we have agreed on a common naming for task tags for all open source projects, we should align on them.
## Steps
- [x] Align task tags in canonical datasets
- [x] task_categories: 4 datasets
- [x] task_ids (by @lhoestq)
- [x] Open PRs in community datasets
- [x] task_categories: 451 datasets
- [x] task_ids: 556 datasets
Yes, @julien-c. These are some of the feedbacks:
- Most people just thank for the fix: [cahya/librivox-indonesia](https://huggingface.co/datasets/cahya/librivox-indonesia/discussions/1#6357cd8a292a050ebd705f84), [TurkuNLP/xlsum-fi](https://huggingface.co/datasets/TurkuNLP/xlsum-fi/discussions/1#6357828aa1f8ad1c31bcbe46), [coastalcph/fairlex](https://huggingface.co/datasets/coastalcph/fairlex/discussions/4#6351a527a8e595171ab1aef2)
- Why are we changing their task names? [joelito/lextreme](https://huggingface.co/datasets/joelito/lextreme/discussions/1#6351b576fe367c0d9b12041b)
- I take note of this for the next bulk operation; besides the PR title, we should also add a description to explain the reason for the change and also maybe putting a link to some pertinent GH Issue page
- Some of them ask where to find the list of the supported task values is: [dennlinger/klexikon](https://huggingface.co/datasets/dennlinger/klexikon/discussions/3#6356b3ea80f8cb3ab777ac5c), [lmqg/qg_jaquad](https://huggingface.co/datasets/lmqg/qg_jaquad/discussions/1#635262467e4cc3135fd09f58)
- Currently, the list is here: https://github.com/huggingface/hub-docs/blob/main/js/src/lib/interfaces/Types.ts#L85
- Maybe we could made them more easily accessible
- Some people do not agree about current "hierarchy":
- text-scoring: [emrecan/nli_tr_for_simcse](https://huggingface.co/datasets/emrecan/nli_tr_for_simcse/discussions/1#6357c1b128792d8cdd51e9f9) (but referring to [emrecan/nli_tr_for_simcse](https://huggingface.co/datasets/emrecan/nli_tr_for_simcse/discussions/2/files))
- Before "text-scoring" was a task_category, with task_ids ["semantic-similarity-scoring", "sentiment-scoring"]
- Now all three are task_ids ["text-scoring", "semantic-similarity-scoring", "sentiment-scoring"] under the task_category "text-classification"
- People complain that their scoring tasks are not classification task
- binary-classification: why don't we have binary-classification? We have multi-class-classification, multi-label-classification and sentiment-classification, but not binary-classification
- symbolic-regression: [yoshitomo-matsubara/srsd-feynman_hard](https://huggingface.co/datasets/yoshitomo-matsubara/srsd-feynman_hard/discussions/2#63614194c12a09b8a31457cc), [yoshitomo-matsubara/srsd-feynman_medium](https://huggingface.co/datasets/yoshitomo-matsubara/srsd-feynman_medium/discussions/2#6361418aeee0d27f04379e43), [yoshitomo-matsubara/srsd-feynman_easy](https://huggingface.co/datasets/yoshitomo-matsubara/srsd-feynman_easy/discussions/2#6361416e00905b1ffb8d0112)
- Why don't we have symbolic-regression task?
NOTE: I'm editing this comment to add more feedback | [
-0.4031170606613159,
0.06738302111625671,
-0.2060859054327011,
-0.03661643713712692,
0.15056931972503662,
-0.2056995928287506,
0.19062437117099762,
0.30846714973449707,
0.021493390202522278,
0.1598738133907318,
-0.20700135827064514,
0.2251671403646469,
0.08066467940807343,
0.4828643798828125,
-0.1562453955411911,
-0.0220869779586792,
0.22290705144405365,
-0.0648994892835617,
-0.011495016515254974,
0.03436901420354843,
-0.37152424454689026,
0.014147903770208359,
-0.09961310774087906,
0.0725875049829483,
0.044130146503448486,
-0.18849614262580872,
-0.1103237196803093,
-0.25897514820098877,
-0.06485487520694733,
-0.11297917366027832,
0.18657267093658447,
0.25749877095222473,
-0.04165586829185486,
0.389507532119751,
-0.00009935330308508128,
-0.12303954362869263,
0.24055038392543793,
0.006390085443854332,
-0.2646632790565491,
0.10079164057970047,
-0.24777206778526306,
-0.17274120450019836,
-0.2366034835577011,
-0.06289731711149216,
0.08228811621665955,
-0.061852578073740005,
0.16513264179229736,
-0.4037022590637207,
0.03089589625597,
-0.0834699273109436,
0.2773110866546631,
0.2202042043209076,
0.15508851408958435,
-0.21448183059692383,
-0.10941525548696518,
0.22969284653663635,
-0.066959910094738,
0.23714137077331543,
0.4708079397678375,
-0.04913896322250366,
0.18011459708213806,
0.2947441637516022,
-0.000025503337383270264,
0.15443019568920135,
0.4517367482185364,
-0.14062470197677612,
-0.0799315795302391,
-0.2447350025177002,
0.0416640006005764,
0.20254284143447876,
0.6882398724555969,
-0.18340235948562622,
-0.3767964243888855,
-0.25724494457244873,
-0.2091430425643921,
-0.26642879843711853,
-0.15971732139587402,
0.35037878155708313,
0.2225780338048935,
0.07998432219028473,
0.12084132432937622,
-0.1364174783229828,
0.12601830065250397,
-0.06766749918460846,
-0.0006273873150348663,
0.5300092697143555,
0.012951571494340897,
-0.02278365194797516,
0.07533664256334305,
-0.20576781034469604,
-0.16849026083946228,
0.009524917230010033,
-0.1384064257144928,
-0.04892115294933319,
-0.477455735206604,
-0.042195554822683334,
-0.026789076626300812,
-0.24032384157180786,
0.26523613929748535,
0.22999633848667145,
0.025059198960661888,
0.025334011763334274,
0.06929191201925278,
0.14824935793876648,
-0.0063331276178359985,
0.16044427454471588,
0.1486588716506958,
0.3783028721809387,
0.15974408388137817,
0.013019558042287827,
0.1838998794555664,
0.1032281294465065,
-0.19455105066299438,
-0.24315501749515533,
-0.34070178866386414,
0.23131775856018066,
0.04094238579273224,
0.04656209424138069,
-0.5822078585624695,
0.008804201148450375,
0.1088365837931633,
-0.18203945457935333,
-0.261492520570755,
-0.052751682698726654,
-0.12399207800626755,
0.1468178629875183,
-0.09914984554052353,
0.12938988208770752,
-0.08083704113960266,
0.05127602443099022,
-0.24687790870666504,
-0.1174929141998291,
-0.12314736843109131,
0.030004877597093582,
0.17438338696956635,
-0.2400999665260315,
0.06838997453451157,
0.09885834902524948,
-0.09187905490398407,
-0.11279504746198654,
-0.05728534609079361,
-0.023399777710437775,
-0.0013523846864700317,
0.10660988092422485,
-0.12791597843170166,
-0.2597030699253082,
-0.11779963970184326,
0.1259595900774002,
-0.36147210001945496,
0.03227453678846359,
-0.21900424361228943,
-0.1565169095993042,
-0.20919013023376465,
0.3808740973472595,
-0.029349692165851593,
-0.08433350920677185,
-0.4504447281360626,
0.2437804490327835,
-0.08736108988523483,
0.09017513692378998,
0.1458376944065094,
0.06867508590221405,
0.07499772310256958,
0.007863053120672703,
0.020330889150500298,
0.08259999752044678,
0.26739785075187683,
-0.03141351416707039,
0.3046562671661377,
0.0359274297952652,
0.11152201145887375,
0.045884985476732254,
0.12379465997219086,
0.3615090548992157,
-0.2778133451938629,
0.031711362302303314,
-0.09043306857347488,
-0.5272007584571838,
-0.174443319439888,
0.1139213889837265,
-0.21524465084075928,
-0.14062874019145966,
0.21045222878456116,
-0.04987725988030434,
0.36204028129577637,
-0.13502442836761475,
0.07741495966911316,
0.35265088081359863,
-0.16656793653964996,
0.15263327956199646,
-0.1974882036447525,
-0.07255499809980392,
0.03786780312657356,
0.20238935947418213,
0.0726945772767067,
-0.15243613719940186,
0.10461090505123138,
-0.08753252774477005,
0.11187019944190979,
-0.0015157200396060944,
-0.017757771536707878,
0.06609900295734406,
0.3099437355995178,
-0.017383523285388947,
0.09255854040384293,
-0.049405645579099655,
-0.7076705098152161,
-0.05896824598312378,
0.14027301967144012,
0.09324760735034943,
0.1685495674610138,
-0.306477427482605,
-0.20775818824768066,
-0.13627776503562927,
-0.2807878851890564,
-0.21918857097625732,
0.1381199210882187,
-0.0021531134843826294,
-0.15281367301940918,
-0.5317099094390869,
-0.10631460696458817,
0.45449957251548767,
-0.03890646994113922,
0.29491978883743286,
0.13638576865196228,
0.191824272274971,
-0.2751871347427368,
0.08702944964170456,
0.14812156558036804,
0.21766942739486694,
0.04756375029683113,
0.07913334667682648,
0.0016632061451673508,
0.15356874465942383,
0.046456702053546906,
0.1377321183681488,
0.4126957356929779,
0.5674939751625061,
0.14114099740982056,
-0.216698557138443,
0.030150696635246277,
0.13614441454410553,
0.017868921160697937,
-0.02606794610619545,
-0.29154184460639954,
0.34007909893989563,
-0.1374499350786209,
0.20645785331726074,
-0.062259990721940994,
-0.22397549450397491,
0.18072083592414856,
-0.029561344534158707,
-0.2528741955757141,
0.29122865200042725,
0.24764159321784973,
-0.026833288371562958,
0.15406852960586548,
0.16585902869701385,
-0.3894820809364319,
0.06417634338140488,
0.2969978451728821,
0.10849438607692719,
-0.03908552974462509,
0.13460123538970947,
0.02171601727604866,
-0.005557091906666756,
0.1748732030391693,
-0.2267996072769165,
0.07854929566383362,
0.34847575426101685,
0.024308573454618454,
0.11234673112630844,
-0.014990302734076977,
-0.05381375923752785,
0.08161958307027817,
0.1527535617351532,
0.17516468465328217,
0.24551108479499817,
0.17345044016838074,
0.30225011706352234,
0.04830179363489151,
-0.2087583690881729,
0.020241303369402885,
0.07904964685440063,
-0.14872890710830688,
-0.09461873769760132,
-0.044455643743276596,
-0.2868649363517761,
-0.21943257749080658,
0.0006994614377617836,
-0.5158630609512329,
-0.4186886250972748,
0.10971783846616745,
-0.23841458559036255,
-0.30330803990364075,
0.548961341381073,
0.2622521221637726,
0.2458336502313614,
-0.2992863357067108,
0.12956564128398895,
-0.2697741389274597,
-0.30507123470306396,
0.012448349967598915,
0.13434743881225586,
0.24799539148807526,
-0.3092730939388275,
0.5299304723739624,
-0.2754904329776764,
0.23146341741085052,
-0.42760583758354187,
-0.44535505771636963,
0.0887712612748146,
-0.05856342613697052,
-0.13173741102218628,
-0.012835264205932617,
-0.0509229451417923,
-0.05892784893512726,
-0.29708197712898254,
0.0027976538985967636,
-0.03548913076519966,
-0.2622073292732239,
-0.19790010154247284,
-0.18215058743953705,
0.13688938319683075,
-0.24480333924293518,
-0.4781694710254669,
-0.22950567305088043,
-0.611587405204773,
0.2999667525291443,
-0.36256471276283264,
0.20308509469032288,
0.6342553496360779,
-0.4604383707046509,
-0.34232696890830994,
-0.010252727195620537,
0.09037210792303085,
-0.16540400683879852,
0.07968772947788239,
-0.10897371172904968,
-0.013875272125005722,
-0.026950012892484665,
-0.15033556520938873,
-0.05376136302947998,
0.11739400029182434,
0.09889201074838638,
0.07920114696025848,
0.055134642869234085,
0.11472588777542114,
0.22220700979232788,
0.07013918459415436,
0.14634379744529724,
-0.07589656114578247,
0.16696575284004211,
-0.11517590284347534,
-0.04838493838906288,
-0.3034493029117584,
0.017909616231918335,
0.13941796123981476,
0.07924817502498627,
0.2327154278755188,
-0.2529515027999878,
-0.024773791432380676,
0.4151548743247986,
0.09545369446277618,
-0.22049914300441742,
0.04368637129664421,
0.11201713234186172,
0.17780117690563202,
-0.0073714181780815125,
-0.2017393708229065,
0.4564603269100189,
0.08210396021604538,
0.09571655094623566,
0.18041962385177612,
0.04961122199892998,
0.30001160502433777,
-0.06771302223205566,
0.14582577347755432,
-0.4287884831428528,
-0.12638816237449646,
-0.07244643568992615,
-0.1356436014175415,
0.35105663537979126,
0.12032835185527802,
-0.06356392055749893,
-0.243097186088562,
0.01601293869316578,
0.3488847315311432,
0.35556602478027344,
0.07622076570987701,
0.008880619890987873,
-0.13609760999679565,
0.17518779635429382,
-0.2637650668621063,
0.44042110443115234,
-0.14648261666297913,
0.0686202421784401,
0.05245877429842949,
-0.05518020689487457,
-0.15599466860294342,
0.08564899116754532,
0.449501633644104,
-0.06592978537082672,
-0.06522686034440994,
-0.19720932841300964,
0.42954346537590027,
0.28628748655319214,
-0.1710500717163086,
0.06783871352672577,
-0.15109765529632568,
0.4041418433189392,
0.7392381429672241,
-0.5356009602546692,
-0.17226381599903107,
-0.017190445214509964,
-0.10091987997293472,
0.07067012786865234,
-0.14292964339256287,
-0.09938207268714905,
-0.3376321792602539,
-0.14401623606681824,
0.19874787330627441,
0.37006306648254395,
0.2947181761264801,
0.09906495362520218,
0.04733872786164284,
-0.053232818841934204,
0.12104698270559311,
0.21088892221450806,
-0.19584405422210693,
0.3275100886821747,
0.2504366338253021,
0.2373427450656891,
-0.16452288627624512,
0.263262540102005,
0.5395594239234924,
0.43738436698913574,
-0.3084105849266052,
-0.07849307358264923,
0.23675775527954102,
-0.32147911190986633,
0.43776214122772217,
0.14359773695468903,
0.4924124777317047,
-0.022104687988758087,
-0.07830226421356201,
0.245810404419899,
-0.4805261492729187,
0.27607306838035583,
-0.046173758804798126,
0.22912415862083435,
-0.40579360723495483,
-0.4184628129005432,
0.06767534464597702,
0.37763386964797974,
-0.178185373544693,
0.34155571460723877,
-0.2592700123786926,
-0.015671340748667717,
-0.21714664995670319,
0.10138349235057831,
0.7190649509429932,
-0.09881803393363953,
-0.141194149851799,
0.1589536964893341,
-0.8182390928268433,
0.24135863780975342,
-0.4194204807281494,
0.08603236079216003,
-0.2577148973941803,
-0.2270352691411972,
0.12561872601509094,
-0.09534191340208054,
0.030986271798610687,
0.10901223868131638,
-0.17304261028766632,
0.4335800111293793,
0.30218249559402466,
0.1803378015756607,
0.09135030210018158,
0.35193973779678345,
-0.053376346826553345,
-0.2996262311935425,
0.015695078298449516,
0.1418689787387848,
-0.42156821489334106,
0.373060405254364,
-0.2023204267024994,
-0.06088598072528839,
0.045926015824079514,
-0.04185069724917412,
-0.2585473656654358,
0.030162062495946884,
0.054462261497974396,
-0.10915067791938782,
0.23740296065807343,
-0.18029776215553284,
0.0010679606348276138,
-0.2517567574977875,
0.3024146854877472,
-0.006358802318572998,
0.04186239093542099,
0.21871371567249298,
0.09548955410718918,
0.38708263635635376,
0.06111190840601921,
-0.12000394612550735,
0.35583972930908203,
-0.11545348912477493,
0.10405593365430832,
-0.20881599187850952,
0.05974932014942169,
-0.09460770338773727,
-0.45085272192955017,
-0.03414827585220337,
0.09212186187505722,
0.05197989195585251,
0.3681827783584595,
0.12488539516925812,
0.15269538760185242,
-0.11941048502922058,
0.24212493002414703,
0.07299228012561798,
-0.09923943877220154,
0.2287500500679016,
-0.060245711356401443,
-0.3162308633327484,
-0.2129492461681366,
-0.01548050343990326,
-0.059919171035289764,
-0.49430057406425476,
0.03641602769494057,
0.18813349306583405,
-0.18456493318080902,
-0.21173781156539917,
-0.11427317559719086,
0.27446249127388,
-0.26350629329681396,
-0.17185291647911072,
-0.21593348681926727,
-0.23545143008232117,
0.38306093215942383,
0.4289550483226776,
0.2857859134674072,
-0.09514463692903519,
0.024229522794485092,
-0.06900157779455185,
-0.30242860317230225,
0.22053661942481995,
-0.3923163414001465,
0.17536461353302002,
0.21450325846672058,
-0.09708462655544281,
0.08218368142843246,
0.03629516810178757,
-0.460746169090271,
-0.20661561191082,
-0.15348784625530243,
0.09980867058038712,
-0.03294903412461281,
-0.18476185202598572,
0.027308156713843346,
-0.15121430158615112,
0.15427936613559723,
-0.10000962018966675,
-0.25931209325790405,
-0.3085978925228119,
-0.11334925889968872,
0.07403869926929474,
0.009335814043879509,
0.2988134026527405,
-0.2149077206850052,
-0.0698162317276001,
-0.10745717585086823,
-0.18495911359786987,
0.06174873188138008,
-0.13029873371124268,
-0.01562172919511795,
0.38423824310302734,
0.21357101202011108,
0.40901878476142883,
0.4066500663757324,
-0.03331482410430908,
0.17684230208396912,
0.27628278732299805,
-0.004193237982690334,
0.1578676849603653,
-0.09170536696910858,
0.06720809638500214,
-0.09209561347961426,
0.062142569571733475,
0.35424667596817017,
0.049680206924676895,
0.3205903172492981,
-0.12001535296440125,
-0.09035331010818481,
0.15096592903137207,
0.42013561725616455,
0.13486553728580475,
0.07786547392606735,
-0.2963986098766327,
0.14397981762886047,
0.36846527457237244,
-0.22451679408550262,
-0.05572288855910301,
0.06485626101493835,
0.15433336794376373,
-0.023383665829896927,
0.1991441249847412,
0.4471244513988495,
-0.07235348224639893,
-0.11003190279006958,
0.34464797377586365,
0.6039263010025024,
-0.09536375105381012,
0.1643204391002655,
-0.05127711966633797,
0.22125811874866486,
0.12460717558860779,
0.47156980633735657,
0.14248408377170563,
0.10867951065301895,
-0.27516406774520874,
0.11306629329919815,
0.3340216279029846,
0.35194066166877747,
0.041125111281871796,
0.26690399646759033,
-0.13183529675006866,
-0.043019797652959824,
0.061061613261699677,
0.09154896438121796,
0.13669583201408386,
0.3170904517173767,
0.039682786911726,
-0.12834542989730835,
-0.3337085247039795,
0.13649728894233704,
0.06742262840270996,
-0.21381869912147522,
0.2588461935520172,
-0.1560996174812317,
-0.12275469303131104,
-0.052382245659828186,
-0.04871391877532005,
0.060713887214660645,
0.005909685045480728,
0.4348669648170471,
-0.08513939380645752,
-0.10251925885677338,
-0.1403670758008957,
-0.2340392768383026,
0.16494326293468475,
0.2910022437572479,
-0.25643423199653625,
0.1439233273267746,
-0.17218132317066193,
-0.15386523306369781,
0.1309119313955307,
0.59691321849823,
0.3611910939216614,
0.07174588739871979,
-0.21564392745494843,
-0.1402801275253296,
-0.06005723401904106,
0.08947223424911499,
-0.13274791836738586,
-0.06202948838472366,
-0.023178957402706146,
-0.11941277980804443,
0.19671690464019775,
0.26076439023017883,
-0.13249066472053528,
0.15725046396255493,
-0.2870302200317383,
-0.06175317242741585,
-0.17170818150043488,
0.11341093480587006,
0.11416956037282944,
-0.18997716903686523,
0.26245760917663574,
0.21134451031684875,
-0.35784202814102173,
-0.16065461933612823,
-0.009099064394831657,
0.16978639364242554,
-0.06032188981771469,
-0.24489735066890717,
0.17272143065929413,
0.09212909638881683,
0.07207974791526794,
0.4522116482257843,
0.22227677702903748,
-0.30761244893074036,
-0.16024774312973022,
-0.29652726650238037,
0.21434858441352844,
0.04860502853989601,
-0.17752422392368317,
0.334357887506485,
-0.2625574469566345,
0.23758834600448608,
-0.1573013812303543,
0.017264485359191895,
-0.12351998686790466,
0.32191652059555054,
0.026581231504678726,
-0.6389305591583252,
0.2644178867340088,
0.06611400097608566,
-0.12230265140533447,
0.1742914915084839,
-0.017336558550596237,
0.07731470465660095,
-0.06361326575279236,
0.13884055614471436,
-0.31701111793518066,
-0.03597453236579895,
0.6022667288780212,
0.15007677674293518,
0.1820886731147766,
-0.17942161858081818,
0.07819096744060516,
-0.12752851843833923,
-0.17366985976696014,
-0.07048189640045166,
-0.1560050994157791,
-0.27874791622161865,
0.0978260487318039,
-0.5493389368057251,
-0.06269768625497818,
-0.013219427317380905,
-0.18935775756835938,
-0.2850344479084015,
-0.14444498717784882,
-0.15515941381454468,
0.19800835847854614,
-0.15444715321063995,
0.14672139286994934,
0.01427336037158966,
-0.30642133951187134,
0.09713178873062134,
0.12852275371551514,
0.29305022954940796,
-0.050739653408527374,
-0.35951292514801025,
-0.3083708584308624,
0.08856072276830673,
0.21264073252677917,
-0.2620556950569153,
-0.27345114946365356,
0.17101475596427917,
0.17015571892261505,
0.3440258502960205,
-0.5647106766700745,
0.0016003996133804321,
0.3092592656612396,
-0.08218581974506378,
-0.08944833278656006,
-0.05566636845469475,
0.0919693112373352,
-0.14028231799602509,
0.014411058276891708,
-0.1847006380558014,
0.09369051456451416,
-0.3057625889778137,
-0.14431844651699066,
-0.07651450484991074
] |
https://github.com/huggingface/datasets/issues/5137 | Align task tags in dataset metadata | As someone with feedback on the updates (which I highly appreciate seeing included here :D), a few comments from a "user perspective":
* I think the general confusion for me was also surrounding the hierarchy; it doesn't really become super clear (even when using the tagger space) that one is a subset of the other, especially since it seems to be still possible to include fine-grained tasks without the "parent category"?
* The datasets explorer still shows tags that are no longer valid (e.g., super specific ones such as `summarization-other-paper-abstract-generation`, but also ones that should be `task_categories`, such as `summarization`). I'm assuming this will be fixed soon, but until then it can confuse people who don't understand why they suddenly can't use seemingly still valid tags anymore.
* As I mentioned to @albertvillanova, having a dedicated page in the docs with explanations (especially wrt the difference between `task_categories` and `task_ids`) would be super helpful. However, I think it would have been sufficient to just include some description in the dataset PRs where you can link to the Github/other discussion on the topic :) That way, I can check myself what changes are expected to happen.
Thanks again for the streamlining process, I personally learned a fair bit about the tagging structure in the meantime!
Best,
Dennis | ## Describe
Once we have agreed on a common naming for task tags for all open source projects, we should align on them.
## Steps
- [x] Align task tags in canonical datasets
- [x] task_categories: 4 datasets
- [x] task_ids (by @lhoestq)
- [x] Open PRs in community datasets
- [x] task_categories: 451 datasets
- [x] task_ids: 556 datasets
| 216 | Align task tags in dataset metadata
## Describe
Once we have agreed on a common naming for task tags for all open source projects, we should align on them.
## Steps
- [x] Align task tags in canonical datasets
- [x] task_categories: 4 datasets
- [x] task_ids (by @lhoestq)
- [x] Open PRs in community datasets
- [x] task_categories: 451 datasets
- [x] task_ids: 556 datasets
As someone with feedback on the updates (which I highly appreciate seeing included here :D), a few comments from a "user perspective":
* I think the general confusion for me was also surrounding the hierarchy; it doesn't really become super clear (even when using the tagger space) that one is a subset of the other, especially since it seems to be still possible to include fine-grained tasks without the "parent category"?
* The datasets explorer still shows tags that are no longer valid (e.g., super specific ones such as `summarization-other-paper-abstract-generation`, but also ones that should be `task_categories`, such as `summarization`). I'm assuming this will be fixed soon, but until then it can confuse people who don't understand why they suddenly can't use seemingly still valid tags anymore.
* As I mentioned to @albertvillanova, having a dedicated page in the docs with explanations (especially wrt the difference between `task_categories` and `task_ids`) would be super helpful. However, I think it would have been sufficient to just include some description in the dataset PRs where you can link to the Github/other discussion on the topic :) That way, I can check myself what changes are expected to happen.
Thanks again for the streamlining process, I personally learned a fair bit about the tagging structure in the meantime!
Best,
Dennis | [
-0.4204704761505127,
0.22354808449745178,
-0.19335894286632538,
-0.04848835617303848,
0.13828012347221375,
-0.07244402170181274,
0.10605517029762268,
0.2928413450717926,
-0.009969361126422882,
0.020484723150730133,
-0.15161719918251038,
0.4007692039012909,
-0.03414963558316231,
0.37688523530960083,
-0.1833159476518631,
-0.037403933703899384,
0.35739704966545105,
-0.10413593053817749,
0.04563407599925995,
0.08652208745479584,
-0.2981390655040741,
0.0012991297990083694,
-0.1418832391500473,
0.08651748299598694,
-0.05783366411924362,
-0.17953449487686157,
-0.2703157365322113,
-0.17411652207374573,
-0.2691013813018799,
-0.24167847633361816,
0.2633340656757355,
0.3001934289932251,
0.06466855853796005,
0.40145131945610046,
-0.00009918391879182309,
-0.3105155825614929,
0.28510674834251404,
0.08362164348363876,
-0.15404950082302094,
0.017790108919143677,
-0.33811476826667786,
-0.373969167470932,
-0.05950426310300827,
0.0709015354514122,
0.24455508589744568,
-0.28146928548812866,
0.12508979439735413,
-0.05589701980352402,
-0.14533425867557526,
-0.12337782233953476,
0.2921915054321289,
-0.030544795095920563,
0.28131505846977234,
-0.16222958266735077,
-0.16662898659706116,
0.26182079315185547,
-0.07750348746776581,
0.2575209140777588,
0.49893105030059814,
-0.06973623484373093,
0.18431517481803894,
0.21304050087928772,
-0.009481079876422882,
0.12859131395816803,
0.6237474679946899,
-0.12062453478574753,
-0.10202980786561966,
-0.4298114776611328,
-0.03545845299959183,
0.09715373069047928,
0.8063027858734131,
-0.10764729231595993,
-0.3935242295265198,
-0.17385607957839966,
-0.30144381523132324,
-0.2142782360315323,
-0.12391506880521774,
0.17899054288864136,
0.25088247656822205,
0.03664199635386467,
0.10617951303720474,
-0.17289145290851593,
0.026696346700191498,
-0.05195360630750656,
0.08058178424835205,
0.4463072121143341,
0.07554202526807785,
-0.08747202903032303,
0.0072777122259140015,
-0.13972200453281403,
-0.0022637266665697098,
0.037121254950761795,
-0.1557474285364151,
0.08157262951135635,
-0.39583244919776917,
-0.11056779325008392,
-0.005175434052944183,
-0.13119515776634216,
0.2839454412460327,
0.26829099655151367,
-0.06933305412530899,
-0.024748992174863815,
0.08027812838554382,
0.13261039555072784,
0.11044380068778992,
0.25231993198394775,
0.1437220722436905,
0.3692527413368225,
0.07123414427042007,
-0.03832152113318443,
0.1908758580684662,
0.06643398106098175,
-0.1821814775466919,
-0.1673310548067093,
-0.22650626301765442,
0.18610557913780212,
0.2315780073404312,
-0.018911927938461304,
-0.33163654804229736,
0.03898141160607338,
0.11362943798303604,
-0.22911392152309418,
-0.26982107758522034,
-0.19502916932106018,
-0.14255842566490173,
0.24000760912895203,
-0.12775418162345886,
0.04341592639684677,
-0.112879678606987,
0.054191093891859055,
-0.20207279920578003,
-0.09604860842227936,
-0.27427932620048523,
0.04529103636741638,
0.08925315737724304,
-0.2815867066383362,
0.0758809819817543,
0.148506298661232,
-0.11881867051124573,
-0.10472951829433441,
-0.16284123063087463,
0.06449973583221436,
0.1313980221748352,
0.11942005157470703,
-0.1616184562444687,
-0.02145855315029621,
-0.14853884279727936,
-0.004130851477384567,
-0.30012795329093933,
0.08913849294185638,
-0.3108750879764557,
-0.3875131905078888,
-0.3686976432800293,
0.36998364329338074,
-0.15138661861419678,
-0.06827031075954437,
-0.3523009717464447,
0.335908979177475,
-0.08372778445482254,
0.06910818815231323,
0.14508870244026184,
0.11287199705839157,
0.06334106624126434,
-0.05907835066318512,
-0.06876150518655777,
0.11505931615829468,
0.17255248129367828,
-0.017209485173225403,
0.13212020695209503,
0.03272406384348869,
0.08763396739959717,
-0.01680651679635048,
0.15265148878097534,
0.3466220796108246,
-0.24578410387039185,
0.048808589577674866,
-0.01049795001745224,
-0.42046448588371277,
-0.13328582048416138,
0.0541592612862587,
-0.005827844142913818,
-0.07210418581962585,
0.14958874881267548,
-0.0624038390815258,
0.47304531931877136,
-0.18452492356300354,
0.15871700644493103,
0.0020777061581611633,
-0.19158951938152313,
0.013437381014227867,
-0.22116707265377045,
-0.0529358796775341,
0.22052626311779022,
0.08719554543495178,
0.13448014855384827,
-0.05054668337106705,
0.06780495494604111,
-0.04040722921490669,
0.005811288952827454,
0.10841017961502075,
-0.04100692272186279,
0.006640713661909103,
0.2490752935409546,
0.11483500897884369,
0.12314555048942566,
-0.16623148322105408,
-0.6459986567497253,
-0.054552990943193436,
0.4131332337856293,
0.12259849160909653,
0.22743143141269684,
-0.24536076188087463,
-0.17210420966148376,
-0.14039826393127441,
-0.21471954882144928,
-0.32141542434692383,
0.15883788466453552,
-0.135774627327919,
-0.2399059385061264,
-0.5067347884178162,
-0.33118197321891785,
0.30136415362358093,
-0.1753033846616745,
0.3283979892730713,
0.19983991980552673,
0.10406364500522614,
-0.256915807723999,
-0.06092841923236847,
0.16434980928897858,
0.1798921823501587,
0.012501735240221024,
0.10050790756940842,
0.043306272476911545,
0.2500549256801605,
0.07316836714744568,
0.1445600986480713,
0.3407227694988251,
0.6193830370903015,
0.2538885474205017,
-0.15444833040237427,
0.07190898805856705,
0.0008848775178194046,
-0.017978698015213013,
0.006351262331008911,
-0.14800521731376648,
0.1313157081604004,
-0.37690433859825134,
0.22644948959350586,
-0.08385147154331207,
-0.19050060212612152,
0.06069345027208328,
0.13746735453605652,
-0.3487098515033722,
0.24576815962791443,
0.03834756836295128,
-0.04277325049042702,
0.01428939402103424,
0.18239735066890717,
-0.2830541133880615,
0.2990280091762543,
0.26163506507873535,
0.08148467540740967,
-0.2267313003540039,
0.22602146863937378,
-0.03455916792154312,
-0.08135756850242615,
0.16602647304534912,
-0.10777181386947632,
0.11245841532945633,
0.2834981083869934,
0.11763443052768707,
0.08211282640695572,
0.0034406748600304127,
0.04249592870473862,
0.1489332914352417,
0.2927381992340088,
-0.01946564018726349,
0.1584939956665039,
0.09217266738414764,
0.3345659375190735,
0.06489208340644836,
-0.16815437376499176,
-0.060162968933582306,
0.2438119351863861,
-0.2115882784128189,
-0.060200035572052,
-0.015093953348696232,
-0.44464021921157837,
-0.11608710885047913,
-0.17204706370830536,
-0.4385787546634674,
-0.4579126536846161,
0.14890357851982117,
-0.22036156058311462,
-0.173481285572052,
0.4822379946708679,
0.37186795473098755,
0.2397189438343048,
-0.3589755892753601,
0.35715728998184204,
-0.25254297256469727,
-0.36297371983528137,
-0.004762809723615646,
0.181955948472023,
0.24548746645450592,
-0.2514379918575287,
0.47487637400627136,
-0.23353265225887299,
0.2544916868209839,
-0.2891005575656891,
-0.5695943236351013,
0.0384078249335289,
-0.16143032908439636,
0.027138570323586464,
-0.009894318878650665,
-0.027792565524578094,
-0.03109058365225792,
-0.3538826107978821,
-0.10064604878425598,
-0.10526619851589203,
-0.2685980498790741,
-0.20583763718605042,
-0.15313509106636047,
0.027309821918606758,
-0.24170851707458496,
-0.5673739910125732,
-0.1845666468143463,
-0.593278169631958,
0.20327003300189972,
-0.27601194381713867,
0.17579567432403564,
0.5718985199928284,
-0.2963416874408722,
-0.3543892204761505,
0.031548984348773956,
0.08089256286621094,
-0.06571674346923828,
0.044057656079530716,
0.00673159584403038,
-0.04344945773482323,
0.023731235414743423,
0.03587181493639946,
0.06282033026218414,
0.14005598425865173,
-0.04625868797302246,
0.22487126290798187,
0.07754049450159073,
0.1675242930650711,
0.18230220675468445,
0.09835804253816605,
0.08787193894386292,
0.056323155760765076,
0.3391546308994293,
-0.16215300559997559,
-0.0029238760471343994,
-0.29556363821029663,
-0.1604064404964447,
0.17154937982559204,
0.0654492974281311,
0.10556866228580475,
-0.3212985694408417,
-0.015613125637173653,
0.5582351088523865,
0.12339243292808533,
-0.22432588040828705,
-0.06659775972366333,
0.1067974865436554,
0.2347685843706131,
-0.1074208989739418,
-0.27379852533340454,
0.43722257018089294,
-0.0015329569578170776,
0.06625628471374512,
0.15348073840141296,
0.1543234884738922,
0.25628480315208435,
-0.0999794602394104,
0.14846618473529816,
-0.46432286500930786,
0.023760896176099777,
-0.15761114656925201,
-0.0545676052570343,
0.3160801827907562,
0.16684210300445557,
-0.20047569274902344,
-0.17475482821464539,
-0.0699327364563942,
0.2968321740627289,
0.5641341805458069,
0.15266075730323792,
0.07265054434537888,
-0.15573826432228088,
0.04645374417304993,
-0.21272361278533936,
0.3095073699951172,
-0.11007065325975418,
-0.19368477165699005,
0.021897178143262863,
-0.16285663843154907,
-0.1461409628391266,
0.17444662749767303,
0.34929168224334717,
-0.15498404204845428,
-0.21210213005542755,
-0.17501266300678253,
0.44769981503486633,
0.27590668201446533,
-0.21249638497829437,
0.06330029666423798,
-0.0737418606877327,
0.3730285167694092,
0.4963173270225525,
-0.35442084074020386,
-0.249534010887146,
-0.013194449245929718,
-0.1360626220703125,
0.10964277386665344,
-0.03823322802782059,
-0.054848264902830124,
-0.20347973704338074,
-0.1453729122877121,
0.10417785495519638,
0.34428536891937256,
0.08860529214143753,
-0.03742083162069321,
-0.02004542574286461,
0.05226445943117142,
0.08042880892753601,
0.09746657311916351,
-0.13020262122154236,
0.3635692298412323,
0.0940115675330162,
0.22335991263389587,
-0.01435612142086029,
0.20944224298000336,
0.6041470170021057,
0.3083071708679199,
-0.3254840075969696,
-0.23725175857543945,
0.25260087847709656,
-0.2741102874279022,
0.3880932331085205,
0.09102542698383331,
0.4205063283443451,
-0.1267796754837036,
-0.132907435297966,
0.05292246490716934,
-0.48991912603378296,
0.1550556868314743,
0.007505378220230341,
0.21118643879890442,
-0.2724496126174927,
-0.522629976272583,
0.049777012318372726,
0.4093453288078308,
-0.2961936891078949,
0.4144943654537201,
-0.1846056431531906,
-0.0016904938966035843,
-0.15710386633872986,
0.17019525170326233,
0.8210272192955017,
0.032148391008377075,
-0.22631070017814636,
0.09394987672567368,
-0.8518502116203308,
0.33307141065597534,
-0.2903437614440918,
0.04603687673807144,
-0.20674726366996765,
-0.14109793305397034,
0.05927487462759018,
-0.022305823862552643,
-0.04114881902933121,
0.012897197157144547,
-0.2818259596824646,
0.40213730931282043,
0.1826234608888626,
0.1453474462032318,
0.13335993885993958,
0.3059535026550293,
0.045159488916397095,
-0.19419297575950623,
0.09403851628303528,
0.16470971703529358,
-0.3844752907752991,
0.25729477405548096,
-0.17539340257644653,
-0.017560506239533424,
-0.007791981101036072,
0.015996575355529785,
-0.3497164249420166,
-0.08133082091808319,
0.29066863656044006,
-0.26985418796539307,
0.20697517693042755,
-0.11628959327936172,
0.06651417911052704,
-0.07640807330608368,
0.26800939440727234,
-0.20903755724430084,
0.004059372469782829,
0.16769252717494965,
0.07908240705728531,
0.3445093631744385,
0.036403391510248184,
-0.16330586373806,
0.34746605157852173,
-0.09778429567813873,
0.16652628779411316,
-0.27028125524520874,
0.03230271860957146,
0.07086491584777832,
-0.5181841850280762,
0.0061956048011779785,
0.18749846518039703,
-0.09649297595024109,
0.5150433778762817,
0.1446075737476349,
0.1866348683834076,
-0.11706528067588806,
0.241858571767807,
0.049262918531894684,
-0.010516044683754444,
0.2627897262573242,
-0.03239814564585686,
-0.09834595769643784,
-0.14626269042491913,
-0.04021606594324112,
0.04870494455099106,
-0.4434233605861664,
-0.1399097591638565,
0.09684741497039795,
-0.25985413789749146,
-0.20130407810211182,
-0.046181559562683105,
0.17904357612133026,
-0.1158050000667572,
-0.09709823131561279,
-0.26506221294403076,
-0.15250298380851746,
0.4733414649963379,
0.485855370759964,
0.27049481868743896,
0.049485012888908386,
-0.058281004428863525,
0.014069832861423492,
-0.18797922134399414,
0.3202676475048065,
-0.3830055594444275,
0.2575322091579437,
-0.07440614700317383,
-0.2533174753189087,
0.10386179387569427,
0.07282297313213348,
-0.4543002247810364,
-0.17386823892593384,
-0.004596799612045288,
0.1547088325023651,
-0.05218100547790527,
-0.09107529371976852,
-0.11733238399028778,
-0.2693343758583069,
0.09036549180746078,
-0.14463311433792114,
-0.06826267391443253,
-0.28960850834846497,
-0.09810444712638855,
0.0619189590215683,
0.010798412375152111,
0.24932734668254852,
-0.22069363296031952,
0.0754699781537056,
-0.11711177229881287,
-0.07185804843902588,
0.08797624707221985,
-0.21762436628341675,
-0.13653217256069183,
0.43038076162338257,
0.1898394525051117,
0.31546133756637573,
0.41812217235565186,
-0.0019645243883132935,
0.2020883560180664,
0.4709765911102295,
0.20196571946144104,
0.1320856213569641,
-0.03194046393036842,
0.07228560745716095,
0.03060208074748516,
0.2379283607006073,
0.16037967801094055,
0.027929704636335373,
0.3392041325569153,
-0.02286200225353241,
-0.07200763374567032,
0.03901735320687294,
0.3111007809638977,
0.17842382192611694,
0.11391091346740723,
-0.33023425936698914,
0.04834888502955437,
0.34276890754699707,
-0.16195248067378998,
-0.06433795392513275,
0.03357543796300888,
0.1139911487698555,
-0.15226863324642181,
0.11306391656398773,
0.3750613331794739,
-0.08297864347696304,
-0.044514596462249756,
0.386611670255661,
0.5668618083000183,
-0.11199526488780975,
0.31075218319892883,
-0.08478483557701111,
0.07042255997657776,
0.06118369475007057,
0.43623948097229004,
0.03694196417927742,
0.06303218007087708,
-0.12036630511283875,
0.28179293870925903,
0.3360615074634552,
0.5498372912406921,
0.10459066927433014,
0.23837140202522278,
0.02930987998843193,
0.003605775535106659,
-0.04345525801181793,
0.12372331321239471,
-0.03414158523082733,
0.3686034381389618,
0.0873388722538948,
-0.056285690516233444,
-0.4334021806716919,
0.19792452454566956,
-0.0025035738945007324,
-0.14149972796440125,
0.2405703067779541,
-0.23790138959884644,
-0.3047805726528168,
0.03745236247777939,
-0.05848383530974388,
0.024716228246688843,
-0.01806115359067917,
0.515579104423523,
-0.09321294724941254,
-0.15681999921798706,
-0.16154637932777405,
-0.16250240802764893,
0.15065571665763855,
0.32647326588630676,
-0.0893876701593399,
0.030277196317911148,
-0.14414912462234497,
-0.1925112009048462,
0.17545661330223083,
0.723827064037323,
0.39512839913368225,
0.07459025830030441,
-0.24387529492378235,
-0.10188406705856323,
-0.018888361752033234,
0.0022960882633924484,
0.006890762597322464,
0.014438087120652199,
0.01365698128938675,
-0.20457243919372559,
0.023875564336776733,
0.2686011493206024,
-0.10449719429016113,
0.23198503255844116,
-0.3578232526779175,
-0.07398103177547455,
-0.1413360983133316,
0.12227468192577362,
0.23230330646038055,
-0.25894200801849365,
0.3553434908390045,
0.20408079028129578,
-0.27736160159111023,
-0.2940995991230011,
0.08530448377132416,
0.27866435050964355,
-0.13219738006591797,
-0.3098840117454529,
0.17007647454738617,
0.13392069935798645,
0.13638339936733246,
0.4307481348514557,
0.2761116921901703,
-0.1360800564289093,
-0.23859143257141113,
-0.23564499616622925,
0.06239086762070656,
0.12821869552135468,
0.09618988633155823,
0.21545155346393585,
-0.2158321738243103,
0.036869894713163376,
-0.04521851986646652,
0.06758992373943329,
-0.27351513504981995,
0.3053705394268036,
0.08412617444992065,
-0.5320261120796204,
0.22498071193695068,
0.12289745360612869,
-0.06940756738185883,
0.04284880310297012,
0.13755390048027039,
-0.015929531306028366,
-0.21170242130756378,
0.1123642548918724,
-0.20506729185581207,
-0.06616175919771194,
0.6129712462425232,
0.20227622985839844,
0.2811970114707947,
-0.05637931078672409,
0.07079456746578217,
-0.036387134343385696,
-0.1828819066286087,
-0.09586481750011444,
-0.20558303594589233,
-0.2450326830148697,
0.26839157938957214,
-0.39574721455574036,
-0.028527379035949707,
-0.11774975061416626,
-0.1609920859336853,
-0.21825408935546875,
-0.20904529094696045,
-0.14164678752422333,
0.20443546772003174,
-0.29973265528678894,
0.0914769247174263,
0.0769973173737526,
-0.2685741186141968,
-0.06616726517677307,
0.12497327476739883,
0.22161956131458282,
-0.025245480239391327,
-0.3563392162322998,
-0.19275185465812683,
0.06411898881196976,
0.2537209987640381,
-0.17074230313301086,
-0.2643771171569824,
0.09478680044412613,
0.13506178557872772,
0.33815842866897583,
-0.652398407459259,
-0.2289465367794037,
0.30712491273880005,
-0.10009103268384933,
-0.3009988069534302,
0.1299816370010376,
0.03910675272345543,
-0.22413098812103271,
-0.03501896560192108,
-0.20440325140953064,
0.04365610331296921,
-0.1673138290643692,
-0.06779440492391586,
-0.040341611951589584
] |
https://github.com/huggingface/datasets/issues/5137 | Align task tags in dataset metadata | Thanks to you both for your feedback! super useful! cc'ing @osanseviero too 🙂
> The datasets explorer still shows tags that are no longer valid
wait which explorer is that? is it https://huggingface.co/datasets/viewer/ ?
| ## Describe
Once we have agreed on a common naming for task tags for all open source projects, we should align on them.
## Steps
- [x] Align task tags in canonical datasets
- [x] task_categories: 4 datasets
- [x] task_ids (by @lhoestq)
- [x] Open PRs in community datasets
- [x] task_categories: 451 datasets
- [x] task_ids: 556 datasets
| 34 | Align task tags in dataset metadata
## Describe
Once we have agreed on a common naming for task tags for all open source projects, we should align on them.
## Steps
- [x] Align task tags in canonical datasets
- [x] task_categories: 4 datasets
- [x] task_ids (by @lhoestq)
- [x] Open PRs in community datasets
- [x] task_categories: 451 datasets
- [x] task_ids: 556 datasets
Thanks to you both for your feedback! super useful! cc'ing @osanseviero too 🙂
> The datasets explorer still shows tags that are no longer valid
wait which explorer is that? is it https://huggingface.co/datasets/viewer/ ?
| [
-0.47998085618019104,
0.1701505482196808,
-0.18582399189472198,
0.15901131927967072,
0.14320895075798035,
-0.11162927746772766,
0.18686769902706146,
0.18362505733966827,
0.017176374793052673,
0.1275055706501007,
-0.13632506132125854,
0.30775824189186096,
-0.06249284744262695,
0.5013511180877686,
-0.3144356608390808,
0.03793260082602501,
0.12994661927223206,
0.032836757600307465,
0.09560655057430267,
0.0945107638835907,
-0.2939271032810211,
-0.14558914303779602,
-0.19168898463249207,
0.13937333226203918,
-0.03139130026102066,
-0.17392706871032715,
-0.08091004937887192,
-0.4289845824241638,
-0.2192680686712265,
-0.15294982492923737,
0.255715012550354,
0.22921451926231384,
-0.0015806462615728378,
0.3281109035015106,
-0.00010092819866258651,
-0.1595129668712616,
0.35349762439727783,
0.128153994679451,
-0.2697892189025879,
0.08602693676948547,
-0.4797956645488739,
-0.23467646539211273,
-0.04543166607618332,
0.03190989047288895,
-0.07945232093334198,
-0.2613644301891327,
0.16652077436447144,
-0.38748854398727417,
-0.04003101587295532,
0.006979784928262234,
0.2914927303791046,
0.1585187166929245,
0.2512291371822357,
-0.17859622836112976,
-0.10690157860517502,
0.3535683751106262,
-0.06349538266658783,
0.1610773205757141,
0.47803357243537903,
0.0987480878829956,
0.31360799074172974,
0.2862766683101654,
-0.06831477582454681,
0.042912427335977554,
0.5735652446746826,
-0.15942718088626862,
-0.10123854130506516,
-0.3606337308883667,
0.10154545307159424,
0.1612270176410675,
0.8269875645637512,
-0.04795461893081665,
-0.23957373201847076,
-0.20152387022972107,
-0.27780231833457947,
-0.19098840653896332,
-0.007287949323654175,
0.19461610913276672,
0.335906445980072,
0.13491328060626984,
0.0482892282307148,
-0.1409449428319931,
-0.0026181787252426147,
0.05329073593020439,
-0.15372517704963684,
0.5122377276420593,
-0.0765436440706253,
-0.05699826776981354,
0.11507880687713623,
-0.1995541751384735,
0.06000135838985443,
0.0713864415884018,
-0.19960016012191772,
-0.021819885820150375,
-0.3934853672981262,
-0.029815994203090668,
-0.06910011917352676,
-0.10561736673116684,
0.166634202003479,
0.37802785634994507,
-0.06961772590875626,
-0.020914383232593536,
0.06404860317707062,
0.14110475778579712,
0.10346345603466034,
0.1808324009180069,
0.39249271154403687,
0.3711175322532654,
0.015580371022224426,
-0.025425715371966362,
0.08083809912204742,
0.007819142192602158,
-0.2531810998916626,
-0.3757750689983368,
-0.1677606999874115,
0.2210269272327423,
0.3780096173286438,
-0.028525397181510925,
-0.5398141741752625,
0.18352597951889038,
0.0995248481631279,
-0.18236412107944489,
-0.1023363247513771,
-0.12110083550214767,
-0.10511227697134018,
0.04583854600787163,
-0.1355116069316864,
0.05610841512680054,
-0.020970968529582024,
-0.11707228422164917,
-0.19425463676452637,
-0.11435052752494812,
-0.10445615649223328,
-0.18229399621486664,
0.16501876711845398,
-0.38037583231925964,
0.029268497601151466,
0.04383613169193268,
-0.24612469971179962,
-0.1878126859664917,
-0.16999849677085876,
-0.22691528499126434,
0.20359626412391663,
0.1631971299648285,
-0.12057605385780334,
0.06333019584417343,
-0.11117520928382874,
-0.13807561993598938,
-0.27516260743141174,
0.16939470171928406,
-0.3038806617259979,
-0.14762218296527863,
-0.4043538570404053,
0.39501839876174927,
-0.11336462944746017,
-0.11487390100955963,
-0.4333657920360565,
0.18302589654922485,
-0.09767471998929977,
0.05486108735203743,
0.13909879326820374,
0.07056649029254913,
0.06232360377907753,
0.0008755649323575199,
-0.012846200726926327,
0.10210609436035156,
-0.06811553984880447,
0.06719627976417542,
0.08381303399801254,
-0.07258084416389465,
-0.04514550417661667,
0.06864920258522034,
0.13341426849365234,
0.38665062189102173,
-0.3394632339477539,
0.10303747653961182,
0.12944568693637848,
-0.5161641240119934,
-0.19912412762641907,
-0.040536392480134964,
-0.008788291364908218,
-0.1443323791027069,
0.10206186771392822,
-0.04157324135303497,
0.683089017868042,
-0.15896694362163544,
-0.01687135547399521,
0.17496135830879211,
-0.09739527106285095,
-0.10394008457660675,
-0.10540913045406342,
-0.052860599011182785,
0.27090394496917725,
0.010011106729507446,
0.1715121567249298,
-0.15912339091300964,
0.11038300395011902,
-0.06310591846704483,
0.050488002598285675,
0.13665804266929626,
0.01265762560069561,
0.0386708565056324,
0.4044616222381592,
0.01257374882698059,
0.032749276608228683,
-0.2628832161426544,
-0.6333349943161011,
-0.017961546778678894,
0.341071754693985,
0.031550318002700806,
0.14304280281066895,
-0.29689687490463257,
-0.22583827376365662,
-0.17262335121631622,
-0.4129714369773865,
-0.17815811932086945,
0.18467871844768524,
-0.14993645250797272,
-0.2853025794029236,
-0.3990939259529114,
-0.22018733620643616,
0.14983072876930237,
-0.03293304890394211,
0.24375109374523163,
0.11337581276893616,
0.20917430520057678,
-0.2538015842437744,
0.09195871651172638,
0.04322001338005066,
0.06877253949642181,
0.07785311341285706,
0.11534296721220016,
0.010522052645683289,
0.14817769825458527,
0.134262353181839,
0.14242541790008545,
0.2819414734840393,
0.4966415762901306,
0.16438594460487366,
-0.5121840834617615,
-0.005359319970011711,
0.2478119134902954,
-0.04706822708249092,
0.06710264831781387,
-0.20164135098457336,
0.07509689033031464,
-0.12504220008850098,
0.12498976290225983,
-0.19380834698677063,
-0.23542168736457825,
0.18187880516052246,
-0.04172255098819733,
-0.2478557676076889,
0.08964185416698456,
0.0901745855808258,
-0.012805912643671036,
0.05790262296795845,
0.277330607175827,
-0.18069306015968323,
0.19258961081504822,
0.31602466106414795,
0.1245773583650589,
0.053920961916446686,
0.14118024706840515,
-0.14772635698318481,
0.018635645508766174,
0.07281842082738876,
-0.18043266236782074,
0.021863572299480438,
0.23661014437675476,
0.030011694878339767,
0.06556615978479385,
-0.11847884207963943,
-0.016006728634238243,
0.22364112734794617,
0.2859194874763489,
0.17986363172531128,
0.3582565188407898,
0.02745126560330391,
0.27759456634521484,
-0.10608725249767303,
-0.15684662759304047,
-0.04955214262008667,
0.17215462028980255,
-0.21524709463119507,
-0.023641061037778854,
-0.21968358755111694,
-0.5319759249687195,
-0.16409523785114288,
-0.23761878907680511,
-0.52276211977005,
-0.4208793044090271,
0.21463145315647125,
-0.08355343341827393,
-0.2134682536125183,
0.46391019225120544,
0.1858261674642563,
0.21941334009170532,
-0.2269534170627594,
0.21110054850578308,
-0.24718506634235382,
-0.3119012117385864,
-0.014348350465297699,
0.16504821181297302,
0.28697705268859863,
-0.1373792439699173,
0.5023255348205566,
-0.25399646162986755,
0.3341413140296936,
-0.4666011929512024,
-0.5059915781021118,
0.12801769375801086,
0.06958392262458801,
0.14164812862873077,
-0.059316813945770264,
0.06979572772979736,
0.011219978332519531,
-0.27346447110176086,
0.04019824415445328,
-0.061530038714408875,
-0.1615907847881317,
-0.24581536650657654,
-0.2144513726234436,
0.10010586678981781,
-0.1250515580177307,
-0.36227723956108093,
-0.2055497169494629,
-0.5334805250167847,
0.07633685320615768,
-0.22713829576969147,
0.11160733550786972,
0.7081128358840942,
-0.327575147151947,
-0.3573318421840668,
0.07350189983844757,
0.16325341165065765,
-0.2773702144622803,
0.02818053588271141,
0.058433230966329575,
0.03823953866958618,
0.005985882133245468,
0.032690707594156265,
-0.004922080785036087,
0.02651793323457241,
0.030884552747011185,
0.22580556571483612,
0.10995906591415405,
0.13698436319828033,
0.0009086728096008301,
0.1271173059940338,
-0.021917352452874184,
0.06171649694442749,
0.23406055569648743,
-0.05505431443452835,
-0.0787774920463562,
-0.325318843126297,
-0.12937098741531372,
0.13988721370697021,
0.08276296406984329,
0.10691536217927933,
-0.28433138132095337,
-0.035066451877355576,
0.34597140550613403,
0.10832901298999786,
-0.3315065801143646,
0.005472801625728607,
0.01602838560938835,
0.39408427476882935,
-0.08732534199953079,
-0.2484067976474762,
0.37617984414100647,
0.17583850026130676,
-0.07933558523654938,
0.14731328189373016,
0.09566587954759598,
0.3600672781467438,
-0.010042794048786163,
0.114128977060318,
-0.5077479481697083,
-0.15830497443675995,
-0.2545669972896576,
-0.07015076279640198,
0.2892460227012634,
0.13916493952274323,
-0.047435879707336426,
-0.014725008979439735,
-0.106125108897686,
0.3426401913166046,
0.5331931710243225,
0.026998423039913177,
-0.008883507922291756,
-0.07065872102975845,
0.14376410841941833,
-0.15183275938034058,
0.30105942487716675,
-0.17082621157169342,
0.025610260665416718,
0.056590158492326736,
-0.02828238159418106,
-0.023346401751041412,
0.1919655203819275,
0.5714520812034607,
-0.19853906333446503,
0.010228265076875687,
-0.12669897079467773,
0.5838309526443481,
0.20187382400035858,
-0.2796405553817749,
0.0988975465297699,
-0.13541114330291748,
0.16498732566833496,
0.6210852861404419,
-0.26780152320861816,
-0.22925713658332825,
0.0634787529706955,
-0.036028508096933365,
-0.09387518465518951,
-0.02881283313035965,
-0.10671695321798325,
-0.28874412178993225,
-0.09299341589212418,
0.16829869151115417,
0.3975164592266083,
0.15765352547168732,
0.09636151045560837,
-0.049617789685726166,
-0.34206199645996094,
-0.000872977077960968,
0.11112967878580093,
-0.24053390324115753,
0.4328274130821228,
0.05106716975569725,
0.2513311505317688,
-0.04531387984752655,
0.2541705369949341,
0.5363653302192688,
0.4505772292613983,
-0.1567104458808899,
-0.3269883692264557,
0.2462119460105896,
-0.2306004762649536,
0.31987425684928894,
0.0443527027964592,
0.3857143819332123,
-0.025797754526138306,
-0.10218353569507599,
0.17903006076812744,
-0.5010986328125,
0.2793431878089905,
0.05765292048454285,
0.12571914494037628,
-0.4214448630809784,
-0.31608691811561584,
0.06274564564228058,
0.41096043586730957,
-0.22596900165081024,
0.2915499806404114,
-0.16902221739292145,
-0.12068021297454834,
-0.2755171060562134,
0.16266152262687683,
0.8130642175674438,
-0.04334463179111481,
-0.3103789985179901,
0.1641654372215271,
-0.7353343367576599,
0.34905508160591125,
-0.2869085669517517,
0.059450868517160416,
-0.28883397579193115,
-0.37749195098876953,
-0.029062416404485703,
0.014172110706567764,
0.07446971535682678,
-0.017462879419326782,
-0.19840629398822784,
0.4556805491447449,
0.1504359245300293,
0.2605975270271301,
0.07476600259542465,
0.23019462823867798,
0.07758819311857224,
-0.10136167705059052,
0.0007832590490579605,
0.1697242110967636,
-0.32623952627182007,
0.38032618165016174,
-0.18349513411521912,
0.031913112848997116,
0.2810923755168915,
-0.007969919592142105,
-0.23076952993869781,
0.03035935014486313,
0.13660453259944916,
-0.04885303974151611,
0.23011696338653564,
-0.17875531315803528,
-0.009454727172851562,
-0.17379015684127808,
0.26799243688583374,
-0.10152092576026917,
-0.016910014674067497,
0.36050844192504883,
0.18289387226104736,
0.2788968086242676,
-0.052326902747154236,
-0.1853865534067154,
0.30128249526023865,
-0.09227672964334488,
0.1711556315422058,
-0.1593511700630188,
0.14178606867790222,
-0.0048222169280052185,
-0.3101729154586792,
0.027255862951278687,
0.07572875916957855,
-0.05214127153158188,
0.37271228432655334,
-0.06661029160022736,
0.23964250087738037,
-0.12429802119731903,
0.2213137000799179,
0.08229037374258041,
0.1365613043308258,
0.26048722863197327,
0.021330535411834717,
-0.148587167263031,
-0.14805153012275696,
0.02937941625714302,
0.04964592680335045,
-0.331106960773468,
-0.11997613310813904,
0.07467515766620636,
-0.2472459077835083,
-0.29671451449394226,
0.07408211380243301,
0.05254945531487465,
-0.20578399300575256,
-0.1102185994386673,
-0.1886889934539795,
-0.09983688592910767,
0.42671605944633484,
0.5176870226860046,
0.3661549687385559,
-0.10012676566839218,
-0.07320231199264526,
-0.15717542171478271,
-0.0019498728215694427,
0.3336799740791321,
-0.38447168469429016,
0.18043340742588043,
0.10992784053087234,
-0.17572949826717377,
0.1677480936050415,
-0.1097412258386612,
-0.44255194067955017,
-0.052751488983631134,
-0.11344124376773834,
0.12615081667900085,
-0.14392071962356567,
-0.06177137792110443,
-0.13084650039672852,
-0.3498535752296448,
0.07602130621671677,
-0.17594781517982483,
-0.15061824023723602,
-0.28125229477882385,
-0.18340568244457245,
0.06071771681308746,
0.08793184906244278,
0.315100759267807,
-0.26001617312431335,
-0.08662290871143341,
0.031620945781469345,
-0.13251298666000366,
-0.13019609451293945,
-0.008753767237067223,
-0.048695601522922516,
0.3216741383075714,
0.1788916289806366,
0.09194648265838623,
0.27359962463378906,
0.05804966017603874,
0.18793544173240662,
0.35575801134109497,
0.0902058556675911,
0.08685342967510223,
-0.07613629847764969,
0.09372231364250183,
-0.06418871879577637,
0.188961923122406,
0.35839468240737915,
-0.030355192720890045,
0.22657296061515808,
-0.15047867596149445,
-0.03637334331870079,
0.12076912820339203,
0.39167359471321106,
0.2380494922399521,
0.017466412857174873,
-0.3814747631549835,
0.14725425839424133,
0.3631040155887604,
-0.2541983723640442,
-0.08050733804702759,
0.06978189200162888,
0.11898070573806763,
-0.15511032938957214,
0.07703652232885361,
0.27008160948753357,
0.009870961308479309,
-0.03013034164905548,
0.3737492561340332,
0.5279839634895325,
-0.03950807452201843,
0.32740288972854614,
-0.04131152108311653,
0.04990809038281441,
0.0038991235196590424,
0.5972474813461304,
-0.00987708568572998,
0.1493680626153946,
-0.0589522123336792,
0.0914214476943016,
0.3870188295841217,
0.4994456470012665,
0.04839175194501877,
0.2484344244003296,
-0.04691104590892792,
-0.00858587771654129,
-0.042521968483924866,
0.009991012513637543,
0.03410010039806366,
0.301649272441864,
0.037407778203487396,
-0.20356158912181854,
-0.4593467712402344,
0.08304337412118912,
0.1522969901561737,
-0.16233479976654053,
0.14331023395061493,
-0.21914926171302795,
-0.1911056935787201,
0.04295622557401657,
-0.07774436473846436,
0.07696885615587234,
0.03753790259361267,
0.2670145630836487,
-0.06996507942676544,
-0.16204123198986053,
-0.12823477387428284,
-0.10020404309034348,
0.21171575784683228,
0.3295581340789795,
-0.13516002893447876,
0.12381705641746521,
-0.34408408403396606,
-0.17252062261104584,
0.16168424487113953,
0.7055357694625854,
0.24357809126377106,
0.07385748624801636,
-0.14838603138923645,
-0.11979096382856369,
-0.047104012221097946,
-0.06439560651779175,
-0.0012835469096899033,
-0.035320136696100235,
0.032289475202560425,
-0.2403731495141983,
0.2085789442062378,
0.3080722391605377,
-0.15022942423820496,
0.2773691415786743,
-0.3652482330799103,
0.006536910310387611,
-0.21325665712356567,
-0.017832256853580475,
0.11850151419639587,
-0.21448764204978943,
0.26357293128967285,
-0.014592394232749939,
-0.2990885376930237,
-0.2286088764667511,
0.15208707749843597,
0.1892995685338974,
-0.023725587874650955,
-0.2824395000934601,
0.15643161535263062,
0.17430834472179413,
0.04856327921152115,
0.46808743476867676,
0.21532666683197021,
-0.1202259436249733,
-0.2345411628484726,
-0.4930034577846527,
0.22052815556526184,
-0.019586186856031418,
-0.17751355469226837,
0.3618711829185486,
-0.19121100008487701,
-0.02286076545715332,
0.06808547675609589,
0.22140878438949585,
-0.08226024359464645,
0.38921239972114563,
-0.119661346077919,
-0.488561749458313,
0.21680814027786255,
0.22447152435779572,
-0.0663537085056305,
0.07099240273237228,
-0.08889620006084442,
0.09947095811367035,
-0.4117532968521118,
0.13047829270362854,
-0.1365586221218109,
0.01977107673883438,
0.5820267796516418,
0.06865432113409042,
0.32394567131996155,
-0.22319257259368896,
0.13619080185890198,
0.01917204260826111,
0.07114748656749725,
-0.06896562874317169,
-0.1414669305086136,
-0.23917636275291443,
0.2240917980670929,
-0.3028235137462616,
-0.08627454936504364,
-0.08138003200292587,
-0.03663730248808861,
-0.22407536208629608,
-0.27855855226516724,
-0.08415095508098602,
0.488600492477417,
-0.36879852414131165,
0.12707403302192688,
-0.02829194813966751,
-0.16115517914295197,
-0.014922244474291801,
0.011514522135257721,
0.1852293461561203,
0.02174868993461132,
-0.3306223154067993,
-0.4215538501739502,
0.1621275097131729,
0.2124294936656952,
-0.2649531364440918,
-0.4130992293357849,
0.2473738044500351,
0.25070393085479736,
0.30173882842063904,
-0.4983380138874054,
-0.10844112932682037,
0.37609946727752686,
-0.09086937457323074,
-0.08110039681196213,
0.017910689115524292,
0.08098486065864563,
-0.0024827830493450165,
0.062387410551309586,
-0.11511987447738647,
0.22926360368728638,
-0.24483618140220642,
-0.09594891965389252,
-0.09141884744167328
] |
https://github.com/huggingface/datasets/issues/5137 | Align task tags in dataset metadata | - Some people do not agree about current "hierarchy":
- symbolic-regression: [yoshitomo-matsubara/srsd-feynman_hard](https://huggingface.co/datasets/yoshitomo-matsubara/srsd-feynman_hard/discussions/2#63614194c12a09b8a31457cc), [yoshitomo-matsubara/srsd-feynman_medium](https://huggingface.co/datasets/yoshitomo-matsubara/srsd-feynman_medium/discussions/2#6361418aeee0d27f04379e43), [yoshitomo-matsubara/srsd-feynman_easy](https://huggingface.co/datasets/yoshitomo-matsubara/srsd-feynman_easy/discussions/2#6361416e00905b1ffb8d0112)
- Why don't we have symbolic-regression task? | ## Describe
Once we have agreed on a common naming for task tags for all open source projects, we should align on them.
## Steps
- [x] Align task tags in canonical datasets
- [x] task_categories: 4 datasets
- [x] task_ids (by @lhoestq)
- [x] Open PRs in community datasets
- [x] task_categories: 451 datasets
- [x] task_ids: 556 datasets
| 21 | Align task tags in dataset metadata
## Describe
Once we have agreed on a common naming for task tags for all open source projects, we should align on them.
## Steps
- [x] Align task tags in canonical datasets
- [x] task_categories: 4 datasets
- [x] task_ids (by @lhoestq)
- [x] Open PRs in community datasets
- [x] task_categories: 451 datasets
- [x] task_ids: 556 datasets
- Some people do not agree about current "hierarchy":
- symbolic-regression: [yoshitomo-matsubara/srsd-feynman_hard](https://huggingface.co/datasets/yoshitomo-matsubara/srsd-feynman_hard/discussions/2#63614194c12a09b8a31457cc), [yoshitomo-matsubara/srsd-feynman_medium](https://huggingface.co/datasets/yoshitomo-matsubara/srsd-feynman_medium/discussions/2#6361418aeee0d27f04379e43), [yoshitomo-matsubara/srsd-feynman_easy](https://huggingface.co/datasets/yoshitomo-matsubara/srsd-feynman_easy/discussions/2#6361416e00905b1ffb8d0112)
- Why don't we have symbolic-regression task? | [
-0.442884624004364,
-0.005620621144771576,
-0.19131524860858917,
0.03644504025578499,
0.07210005074739456,
-0.19481422007083893,
0.32549312710762024,
0.21850533783435822,
0.1132032722234726,
0.2021963894367218,
-0.0025847251527011395,
0.3101688325405121,
-0.02433440089225769,
0.4608309268951416,
-0.07166645675897598,
-0.02670293301343918,
0.16700533032417297,
-0.0011101588606834412,
0.11216084659099579,
0.006990879774093628,
-0.308498740196228,
-0.06287315487861633,
-0.07071057707071304,
-0.08868333697319031,
0.03142854571342468,
-0.13402552902698517,
-0.0707566887140274,
-0.24419355392456055,
-0.1672085076570511,
-0.029286881908774376,
0.10377290844917297,
0.21903125941753387,
0.0736803412437439,
0.34913215041160583,
-0.00010252186621073633,
-0.15040400624275208,
0.3632062077522278,
0.01586952619254589,
-0.1971704512834549,
-0.0543157160282135,
-0.18424314260482788,
-0.21833717823028564,
-0.03218460828065872,
-0.03517525643110275,
0.06617706269025803,
-0.10049435496330261,
0.24273280799388885,
-0.18031494319438934,
0.12346500158309937,
-0.1727559119462967,
0.2618136703968048,
0.25758302211761475,
0.12070682644844055,
-0.12140034884214401,
-0.15485191345214844,
0.44128042459487915,
-0.18768560886383057,
0.3986494839191437,
0.3907705545425415,
0.030457643792033195,
0.1997375786304474,
0.2205936759710312,
-0.07025562971830368,
0.15517312288284302,
0.543026864528656,
-0.24718846380710602,
-0.03149578720331192,
-0.21314093470573425,
-0.1989288032054901,
0.24572864174842834,
0.6942231059074402,
-0.11987747997045517,
-0.1826789379119873,
-0.12669387459754944,
-0.35763871669769287,
-0.20393653213977814,
-0.20030272006988525,
0.29881057143211365,
0.1116025447845459,
0.12493295967578888,
0.22336871922016144,
-0.11903193593025208,
0.056954577565193176,
0.12228338420391083,
-0.0943833440542221,
0.609190821647644,
-0.039978452026844025,
-0.055417172610759735,
0.07314318418502808,
-0.17425280809402466,
-0.13810180127620697,
0.048678457736968994,
0.004734572023153305,
-0.17556126415729523,
-0.3766077160835266,
-0.11179042607545853,
0.017723295837640762,
-0.2956768870353699,
0.295265257358551,
0.3343670964241028,
0.1993531584739685,
-0.14234784245491028,
0.27681899070739746,
0.2006215751171112,
0.09132213890552521,
0.39298686385154724,
0.06610177457332611,
0.25784534215927124,
0.18740350008010864,
0.0032413520384579897,
0.19222420454025269,
0.055093154311180115,
-0.23912684619426727,
-0.015462158247828484,
-0.23765724897384644,
0.22747671604156494,
0.2917105555534363,
0.10723499953746796,
-0.5936089754104614,
-0.016984235495328903,
-0.01997045986354351,
-0.16591696441173553,
-0.14871516823768616,
-0.009447909891605377,
0.011845603585243225,
0.15756773948669434,
-0.17108310759067535,
0.10951552540063858,
-0.07975045591592789,
0.01515213306993246,
-0.21414414048194885,
-0.12089191377162933,
-0.16206605732440948,
-0.0177913811057806,
0.0607181154191494,
-0.08940251171588898,
0.19186387956142426,
0.13925741612911224,
0.1901581883430481,
-0.19285465776920319,
-0.019935782998800278,
-0.1689188927412033,
0.03570277988910675,
0.18783573806285858,
-0.15665893256664276,
-0.22058705985546112,
-0.05734860524535179,
-0.2383665293455124,
-0.35399600863456726,
0.1506870687007904,
-0.1883845031261444,
-0.26372551918029785,
-0.13387329876422882,
0.3577134907245636,
-0.06751249730587006,
-0.06083887815475464,
-0.7426610589027405,
0.3263041377067566,
-0.18549874424934387,
0.18457074463367462,
0.08916415274143219,
0.02485039457678795,
0.20084476470947266,
-0.028813693672418594,
-0.1109648197889328,
0.0499771311879158,
0.16068916022777557,
-0.0029179975390434265,
0.21984510123729706,
0.24938112497329712,
0.18699675798416138,
0.22066247463226318,
0.1147746592760086,
0.31954771280288696,
-0.24491089582443237,
0.15110933780670166,
0.11436882615089417,
-0.613260805606842,
-0.08322665840387344,
0.1598883420228958,
-0.17489412426948547,
-0.16566821932792664,
0.2890045642852783,
0.09667615592479706,
0.36338740587234497,
-0.1269325166940689,
-0.20017462968826294,
0.24591614305973053,
-0.04366117715835571,
-0.013963881880044937,
-0.14760780334472656,
-0.007360499352216721,
0.21226832270622253,
0.258839875459671,
-0.02569710835814476,
-0.2533954381942749,
0.09492580592632294,
-0.03568485751748085,
0.12004305422306061,
0.011100169271230698,
-0.1669841706752777,
0.048252806067466736,
0.45012542605400085,
-0.11197976768016815,
-0.03780696541070938,
-0.2530953884124756,
-0.6098402738571167,
-0.09391982853412628,
0.3668946623802185,
0.20822182297706604,
0.2289109230041504,
-0.34058499336242676,
-0.18661952018737793,
-0.06030759960412979,
-0.24208475649356842,
-0.15748000144958496,
0.1574956625699997,
-0.024250753223896027,
-0.3006061017513275,
-0.5407142043113708,
-0.24689820408821106,
0.26925891637802124,
-0.022734809666872025,
0.3088923990726471,
0.0481470450758934,
0.22100529074668884,
-0.33383238315582275,
0.0033822241239249706,
0.2164081633090973,
0.3217374086380005,
-0.023156963288784027,
0.09603680670261383,
0.12062613666057587,
0.02230893447995186,
0.09209728240966797,
-0.09386494755744934,
0.33097222447395325,
0.5932434797286987,
0.13495729863643646,
-0.379692941904068,
0.00836050696671009,
0.36048322916030884,
-0.039257634431123734,
0.04218471795320511,
-0.04952489584684372,
0.18125467002391815,
-0.06553690135478973,
0.22580808401107788,
-0.17131710052490234,
-0.15376342833042145,
0.13464899361133575,
-0.013404522091150284,
-0.4007990062236786,
0.15002378821372986,
0.3296591341495514,
0.16177129745483398,
0.039756614714860916,
0.23305892944335938,
-0.37255141139030457,
0.0939880982041359,
0.31019338965415955,
0.02752915397286415,
0.11822640895843506,
-0.016263790428638458,
-0.1935364007949829,
-0.05385568365454674,
0.1617494523525238,
-0.09529967606067657,
0.10489493608474731,
0.39686694741249084,
-0.08321142196655273,
-0.0253449734300375,
-0.08262094855308533,
-0.13981202244758606,
0.09898034483194351,
0.18856114149093628,
0.20923414826393127,
0.11618581414222717,
0.21160392463207245,
0.2853998839855194,
0.0164286307990551,
-0.3557806611061096,
-0.17838658392429352,
-0.05689453333616257,
-0.16085970401763916,
-0.12593097984790802,
-0.13525579869747162,
-0.26450106501579285,
-0.2528209686279297,
-0.1551063358783722,
-0.5378048419952393,
-0.31881240010261536,
0.11873776465654373,
-0.18400274217128754,
-0.25544512271881104,
0.369475394487381,
0.41089731454849243,
0.16933220624923706,
-0.31318673491477966,
0.10279805213212967,
-0.3630707561969757,
-0.4544779062271118,
0.10120658576488495,
0.11170686781406403,
0.24320586025714874,
-0.1072000041604042,
0.5191833972930908,
-0.36562302708625793,
0.2665666341781616,
-0.1083836629986763,
-0.49639105796813965,
0.06982532143592834,
-0.1264047473669052,
0.15509511530399323,
-0.029802583158016205,
-0.028298452496528625,
-0.11673206835985184,
-0.24446533620357513,
0.028734436258673668,
0.03949138522148132,
-0.3132442831993103,
-0.20666280388832092,
-0.18902234733104706,
-0.036335691809654236,
-0.19266676902770996,
-0.3422825336456299,
-0.1686575710773468,
-0.5926657319068909,
0.31138595938682556,
-0.3152194917201996,
0.20160871744155884,
0.771072268486023,
-0.42721736431121826,
-0.4129338562488556,
0.10798828303813934,
0.2721446752548218,
-0.1608400046825409,
0.15764391422271729,
-0.06449727714061737,
-0.04923614114522934,
0.0052859485149383545,
-0.10498765110969543,
-0.015907784923911095,
0.11055243015289307,
0.05270855873823166,
0.14840584993362427,
-0.12851031124591827,
0.1952100396156311,
0.12881262600421906,
-0.033391304314136505,
-0.00008207932114601135,
-0.09506313502788544,
0.2065010517835617,
-0.07371027022600174,
-0.10472992807626724,
-0.36152952909469604,
0.017524458467960358,
0.22447961568832397,
0.09723744541406631,
0.2065974771976471,
-0.08803824335336685,
-0.0298334751278162,
0.5811000466346741,
0.11791175603866577,
-0.3146079480648041,
-0.12931668758392334,
0.14556938409805298,
0.1199040561914444,
0.008756063878536224,
-0.18320751190185547,
0.42945703864097595,
0.2029491364955902,
0.047285884618759155,
0.1297699362039566,
0.05005662143230438,
0.2934674024581909,
-0.07812616229057312,
0.16698835790157318,
-0.3986499309539795,
-0.0008476004004478455,
-0.2409047931432724,
-0.10511897504329681,
0.26805299520492554,
0.15051214396953583,
-0.18282373249530792,
-0.08490823209285736,
0.049053389579057693,
0.27072304487228394,
0.6285828948020935,
-0.1007431373000145,
0.08710602670907974,
-0.1931353211402893,
0.162027046084404,
-0.26521924138069153,
0.2808941602706909,
-0.12751437723636627,
0.03518597036600113,
0.1340375393629074,
-0.04851198196411133,
-0.1265536993741989,
0.11924383044242859,
0.2806195020675659,
0.015341358259320259,
0.01724090240895748,
-0.21340329945087433,
0.1874602884054184,
0.0690244659781456,
-0.09280510246753693,
-0.07076708227396011,
-0.07486006617546082,
0.4753683805465698,
0.6000738739967346,
-0.5037587881088257,
-0.24989330768585205,
-0.12506578862667084,
-0.011125432327389717,
0.06194609776139259,
-0.33211156725883484,
-0.08937813341617584,
-0.4091857969760895,
-0.017271488904953003,
0.08589516580104828,
0.5153490900993347,
0.22298964858055115,
0.14624802768230438,
-0.1542033702135086,
-0.22647495567798615,
-0.06204862892627716,
0.20528215169906616,
-0.28893858194351196,
0.28226929903030396,
0.07812647521495819,
0.11147837340831757,
-0.16179820895195007,
0.6120731830596924,
0.5328152179718018,
0.25432342290878296,
-0.13344687223434448,
-0.061751097440719604,
0.1446617990732193,
-0.1902790665626526,
0.41214606165885925,
-0.09868457913398743,
0.32434505224227905,
-0.07156305760145187,
-0.21980619430541992,
0.01941636949777603,
-0.49243855476379395,
0.3333068788051605,
-0.09849759191274643,
0.24642109870910645,
-0.04405830055475235,
-0.3272882103919983,
0.03902045637369156,
0.3487258851528168,
-0.23065713047981262,
0.13603176176548004,
-0.5337660908699036,
-0.06958308070898056,
-0.20364511013031006,
0.1985306590795517,
0.6946457028388977,
-0.08086003363132477,
-0.17585913836956024,
0.2590482532978058,
-0.741039514541626,
0.24292519688606262,
-0.35780274868011475,
0.13432297110557556,
-0.25656723976135254,
-0.27602827548980713,
0.008429335430264473,
-0.1598757654428482,
-0.14822208881378174,
-0.033302150666713715,
-0.19741840660572052,
0.4538351893424988,
0.32346677780151367,
0.39099135994911194,
0.18122227489948273,
0.27203240990638733,
0.16570055484771729,
-0.17506031692028046,
-0.13229891657829285,
0.09826530516147614,
-0.3576139807701111,
0.17057634890079498,
-0.2341567575931549,
-0.04216373339295387,
0.045958805829286575,
-0.0019123628735542297,
-0.1424829065799713,
-0.07184953987598419,
-0.16327372193336487,
0.04572824388742447,
0.11584150791168213,
-0.3615303039550781,
0.08277450501918793,
-0.02267228439450264,
0.16209904849529266,
-0.015662241727113724,
-0.009507289156317711,
0.0973077267408371,
0.1629847288131714,
0.2611570358276367,
-0.05072848126292229,
-0.18297024071216583,
0.27917465567588806,
-0.22559607028961182,
0.20988041162490845,
-0.26437175273895264,
0.09735122323036194,
-0.018918663263320923,
-0.4417487382888794,
0.03838187828660011,
0.01334744319319725,
0.17299999296665192,
0.33790257573127747,
0.0788537859916687,
0.2297753095626831,
-0.038155581802129745,
0.22432178258895874,
0.07806754857301712,
-0.029750782996416092,
0.1804862916469574,
0.0289719607681036,
-0.2769165337085724,
-0.14072741568088531,
-0.10133954137563705,
0.08656071126461029,
-0.2772573232650757,
-0.12089073657989502,
0.03178365156054497,
-0.19376417994499207,
-0.2184045910835266,
-0.011571791023015976,
0.1802968680858612,
-0.29328465461730957,
-0.03281477838754654,
-0.33017829060554504,
-0.22671657800674438,
0.3011023700237274,
0.4900882840156555,
0.44239872694015503,
-0.2397059202194214,
-0.18121567368507385,
-0.04099542647600174,
-0.30793604254722595,
0.2595564126968384,
-0.569678544998169,
0.053113896399736404,
0.13901135325431824,
-0.04164816439151764,
-0.03452366217970848,
0.09433380514383316,
-0.4527566134929657,
-0.23847554624080658,
-0.10678792744874954,
-0.016163885593414307,
-0.036548417061567307,
-0.2134685218334198,
0.05611053481698036,
-0.009310467168688774,
0.08745162189006805,
-0.2084726244211197,
-0.11375723779201508,
-0.2798541486263275,
-0.12601080536842346,
0.04898571968078613,
0.00451507605612278,
0.4294794499874115,
-0.2453252077102661,
-0.0511355921626091,
0.0023860204964876175,
-0.13666613399982452,
0.008349673822522163,
-0.12647077441215515,
-0.0033271238207817078,
0.29548123478889465,
0.25091663002967834,
0.37785452604293823,
0.19985930621623993,
0.12666819989681244,
0.16525423526763916,
0.2918943464756012,
-0.05676884204149246,
0.1258951872587204,
-0.03783823549747467,
0.06628522276878357,
-0.14588725566864014,
0.0759107694029808,
0.3283771276473999,
0.08947140723466873,
0.22843125462532043,
0.04875388741493225,
-0.13318701088428497,
0.10414807498455048,
0.35935863852500916,
0.07324419170618057,
0.03472798317670822,
-0.19790349900722504,
-0.03839542344212532,
0.3511626422405243,
-0.09320015460252762,
0.003044948447495699,
0.028740467503666878,
0.23307271301746368,
0.03769853338599205,
0.2863856554031372,
0.5176072716712952,
0.04582403600215912,
-0.11051107943058014,
0.23532503843307495,
0.4128115177154541,
0.24154528975486755,
0.15035615861415863,
-0.14135579764842987,
0.037863049656152725,
0.023296743631362915,
0.5011804699897766,
0.08553341031074524,
0.27753159403800964,
-0.2580188512802124,
0.17056462168693542,
0.3982597887516022,
0.5342026352882385,
-0.004802744835615158,
0.2227279543876648,
0.30172672867774963,
-0.07781428098678589,
0.019452467560768127,
0.2927621901035309,
-0.029636479914188385,
0.2385994791984558,
0.13310018181800842,
0.001477341167628765,
-0.25848156213760376,
0.11802532523870468,
0.11462537944316864,
-0.08049193024635315,
0.10617333650588989,
-0.18444205820560455,
-0.04349209740757942,
-0.1462637037038803,
-0.08404698967933655,
-0.00782763585448265,
0.009524371474981308,
0.19518378376960754,
-0.07024960219860077,
-0.10965113341808319,
-0.1027003824710846,
-0.06390345096588135,
0.4131215810775757,
0.1735157072544098,
-0.2580709755420685,
0.09793467074632645,
-0.3058429956436157,
0.049181751906871796,
0.034303586930036545,
0.649943470954895,
0.42736566066741943,
0.17056690156459808,
-0.3448840081691742,
-0.20929130911827087,
0.0006306879222393036,
-0.04860588163137436,
-0.163530632853508,
-0.15460054576396942,
-0.04877571761608124,
-0.08955886960029602,
0.3205322027206421,
0.23969298601150513,
-0.11340690404176712,
0.26764950156211853,
-0.3615473508834839,
-0.13891448080539703,
-0.2250165343284607,
0.3418707549571991,
0.060294028371572495,
-0.24673014879226685,
0.3374093174934387,
0.2303093671798706,
-0.4395222067832947,
-0.1714075207710266,
0.1329089105129242,
0.08124015480279922,
-0.13104061782360077,
-0.33109980821609497,
0.16209234297275543,
-0.07268865406513214,
0.008264094591140747,
0.372230589389801,
0.35815879702568054,
-0.18791407346725464,
-0.24198146164417267,
-0.17610055208206177,
0.28282371163368225,
0.02666591852903366,
-0.25637248158454895,
0.31888633966445923,
-0.16321870684623718,
0.08790712803602219,
-0.03266591578722,
0.010741852223873138,
-0.054473791271448135,
0.2772778570652008,
-0.019390590488910675,
-0.5840388536453247,
0.2546086609363556,
0.037313252687454224,
-0.22612264752388,
0.19384321570396423,
0.07029033452272415,
-0.15871639549732208,
0.0035521313548088074,
0.13937541842460632,
-0.367390513420105,
0.1845661848783493,
0.5310577750205994,
0.061530329287052155,
0.3453540503978729,
-0.11237217485904694,
0.24499176442623138,
-0.02057717554271221,
-0.2426411360502243,
0.1156599372625351,
-0.11049392074346542,
-0.3079253137111664,
0.2060781717300415,
-0.4795773923397064,
-0.06970982253551483,
-0.22006554901599884,
-0.04255778715014458,
-0.13154275715351105,
-0.19570183753967285,
-0.0788336992263794,
0.026977989822626114,
-0.20829716324806213,
0.09800944477319717,
-0.13600215315818787,
-0.375250905752182,
0.13202305138111115,
0.1779630184173584,
0.14032188057899475,
-0.07107321918010712,
-0.2956104576587677,
-0.3392561972141266,
0.09616562724113464,
0.2964741289615631,
-0.15502525866031647,
-0.1347855031490326,
0.17464682459831238,
0.18588559329509735,
0.396560937166214,
-0.566767156124115,
-0.09728503227233887,
0.32170018553733826,
-0.0438883975148201,
-0.1252494603395462,
0.1368931084871292,
0.060099344700574875,
-0.08478453755378723,
0.01053968071937561,
-0.29820138216018677,
0.14257240295410156,
-0.3007376790046692,
-0.19445016980171204,
-0.07484981417655945
] |
https://github.com/huggingface/datasets/issues/5137 | Align task tags in dataset metadata | @albertvillanova
Thank you for sharing our voice here!
Yes, we want `symbolic-regression` to be listed as a task. This task has been attracting attention from the machine learning/deep learning community, and unfortunately existing symbolic regression datasets are de-centralized in the community (hosted at individual platforms like author website, github, etc).
It would be great for the community if Hugging Face can support the task. | ## Describe
Once we have agreed on a common naming for task tags for all open source projects, we should align on them.
## Steps
- [x] Align task tags in canonical datasets
- [x] task_categories: 4 datasets
- [x] task_ids (by @lhoestq)
- [x] Open PRs in community datasets
- [x] task_categories: 451 datasets
- [x] task_ids: 556 datasets
| 64 | Align task tags in dataset metadata
## Describe
Once we have agreed on a common naming for task tags for all open source projects, we should align on them.
## Steps
- [x] Align task tags in canonical datasets
- [x] task_categories: 4 datasets
- [x] task_ids (by @lhoestq)
- [x] Open PRs in community datasets
- [x] task_categories: 451 datasets
- [x] task_ids: 556 datasets
@albertvillanova
Thank you for sharing our voice here!
Yes, we want `symbolic-regression` to be listed as a task. This task has been attracting attention from the machine learning/deep learning community, and unfortunately existing symbolic regression datasets are de-centralized in the community (hosted at individual platforms like author website, github, etc).
It would be great for the community if Hugging Face can support the task. | [
-0.27145084738731384,
-0.0036713778972625732,
-0.18218624591827393,
-0.14358840882778168,
0.11106597632169724,
-0.010412119328975677,
0.3569692075252533,
0.09038525819778442,
0.20404158532619476,
0.06712514162063599,
0.06111757457256317,
0.3600502610206604,
-0.16980160772800446,
0.5808401107788086,
0.11453831195831299,
-0.03599611669778824,
0.2095012366771698,
0.07069140672683716,
0.21100351214408875,
0.030715689063072205,
-0.2980513274669647,
0.03434690460562706,
0.03951512277126312,
-0.030451267957687378,
-0.07192167639732361,
-0.16575106978416443,
-0.14941489696502686,
-0.2923337519168854,
-0.09443306177854538,
-0.021013794466853142,
0.1236986517906189,
0.08985002338886261,
-0.09130404889583588,
0.34281882643699646,
-0.00010509030107641593,
-0.22419393062591553,
0.24481642246246338,
-0.028110958635807037,
-0.21272587776184082,
-0.2449813336133957,
-0.22720006108283997,
-0.2768423855304718,
0.10754839330911636,
0.039861612021923065,
0.06864503026008606,
0.010662660002708435,
0.2563565969467163,
-0.15709921717643738,
0.1724957823753357,
-0.1500799059867859,
0.19884438812732697,
0.33280566334724426,
0.02810068055987358,
-0.1360151171684265,
-0.15949440002441406,
0.5809637308120728,
-0.19922979176044464,
0.4530262053012848,
0.27497416734695435,
-0.1367982178926468,
0.30675840377807617,
0.2691340148448944,
-0.008905680850148201,
0.20816189050674438,
0.65069580078125,
-0.10978827625513077,
-0.10616346448659897,
-0.36533138155937195,
-0.24616101384162903,
0.21506130695343018,
0.7251370549201965,
-0.26592156291007996,
-0.16853177547454834,
-0.3055175542831421,
-0.20255602896213531,
-0.2124951332807541,
-0.17898669838905334,
0.3804347813129425,
0.12665456533432007,
0.08789458870887756,
0.2707875370979309,
-0.14279058575630188,
0.0714956670999527,
0.1168927475810051,
-0.03845887631177902,
0.3602639436721802,
-0.04212910309433937,
-0.05951596051454544,
0.15760721266269684,
-0.2101036012172699,
-0.25841471552848816,
0.1942925602197647,
0.038659341633319855,
-0.07316675782203674,
-0.47833263874053955,
-0.07520698010921478,
-0.17600634694099426,
-0.315036416053772,
0.25283193588256836,
0.2890450954437256,
0.1556721180677414,
-0.2059767246246338,
0.20682567358016968,
0.268066942691803,
0.05691014230251312,
0.30788230895996094,
0.1364492028951645,
0.21399684250354767,
0.21314303576946259,
-0.0509350523352623,
0.29443562030792236,
0.025687597692012787,
-0.42721039056777954,
0.05175347626209259,
-0.23273026943206787,
0.19520708918571472,
0.26929616928100586,
0.06797158718109131,
-0.6922334432601929,
-0.0588260143995285,
0.051670074462890625,
-0.13160541653633118,
-0.20146094262599945,
-0.020767152309417725,
0.13518068194389343,
0.057926058769226074,
0.007129468023777008,
0.05920515954494476,
-0.01978329010307789,
0.07172013074159622,
-0.09954562783241272,
-0.09559619426727295,
-0.18589045107364655,
0.14105574786663055,
0.1601434350013733,
-0.1280231475830078,
0.2354256957769394,
0.09588924050331116,
0.260306715965271,
-0.20196391642093658,
-0.04166320711374283,
0.10440696775913239,
0.0658474788069725,
0.2283746302127838,
-0.26706093549728394,
-0.27122682332992554,
0.02356046997010708,
-0.11105643957853317,
-0.3793504536151886,
0.1515168845653534,
-0.11630117148160934,
-0.20120517909526825,
-0.1873144954442978,
0.23975208401679993,
-0.08305813372135162,
-0.04907526820898056,
-0.6020316481590271,
0.42973026633262634,
-0.0836930200457573,
0.2769438922405243,
0.22164496779441833,
0.24477726221084595,
0.11114934086799622,
0.06355474144220352,
-0.07428288459777832,
0.12640252709388733,
0.135859414935112,
-0.13232053816318512,
0.43505698442459106,
0.32922810316085815,
-0.10075240582227707,
0.2971537113189697,
0.10273721814155579,
0.2578612267971039,
-0.27026185393333435,
0.1124524176120758,
-0.06494160741567612,
-0.4827428162097931,
-0.0811181291937828,
0.08555567264556885,
-0.3857784867286682,
-0.26389601826667786,
0.13836561143398285,
0.0668560117483139,
0.2767930030822754,
-0.07103974372148514,
-0.143136665225029,
0.4140847325325012,
-0.09627249836921692,
-0.02748633362352848,
-0.09037119150161743,
-0.12340046465396881,
0.26247450709342957,
0.22396908700466156,
-0.047547172755002975,
-0.16306433081626892,
-0.08108503371477127,
-0.05139920487999916,
-0.03619539737701416,
-0.004820898175239563,
-0.17503976821899414,
0.08075456321239471,
0.5200585722923279,
-0.038349367678165436,
0.08141669631004333,
-0.3233206868171692,
-0.5823978781700134,
-0.18723398447036743,
0.32223817706108093,
0.17457447946071625,
0.1095864325761795,
-0.35984426736831665,
-0.18555590510368347,
0.006774174049496651,
-0.21456365287303925,
-0.09607569873332977,
0.033813074231147766,
-0.03625745326280594,
-0.1764063984155655,
-0.28917476534843445,
-0.2804710865020752,
0.421099990606308,
-0.09689337015151978,
0.24944078922271729,
0.02003517746925354,
0.17901688814163208,
-0.22296695411205292,
0.02043228968977928,
0.09097911417484283,
0.3156811594963074,
0.034624189138412476,
0.09131353348493576,
0.16745802760124207,
0.0066429488360881805,
-0.057775940746068954,
-0.07337722182273865,
0.32626479864120483,
0.6514638662338257,
0.2562597393989563,
-0.3448977768421173,
-0.016444092616438866,
0.31576165556907654,
-0.11189794540405273,
0.0872739627957344,
0.034975841641426086,
0.21401003003120422,
-0.1480008214712143,
0.22738045454025269,
-0.2782352864742279,
-0.035876959562301636,
0.014532426372170448,
0.09987469017505646,
-0.5051936507225037,
0.19302913546562195,
0.32535120844841003,
0.00825355015695095,
-0.016800828278064728,
0.11398573964834213,
-0.27048352360725403,
-0.0009885281324386597,
0.28907912969589233,
-0.05925522372126579,
0.2276459038257599,
0.028343457728624344,
-0.16893604397773743,
0.010967712849378586,
0.12541300058364868,
-0.18051116168498993,
0.14226993918418884,
0.28125452995300293,
-0.2895534336566925,
-0.014177581295371056,
-0.011659556068480015,
-0.05633958429098129,
0.05353926494717598,
0.23414866626262665,
0.14373569190502167,
0.09403104335069656,
0.14782500267028809,
0.22799628973007202,
-0.07577058672904968,
-0.260829895734787,
-0.11439082771539688,
-0.1316705346107483,
-0.17385143041610718,
-0.046504516154527664,
0.08938062191009521,
-0.29374632239341736,
-0.26765701174736023,
-0.13973091542720795,
-0.5918592214584351,
-0.2172727733850479,
0.03383977338671684,
-0.1862144023180008,
-0.21775907278060913,
0.549611508846283,
0.41502970457077026,
0.4084967076778412,
-0.3528590202331543,
0.09020854532718658,
-0.35007473826408386,
-0.30344316363334656,
0.12201594561338425,
0.04782913252711296,
0.11391248553991318,
-0.24878491461277008,
0.5032089948654175,
-0.5158035159111023,
0.32500404119491577,
-0.30674996972084045,
-0.5358034372329712,
0.08495389670133591,
-0.14530450105667114,
0.09708068519830704,
-0.04240110516548157,
-0.025138631463050842,
-0.29889559745788574,
-0.37434208393096924,
0.07194533199071884,
-0.08143371343612671,
-0.3467192053794861,
-0.3663294315338135,
-0.17261584103107452,
0.1495085507631302,
-0.1730852574110031,
-0.173814058303833,
-0.2989456057548523,
-0.519406795501709,
0.47628068923950195,
-0.38923507928848267,
0.08776918053627014,
0.6530343890190125,
-0.5135422945022583,
-0.40427520871162415,
0.0046535637229681015,
0.0937759056687355,
-0.21068429946899414,
0.176825612783432,
-0.05602232739329338,
-0.0987350344657898,
-0.058366093784570694,
-0.08797786384820938,
-0.10983696579933167,
-0.032897721976041794,
-0.03290164843201637,
0.13388001918792725,
-0.2311466634273529,
0.3539735972881317,
0.2046806514263153,
-0.002338618040084839,
-0.09714639186859131,
-0.13068163394927979,
0.18291449546813965,
0.0037386957556009293,
-0.10484590381383896,
-0.5765812993049622,
0.1450694501399994,
0.3679705262184143,
0.04634414240717888,
0.3496384620666504,
-0.17176979780197144,
-0.09193845093250275,
0.5572735667228699,
0.07486234605312347,
-0.35741356015205383,
-0.08652856945991516,
0.13859005272388458,
0.21690784394741058,
0.04429111257195473,
-0.32418379187583923,
0.3333093225955963,
0.18922452628612518,
-0.0523822158575058,
0.15807263553142548,
0.06831926107406616,
0.25114986300468445,
-0.0702202171087265,
0.052015628665685654,
-0.3852052390575409,
0.05955446884036064,
-0.1545732319355011,
-0.11405104398727417,
0.34794682264328003,
0.12937800586223602,
-0.18076781928539276,
-0.17442864179611206,
0.07015767693519592,
0.37996357679367065,
0.6078322529792786,
0.07841713726520538,
0.07946252077817917,
-0.14511485397815704,
-0.0034631118178367615,
-0.31620609760284424,
0.15651921927928925,
-0.2160060852766037,
0.01945153810083866,
-0.019356101751327515,
0.002447333186864853,
-0.16935203969478607,
0.20483116805553436,
0.3820245862007141,
0.13371585309505463,
-0.1683734804391861,
-0.33418408036231995,
0.16014200448989868,
0.23144201934337616,
-0.024871008470654488,
0.11688847839832306,
-0.20832309126853943,
0.3428790271282196,
0.7065936923027039,
-0.4766005277633667,
-0.06345080584287643,
-0.049489572644233704,
0.028301717713475227,
0.033236850053071976,
-0.2898682951927185,
-0.08803868293762207,
-0.48980632424354553,
-0.12049327045679092,
0.10154556483030319,
0.5753635764122009,
0.12208282202482224,
0.42953556776046753,
0.05185956135392189,
-0.12025323510169983,
0.04185779392719269,
0.19189244508743286,
-0.22800301015377045,
0.39654335379600525,
0.17513327300548553,
0.19002296030521393,
0.07662229239940643,
0.5115610361099243,
0.48826345801353455,
0.24936936795711517,
-0.2641904354095459,
-0.31667986512184143,
0.18311533331871033,
-0.18382889032363892,
0.46542438864707947,
0.0012389570474624634,
0.3576764166355133,
-0.05164804309606552,
-0.17270126938819885,
-0.025366902351379395,
-0.6069226264953613,
0.18457762897014618,
-0.012255704030394554,
0.39053645730018616,
-0.08424920588731766,
-0.3383645713329315,
0.050246503204107285,
0.2713056206703186,
-0.20499677956104279,
0.14786773920059204,
-0.6000947952270508,
-0.06896357983350754,
-0.0924539715051651,
0.24984031915664673,
0.7606192827224731,
-0.27507495880126953,
-0.04472619667649269,
0.1552525758743286,
-0.6340888738632202,
0.4265459477901459,
-0.33791881799697876,
0.12652358412742615,
-0.2987614572048187,
-0.2059587836265564,
-0.004877245053648949,
-0.1586606502532959,
-0.07744871824979782,
-0.04959791153669357,
-0.21233190596103668,
0.31768476963043213,
0.2827960252761841,
0.49768880009651184,
0.049274154007434845,
0.3216114938259125,
0.27031198143959045,
-0.3278493881225586,
-0.16510994732379913,
0.047085270285606384,
-0.29917216300964355,
0.33668622374534607,
-0.18348369002342224,
-0.06738319247961044,
0.10204963386058807,
-0.02090369537472725,
-0.25476139783859253,
-0.14551889896392822,
-0.13164253532886505,
0.010525008663535118,
0.057288117706775665,
-0.4352220892906189,
0.11570140719413757,
0.05672553926706314,
0.23677873611450195,
-0.08138681948184967,
-0.1105719655752182,
0.11884789168834686,
0.12297874689102173,
0.24767476320266724,
-0.08157885074615479,
-0.2326740175485611,
0.18055076897144318,
-0.19906297326087952,
0.22540244460105896,
-0.24703460931777954,
0.1369370073080063,
0.07303260266780853,
-0.4988993704319,
0.12066268920898438,
0.059141844511032104,
0.06559041142463684,
0.2206968367099762,
0.02152726799249649,
0.40234625339508057,
-0.04710312932729721,
0.1881687194108963,
0.09470953792333603,
-0.06318696588277817,
-0.059778325259685516,
-0.05500584468245506,
-0.20879194140434265,
-0.1698722094297409,
-0.24979084730148315,
-0.09554200619459152,
-0.4880308210849762,
-0.0011068135499954224,
0.020530138164758682,
-0.1131233349442482,
-0.18285512924194336,
0.06993495672941208,
0.22933803498744965,
-0.35003969073295593,
-0.06056811287999153,
-0.10156785696744919,
-0.30136314034461975,
0.13532991707324982,
0.5116844773292542,
0.6023690104484558,
-0.2748867869377136,
-0.09865044057369232,
0.02942279726266861,
-0.3435667157173157,
0.22546634078025818,
-0.4446498453617096,
-0.004160016775131226,
0.1982795000076294,
-0.189392551779747,
0.11321069300174713,
0.027862053364515305,
-0.3697608411312103,
-0.21251274645328522,
-0.07279916107654572,
-0.00904514268040657,
0.01577106863260269,
-0.21237421035766602,
0.14424949884414673,
-0.004633820615708828,
0.03863583505153656,
-0.058888114988803864,
-0.0779702439904213,
-0.19608041644096375,
-0.0902557373046875,
0.08380460739135742,
0.005313664674758911,
0.4471666216850281,
-0.18401183187961578,
-0.02466629631817341,
-0.11710025370121002,
-0.14463169872760773,
-0.07363288104534149,
-0.07608295232057571,
-0.019044488668441772,
0.3498781621456146,
0.20467637479305267,
0.24674203991889954,
0.3132367730140686,
0.09197704493999481,
0.1273796111345291,
0.2302771359682083,
0.10469034314155579,
0.14910674095153809,
-0.05872688069939613,
0.1923637092113495,
-0.144012913107872,
0.15872997045516968,
0.22283263504505157,
0.028008192777633667,
0.12527206540107727,
-0.0919356644153595,
-0.17400191724300385,
0.03295121341943741,
0.39575207233428955,
0.010998975485563278,
-0.006558713968843222,
-0.16145049035549164,
0.07584888488054276,
0.2896520793437958,
-0.13669198751449585,
-0.020521482452750206,
0.1130182147026062,
0.2088903933763504,
-0.013079483062028885,
0.2794446349143982,
0.5804911851882935,
0.055256932973861694,
-0.1138104796409607,
0.19872188568115234,
0.6084442138671875,
0.10509851574897766,
0.2078269124031067,
-0.07404810190200806,
0.1612910032272339,
0.18667562305927277,
0.44614431262016296,
0.23674504458904266,
0.2394101917743683,
-0.4099651575088501,
-0.002231001853942871,
0.17320212721824646,
0.5084884166717529,
0.06451115757226944,
0.35851743817329407,
0.22709284722805023,
-0.04325416311621666,
-0.001730412244796753,
0.20867183804512024,
0.054552532732486725,
0.2426832914352417,
0.24631837010383606,
-0.10101187229156494,
-0.3523591160774231,
0.11714790016412735,
0.11725662648677826,
-0.15592575073242188,
0.09524095058441162,
-0.0718143954873085,
-0.03982421010732651,
0.09314240515232086,
-0.11440195143222809,
0.19820636510849,
-0.20207743346691132,
0.36622413992881775,
-0.02979506552219391,
0.10488072782754898,
0.009789668023586273,
-0.14453205466270447,
0.39664503931999207,
0.19342172145843506,
-0.20156234502792358,
0.07959017157554626,
-0.3646150827407837,
-0.043130822479724884,
0.19661740958690643,
0.5352569818496704,
0.35301876068115234,
0.008704150095582008,
-0.205924853682518,
0.014352355152368546,
-0.2052343338727951,
0.0349496528506279,
-0.08975484222173691,
-0.042261458933353424,
0.08729925006628036,
-0.017472825944423676,
0.19760899245738983,
0.19535090029239655,
-0.05527011305093765,
0.1747349053621292,
-0.40450483560562134,
-0.0440041683614254,
-0.2594137191772461,
0.2141823172569275,
-0.027336914092302322,
-0.2302246391773224,
0.19323857128620148,
0.26319214701652527,
-0.33443683385849,
-0.039998192340135574,
0.2175692468881607,
0.2012980431318283,
-0.21250391006469727,
-0.17953556776046753,
0.1106218546628952,
-0.05745044723153114,
-0.012561548501253128,
0.3893470764160156,
0.5065084099769592,
-0.18913055956363678,
-0.13166376948356628,
-0.06646019220352173,
0.32796385884284973,
0.030010690912604332,
-0.24549798667430878,
0.36279764771461487,
-0.2051653414964676,
0.24807700514793396,
0.04210794344544411,
0.040543332695961,
-0.031295955181121826,
0.14982928335666656,
-0.09727911651134491,
-0.6151627898216248,
0.24604257941246033,
-0.07055562734603882,
-0.023200789466500282,
0.2809036374092102,
0.17306679487228394,
-0.26253974437713623,
0.1736556440591812,
0.03162503242492676,
-0.45518958568573,
0.12959346175193787,
0.31805121898651123,
0.12442220002412796,
0.30380916595458984,
-0.11380170285701752,
0.12420523166656494,
0.00029221177101135254,
-0.33638831973075867,
0.2155301719903946,
-0.14424975216388702,
-0.36443570256233215,
0.21023806929588318,
-0.3792744278907776,
-0.020357593894004822,
-0.3591268062591553,
-0.027748409658670425,
-0.28181976079940796,
-0.09444627910852432,
-0.06896901875734329,
-0.13765180110931396,
-0.13666237890720367,
0.05013458430767059,
0.0036055520176887512,
-0.4198988080024719,
0.20820282399654388,
0.21385705471038818,
0.16258707642555237,
-0.1390191614627838,
-0.1999558061361313,
-0.18841886520385742,
0.1915174126625061,
0.04413312301039696,
-0.21710717678070068,
0.00023895874619483948,
0.19365926086902618,
0.14977127313613892,
0.3033059239387512,
-0.7284004092216492,
-0.038329824805259705,
0.3051653206348419,
0.013940708711743355,
-0.07678183913230896,
0.006993705872446299,
0.016480688005685806,
-0.08797146379947662,
0.028019282966852188,
-0.18257445096969604,
0.08437216281890869,
-0.26207196712493896,
-0.11325386166572571,
-0.18499909341335297
] |
https://github.com/huggingface/datasets/issues/5134 | Raise ImportError instead of OSError if required extraction library is not installed | hey @mariosasko , i made a pr for this issue. Could you please review it.
Also i found multiple `OSError` in `extract.py` file which i thought could be replaced too but wasn't sure about them.
Please do tell if that also needs to be done. | According to the official Python docs, `OSError` should be thrown in the following situations:
> This exception is raised when a system function returns a system-related error, including I/O failures such as “file not found” or “disk full” (not for illegal argument types or other incidental errors).
Hence, it makes more sense to raise `ImportError` instead of `OSError` when the required extraction/decompression library is not installed. | 45 | Raise ImportError instead of OSError if required extraction library is not installed
According to the official Python docs, `OSError` should be thrown in the following situations:
> This exception is raised when a system function returns a system-related error, including I/O failures such as “file not found” or “disk full” (not for illegal argument types or other incidental errors).
Hence, it makes more sense to raise `ImportError` instead of `OSError` when the required extraction/decompression library is not installed.
hey @mariosasko , i made a pr for this issue. Could you please review it.
Also i found multiple `OSError` in `extract.py` file which i thought could be replaced too but wasn't sure about them.
Please do tell if that also needs to be done. | [
0.13113847374916077,
-0.10024960339069366,
-0.0478091761469841,
-0.041649237275123596,
-0.04420727491378784,
-0.15195387601852417,
0.048548296093940735,
0.06685023009777069,
0.18493899703025818,
0.42027950286865234,
0.11480434983968735,
0.295774906873703,
-0.12839074432849884,
0.010311676189303398,
-0.2630053162574768,
-0.08474817872047424,
-0.09180422872304916,
0.341336190700531,
0.23300841450691223,
0.047511301934719086,
-0.4639506936073303,
0.42494210600852966,
-0.32730814814567566,
0.13471552729606628,
0.23258478939533234,
0.1514151394367218,
0.1103135347366333,
0.3746432065963745,
-0.41612598299980164,
-0.5704666376113892,
0.09819264709949493,
-0.28191959857940674,
0.305696040391922,
0.4182382822036743,
-0.00010662971180863678,
-0.10338592529296875,
0.16156168282032013,
-0.16549812257289886,
-0.09710723161697388,
-0.30100876092910767,
0.1788860559463501,
-0.4777420163154602,
0.1089475154876709,
-0.3899897634983063,
0.25867563486099243,
-0.11330749094486237,
-0.0044716354459524155,
0.13283930718898773,
0.3919293284416199,
0.5115482211112976,
0.2810899019241333,
0.32402312755584717,
0.43979668617248535,
0.08181782811880112,
0.03255928307771683,
0.0063136667013168335,
-0.053454190492630005,
0.4227759540081024,
0.06628197431564331,
-0.09563455730676651,
0.04193104803562164,
0.054900821298360825,
-0.14444461464881897,
-0.04084261879324913,
-0.04190091788768768,
-0.08498109132051468,
0.1616443395614624,
-0.4650653898715973,
-0.3437512218952179,
0.11287499219179153,
0.07249540090560913,
0.15626490116119385,
-0.3683120012283325,
-0.01770997792482376,
0.11750735342502594,
-0.5014912486076355,
0.3022943437099457,
0.15305128693580627,
0.05465707555413246,
0.3786054849624634,
0.4021356403827667,
-0.2505926489830017,
-0.4088048040866852,
0.033237118273973465,
-0.40091297030448914,
0.17736247181892395,
-0.2019919455051422,
-0.06834299117326736,
0.45573705434799194,
-0.11121973395347595,
-0.11309774219989777,
0.058896198868751526,
0.08276447653770447,
-0.006668468005955219,
-0.011722948402166367,
-0.1001579612493515,
0.10519716143608093,
-0.24610677361488342,
-0.10602312535047531,
-0.14474327862262726,
-0.24471573531627655,
-0.05441233515739441,
-0.035545799881219864,
0.22867843508720398,
-0.09968534111976624,
0.17310835421085358,
0.26509636640548706,
0.020271938294172287,
0.2798152565956116,
0.22862307727336884,
0.11852476000785828,
-0.17668339610099792,
0.06659062206745148,
0.007005057297646999,
-0.12156039476394653,
0.3219413459300995,
0.3471072316169739,
-0.25759947299957275,
-0.17358902096748352,
0.04757760465145111,
-0.2887937128543854,
-0.0882708877325058,
-0.04108366370201111,
-0.03373595327138901,
0.1145130917429924,
0.16017085313796997,
0.31015509366989136,
0.45637762546539307,
-0.06085878610610962,
-0.09051989018917084,
0.04982571303844452,
0.4551409184932709,
-0.023645415902137756,
-0.0778750330209732,
-0.0313478484749794,
-0.280856728553772,
0.28282880783081055,
0.07069744914770126,
-0.04468754678964615,
-0.007022585719823837,
0.08722848445177078,
-0.03910081833600998,
0.11186644434928894,
0.3353387713432312,
0.07709267735481262,
-0.09864340722560883,
0.4381673336029053,
-0.052860189229249954,
0.009609110653400421,
0.3334171175956726,
-0.24399656057357788,
-0.5460802912712097,
-0.25817370414733887,
0.27380988001823425,
-0.10859140753746033,
-0.10221084952354431,
0.01593814045190811,
-0.138943150639534,
-0.04611501842737198,
-0.156680166721344,
0.1437729150056839,
-0.3694620728492737,
0.12708055973052979,
-0.2747887074947357,
-0.10474435985088348,
0.14647111296653748,
-0.3251207768917084,
0.18666937947273254,
-0.2928534150123596,
-0.2154836505651474,
0.47611182928085327,
0.21303178369998932,
-0.21086223423480988,
0.14239521324634552,
-0.38873982429504395,
0.0652095377445221,
0.07123860716819763,
-0.32162776589393616,
-0.01892787776887417,
-0.004293312318623066,
-0.1624642014503479,
0.4532097280025482,
0.16093474626541138,
-0.11865749210119247,
-0.12514448165893555,
-0.013371182605624199,
-0.1407621204853058,
0.2768908739089966,
0.00009815581142902374,
-0.034759461879730225,
-0.1380365639925003,
-0.18179726600646973,
0.26541686058044434,
-0.02759488858282566,
0.27064982056617737,
0.1561747044324875,
-0.11040551215410233,
-0.06541132181882858,
0.2728115916252136,
-0.08150789141654968,
-0.39611580967903137,
0.09099216759204865,
0.4728251099586487,
-0.12388749420642853,
-0.1382158100605011,
0.0687989592552185,
0.5823750495910645,
0.2828465700149536,
-0.23548543453216553,
0.46016377210617065,
-0.3053233027458191,
-0.019795484840869904,
-0.08659712225198746,
0.05197909474372864,
-0.26347994804382324,
-0.09189598262310028,
0.14310023188591003,
-0.059183523058891296,
0.2945612668991089,
0.3902110457420349,
-0.2383420616388321,
0.014364751055836678,
-0.45603540539741516,
0.3320525288581848,
-0.1812163144350052,
0.09651528298854828,
-0.23735271394252777,
-0.026073284447193146,
-0.2016078233718872,
-0.0849544033408165,
-0.04092709720134735,
-0.09924101084470749,
-0.19972047209739685,
0.14229866862297058,
0.10657914727926254,
-0.21067683398723602,
-0.6074067950248718,
-0.174099400639534,
0.14981669187545776,
0.10559742152690887,
0.08392949402332306,
0.46356669068336487,
0.013355347327888012,
0.197553813457489,
0.2661683261394501,
0.3752567768096924,
0.31856584548950195,
-0.024902254343032837,
0.041224122047424316,
0.15308800339698792,
0.08076221495866776,
0.05013877525925636,
-0.032409023493528366,
-0.2593298554420471,
-0.07086381316184998,
-0.07801155745983124,
-0.04450064152479172,
-0.19849814474582672,
0.2910599708557129,
-0.3384554982185364,
0.3697715699672699,
0.14300216734409332,
0.03364996984601021,
0.44052061438560486,
0.13961780071258545,
0.027764942497015,
0.10429123044013977,
0.22283490002155304,
0.5190389752388,
0.1561003476381302,
-0.20116204023361206,
-0.11009793728590012,
0.20557506382465363,
-0.19182296097278595,
0.19822357594966888,
0.16592727601528168,
0.15054580569267273,
0.12039343267679214,
-0.27790945768356323,
-0.014168054796755314,
-0.344824880361557,
-0.30805549025535583,
-0.3270491063594818,
0.2538950443267822,
-0.08042711019515991,
-0.1155424639582634,
-0.25724276900291443,
-0.27134382724761963,
-0.14490003883838654,
0.024895288050174713,
-0.22998476028442383,
-0.21135950088500977,
0.15491598844528198,
0.07810038328170776,
-0.2322024255990982,
-0.07392046600580215,
0.3029751479625702,
-0.34397369623184204,
-0.11975866556167603,
-0.18847420811653137,
0.2968582212924957,
0.19664061069488525,
-0.040478095412254333,
0.14408248662948608,
-0.16904492676258087,
-0.22962500154972076,
0.13849742710590363,
-0.30157768726348877,
-0.013389771804213524,
-0.23545756936073303,
-0.25371700525283813,
0.04797941818833351,
-0.03363516926765442,
-0.17819836735725403,
0.16028156876564026,
0.09930907189846039,
0.2648758888244629,
-0.46595877408981323,
0.04744817316532135,
-0.3010109066963196,
-0.10486828535795212,
0.23717868328094482,
0.11059070378541946,
0.23099972307682037,
-0.21436366438865662,
-0.28167596459388733,
-0.47282275557518005,
-0.6112136840820312,
0.1123424619436264,
-0.010836554691195488,
0.09971752762794495,
0.3239208161830902,
0.10772283375263214,
0.18364228308200836,
0.14758418500423431,
0.0723489373922348,
0.17400863766670227,
-0.2419411987066269,
0.04332708567380905,
-0.0014176442055031657,
-0.09895135462284088,
0.056840065866708755,
-0.10273876786231995,
-0.1540924608707428,
-0.15342803299427032,
-0.19776283204555511,
-0.5127963423728943,
-0.1471375972032547,
0.14848163723945618,
-0.025085769593715668,
0.21561291813850403,
0.2212228924036026,
-0.02022445574402809,
-0.07559248059988022,
0.21894147992134094,
-0.0453336201608181,
0.1378379613161087,
0.3494010865688324,
0.15941429138183594,
0.18731746077537537,
0.3424965441226959,
-0.0003424733877182007,
0.15577319264411926,
-0.1754171997308731,
0.16485893726348877,
0.34483054280281067,
0.2612690329551697,
0.44640281796455383,
0.007456772029399872,
-0.27727481722831726,
-0.2955850660800934,
0.13071367144584656,
-0.23483127355575562,
0.110164575278759,
-0.10976194590330124,
0.017914554104208946,
-0.21891924738883972,
-0.36377909779548645,
-0.20889005064964294,
-0.18291302025318146,
0.08340439945459366,
0.25080400705337524,
0.12553928792476654,
-0.2307991236448288,
-0.08066467195749283,
0.13522008061408997,
0.275815486907959,
0.11083735525608063,
0.5423311591148376,
0.49835798144340515,
-0.01339777559041977,
-0.268596887588501,
-0.4469701945781708,
-0.31068411469459534,
0.24790257215499878,
0.10026068240404129,
-0.05804239213466644,
0.22691620886325836,
-0.17507511377334595,
-0.15570516884326935,
0.06566830724477768,
0.0011683404445648193,
0.0907747745513916,
-0.424116313457489,
0.06140827760100365,
-0.3203357756137848,
0.038362957537174225,
-0.1481548547744751,
-0.23833341896533966,
0.046996328979730606,
0.2766276001930237,
-0.058159857988357544,
-0.20865166187286377,
-0.009860912337899208,
0.23270852863788605,
0.5577737092971802,
-0.08064144849777222,
-0.35537734627723694,
-0.20572499930858612,
-0.31701645255088806,
-0.5351426601409912,
-0.06801573187112808,
0.17498432099819183,
0.11106232553720474,
-0.03711310774087906,
0.08329492807388306,
0.0672522559762001,
-0.23075872659683228,
0.23263537883758545,
-0.04573896527290344,
0.1846787929534912,
-0.27187228202819824,
-0.06435069441795349,
-0.20705515146255493,
-0.07998932898044586,
0.6527880430221558,
0.13989558815956116,
-0.3358888030052185,
-0.33388492465019226,
-0.14900043606758118,
0.04127631336450577,
0.10461390763521194,
0.1491774171590805,
-0.0673176720738411,
0.38244810700416565,
-0.3669864535331726,
0.11746159195899963,
0.12816914916038513,
-0.21959970891475677,
0.00478324992582202,
-0.16246138513088226,
0.18109793961048126,
0.08250214904546738,
0.043544284999370575,
0.049469832330942154,
0.205229714512825,
-0.05972004681825638,
0.4228857755661011,
-0.13711585104465485,
0.3676089644432068,
-0.30946987867355347,
0.5878282189369202,
-0.041444167494773865,
-0.17693203687667847,
0.35522252321243286,
0.0472775399684906,
0.5459858775138855,
-0.07950076460838318,
0.2716248035430908,
-0.25451794266700745,
-0.21057190001010895,
0.046038687229156494,
0.022862348705530167,
0.3158406913280487,
-0.182068333029747,
-0.3284592032432556,
0.3067089915275574,
-0.2866799235343933,
-0.02967362478375435,
0.03015211597084999,
0.4587897062301636,
-0.2949666380882263,
-0.22227418422698975,
-0.5491728782653809,
0.1513499617576599,
0.22805610299110413,
0.49065226316452026,
-0.02895987778902054,
-0.05605342239141464,
0.2512306272983551,
-0.13642743229866028,
-0.018941782414913177,
-0.0006578303873538971,
-0.08966844528913498,
0.3479461669921875,
-0.04612943157553673,
-0.1586216390132904,
-0.0017911940813064575,
0.3423275053501129,
-0.06564278900623322,
0.08910661935806274,
0.1719924807548523,
-0.22999759018421173,
0.03251432999968529,
-0.29845985770225525,
0.09248882532119751,
0.13182200491428375,
0.15758754312992096,
-0.1627398282289505,
-0.11042815446853638,
0.2637512683868408,
-0.34902423620224,
-0.4605920910835266,
0.28655704855918884,
0.14329087734222412,
0.04736504703760147,
0.059154875576496124,
-0.24841716885566711,
-0.011227086186408997,
-0.11520399153232574,
-0.2515813410282135,
0.16373494267463684,
0.18606412410736084,
-0.19820962846279144,
0.362233966588974,
-0.3962390124797821,
-0.24612842500209808,
-0.1395873725414276,
-0.019981853663921356,
0.14761140942573547,
-0.28375139832496643,
0.3130398392677307,
-0.15425926446914673,
-0.02391938306391239,
-0.08997603505849838,
0.20792096853256226,
-0.20865902304649353,
0.012033827602863312,
0.26159703731536865,
0.16940747201442719,
-0.04865381121635437,
0.14948590099811554,
-0.2566060721874237,
0.362895131111145,
-0.08230439573526382,
-0.3096276521682739,
-0.2894681990146637,
-0.23522022366523743,
0.15611019730567932,
0.021235397085547447,
-0.015972908586263657,
0.040959760546684265,
0.03182635083794594,
-0.09566646069288254,
-0.2368699312210083,
-0.35308945178985596,
0.14251521229743958,
0.026466911658644676,
0.08309895545244217,
0.07734014093875885,
-0.11146888881921768,
0.09025384485721588,
0.15728668868541718,
0.13812997937202454,
0.20192959904670715,
-0.1204596757888794,
-0.15826201438903809,
0.06915050745010376,
0.09326004981994629,
0.013261771760880947,
-0.07354020327329636,
0.43944159150123596,
-0.39277613162994385,
-0.01676008105278015,
0.06338085979223251,
-0.06252980977296829,
0.1760464608669281,
-0.191107377409935,
0.20263716578483582,
0.00015819817781448364,
0.20749464631080627,
-0.17624244093894958,
0.17213065922260284,
-0.4062281548976898,
0.35796892642974854,
0.010255463421344757,
0.1783384084701538,
-0.13046100735664368,
0.02109060436487198,
-0.029184572398662567,
-0.08947386592626572,
-0.29132652282714844,
0.14378413558006287,
0.11193770915269852,
0.1911332756280899,
-0.13892392814159393,
-0.1159597858786583,
0.20199628174304962,
0.27984100580215454,
-0.06450620293617249,
0.03308090567588806,
0.08079466968774796,
0.25519534945487976,
-0.13423791527748108,
0.07042360305786133,
0.0051171015948057175,
-0.16312791407108307,
0.10501530766487122,
0.49999016523361206,
0.0724627822637558,
0.13793790340423584,
0.669235348701477,
0.1123899444937706,
0.22467906773090363,
0.5023028254508972,
0.07598774135112762,
0.19382035732269287,
-0.37070944905281067,
0.054001931101083755,
0.04781636223196983,
-0.23057886958122253,
0.46363914012908936,
-0.24386407434940338,
-0.2826137840747833,
0.20931598544120789,
0.0908694863319397,
0.01300051063299179,
0.06199247017502785,
-0.2892075479030609,
-0.06782251596450806,
-0.030384838581085205,
0.129213348031044,
-0.14524716138839722,
0.3265834450721741,
0.0760488361120224,
-0.5244062542915344,
0.06077815592288971,
-0.04410307854413986,
0.01975451409816742,
-0.07735729962587357,
0.3603208661079407,
0.2936277687549591,
0.030781686305999756,
-0.05986761301755905,
-0.0973132848739624,
0.28727877140045166,
-0.023986749351024628,
-0.25866931676864624,
0.004753373563289642,
-0.1798391491174698,
0.0632968544960022,
-0.23372530937194824,
0.00471978634595871,
0.22300446033477783,
-0.22139808535575867,
-0.3052280843257904,
0.4695870876312256,
0.06317748129367828,
0.09615972638130188,
0.1800665706396103,
0.5544944405555725,
0.3619048595428467,
0.04536589980125427,
-0.06616131961345673,
-0.050433021038770676,
0.06297735869884491,
0.012148275971412659,
-0.09977461397647858,
-0.21820244193077087,
0.5179454684257507,
0.16259624063968658,
0.22392095625400543,
-0.3024710416793823,
-0.26586347818374634,
0.16691459715366364,
0.08879758417606354,
-0.23516136407852173,
0.09187091886997223,
0.30470892786979675,
0.006829455494880676,
-0.2638512849807739,
-0.030344434082508087,
-0.1867850124835968,
-0.040402211248874664,
0.026819396764039993,
0.20415306091308594,
-0.1449054777622223,
0.1498657464981079,
0.12079255282878876,
-0.12996914982795715,
-0.2936766743659973,
0.5426844358444214,
0.03941139206290245,
-0.4456427991390228,
0.0381896048784256,
-0.30656033754348755,
0.0989493727684021,
-0.06729662418365479,
-0.147339329123497,
-0.10349234938621521,
-0.06602708995342255,
0.027615971863269806,
0.2916598916053772,
-0.008684173226356506,
0.06617925316095352,
0.044584281742572784,
-0.3026127517223358,
-0.36010992527008057,
-0.18902593851089478,
0.548293948173523,
-0.3065659701824188,
0.036270901560783386,
-0.2754843235015869,
-0.05228658393025398,
-0.34564414620399475,
0.15160992741584778,
-0.24283663928508759,
0.016703978180885315,
0.11570698022842407,
0.1957000344991684,
0.5018224716186523,
0.274696946144104,
0.05737311765551567,
-0.08785632997751236,
-0.30602383613586426,
0.5449920892715454,
0.0369734950363636,
-0.2022220641374588,
0.11921460926532745,
0.20064641535282135,
0.7875316143035889,
-0.016217490658164024,
-0.23650099337100983,
-0.41062846779823303,
0.6352238059043884,
-0.03923160955309868,
-0.24557390809059143,
-0.3574606776237488,
0.4875240623950958,
0.11497469991445541,
-0.05273997038602829,
0.007625696249306202,
0.0851527601480484,
0.2124524861574173,
0.16019129753112793,
-0.42464375495910645,
-0.1843203902244568,
0.2082953304052353,
0.2209165245294571,
0.03144380450248718,
-0.01174837350845337,
0.2358788549900055,
-0.056262336671352386,
0.03965509310364723,
-0.42256486415863037,
-0.048050154000520706,
0.11229805648326874,
-0.09945680946111679,
-0.2085578888654709,
0.03644104674458504,
-0.03806310147047043,
-0.13959616422653198,
0.05904267355799675,
0.0019343271851539612,
-0.017154507339000702,
-0.14710351824760437,
0.005681794136762619,
0.13204723596572876
] |
https://github.com/huggingface/datasets/issues/5133 | Tensor operation not functioning in dataset mapping | Hi! The Torch ops in your snippet are not equivalent to the NumPy ones, hence the difference. You can get the same behavior by replacing the line `feature = torch.mean(feature, dim=1)` with `feature = feature.squeeze().mean(1)` . | ## Describe the bug
I'm doing a torch.mean() operation in data preprocessing, and it's not working.
## Steps to reproduce the bug
```
from transformers import pipeline
import torch
import numpy as np
from datasets import load_dataset
device = 'cuda:0'
raw_dataset = load_dataset("glue", "sst2")
feature_extraction = pipeline('feature-extraction', 'bert-base-uncased', device=device)
def extracted_data(examples):
# feature = torch.tensor(feature_extraction(examples['sentence'], batch_size=16), device=device)
# feature = torch.mean(feature, dim=1)
feature = np.asarray(feature_extraction(examples['sentence'], batch_size=16)).squeeze().mean(1)
print(feature.shape)
return {'feature': feature}
extracted_dataset = raw_dataset.map(extracted_data, batched=True, batch_size=16)
```
## Results
When running with torch.mean(), the shape printed out is [16, seq_len, 768], which is exactly the same before the operation. While numpy works just fine, which gives [16, 768].
## Environment info
- `datasets` version: 2.6.1
- Platform: Linux-4.4.0-142-generic-x86_64-with-glibc2.31
- Python version: 3.10.6
- PyArrow version: 9.0.0
- Pandas version: 1.5.0
| 36 | Tensor operation not functioning in dataset mapping
## Describe the bug
I'm doing a torch.mean() operation in data preprocessing, and it's not working.
## Steps to reproduce the bug
```
from transformers import pipeline
import torch
import numpy as np
from datasets import load_dataset
device = 'cuda:0'
raw_dataset = load_dataset("glue", "sst2")
feature_extraction = pipeline('feature-extraction', 'bert-base-uncased', device=device)
def extracted_data(examples):
# feature = torch.tensor(feature_extraction(examples['sentence'], batch_size=16), device=device)
# feature = torch.mean(feature, dim=1)
feature = np.asarray(feature_extraction(examples['sentence'], batch_size=16)).squeeze().mean(1)
print(feature.shape)
return {'feature': feature}
extracted_dataset = raw_dataset.map(extracted_data, batched=True, batch_size=16)
```
## Results
When running with torch.mean(), the shape printed out is [16, seq_len, 768], which is exactly the same before the operation. While numpy works just fine, which gives [16, 768].
## Environment info
- `datasets` version: 2.6.1
- Platform: Linux-4.4.0-142-generic-x86_64-with-glibc2.31
- Python version: 3.10.6
- PyArrow version: 9.0.0
- Pandas version: 1.5.0
Hi! The Torch ops in your snippet are not equivalent to the NumPy ones, hence the difference. You can get the same behavior by replacing the line `feature = torch.mean(feature, dim=1)` with `feature = feature.squeeze().mean(1)` . | [
-0.31599900126457214,
-0.485085666179657,
0.001089518889784813,
0.2954884171485901,
0.22902525961399078,
-0.08756133913993835,
0.5998207330703735,
0.16039983928203583,
-0.09626495838165283,
0.3030318319797516,
-0.0017559886910021305,
0.3639741837978363,
0.14919818937778473,
-0.37007108330726624,
0.14672823250293732,
-0.221421480178833,
0.09559669345617294,
-0.14499463140964508,
-0.1334468573331833,
-0.03167639300227165,
-0.17493712902069092,
0.008019855245947838,
-0.405235230922699,
0.12178881466388702,
-0.45548170804977417,
0.10291462391614914,
0.24969416856765747,
-0.1720876693725586,
0.2104334533214569,
0.10358850657939911,
0.3301905393600464,
-0.1600843071937561,
0.1306731104850769,
0.9140843749046326,
-0.00012460043944884092,
0.05028054118156433,
0.2824940085411072,
-0.06950914114713669,
-0.0515793040394783,
-0.31987470388412476,
0.28044623136520386,
-0.3681700825691223,
-0.03375440090894699,
-0.3328508138656616,
-0.16176602244377136,
0.4081903398036957,
-0.035262733697891235,
-0.5651426315307617,
0.25987476110458374,
0.3607672452926636,
0.07571602612733841,
0.32822954654693604,
0.04048151150345802,
-0.01155663188546896,
0.11322995275259018,
0.4806886315345764,
-0.18364368379116058,
-0.11411456763744354,
0.21930629014968872,
-0.0723593607544899,
0.13207286596298218,
0.19119861721992493,
-0.1919172704219818,
0.10698352754116058,
0.10469961166381836,
0.3496176600456238,
-0.1537603735923767,
-0.3111778199672699,
0.11964676529169083,
0.13262516260147095,
0.271354615688324,
-0.3044854402542114,
-0.2669256627559662,
-0.07631939649581909,
-0.3995588421821594,
-0.22703076899051666,
0.17724329233169556,
0.2989135980606079,
-0.14206254482269287,
-0.19130903482437134,
-0.11741167306900024,
0.2796076834201813,
-0.06542787700891495,
0.20720301568508148,
-0.21786688268184662,
0.24531017243862152,
-0.07403495907783508,
0.18027453124523163,
-0.014177452772855759,
-0.1169862449169159,
0.2915559411048889,
-0.04895849525928497,
0.26491251587867737,
0.2993183732032776,
-0.3717646300792694,
0.021127671003341675,
-0.09628497809171677,
-0.5449813008308411,
-0.1642916202545166,
-0.2609124779701233,
0.17186076939105988,
0.3449211120605469,
-0.09643574059009552,
0.2027411162853241,
-0.060791779309511185,
0.37120339274406433,
-0.04542230814695358,
0.3742440938949585,
0.24044182896614075,
-0.1619986891746521,
-0.05486060678958893,
-0.0758277177810669,
0.3243770897388458,
-0.5773991942405701,
-0.03449636697769165,
0.19181504845619202,
0.27386438846588135,
0.12113487720489502,
-0.2670597732067108,
-0.143233522772789,
-0.2177402675151825,
-0.17806999385356903,
-0.048122797161340714,
0.13441552221775055,
0.07657554745674133,
-0.08397278189659119,
0.3835996389389038,
0.34754347801208496,
-0.15068720281124115,
-0.036747369915246964,
-0.19881296157836914,
-0.002518724650144577,
-0.41830405592918396,
-0.1386949121952057,
0.22571392357349396,
0.046558454632759094,
-0.011418977752327919,
-0.02099968120455742,
0.21107982099056244,
0.00422104075551033,
0.03868718445301056,
-0.2434307336807251,
0.7514216899871826,
0.035504840314388275,
-0.19256916642189026,
0.16322338581085205,
0.10309407114982605,
0.35953056812286377,
-0.07960634678602219,
0.2777908742427826,
-0.4070974886417389,
-0.1189730316400528,
0.1291663646697998,
-0.02230435609817505,
0.09023573249578476,
0.0462377704679966,
-0.09349077194929123,
0.07555429637432098,
0.669043242931366,
-0.08078007400035858,
0.33914440870285034,
-0.06817445158958435,
-0.266971617937088,
-0.07590998709201813,
0.5705391764640808,
0.22825175523757935,
-0.03973575308918953,
0.125727117061615,
-0.05125286430120468,
0.23033969104290009,
0.40303707122802734,
0.26425161957740784,
-0.012098782695829868,
0.175089031457901,
-0.2337668389081955,
-0.05455158278346062,
0.3639185428619385,
-0.42606088519096375,
-0.3873187005519867,
-0.03789093345403671,
0.05017390847206116,
-0.00840400904417038,
-0.3096827566623688,
0.08498424291610718,
0.045409876853227615,
0.0861426442861557,
0.04395478963851929,
0.2757984399795532,
-0.044084951281547546,
0.2534583508968353,
-0.060964688658714294,
0.09518866240978241,
0.5190639495849609,
-0.04120780900120735,
0.26148587465286255,
0.10411795228719711,
-0.019360214471817017,
-0.10479475557804108,
0.024924859404563904,
0.15165874361991882,
0.18797031044960022,
-0.016574908047914505,
-0.18505367636680603,
-0.17544184625148773,
0.15970420837402344,
-0.08232256025075912,
-0.21833565831184387,
0.12367474287748337,
-0.09202210605144501,
0.24871046841144562,
-0.20672203600406647,
-0.040010396391153336,
-0.12324198335409164,
0.09324512630701065,
-0.04389718547463417,
-0.11964192986488342,
-0.10721138119697571,
-0.24411550164222717,
0.003960233181715012,
-0.1256280094385147,
0.07005482912063599,
0.013171057216823101,
0.2429134100675583,
0.04444838687777519,
-0.41028642654418945,
0.14010348916053772,
0.019828330725431442,
-0.27636608481407166,
-0.42964446544647217,
0.23057594895362854,
0.18990683555603027,
-0.09721507877111435,
-0.2707064151763916,
0.3255023956298828,
-0.107266865670681,
0.12504234910011292,
-0.4666309058666229,
-0.010498017072677612,
0.17187610268592834,
-0.3904602527618408,
0.16680237650871277,
0.4961685836315155,
0.05641916021704674,
-0.12864646315574646,
-0.14463743567466736,
0.3013503849506378,
-0.04892932251095772,
0.23596438765525818,
-0.33448082208633423,
0.034489743411540985,
0.0219243336468935,
0.07370924949645996,
-0.007573510520160198,
0.0030805841088294983,
-0.14655430614948273,
-0.08410614728927612,
0.1760290563106537,
-0.16324575245380402,
-0.138810932636261,
-0.20863187313079834,
0.3167334198951721,
0.1990809291601181,
0.20386767387390137,
0.23741596937179565,
-0.08901824802160263,
0.24172982573509216,
-0.024548543617129326,
-0.5081361532211304,
0.3767014145851135,
-0.004667269065976143,
0.3570813536643982,
0.12179525196552277,
0.26304787397384644,
-0.11756990104913712,
0.0169379860162735,
0.17014755308628082,
-0.034932684153318405,
-0.11746665090322495,
0.2981971204280853,
0.19044162333011627,
-0.003553450107574463,
0.3109687566757202,
0.05128827691078186,
0.09081854671239853,
-0.24225051701068878,
0.2834206521511078,
-0.08341363072395325,
0.15899443626403809,
-0.25936082005500793,
-0.376169353723526,
-0.11125719547271729,
-0.00047625787556171417,
-0.2202673703432083,
0.06579742580652237,
-0.10633498430252075,
0.4844779372215271,
0.653963029384613,
-0.08253897726535797,
0.2786644697189331,
-0.475581556558609,
-0.2593759596347809,
-0.09261806309223175,
0.03199286758899689,
-0.04778536409139633,
-0.06604830175638199,
-0.09973715245723724,
0.06584791839122772,
-0.0901811346411705,
0.031002450734376907,
-0.18841755390167236,
-0.23197096586227417,
-0.004263728857040405,
0.027495870366692543,
-0.022498616948723793,
-0.0015493854880332947,
-0.24716998636722565,
-0.15724539756774902,
0.017988596111536026,
0.17047275602817535,
-0.18185588717460632,
-0.195229172706604,
0.25912779569625854,
0.11880214512348175,
0.029564639553427696,
-0.26893967390060425,
-0.34219497442245483,
-0.04641707241535187,
-0.2703254222869873,
0.21001701056957245,
-0.3314790725708008,
0.11529889702796936,
-0.3074148893356323,
0.1775435358285904,
-0.22914275527000427,
0.18585067987442017,
0.015534105710685253,
-0.05951130390167236,
-0.21347475051879883,
0.32979005575180054,
-0.26810404658317566,
-0.2735593914985657,
-0.13163428008556366,
-0.038261689245700836,
0.1657995730638504,
0.5338836908340454,
-0.04455854743719101,
0.4158465564250946,
-0.27676069736480713,
0.2584136426448822,
-0.14508627355098724,
0.2477659285068512,
0.4678524136543274,
-0.06572610884904861,
0.06649661064147949,
-0.04931526631116867,
-0.1751178652048111,
0.03327292203903198,
-0.10830289870500565,
0.3071398437023163,
0.09666630625724792,
0.5508904457092285,
0.07704530656337738,
0.5663514137268066,
-0.014788862317800522,
-0.6592012047767639,
0.2841438353061676,
-0.09560412168502808,
-0.08932408690452576,
-0.16560962796211243,
-0.3800245225429535,
0.0853981152176857,
-0.08423465490341187,
0.006915159523487091,
-0.1676756888628006,
-0.13718128204345703,
-0.05592428892850876,
-0.24808943271636963,
-0.039237454533576965,
-0.35843971371650696,
-0.4045036733150482,
0.22552679479122162,
-0.5378789901733398,
0.3726951479911804,
0.015690568834543228,
0.3636617958545685,
-0.2444404810667038,
-0.21973198652267456,
0.18899759650230408,
0.05401609465479851,
0.38313212990760803,
-0.07475021481513977,
-0.16502805054187775,
-0.09159205853939056,
-0.4162714183330536,
0.5671273469924927,
-0.09504824131727219,
0.4337782859802246,
-0.058654915541410446,
-0.032238829880952835,
-0.03176841139793396,
0.17193703353405,
1.0208152532577515,
0.011468305252492428,
0.14969903230667114,
0.07756532728672028,
-0.19877144694328308,
-0.6825236082077026,
-0.11530905961990356,
0.10412739217281342,
0.4164503812789917,
0.3653739094734192,
0.3401094377040863,
-0.07747310400009155,
-0.19980710744857788,
0.17466425895690918,
0.12317018210887909,
-0.14840219914913177,
-0.26265257596969604,
-0.4185192286968231,
0.037779681384563446,
-0.1782369613647461,
-0.060197167098522186,
0.33019906282424927,
0.16404278576374054,
-0.05667051672935486,
-0.22784048318862915,
-0.31656599044799805,
0.08289968967437744,
0.1991756558418274,
-0.036203108727931976,
0.3900432586669922,
-0.044999271631240845,
0.17229622602462769,
0.08771874010562897,
0.2641536593437195,
0.1348668932914734,
0.011337727308273315,
0.011692069470882416,
-0.1565958559513092,
-0.009552158415317535,
-0.092644102871418,
0.3610747158527374,
0.047600217163562775,
-0.00009529921226203442,
-0.084213025867939,
-0.25878649950027466,
0.05794853717088699,
-0.4061552882194519,
0.08926810324192047,
0.1323351114988327,
0.37584319710731506,
-0.19726970791816711,
-0.20580703020095825,
0.38458171486854553,
0.2336387187242508,
-0.04539484158158302,
0.27418625354766846,
-0.42921000719070435,
-0.3799249231815338,
0.09044037014245987,
0.2048996388912201,
0.7234992980957031,
-0.14078111946582794,
0.0061005279421806335,
0.012441295199096203,
0.0202249214053154,
0.09089918434619904,
-0.3172537088394165,
0.19503818452358246,
-0.33104366064071655,
-0.1014295443892479,
0.026498308405280113,
-0.2604173421859741,
-0.029248028993606567,
0.2161967009305954,
-0.15589399635791779,
0.06803764402866364,
-0.21039973199367523,
0.05928449332714081,
0.06754980236291885,
-0.08163192868232727,
0.11837608367204666,
-0.36827751994132996,
0.1686960607767105,
-0.004548400640487671,
-0.05458895117044449,
0.47157278656959534,
-0.031771235167980194,
-0.13614919781684875,
-0.26523280143737793,
-0.16867513954639435,
-0.12815557420253754,
0.01476585865020752,
-0.26447123289108276,
0.08398869633674622,
0.22603285312652588,
-0.6507222056388855,
0.4303448498249054,
0.44489532709121704,
0.584498405456543,
0.10213693231344223,
-0.016777588054537773,
0.05129923298954964,
0.10560698062181473,
0.11913814395666122,
0.06711273640394211,
-0.08231128752231598,
0.019192280247807503,
0.14386773109436035,
-0.31869831681251526,
0.12001213431358337,
0.01992982253432274,
-0.05324259400367737,
0.03683499991893768,
0.2389850616455078,
0.1326143443584442,
-0.35550591349601746,
-0.18709442019462585,
-0.08137710392475128,
-0.08190774917602539,
-0.1312633454799652,
0.03814924508333206,
0.05943784862756729,
-0.25515568256378174,
0.5818546414375305,
-0.34267961978912354,
-0.34745559096336365,
0.08496581017971039,
0.5717691779136658,
-0.0989748165011406,
-0.28751006722450256,
0.4896944761276245,
0.2825564742088318,
-0.18417415022850037,
-0.10446035116910934,
0.06987632066011429,
0.11351542174816132,
-0.4257431924343109,
0.30277448892593384,
-0.40586283802986145,
-0.12052063643932343,
-0.04226944223046303,
0.03541187196969986,
-0.2639082670211792,
0.02186441794037819,
-0.126749187707901,
-0.18646657466888428,
-0.48260340094566345,
-0.08325542509555817,
0.10189858078956604,
0.10172542929649353,
-0.0771045982837677,
0.3340573012828827,
0.09034588187932968,
0.07952865213155746,
-0.1619091033935547,
0.29863154888153076,
0.25344762206077576,
0.4519290626049042,
0.05826926603913307,
0.08156129717826843,
-0.08077023178339005,
-0.345402330160141,
-0.1275474578142166,
0.20673933625221252,
-0.09906517714262009,
-0.14860090613365173,
-0.007714052684605122,
0.15326708555221558,
-0.11258401721715927,
-0.29555031657218933,
0.030808061361312866,
-0.20132917165756226,
-0.17904570698738098,
-0.4735962450504303,
0.12940876185894012,
0.3352349102497101,
-0.18380092084407806,
0.40887895226478577,
0.052772603929042816,
0.34118494391441345,
-0.13059860467910767,
-0.15087218582630157,
-0.020166262984275818,
0.048721879720687866,
-0.04916664958000183,
0.1970176100730896,
0.05100031569600105,
0.03810752183198929,
-0.4199490547180176,
-0.18622645735740662,
0.20438066124916077,
-0.07018841058015823,
0.25825831294059753,
-0.3320741653442383,
-0.20960694551467896,
-0.12948381900787354,
0.14599251747131348,
-0.05808533728122711,
-0.2682184875011444,
-0.15131138265132904,
-0.10736920684576035,
0.08191845566034317,
-0.2679241895675659,
0.19270585477352142,
0.06433334946632385,
0.08695854246616364,
0.07432831823825836,
0.11244694143533707,
0.05623672530055046,
0.23024046421051025,
-0.3758648633956909,
0.13509410619735718,
0.32657089829444885,
-0.2901199460029602,
0.2548701763153076,
0.06912610679864883,
0.00033067911863327026,
0.29985058307647705,
0.3042841851711273,
-0.03505173698067665,
-0.023882754147052765,
0.4690912365913391,
0.26024749875068665,
0.7445930242538452,
0.237059086561203,
0.1731346994638443,
-0.049826689064502716,
-0.18872946500778198,
-0.14545126259326935,
0.003325909376144409,
-0.07694502174854279,
0.12485354393720627,
0.10933558642864227,
0.20361444354057312,
-0.1541600078344345,
-0.33741408586502075,
-0.09119760245084763,
0.056358084082603455,
-0.15735319256782532,
-0.08722862601280212,
-0.0319036990404129,
-0.11040614545345306,
0.39167648553848267,
-0.2705302834510803,
0.037639737129211426,
0.09396284073591232,
0.577430248260498,
0.05429432541131973,
-0.041375577449798584,
0.33228012919425964,
0.1699848473072052,
0.11850561946630478,
0.10124586522579193,
-0.06455973535776138,
-0.1020311787724495,
0.19624784588813782,
-0.1485988199710846,
-0.10350361466407776,
0.29631131887435913,
0.4156176745891571,
0.41848620772361755,
-0.5681538581848145,
0.39393937587738037,
-0.061913665384054184,
-0.04105408489704132,
0.05339330434799194,
0.37305063009262085,
0.11867784708738327,
-0.015389498323202133,
0.017883632332086563,
0.023779278621077538,
-0.07540112733840942,
-0.18552152812480927,
0.24017870426177979,
0.49409767985343933,
-0.07073724269866943,
0.4371471405029297,
-0.3794618844985962,
-0.27691981196403503,
-0.2831716239452362,
-0.08060232549905777,
0.09409720450639725,
-0.012438447214663029,
0.5351222157478333,
-0.09701955318450928,
0.12003049999475479,
-0.17532406747341156,
-0.0033186059445142746,
0.02886967733502388,
0.39065104722976685,
0.20599648356437683,
0.44007954001426697,
-0.4004071354866028,
-0.04962148889899254,
-0.3809988796710968,
0.3069623112678528,
0.23439240455627441,
0.1777302771806717,
0.04845069348812103,
-0.019963722676038742,
0.0563492551445961,
-0.02048785239458084,
0.13078619539737701,
-0.17731569707393646,
0.2756359875202179,
0.37248143553733826,
-0.1275283396244049,
-0.20782005786895752,
-0.6012066602706909,
0.040589891374111176,
0.28827545046806335,
-0.4927254319190979,
-0.008093427866697311,
-0.24000656604766846,
-0.07683159410953522,
-0.32856953144073486,
0.09073537588119507,
0.09308210015296936,
0.7825943231582642,
0.7039378881454468,
0.1292090117931366,
0.21580305695533752,
-0.06408088654279709,
0.3613518178462982,
-0.04589848592877388,
-0.017092397436499596,
-0.0510372519493103,
0.23680225014686584,
-0.03644765540957451,
0.12608769536018372,
-0.13427425920963287,
-0.1898556798696518,
-0.3208378553390503,
0.2744607925415039,
0.21857140958309174,
-0.4711035192012787,
-0.1974402517080307,
0.07971323281526566,
-0.06965476274490356,
-0.15041494369506836,
0.2692480683326721,
0.44447949528694153,
-0.07940982282161713,
0.2214827537536621,
-0.365911602973938,
-0.31373822689056396,
0.524787187576294,
-0.09469124674797058,
-0.3694787621498108,
-0.5087072849273682,
0.06635022163391113,
0.08392652869224548,
-0.04749689996242523,
-0.6953890919685364,
-0.19280631840229034,
0.2659509778022766,
-0.23262405395507812,
-0.06395484507083893,
0.03194275498390198,
0.09334447979927063,
-0.12764617800712585,
-0.12284459173679352,
0.4743591547012329,
0.09337031841278076,
-0.07827828079462051,
-0.04352230206131935,
-0.332800030708313
] |
https://github.com/huggingface/datasets/issues/5133 | Tensor operation not functioning in dataset mapping | > Hi! The Torch ops in your snippet are not equivalent to the NumPy ones, hence the difference. You can get the same behavior by replacing the line `feature = torch.mean(feature, dim=1)` with `feature = feature.squeeze().mean(1)` .
Thank you. | ## Describe the bug
I'm doing a torch.mean() operation in data preprocessing, and it's not working.
## Steps to reproduce the bug
```
from transformers import pipeline
import torch
import numpy as np
from datasets import load_dataset
device = 'cuda:0'
raw_dataset = load_dataset("glue", "sst2")
feature_extraction = pipeline('feature-extraction', 'bert-base-uncased', device=device)
def extracted_data(examples):
# feature = torch.tensor(feature_extraction(examples['sentence'], batch_size=16), device=device)
# feature = torch.mean(feature, dim=1)
feature = np.asarray(feature_extraction(examples['sentence'], batch_size=16)).squeeze().mean(1)
print(feature.shape)
return {'feature': feature}
extracted_dataset = raw_dataset.map(extracted_data, batched=True, batch_size=16)
```
## Results
When running with torch.mean(), the shape printed out is [16, seq_len, 768], which is exactly the same before the operation. While numpy works just fine, which gives [16, 768].
## Environment info
- `datasets` version: 2.6.1
- Platform: Linux-4.4.0-142-generic-x86_64-with-glibc2.31
- Python version: 3.10.6
- PyArrow version: 9.0.0
- Pandas version: 1.5.0
| 39 | Tensor operation not functioning in dataset mapping
## Describe the bug
I'm doing a torch.mean() operation in data preprocessing, and it's not working.
## Steps to reproduce the bug
```
from transformers import pipeline
import torch
import numpy as np
from datasets import load_dataset
device = 'cuda:0'
raw_dataset = load_dataset("glue", "sst2")
feature_extraction = pipeline('feature-extraction', 'bert-base-uncased', device=device)
def extracted_data(examples):
# feature = torch.tensor(feature_extraction(examples['sentence'], batch_size=16), device=device)
# feature = torch.mean(feature, dim=1)
feature = np.asarray(feature_extraction(examples['sentence'], batch_size=16)).squeeze().mean(1)
print(feature.shape)
return {'feature': feature}
extracted_dataset = raw_dataset.map(extracted_data, batched=True, batch_size=16)
```
## Results
When running with torch.mean(), the shape printed out is [16, seq_len, 768], which is exactly the same before the operation. While numpy works just fine, which gives [16, 768].
## Environment info
- `datasets` version: 2.6.1
- Platform: Linux-4.4.0-142-generic-x86_64-with-glibc2.31
- Python version: 3.10.6
- PyArrow version: 9.0.0
- Pandas version: 1.5.0
> Hi! The Torch ops in your snippet are not equivalent to the NumPy ones, hence the difference. You can get the same behavior by replacing the line `feature = torch.mean(feature, dim=1)` with `feature = feature.squeeze().mean(1)` .
Thank you. | [
-0.3032844066619873,
-0.5189120769500732,
-0.0023396704345941544,
0.3160865902900696,
0.2063223123550415,
-0.08732113242149353,
0.5950582027435303,
0.15039870142936707,
-0.09797559678554535,
0.28440380096435547,
-0.009615662507712841,
0.3572492003440857,
0.1431005448102951,
-0.36868512630462646,
0.13372695446014404,
-0.22250333428382874,
0.11053626239299774,
-0.1344451755285263,
-0.12226983904838562,
-0.036001056432724,
-0.1823655664920807,
0.014699175953865051,
-0.4372742772102356,
0.1371738463640213,
-0.4248005151748657,
0.0955076515674591,
0.2558312714099884,
-0.18617495894432068,
0.20701582729816437,
0.1185212954878807,
0.3189850151538849,
-0.15640467405319214,
0.14299964904785156,
0.9212511777877808,
-0.00012772102490998805,
0.04248850792646408,
0.29279232025146484,
-0.07379421591758728,
-0.027808744460344315,
-0.3310943841934204,
0.2720035910606384,
-0.35331425070762634,
-0.021882036700844765,
-0.33521929383277893,
-0.15276099741458893,
0.4134351909160614,
-0.0366295650601387,
-0.5751660466194153,
0.2669673562049866,
0.35494861006736755,
0.05115132033824921,
0.3226188123226166,
0.04174618795514107,
0.0087075624614954,
0.11640159040689468,
0.49838560819625854,
-0.17630068957805634,
-0.10148946940898895,
0.22518424689769745,
-0.06041070073843002,
0.16177862882614136,
0.17884793877601624,
-0.1902928352355957,
0.10624058544635773,
0.10317693650722504,
0.33698251843452454,
-0.1497538685798645,
-0.315623015165329,
0.12363027781248093,
0.12428735941648483,
0.2992352545261383,
-0.30350449681282043,
-0.2598714828491211,
-0.05571872368454933,
-0.39636722207069397,
-0.2361857295036316,
0.18579033017158508,
0.3076200485229492,
-0.11722514033317566,
-0.19346141815185547,
-0.12441889196634293,
0.2681910991668701,
-0.08611695468425751,
0.22790837287902832,
-0.1955232173204422,
0.23480020463466644,
-0.07655946910381317,
0.18690955638885498,
-0.03920746222138405,
-0.11930184066295624,
0.30781275033950806,
-0.06360308825969696,
0.2727867662906647,
0.2955126166343689,
-0.3719627857208252,
0.010830745100975037,
-0.13224634528160095,
-0.5210110545158386,
-0.16435131430625916,
-0.2538136839866638,
0.15565742552280426,
0.35825780034065247,
-0.10273675620555878,
0.20870736241340637,
-0.053478728979825974,
0.3693113625049591,
-0.02209126204252243,
0.39010733366012573,
0.24871599674224854,
-0.15626060962677002,
-0.0833001658320427,
-0.06900403648614883,
0.30503135919570923,
-0.5768072605133057,
-0.027350464835762978,
0.1813611388206482,
0.2639467120170593,
0.10898926854133606,
-0.2599424719810486,
-0.15407593548297882,
-0.23379963636398315,
-0.19166205823421478,
-0.04138476029038429,
0.1472267210483551,
0.0734972357749939,
-0.10157730430364609,
0.3889901638031006,
0.3586457371711731,
-0.14817176759243011,
-0.04612654447555542,
-0.17020122706890106,
-0.007558315992355347,
-0.40924304723739624,
-0.13755734264850616,
0.208605095744133,
0.03268657997250557,
-0.013844367116689682,
-0.013695512898266315,
0.20915360748767853,
-0.007372800260782242,
0.05158991366624832,
-0.2675152122974396,
0.7381914854049683,
0.015165291726589203,
-0.1700749397277832,
0.1623055785894394,
0.09319411218166351,
0.38224154710769653,
-0.0774616003036499,
0.295364111661911,
-0.4194226861000061,
-0.11379051208496094,
0.13169850409030914,
-0.04494784399867058,
0.10597404837608337,
0.05446848273277283,
-0.09813395887613297,
0.06524543464183807,
0.6775316596031189,
-0.10076238960027695,
0.34103333950042725,
-0.06439334899187088,
-0.277793824672699,
-0.07844004034996033,
0.5526697039604187,
0.23650993406772614,
-0.029023094102740288,
0.1236729770898819,
-0.052236057817935944,
0.22054867446422577,
0.42672210931777954,
0.27806413173675537,
-0.01554606668651104,
0.18400003015995026,
-0.24662147462368011,
-0.07149513065814972,
0.3766498863697052,
-0.4294572174549103,
-0.3808402121067047,
-0.03563442826271057,
0.058116614818573,
-0.02772345021367073,
-0.30478882789611816,
0.10025113821029663,
0.03620079159736633,
0.0970282331109047,
0.030340716242790222,
0.2524440288543701,
-0.024770410731434822,
0.2431313395500183,
-0.06600676476955414,
0.09714360535144806,
0.5301327705383301,
-0.046475037932395935,
0.26886695623397827,
0.124173104763031,
-0.007365390658378601,
-0.10812738537788391,
0.02741076424717903,
0.16745735704898834,
0.19056880474090576,
-0.009719014167785645,
-0.18514740467071533,
-0.1572151631116867,
0.16418474912643433,
-0.08955062925815582,
-0.20288196206092834,
0.101582370698452,
-0.1233980730175972,
0.23337697982788086,
-0.18605513870716095,
-0.024123139679431915,
-0.12520506978034973,
0.08431096374988556,
-0.06776843965053558,
-0.09742620587348938,
-0.135827898979187,
-0.251659095287323,
0.007347773760557175,
-0.12509824335575104,
0.06952278316020966,
0.02311171591281891,
0.2252497524023056,
0.04626819118857384,
-0.39432433247566223,
0.14945849776268005,
0.017446408048272133,
-0.2711094617843628,
-0.4288516938686371,
0.21673846244812012,
0.19898676872253418,
-0.10472574830055237,
-0.2692311406135559,
0.32234811782836914,
-0.09651187807321548,
0.11381109058856964,
-0.4702100455760956,
-0.02139618992805481,
0.1822238713502884,
-0.410905122756958,
0.1694582998752594,
0.48866692185401917,
0.07238709926605225,
-0.13452324271202087,
-0.11578286439180374,
0.30532869696617126,
-0.047387007623910904,
0.22628113627433777,
-0.3127337098121643,
0.024722808972001076,
0.00031834281980991364,
0.0676688700914383,
-0.00046020466834306717,
0.005467504262924194,
-0.1289134919643402,
-0.08578096330165863,
0.1820983737707138,
-0.17093245685100555,
-0.14285120368003845,
-0.23505458235740662,
0.30586451292037964,
0.1961415708065033,
0.20596149563789368,
0.24008288979530334,
-0.08452413231134415,
0.24744105339050293,
-0.03656527400016785,
-0.5294990539550781,
0.3993159532546997,
-0.01915212720632553,
0.3548092842102051,
0.13178551197052002,
0.29782742261886597,
-0.1041392907500267,
0.019217222929000854,
0.16504503786563873,
-0.025253016501665115,
-0.10475548356771469,
0.29586514830589294,
0.18955083191394806,
0.010487023741006851,
0.32603901624679565,
0.06986257433891296,
0.08186502009630203,
-0.24534611403942108,
0.2666894197463989,
-0.09544879198074341,
0.14833897352218628,
-0.26202961802482605,
-0.3652564585208893,
-0.11528395116329193,
0.015670135617256165,
-0.23636145889759064,
0.059869952499866486,
-0.0630006492137909,
0.4864767789840698,
0.6653260588645935,
-0.08692686259746552,
0.27836334705352783,
-0.46827128529548645,
-0.2577498257160187,
-0.08043611794710159,
0.0383257120847702,
-0.07463932037353516,
-0.06037731096148491,
-0.09842198342084885,
0.06478744745254517,
-0.10583123564720154,
0.017717238515615463,
-0.1973038762807846,
-0.22306933999061584,
0.000840701162815094,
0.06552295386791229,
-0.04132398962974548,
-0.017355874180793762,
-0.261238157749176,
-0.16897524893283844,
0.03611936420202255,
0.17553184926509857,
-0.19471071660518646,
-0.20435182750225067,
0.2447379231452942,
0.12463399767875671,
0.026592927053570747,
-0.25669777393341064,
-0.31696727871894836,
-0.06576564908027649,
-0.2526644170284271,
0.2054753303527832,
-0.3239307999610901,
0.13558419048786163,
-0.3202643394470215,
0.1516926884651184,
-0.2475730925798416,
0.1866154968738556,
0.009873074479401112,
-0.057938672602176666,
-0.2169540524482727,
0.33366596698760986,
-0.27491483092308044,
-0.26545125246047974,
-0.1277703493833542,
-0.023975476622581482,
0.16435667872428894,
0.5371045470237732,
-0.03289947286248207,
0.41716471314430237,
-0.2640799880027771,
0.2439308762550354,
-0.1414000540971756,
0.2537236213684082,
0.4555209279060364,
-0.08323586732149124,
0.09540165960788727,
-0.04507989063858986,
-0.17910414934158325,
0.03896156698465347,
-0.11537992209196091,
0.31198880076408386,
0.14846190810203552,
0.5586175918579102,
0.053441908210515976,
0.5614712238311768,
0.015183139592409134,
-0.6514537334442139,
0.30640560388565063,
-0.10361858457326889,
-0.09320619702339172,
-0.14999401569366455,
-0.38010209798812866,
0.0762839987874031,
-0.06487911939620972,
0.01320180669426918,
-0.15782032907009125,
-0.1417696475982666,
-0.050923578441143036,
-0.2636849880218506,
-0.06091559678316116,
-0.39069482684135437,
-0.38393545150756836,
0.1904718577861786,
-0.5395605564117432,
0.3964436650276184,
0.004216911271214485,
0.3466150462627411,
-0.23505762219429016,
-0.21491247415542603,
0.19015298783779144,
0.0866759642958641,
0.3914158344268799,
-0.07615836709737778,
-0.16529685258865356,
-0.10591118782758713,
-0.38084322214126587,
0.5783401727676392,
-0.09701939672231674,
0.45776888728141785,
-0.06153988093137741,
-0.009109554812312126,
-0.010740160942077637,
0.1820600926876068,
1.0339527130126953,
0.0027572251856327057,
0.15060850977897644,
0.0517590306699276,
-0.20702241361141205,
-0.6618586182594299,
-0.1202896386384964,
0.11478279531002045,
0.4191381335258484,
0.35590457916259766,
0.34838977456092834,
-0.07168754935264587,
-0.1949743926525116,
0.17417830228805542,
0.11795181781053543,
-0.15116123855113983,
-0.29457125067710876,
-0.4098595082759857,
0.05238458514213562,
-0.17389732599258423,
-0.08073743432760239,
0.3083384931087494,
0.15744592249393463,
-0.0437731072306633,
-0.2360808253288269,
-0.3214014172554016,
0.09258696436882019,
0.2104986011981964,
-0.05374259129166603,
0.3988672196865082,
-0.05888509377837181,
0.1616210639476776,
0.08472459018230438,
0.27447959780693054,
0.16326117515563965,
0.003374643623828888,
0.013444619253277779,
-0.14373749494552612,
-0.018984060734510422,
-0.09822291880846024,
0.3732622265815735,
0.03291095048189163,
0.0009130574762821198,
-0.06533903628587723,
-0.2662663161754608,
0.04955513775348663,
-0.3750852644443512,
0.0598844550549984,
0.13358525931835175,
0.37737947702407837,
-0.2058834582567215,
-0.19926361739635468,
0.3783608675003052,
0.2521698772907257,
-0.04064496234059334,
0.28517305850982666,
-0.43789947032928467,
-0.3772769570350647,
0.060905493795871735,
0.19908496737480164,
0.7449297904968262,
-0.14311085641384125,
-0.019086454063653946,
-0.0012071151286363602,
0.004019137471914291,
0.08111522346735,
-0.31863611936569214,
0.19591836631298065,
-0.3457559645175934,
-0.10118814557790756,
0.003385385498404503,
-0.2745172679424286,
-0.00838916003704071,
0.2361844778060913,
-0.16246441006660461,
0.08289743214845657,
-0.23781099915504456,
0.059949733316898346,
0.0658036395907402,
-0.09093138575553894,
0.12235613167285919,
-0.3384243845939636,
0.16640973091125488,
-0.031214671209454536,
-0.04323551803827286,
0.49235478043556213,
-0.043266475200653076,
-0.13814125955104828,
-0.26387637853622437,
-0.1628326028585434,
-0.1311899721622467,
0.005344100296497345,
-0.26781976222991943,
0.09847858548164368,
0.23362861573696136,
-0.6564276218414307,
0.46284183859825134,
0.47004595398902893,
0.587483823299408,
0.09377382695674896,
-0.007741549983620644,
0.036173973232507706,
0.11202256381511688,
0.09441647678613663,
0.05030359327793121,
-0.06535066664218903,
0.0001153554767370224,
0.13043490052223206,
-0.3213145434856415,
0.12882260978221893,
0.014371906407177448,
-0.04476660490036011,
0.029881373047828674,
0.2371419370174408,
0.14449843764305115,
-0.3473093509674072,
-0.20751942694187164,
-0.08613331615924835,
-0.08793486654758453,
-0.12231938540935516,
0.011154673993587494,
0.05381016060709953,
-0.26390326023101807,
0.5830801725387573,
-0.3446730077266693,
-0.34535905718803406,
0.09312303364276886,
0.5703250169754028,
-0.09348797053098679,
-0.28762584924697876,
0.49947449564933777,
0.2657417058944702,
-0.1760105937719345,
-0.09140278398990631,
0.08675282448530197,
0.09674941003322601,
-0.4017651081085205,
0.28841540217399597,
-0.3901445269584656,
-0.09830315411090851,
-0.04077913239598274,
0.021740011870861053,
-0.2678685784339905,
0.04835973680019379,
-0.12605620920658112,
-0.20637525618076324,
-0.47123509645462036,
-0.09034840762615204,
0.0908844992518425,
0.08066846430301666,
-0.08827895671129227,
0.32620126008987427,
0.11193899810314178,
0.07214576005935669,
-0.12943893671035767,
0.3067198693752289,
0.2573571503162384,
0.43838927149772644,
0.0695311576128006,
0.09885372221469879,
-0.10443486273288727,
-0.35143837332725525,
-0.153517946600914,
0.2027614265680313,
-0.0861240103840828,
-0.11956091225147247,
0.0028818361461162567,
0.17426501214504242,
-0.10404280573129654,
-0.293881356716156,
0.023943457752466202,
-0.21181818842887878,
-0.1805105209350586,
-0.4529782235622406,
0.10587026178836823,
0.3348258435726166,
-0.17727476358413696,
0.4175053536891937,
0.05455351248383522,
0.32746070623397827,
-0.16536515951156616,
-0.1385120004415512,
-0.018834687769412994,
0.059089504182338715,
-0.055923692882061005,
0.1893996298313141,
0.08263403177261353,
0.036997295916080475,
-0.4402591586112976,
-0.19884556531906128,
0.21854832768440247,
-0.0818411111831665,
0.2653280198574066,
-0.34174901247024536,
-0.1849941909313202,
-0.12349589169025421,
0.13691556453704834,
-0.043289802968502045,
-0.26997092366218567,
-0.15204882621765137,
-0.10146994888782501,
0.05213812738656998,
-0.28119394183158875,
0.18688496947288513,
0.0811174064874649,
0.07986383885145187,
0.041184742003679276,
0.11657468229532242,
0.05823266878724098,
0.2308954894542694,
-0.38633471727371216,
0.13408222794532776,
0.3232213854789734,
-0.2910240888595581,
0.2604420781135559,
0.08073833584785461,
0.02416231855750084,
0.30782490968704224,
0.30679070949554443,
-0.014340709894895554,
-0.04248706251382828,
0.455780029296875,
0.27386462688446045,
0.7529906630516052,
0.23455750942230225,
0.18612205982208252,
-0.031315214931964874,
-0.1850675344467163,
-0.1572326421737671,
0.02354041486978531,
-0.06918232142925262,
0.11560933291912079,
0.10232112556695938,
0.20303335785865784,
-0.15189990401268005,
-0.3299311399459839,
-0.08774368464946747,
0.06248590722680092,
-0.14353549480438232,
-0.0807531476020813,
-0.041356321424245834,
-0.12238458544015884,
0.3907963037490845,
-0.2862963080406189,
0.042233046144247055,
0.10121545940637589,
0.5662039518356323,
0.0660407543182373,
-0.03633500635623932,
0.33071035146713257,
0.1749131679534912,
0.14485380053520203,
0.10330726206302643,
-0.07617250084877014,
-0.10128917545080185,
0.18065470457077026,
-0.1283365786075592,
-0.10065115988254547,
0.2955803871154785,
0.4203547537326813,
0.4401577413082123,
-0.5646171569824219,
0.38635897636413574,
-0.053519535809755325,
-0.03868686780333519,
0.06764331459999084,
0.3761255145072937,
0.1354549378156662,
-0.020988907665014267,
-0.0024808244779706,
-0.0034723421558737755,
-0.05435701459646225,
-0.17500627040863037,
0.26189717650413513,
0.49276015162467957,
-0.06702521443367004,
0.4336005747318268,
-0.39883139729499817,
-0.2847440242767334,
-0.28112339973449707,
-0.07942263036966324,
0.09544645994901657,
0.0005567818880081177,
0.5365222096443176,
-0.09079205989837646,
0.11822720617055893,
-0.16426336765289307,
-0.025503527373075485,
0.01740368641912937,
0.37213122844696045,
0.21017101407051086,
0.44306355714797974,
-0.4038306474685669,
-0.07472649216651917,
-0.37728351354599,
0.3077365756034851,
0.2438642680644989,
0.16586124897003174,
0.05182018503546715,
-0.03616524487733841,
0.04660779982805252,
-0.04443265497684479,
0.15179572999477386,
-0.18491125106811523,
0.2795972526073456,
0.39264243841171265,
-0.11967186629772186,
-0.19800271093845367,
-0.5909788608551025,
0.05114493519067764,
0.28084617853164673,
-0.49528950452804565,
-0.0023028962314128876,
-0.2497338056564331,
-0.10356391966342926,
-0.32917994260787964,
0.09637834131717682,
0.0801144689321518,
0.780337929725647,
0.6964231729507446,
0.13100747764110565,
0.23179291188716888,
-0.06145444139838219,
0.37932389974594116,
0.0017274320125579834,
-0.024000134319067,
-0.03223506733775139,
0.27100929617881775,
-0.03231528773903847,
0.10173995792865753,
-0.1468241661787033,
-0.19220921397209167,
-0.32122838497161865,
0.2667683959007263,
0.20623679459095,
-0.4833807647228241,
-0.19071216881275177,
0.06883653998374939,
-0.06375099718570709,
-0.16109108924865723,
0.28439611196517944,
0.4310077428817749,
-0.07459066808223724,
0.20485500991344452,
-0.3816320300102234,
-0.2771724462509155,
0.5090113878250122,
-0.09482325613498688,
-0.36714303493499756,
-0.5142918229103088,
0.06606690585613251,
0.09016522020101547,
-0.054249390959739685,
-0.6924624443054199,
-0.20827044546604156,
0.29002222418785095,
-0.23393073678016663,
-0.034374769777059555,
0.0271122045814991,
0.08575654029846191,
-0.12699981033802032,
-0.11671999096870422,
0.46962255239486694,
0.08813059329986572,
-0.07235504686832428,
-0.04116851091384888,
-0.3282378315925598
] |
https://github.com/huggingface/datasets/issues/5131 | WikiText 103 tokenizer hangs | any updates on this? It happens to me on [OpenWikiText-20%](https://huggingface.co/datasets/Bingsu/openwebtext_20p) dataset, but not on [OpenWebText-10k](https://huggingface.co/datasets/stas/openwebtext-10k). This is really strange because I don't change anything else in my running script.
transformers version 4.18.0.dev0
datasets version 1.18.0 | See issue here: https://github.com/huggingface/transformers/issues/19702 | 35 | WikiText 103 tokenizer hangs
See issue here: https://github.com/huggingface/transformers/issues/19702
any updates on this? It happens to me on [OpenWikiText-20%](https://huggingface.co/datasets/Bingsu/openwebtext_20p) dataset, but not on [OpenWebText-10k](https://huggingface.co/datasets/stas/openwebtext-10k). This is really strange because I don't change anything else in my running script.
transformers version 4.18.0.dev0
datasets version 1.18.0 | [
0.03930788114666939,
-0.5219099521636963,
0.05311049893498421,
-0.07705706357955933,
0.3084469437599182,
-0.17780792713165283,
0.4431420564651489,
-0.07915535569190979,
-0.07170720398426056,
0.10493890941143036,
-0.11941280961036682,
0.2056075930595398,
0.129560649394989,
-0.0826609879732132,
-0.2255670726299286,
-0.11250939965248108,
0.21108585596084595,
0.12016094475984573,
0.04281765967607498,
0.058800168335437775,
-0.14578095078468323,
0.3192463517189026,
-0.3858637809753418,
0.025897875428199768,
-0.5291045904159546,
0.23277786374092102,
0.2678886353969574,
-0.4378892481327057,
0.07821372896432877,
-0.2640707790851593,
0.3800308108329773,
0.2076621949672699,
-0.13258442282676697,
0.4018286168575287,
-0.0001241581339854747,
-0.051139168441295624,
0.5372239351272583,
0.3557491898536682,
-0.07293003052473068,
-0.10740865767002106,
-0.03919217735528946,
-0.04869416356086731,
0.14031244814395905,
0.42122915387153625,
-0.005395935848355293,
0.20205366611480713,
-0.09168431907892227,
0.06695360690355301,
0.34984391927719116,
-0.1845504343509674,
0.07074443995952606,
0.511893630027771,
0.2265252321958542,
-0.08688569813966751,
-0.09472308307886124,
0.16070052981376648,
-0.15074364840984344,
-0.3846990466117859,
0.47679272294044495,
-0.016439100727438927,
-0.07596521824598312,
0.07357893884181976,
0.22482529282569885,
-0.46976855397224426,
0.30548208951950073,
-0.1721872091293335,
-0.048029825091362,
-0.28949642181396484,
0.45957526564598083,
0.3486537039279938,
0.4630376100540161,
0.25334587693214417,
-0.20004421472549438,
-0.07710406184196472,
-0.028304606676101685,
0.1399759203195572,
0.39154958724975586,
-0.15832100808620453,
0.06744846701622009,
-0.10596074163913727,
-0.33212193846702576,
-0.13056713342666626,
-0.13750258088111877,
0.05185869336128235,
-0.3649615943431854,
0.8563398122787476,
-0.03206736594438553,
0.2553880214691162,
-0.12104630470275879,
-0.25883936882019043,
-0.1740649938583374,
-0.21098922193050385,
-0.1541794240474701,
0.005396092776209116,
-0.5078373551368713,
0.05515700578689575,
-0.2136445939540863,
-0.12718108296394348,
-0.13779814541339874,
-0.19137197732925415,
-0.2674577534198761,
0.2743309438228607,
-0.025455370545387268,
-0.021076440811157227,
0.29116469621658325,
0.25389742851257324,
0.10259334743022919,
0.07396228611469269,
0.23965540528297424,
0.049477919936180115,
-0.14827480912208557,
-0.11102964729070663,
-0.13797913491725922,
-0.16361893713474274,
-0.12084877490997314,
-0.32431215047836304,
-0.22279885411262512,
-0.09904654324054718,
0.308589905500412,
0.23616763949394226,
0.15155601501464844,
0.3098026216030121,
0.33789870142936707,
0.35621777176856995,
-0.04575309902429581,
0.3630655109882355,
-0.03230643644928932,
-0.16911688446998596,
-0.05680482089519501,
0.2114899754524231,
-0.05024411156773567,
-0.3171446621417999,
0.06979157030582428,
-0.14122813940048218,
-0.15084630250930786,
0.0035073570907115936,
0.12979789078235626,
-0.0301499105989933,
0.24362511932849884,
-0.14348648488521576,
-0.17955492436885834,
0.1838422417640686,
0.10996922105550766,
0.401079386472702,
-0.24128909409046173,
0.6139254570007324,
-0.30197635293006897,
0.02730843424797058,
-0.13764241337776184,
-0.049198731780052185,
0.06925355643033981,
0.0211508609354496,
-0.17486411333084106,
0.07168471068143845,
-0.1333833634853363,
-0.07610433548688889,
0.055863503366708755,
-0.1878139227628708,
0.024861790239810944,
-0.11289453506469727,
0.20656567811965942,
-0.12222898006439209,
-0.16060951352119446,
0.03804701566696167,
0.30549538135528564,
0.0006238222122192383,
0.10818533599376678,
-0.200208842754364,
-0.0994022861123085,
0.05715160444378853,
-0.21639615297317505,
0.2389061003923416,
-0.09022898226976395,
-0.009530633687973022,
-0.17065705358982086,
0.30254995822906494,
-0.16601386666297913,
-0.23554536700248718,
-0.40961453318595886,
-0.029868587851524353,
-0.14068055152893066,
0.11704451590776443,
-0.27804529666900635,
-0.15486697852611542,
0.0686604380607605,
-0.1370750218629837,
-0.28716057538986206,
0.10317637771368027,
-0.023359881713986397,
0.18715986609458923,
-0.14476104080677032,
-0.24340717494487762,
0.08832494169473648,
0.03413473814725876,
0.1691623032093048,
-0.546170175075531,
-0.5132445096969604,
0.5553185939788818,
0.19500970840454102,
0.09644461423158646,
0.13593631982803345,
0.2562617063522339,
0.4381066560745239,
0.07310356199741364,
0.2039175033569336,
0.012150939553976059,
-0.05096253752708435,
0.2148442268371582,
-0.08145999908447266,
-0.07717639207839966,
0.04118788614869118,
-0.1347714364528656,
-0.15014734864234924,
0.20900344848632812,
-0.22778378427028656,
-0.19730673730373383,
-0.015201425179839134,
-0.09607963263988495,
0.28924989700317383,
0.3480805456638336,
0.044736940413713455,
-0.18782171607017517,
0.4298924505710602,
0.19028808176517487,
-0.2419588714838028,
-0.08855981379747391,
-0.051269009709358215,
-0.04537609964609146,
-0.17928862571716309,
0.1423584222793579,
0.12210892140865326,
-0.2843678891658783,
-0.20586758852005005,
0.21604624390602112,
-0.13180845975875854,
0.387542724609375,
-0.26366063952445984,
0.033339694142341614,
0.3244342803955078,
0.06352663040161133,
-0.24597373604774475,
0.10385246574878693,
-0.09195486456155777,
-0.30413079261779785,
0.20820209383964539,
-0.06604339182376862,
0.11593243479728699,
0.382451593875885,
-0.046559084206819534,
0.14402687549591064,
-0.12677115201950073,
0.09200327098369598,
-0.047988831996917725,
0.08084902167320251,
0.1475100815296173,
0.01732262223958969,
0.016614750027656555,
0.04378125071525574,
0.4361366033554077,
0.2819124758243561,
0.45083045959472656,
-0.05244779586791992,
-0.30831238627433777,
0.10828544199466705,
-0.3197880685329437,
-0.049708615988492966,
0.06317178159952164,
-0.42499205470085144,
-0.025568664073944092,
0.015328610315918922,
-0.0370633639395237,
-0.14713430404663086,
0.025294005870819092,
-0.18697424232959747,
0.27091747522354126,
0.44667065143585205,
-0.10350315272808075,
0.16089463233947754,
0.04422122612595558,
-0.09396834671497345,
0.02191951870918274,
-0.02009238861501217,
0.047590553760528564,
-0.041488610208034515,
0.10856597125530243,
0.10601835697889328,
-0.23028837144374847,
0.19505354762077332,
0.14603661000728607,
-0.31471681594848633,
-0.5683436393737793,
-0.4013841450214386,
-0.07518098503351212,
0.26251915097236633,
-0.16334643959999084,
0.3493771553039551,
0.14537926018238068,
0.1258198320865631,
0.19377177953720093,
0.23382829129695892,
-0.588333010673523,
-0.20165212452411652,
-0.4338901937007904,
-0.14687758684158325,
0.4299607574939728,
-0.15947167575359344,
-0.00988745503127575,
0.26244571805000305,
0.0005212146788835526,
-0.03540131449699402,
-0.519700825214386,
0.18237854540348053,
-0.2545091509819031,
0.10124990344047546,
0.25188151001930237,
0.05050909146666527,
-0.3600273132324219,
-0.21909333765506744,
0.29057472944259644,
-0.5283998250961304,
0.02171567641198635,
-0.049960874021053314,
0.29196035861968994,
-0.03510267660021782,
-0.05723011493682861,
0.33429285883903503,
0.12230139970779419,
-0.18361301720142365,
0.2832426130771637,
-0.6154236197471619,
-0.2750009298324585,
0.18496796488761902,
-0.055127471685409546,
0.1730145364999771,
-0.5582089424133301,
-0.2213192582130432,
-0.03237147256731987,
-0.06357067078351974,
0.3603965640068054,
-0.02489485777914524,
-0.3555471897125244,
0.012928467243909836,
-0.06647443771362305,
0.17218033969402313,
-0.29962098598480225,
-0.29799574613571167,
0.06594064831733704,
-0.46455830335617065,
-0.12204334139823914,
0.029804712161421776,
-0.0392661914229393,
0.4373728930950165,
-0.1648004949092865,
0.046614132821559906,
-0.12126386910676956,
0.04377569630742073,
0.06529484689235687,
-0.27449899911880493,
0.06015806645154953,
-0.10080995410680771,
0.06134933605790138,
-0.0365867055952549,
0.5015988945960999,
0.11581122875213623,
-0.07362708449363708,
-0.01199755072593689,
0.20893189311027527,
0.029962358996272087,
-0.04354061931371689,
-0.09394848346710205,
0.02983919344842434,
0.18273191154003143,
0.1088533103466034,
0.5249035954475403,
0.3034379780292511,
0.003199552185833454,
0.02086722105741501,
-0.5804125666618347,
0.09909095615148544,
-0.5689748525619507,
-0.01216445304453373,
0.24266347289085388,
0.0769496038556099,
0.131875142455101,
0.21060624718666077,
-0.2966993749141693,
-0.19192719459533691,
0.36949825286865234,
0.13606958091259003,
0.201687753200531,
-0.3282003402709961,
-0.10204033553600311,
-0.15588757395744324,
-0.5349279642105103,
0.07393566519021988,
0.16506847739219666,
0.6652769446372986,
0.19892878830432892,
-0.12853893637657166,
0.25987622141838074,
-0.2567107379436493,
0.790799081325531,
-0.021557951346039772,
-0.04108796268701553,
-0.11960704624652863,
-0.3529389798641205,
-0.29307687282562256,
-0.03908217325806618,
0.21297401189804077,
-0.32875198125839233,
0.5299067497253418,
0.5118294954299927,
-0.2297338843345642,
-0.5204628705978394,
-0.06299815326929092,
0.07955077290534973,
-0.10795270651578903,
-0.26501092314720154,
-0.15255619585514069,
-0.1168002337217331,
0.04761873185634613,
0.056532979011535645,
0.0990566834807396,
0.07127046585083008,
-0.08401060104370117,
-0.09432556480169296,
-0.3851197063922882,
-0.35999342799186707,
-0.1015685647726059,
0.09824211895465851,
-0.04535985365509987,
-0.01553713995963335,
0.5017426609992981,
0.2435576170682907,
-0.010730065405368805,
-0.087688148021698,
-0.08266764879226685,
0.30208131670951843,
-0.4270298480987549,
0.03892718255519867,
0.1269652247428894,
0.2564287781715393,
0.37147289514541626,
-0.010385647416114807,
0.35047754645347595,
-0.24070358276367188,
0.38662993907928467,
-0.013466020114719868,
0.2900361716747284,
0.2635156810283661,
0.27497565746307373,
-0.40869730710983276,
0.529407262802124,
0.19842371344566345,
-0.02358270063996315,
0.011847585439682007,
0.22060275077819824,
0.4895749092102051,
-0.17320603132247925,
0.20577582716941833,
-0.015554741024971008,
0.7987292408943176,
-0.0738246887922287,
0.20810778439044952,
0.021667562425136566,
-0.1624230444431305,
0.3891688883304596,
-0.14669640362262726,
0.09977243095636368,
-0.317514568567276,
-0.39173537492752075,
0.09166177362203598,
-0.032436616718769073,
0.14574536681175232,
-0.340705931186676,
-0.1349923014640808,
-0.29240158200263977,
0.04053027182817459,
0.7929021716117859,
-0.07336930930614471,
0.4920230507850647,
-0.19181416928768158,
-0.2912827730178833,
0.0806792601943016,
0.05791845917701721,
0.24850501120090485,
0.42649054527282715,
-0.1303100287914276,
-0.21152299642562866,
0.06918206810951233,
-0.23764541745185852,
-0.3311246633529663,
-0.01797538995742798,
0.10389601439237595,
0.02992282807826996,
0.48922839760780334,
-0.021960817277431488,
0.49222245812416077,
0.08966532349586487,
0.2787502706050873,
0.40170347690582275,
-0.34012898802757263,
0.6112224459648132,
-0.11251341551542282,
-0.28270894289016724,
-0.018405985087156296,
-0.05129269137978554,
-0.039806269109249115,
0.012929391115903854,
-0.17842882871627808,
0.012485653162002563,
0.09810979664325714,
0.08607098460197449,
-0.2283613383769989,
0.0043944790959358215,
0.05641235411167145,
-0.31015345454216003,
0.18824462592601776,
-0.13514062762260437,
-0.14477798342704773,
-0.16514787077903748,
0.03964553773403168,
-0.030223019421100616,
-0.1919129192829132,
0.13944180309772491,
0.1287662237882614,
-0.019334323704242706,
0.007929319515824318,
0.36957433819770813,
-0.44844093918800354,
-0.04132068157196045,
0.6489758491516113,
0.19611835479736328,
-0.17481011152267456,
-0.08643919229507446,
0.13149204850196838,
0.1517111361026764,
-0.48316487669944763,
0.006783084012567997,
0.10233674943447113,
-0.09003357589244843,
0.2350446879863739,
0.5852737426757812,
-0.07127241045236588,
-0.35256949067115784,
-0.2704838216304779,
-0.031450606882572174,
-0.2011871337890625,
-0.04910615086555481,
0.04965062811970711,
0.2929770052433014,
-0.2008792757987976,
0.29545122385025024,
-0.23682360351085663,
0.30448177456855774,
-0.13200117647647858,
-0.041031613945961,
-0.21954910457134247,
0.00020186416804790497,
-0.5327794551849365,
-0.6799015998840332,
0.1626715511083603,
-0.28036463260650635,
0.03188779950141907,
0.5122078657150269,
-0.02251078560948372,
-0.08711838722229004,
-0.2576369047164917,
0.18882225453853607,
0.23406720161437988,
-0.11024622619152069,
-0.15849915146827698,
0.14682714641094208,
0.29803234338760376,
-0.2442302107810974,
0.0646364837884903,
-0.13395360112190247,
-0.02553693950176239,
-0.15657071769237518,
0.469453901052475,
0.29291677474975586,
-0.06745018064975739,
0.31739452481269836,
0.136119544506073,
0.12592840194702148,
0.14687494933605194,
0.053762346506118774,
0.16537804901599884,
0.07709607481956482,
0.09684684127569199,
0.24823150038719177,
0.28182452917099,
-0.0882553979754448,
0.41318464279174805,
-0.0713864117860794,
-0.14166736602783203,
0.13503050804138184,
0.09002434462308884,
0.48838791251182556,
0.13142523169517517,
-0.3063119649887085,
0.4720611572265625,
0.08715369552373886,
-0.029997706413269043,
-0.09526639431715012,
0.08179023861885071,
0.09969089180231094,
0.05286360904574394,
0.03924940526485443,
0.10362520813941956,
-0.1912015974521637,
0.3435622453689575,
0.4179840385913849,
0.5529427528381348,
0.2117767632007599,
0.04090511426329613,
0.31090718507766724,
0.04509846493601799,
-0.1154671311378479,
0.14622490108013153,
-0.009679228067398071,
-0.033035315573215485,
-0.32782018184661865,
-0.07720983773469925,
0.10632631927728653,
-0.4636695683002472,
0.35122382640838623,
0.3776087164878845,
-0.06444375216960907,
-0.16934461891651154,
-0.06589853763580322,
-0.026492595672607422,
0.02509113773703575,
-0.0836222767829895,
0.3376098871231079,
-0.1783192753791809,
-0.16929084062576294,
-0.25805461406707764,
0.6011519432067871,
-0.24925827980041504,
-0.17815159261226654,
0.10438460111618042,
0.0565425381064415,
-0.07967191934585571,
-0.00825689360499382,
0.09782753884792328,
-0.12083315849304199,
-0.12740014493465424,
0.2597387731075287,
-0.01718875765800476,
-0.12225638329982758,
-0.12528309226036072,
-0.10635340958833694,
0.5478272438049316,
-0.04590459167957306,
0.16951973736286163,
0.03622607886791229,
-0.07890933752059937,
-0.018365047872066498,
0.18449769914150238,
0.20336852967739105,
0.1499190628528595,
-0.41376763582229614,
0.16250084340572357,
-0.14469653367996216,
0.12596674263477325,
0.16900505125522614,
0.441433310508728,
0.022307738661766052,
-0.011130064725875854,
-0.0728084072470665,
-0.008511219173669815,
-0.12383855134248734,
-0.3634120225906372,
-0.18211932480335236,
-0.0321936309337616,
-0.07232475280761719,
0.3697378635406494,
-0.13287656009197235,
0.03082270175218582,
-0.03522484749555588,
0.07415910065174103,
-0.2797159254550934,
0.19958758354187012,
-0.12326349318027496,
-0.05298807471990585,
0.0899011492729187,
-0.2791881859302521,
0.021886810660362244,
-0.10335709154605865,
0.6087457537651062,
0.32110509276390076,
-0.05149025470018387,
-0.1224336251616478,
-0.37776362895965576,
-0.09253165870904922,
0.16307958960533142,
0.03740978240966797,
-0.15817496180534363,
0.12943929433822632,
-0.13448306918144226,
-0.13463595509529114,
-0.12831123173236847,
0.14034780859947205,
0.19286242127418518,
-0.4311939775943756,
0.3420359194278717,
-0.24088838696479797,
0.24938246607780457,
0.03829074651002884,
-0.17782163619995117,
0.02543337643146515,
-0.0036105848848819733,
0.35156360268592834,
0.10385202616453171,
0.035600446164608,
-0.04866499453783035,
0.07380689680576324,
-0.1717541664838791,
-0.6765371561050415,
-0.029346920549869537,
0.20050768554210663,
-0.03685717284679413,
0.12570765614509583,
0.012307262048125267,
-0.2618775963783264,
-0.08340846747159958,
-0.010878988541662693,
-0.03551017493009567,
0.014476973563432693,
0.10244986414909363,
-0.0729236826300621,
-0.02084324136376381,
-0.17230573296546936,
-0.1964719295501709,
-0.0351884625852108,
0.24687771499156952,
-0.010876103304326534,
-0.030936788767576218,
-0.11299818754196167,
0.15846097469329834,
0.3785524368286133,
0.47119373083114624,
0.10621640086174011,
0.20786356925964355,
-0.4107540249824524,
-0.4524572789669037,
0.4446575939655304,
-0.6757670640945435,
-0.3375937342643738,
-0.10050459951162338,
0.048707373440265656,
0.07371454685926437,
-0.29394930601119995,
-0.4249175488948822,
-0.06777528673410416,
0.05373748764395714,
0.19518142938613892,
0.032937418669462204,
-0.03337061032652855,
0.24887031316757202,
-0.13378207385540009,
-0.2190164476633072,
0.6619466543197632,
0.1454947292804718,
0.17986373603343964,
-0.01663806661963463,
0.08558216691017151
] |
https://github.com/huggingface/datasets/issues/5129 | unexpected `cast` or `class_encode_column` result after `rename_column` | Hi! Unfortunately, I can't reproduce this issue locally (in Python 3.7/3.10) or in Colab. I would assume this is due to a bug we fixed in the latest release, but your version is up-to-date, so I'm not sure if there is something we can do to help... | ## Describe the bug
When invoke `cast` or `class_encode_column` to a colunm renamed by `rename_column` , it will convert all the variables in this column into one variable. I also run this script in version 2.5.2, this bug does not appear. So I switched to the older version.
## Steps to reproduce the bug
```python
from datasets import load_dataset
dataset = load_dataset("amazon_reviews_multi", "en")
data = dataset['train']
data = data.remove_columns(
[
"review_id",
"product_id",
"reviewer_id",
"review_title",
"language",
"product_category",
]
)
data = data.rename_column("review_body", "text")
data1 = data.class_encode_column("stars")
print(set(data1.data.columns[0]))
# output: {<pyarrow.Int64Scalar: 4>, <pyarrow.Int64Scalar: 2>, <pyarrow.Int64Scalar: 3>, <pyarrow.Int64Scalar: 0>, <pyarrow.Int64Scalar: 1>}
data = data.rename_column("stars", "label")
print(set(data.data.columns[0]))
# output: {<pyarrow.Int32Scalar: 5>, <pyarrow.Int32Scalar: 4>, <pyarrow.Int32Scalar: 1>, <pyarrow.Int32Scalar: 3>, <pyarrow.Int32Scalar: 2>}
data2 = data.class_encode_column("label")
print(set(data2.data.columns[0]))
# output: {<pyarrow.Int64Scalar: 0>}
```
## Expected results
the last print should be:
{<pyarrow.Int64Scalar: 4>, <pyarrow.Int64Scalar: 2>, <pyarrow.Int64Scalar: 3>, <pyarrow.Int64Scalar: 0>, <pyarrow.Int64Scalar: 1>}
## Actual results
but it output:
{<pyarrow.Int64Scalar: 0>}
## Environment info
- `datasets` version: 2.6.1
- Platform: macOS-12.5.1-arm64-arm-64bit
- Python version: 3.10.6
- PyArrow version: 9.0.0
- Pandas version: 1.5.0
| 47 | unexpected `cast` or `class_encode_column` result after `rename_column`
## Describe the bug
When invoke `cast` or `class_encode_column` to a colunm renamed by `rename_column` , it will convert all the variables in this column into one variable. I also run this script in version 2.5.2, this bug does not appear. So I switched to the older version.
## Steps to reproduce the bug
```python
from datasets import load_dataset
dataset = load_dataset("amazon_reviews_multi", "en")
data = dataset['train']
data = data.remove_columns(
[
"review_id",
"product_id",
"reviewer_id",
"review_title",
"language",
"product_category",
]
)
data = data.rename_column("review_body", "text")
data1 = data.class_encode_column("stars")
print(set(data1.data.columns[0]))
# output: {<pyarrow.Int64Scalar: 4>, <pyarrow.Int64Scalar: 2>, <pyarrow.Int64Scalar: 3>, <pyarrow.Int64Scalar: 0>, <pyarrow.Int64Scalar: 1>}
data = data.rename_column("stars", "label")
print(set(data.data.columns[0]))
# output: {<pyarrow.Int32Scalar: 5>, <pyarrow.Int32Scalar: 4>, <pyarrow.Int32Scalar: 1>, <pyarrow.Int32Scalar: 3>, <pyarrow.Int32Scalar: 2>}
data2 = data.class_encode_column("label")
print(set(data2.data.columns[0]))
# output: {<pyarrow.Int64Scalar: 0>}
```
## Expected results
the last print should be:
{<pyarrow.Int64Scalar: 4>, <pyarrow.Int64Scalar: 2>, <pyarrow.Int64Scalar: 3>, <pyarrow.Int64Scalar: 0>, <pyarrow.Int64Scalar: 1>}
## Actual results
but it output:
{<pyarrow.Int64Scalar: 0>}
## Environment info
- `datasets` version: 2.6.1
- Platform: macOS-12.5.1-arm64-arm-64bit
- Python version: 3.10.6
- PyArrow version: 9.0.0
- Pandas version: 1.5.0
Hi! Unfortunately, I can't reproduce this issue locally (in Python 3.7/3.10) or in Colab. I would assume this is due to a bug we fixed in the latest release, but your version is up-to-date, so I'm not sure if there is something we can do to help... | [
0.24168212711811066,
0.03820769488811493,
-0.0036129411309957504,
0.14938554167747498,
0.9369388818740845,
0.14646252989768982,
0.3778993785381317,
0.36240869760513306,
-0.3428438603878021,
0.18796268105506897,
-0.04112548381090164,
0.36037856340408325,
-0.08040358871221542,
-0.054241448640823364,
-0.06983652710914612,
-0.16540652513504028,
0.33657005429267883,
-0.0055044591426849365,
-0.1475563943386078,
-0.20108458399772644,
-0.5325029492378235,
0.21582385897636414,
-0.17949125170707703,
0.07549256831407547,
0.036329153925180435,
0.2641637921333313,
-0.15512357652187347,
-0.26291927695274353,
-0.12831607460975647,
-0.013422941789031029,
0.13632827997207642,
-0.17347818613052368,
-0.013315882533788681,
0.2713073492050171,
-0.00012193890142953023,
-0.10916660726070404,
-0.026581361889839172,
0.05468090623617172,
-0.059539660811424255,
-0.17849688231945038,
0.16210493445396423,
-0.2150120884180069,
0.1756884902715683,
-0.4767968952655792,
0.07073138654232025,
-0.15134364366531372,
-0.4293476343154907,
-0.29651427268981934,
-0.18688784539699554,
0.14538948237895966,
0.14049308001995087,
-0.04317294806241989,
-0.2954421639442444,
0.16867226362228394,
0.2026921659708023,
-0.18572352826595306,
-0.2784914970397949,
-0.18666012585163116,
0.09585040807723999,
0.2267215996980667,
0.09742482006549835,
0.3369523286819458,
-0.15799222886562347,
-0.3610498011112213,
0.20418214797973633,
0.20682597160339355,
0.18867391347885132,
-0.13928908109664917,
0.22151431441307068,
-0.15897223353385925,
0.3314962387084961,
-0.4348960816860199,
-0.16348211467266083,
0.11183402687311172,
0.37674397230148315,
-0.11336217820644379,
-0.0892397090792656,
0.1852419525384903,
0.3508427143096924,
0.01242029294371605,
-0.5506618022918701,
0.32373499870300293,
0.10862773656845093,
0.07879113405942917,
-0.11509426683187485,
0.1982828974723816,
-0.05417999252676964,
0.32830554246902466,
-0.1029292643070221,
0.11405858397483826,
0.35117194056510925,
0.07299993932247162,
-0.224713534116745,
-0.1560615450143814,
-0.3924584984779358,
-0.12122532725334167,
-0.07353390008211136,
0.11015300452709198,
-0.2862900495529175,
0.17499618232250214,
0.08862150460481644,
0.06314121931791306,
0.4328445494174957,
-0.007619597017765045,
0.13600236177444458,
0.26093849539756775,
-0.017661109566688538,
0.39775320887565613,
0.11174462735652924,
0.017414966598153114,
-0.11579552292823792,
-0.009030185639858246,
0.20269080996513367,
0.004674375988543034,
0.3617367744445801,
0.24216899275779724,
0.04495590180158615,
-0.1863355040550232,
-0.2177560031414032,
0.11652417480945587,
-0.19979903101921082,
0.31546372175216675,
0.07305613905191422,
0.2433600127696991,
0.12120696902275085,
0.5887877941131592,
0.3907206654548645,
0.4285851716995239,
0.1217384859919548,
-0.29057902097702026,
-0.1520032435655594,
0.2500867545604706,
-0.29362747073173523,
-0.13117779791355133,
0.04065379127860069,
0.44140979647636414,
-0.20194698870182037,
0.3229950964450836,
0.07930150628089905,
-0.5893115401268005,
-0.287627249956131,
-0.13504654169082642,
0.2624031603336334,
-0.004672233015298843,
-0.06471884995698929,
0.21914154291152954,
0.3639596700668335,
-0.23301184177398682,
-0.0062437504529953,
0.23191121220588684,
-0.10221750289201736,
-0.17588816583156586,
-0.24030975997447968,
0.11777573823928833,
0.21278440952301025,
0.09330113977193832,
0.18494954705238342,
-0.0099872425198555,
0.5348851680755615,
0.061792027205228806,
0.2179044783115387,
-0.45580899715423584,
0.23259758949279785,
-0.11468912661075592,
0.16412191092967987,
-0.11726804077625275,
-0.15792354941368103,
0.04130640625953674,
-0.11993364244699478,
0.21325872838497162,
0.29790693521499634,
0.05669284611940384,
0.04192217066884041,
-0.014512941241264343,
-0.07968176156282425,
-0.4052874445915222,
0.38763368129730225,
-0.363736629486084,
-0.1317051202058792,
-0.07736794650554657,
-0.09818820655345917,
-0.16777904331684113,
0.2232722043991089,
-0.035071272403001785,
-0.024183422327041626,
-0.03556892275810242,
0.0281917043030262,
0.06701695919036865,
0.07411081343889236,
0.249991774559021,
-0.2611984610557556,
-0.022787701338529587,
0.04648148640990257,
-0.05051403492689133,
0.08386082947254181,
0.30190420150756836,
0.056837067008018494,
-0.09453321248292923,
0.06170687451958656,
-0.29483962059020996,
0.21036115288734436,
0.12273332476615906,
-0.03844281658530235,
0.07571565359830856,
0.25932973623275757,
0.07601336389780045,
-0.30752208828926086,
-0.03693395480513573,
0.5004407167434692,
-0.201372891664505,
-0.22595350444316864,
-0.4018706679344177,
-0.034857966005802155,
-0.057889342308044434,
0.12192771583795547,
0.15076595544815063,
0.08165784925222397,
-0.11748407781124115,
0.07994432747364044,
-0.28171810507774353,
-0.14277729392051697,
-0.05255106836557388,
-0.2211286872625351,
0.20221206545829773,
-0.0876728892326355,
0.04438542574644089,
0.04874024540185928,
-0.14718681573867798,
-0.22923067212104797,
0.34906187653541565,
0.43705734610557556,
0.00964487623423338,
-0.05455837398767471,
0.46115586161613464,
-0.2042786031961441,
0.0959232822060585,
-0.4202348291873932,
-0.006395682692527771,
-0.28324970602989197,
0.024086248129606247,
0.0033556018024683,
-0.059209275990724564,
0.2927962839603424,
-0.05725772678852081,
0.04721105471253395,
0.39454948902130127,
0.013047698885202408,
0.46618473529815674,
-0.008401941508054733,
0.08194511383771896,
-0.17130224406719208,
-0.3236006796360016,
0.015158472582697868,
-0.3134274482727051,
-0.09717677533626556,
-0.09892943501472473,
0.03616049513220787,
-0.03484474867582321,
-0.30813688039779663,
0.23637232184410095,
0.4474530816078186,
0.02902853861451149,
-0.08035770803689957,
-0.07449062168598175,
-0.053534917533397675,
0.10995025187730789,
-0.2932494282722473,
0.4855404794216156,
0.5037856101989746,
0.06698980927467346,
-0.044290345162153244,
0.22082313895225525,
0.12495803087949753,
-0.0935686007142067,
0.24196168780326843,
0.3875245451927185,
-0.10427342355251312,
0.3712577819824219,
0.24103374779224396,
-0.06959685683250427,
-0.25682881474494934,
0.0994257926940918,
0.3577542006969452,
0.19835852086544037,
-0.5555068254470825,
0.30079394578933716,
-0.3674146234989166,
0.18796521425247192,
-0.33436742424964905,
0.07772337645292282,
0.3597473204135895,
-0.510582447052002,
-0.28653132915496826,
0.13572552800178528,
-0.15121673047542572,
-0.09965863078832626,
-0.22146357595920563,
0.0906205028295517,
-0.15103557705879211,
0.1793290227651596,
-0.1539250612258911,
-0.03351521119475365,
-0.12247151881456375,
-0.0660724937915802,
0.017370902001857758,
-0.36150088906288147,
-0.01690707914531231,
-0.10056918114423752,
-0.034524060785770416,
-0.28982529044151306,
-0.33356696367263794,
-0.1406053602695465,
-0.42658382654190063,
-0.06308948993682861,
0.15699343383312225,
-0.23911075294017792,
-0.36985868215560913,
-0.267909437417984,
0.20331577956676483,
0.08691239356994629,
0.10048140585422516,
0.4257066547870636,
0.16310952603816986,
-0.294687420129776,
-0.3148174583911896,
-0.3775513470172882,
-0.06717289239168167,
-0.039269402623176575,
0.14076265692710876,
-0.270340234041214,
-0.058436259627342224,
-0.5372507572174072,
-0.1149975135922432,
-0.07944332808256149,
0.23289556801319122,
0.2213057279586792,
-0.13128238916397095,
0.06148776039481163,
0.33928725123405457,
0.0027421764098107815,
-0.13730956614017487,
-0.13762328028678894,
0.12694138288497925,
0.072166807949543,
-0.05941811949014664,
-0.49767863750457764,
-0.029952801764011383,
-0.26634421944618225,
0.10593953728675842,
-0.08675238490104675,
-0.008912870660424232,
0.1725471466779709,
0.27492135763168335,
-0.08516985923051834,
-0.12132947891950607,
-0.1381966769695282,
-0.038447268307209015,
0.04089067503809929,
0.14619484543800354,
-0.2940424084663391,
0.5107004046440125,
0.08505953848361969,
0.015320025384426117,
0.026675771921873093,
-0.1602018028497696,
0.11757482588291168,
-0.03239894658327103,
-0.01107192412018776,
-0.04329349845647812,
-0.21142573654651642,
0.315725177526474,
-0.5937705039978027,
-0.044739581644535065,
-0.039483219385147095,
-0.25257787108421326,
-0.20392869412899017,
-0.01663859188556671,
0.4848221242427826,
-0.12418893724679947,
-0.2266121655702591,
0.08928185701370239,
-0.15140610933303833,
-0.057680971920490265,
0.07487735152244568,
0.20174044370651245,
0.10828503966331482,
-0.08576487749814987,
0.11870871484279633,
0.13469555974006653,
-0.3512750566005707,
-0.17680712044239044,
-0.2839195430278778,
-0.4649427533149719,
0.11586834490299225,
0.34273138642311096,
-0.000978580443188548,
0.33033913373947144,
0.2195560187101364,
-0.17400580644607544,
0.2992500066757202,
-0.02468430995941162,
0.8569425344467163,
-0.053909480571746826,
-0.0893092006444931,
0.30726349353790283,
0.1629585325717926,
-0.16501526534557343,
-0.36922475695610046,
-0.3278193473815918,
-0.06995659321546555,
0.20779496431350708,
0.2883707880973816,
-0.08125379681587219,
-0.04158096760511398,
0.5628620386123657,
0.27766504883766174,
-0.04595999792218208,
0.04003908112645149,
-0.14493748545646667,
-0.3692642152309418,
0.06277932971715927,
0.07064028829336166,
0.13109475374221802,
0.1622476875782013,
-0.4372277557849884,
-0.10618415474891663,
0.031453218311071396,
-0.281003475189209,
0.11686372011899948,
-0.1563480645418167,
0.20181456208229065,
-0.15370485186576843,
0.21459974348545074,
-0.4143661558628082,
-0.1784093976020813,
-0.016616886481642723,
0.514654278755188,
-0.06751446425914764,
-0.5457035303115845,
0.296208918094635,
-0.10841446369886398,
0.6010235548019409,
0.19799409806728363,
-0.025908324867486954,
0.11431683599948883,
-0.22653783857822418,
0.24100323021411896,
0.15924710035324097,
-0.33239221572875977,
0.48215872049331665,
0.08394382894039154,
-0.23343245685100555,
-0.18222995102405548,
0.39957860112190247,
0.2279740422964096,
0.017229974269866943,
0.064373679459095,
0.22034475207328796,
-0.3699217736721039,
0.15780895948410034,
0.19691868126392365,
1.188874363899231,
0.057109229266643524,
0.09518665075302124,
0.17643967270851135,
-0.41504162549972534,
0.29437002539634705,
-0.2206142246723175,
0.25940966606140137,
-0.5494281053543091,
-0.30078402161598206,
-0.061109960079193115,
-0.09065160900354385,
0.21671077609062195,
-0.11901848018169403,
-0.39796456694602966,
0.0012438457924872637,
-0.653392493724823,
0.1955995410680771,
-0.011648669838905334,
-0.2882121205329895,
-0.04524306207895279,
-0.32014942169189453,
0.03282037377357483,
0.0398034006357193,
-0.1156550943851471,
-0.3871751129627228,
0.18453529477119446,
0.17182707786560059,
-0.19905522465705872,
-0.21474125981330872,
-0.14678378403186798,
0.32568153738975525,
0.36539438366889954,
0.1913013905286789,
0.0997319146990776,
-0.480191171169281,
0.24554309248924255,
0.2592761516571045,
0.44653624296188354,
0.20023494958877563,
0.24055546522140503,
0.3150132894515991,
0.42818522453308105,
0.6215323805809021,
0.2889435887336731,
-0.08496883511543274,
0.21070706844329834,
0.15101242065429688,
-0.03235255181789398,
-0.07404126971960068,
0.0412135049700737,
0.027974754571914673,
-0.18838027119636536,
0.022247325628995895,
0.1191009134054184,
-0.6815565228462219,
0.014967706054449081,
0.18978841602802277,
0.19971321523189545,
-0.5955305099487305,
0.06448914110660553,
-0.24925436079502106,
-0.3143044710159302,
0.40426623821258545,
-0.17305530607700348,
-0.45108750462532043,
0.030329126864671707,
0.40401148796081543,
0.3795239329338074,
0.15276283025741577,
0.44381436705589294,
0.026064608246088028,
-0.20036882162094116,
-0.09734483063220978,
0.14913392066955566,
0.12311377376317978,
-0.4850994944572449,
0.37220335006713867,
-0.27447882294654846,
0.1286337524652481,
0.11275548487901688,
-0.04918121173977852,
-0.421425998210907,
0.2554877698421478,
-0.3168030083179474,
-0.24345575273036957,
0.11076762527227402,
0.0677693635225296,
0.3372640013694763,
0.08541187644004822,
0.050367847084999084,
0.30662059783935547,
-0.18949182331562042,
0.02387281134724617,
-0.18021249771118164,
-0.15231086313724518,
-0.08512280881404877,
0.3437771201133728,
-0.012044016271829605,
-0.038283973932266235,
-0.2982127368450165,
-0.08306558430194855,
0.20696765184402466,
0.25228041410446167,
0.19963768124580383,
-0.17326068878173828,
-0.3847360610961914,
0.18633566796779633,
0.27754685282707214,
0.3544697165489197,
-0.15958048403263092,
0.06915806233882904,
-0.11324527859687805,
-0.18663685023784637,
0.09848229587078094,
0.14199745655059814,
0.056162163615226746,
0.3104584515094757,
-0.16171881556510925,
0.1644798219203949,
0.1848083734512329,
-0.3068222105503082,
-0.17138782143592834,
-0.0691891610622406,
0.05829913541674614,
0.251289963722229,
0.17157483100891113,
0.11268959939479828,
-0.3764503300189972,
-0.03418687731027603,
-0.16337276995182037,
0.11681374907493591,
0.3647707998752594,
-0.293843150138855,
0.15998204052448273,
-0.2169640064239502,
0.14970853924751282,
0.5030732154846191,
-0.36118191480636597,
-0.3857111930847168,
0.13810834288597107,
0.0409560427069664,
-0.16892792284488678,
-0.11179021000862122,
-0.24045336246490479,
0.03595813736319542,
-0.20492485165596008,
0.27928292751312256,
-0.1528218686580658,
-0.36941128969192505,
-0.02626669406890869,
-0.22982844710350037,
0.7616552114486694,
-0.2775120735168457,
0.21440957486629486,
0.6045951843261719,
0.08511200547218323,
0.1794985681772232,
0.24359455704689026,
0.03454461321234703,
-0.2004326581954956,
0.3533861041069031,
0.08361683785915375,
-0.12277138233184814,
0.3205602765083313,
0.2443719059228897,
-0.06189670413732529,
0.07234114408493042,
0.4231169521808624,
0.032250285148620605,
-0.353951096534729,
0.24607840180397034,
0.02064470946788788,
0.004802681505680084,
-0.36066025495529175,
-0.2242426723241806,
-0.17526786029338837,
0.4133946895599365,
-0.23692399263381958,
-0.03981289267539978,
-0.09876267611980438,
0.09295179694890976,
-0.2864716053009033,
0.14514869451522827,
-0.1584824174642563,
0.0390816405415535,
0.4746707081794739,
0.1696157157421112,
-0.03927622735500336,
-0.30817458033561707,
-0.24267327785491943,
-0.02160363271832466,
0.4714626669883728,
-0.4393640160560608,
0.12305773049592972,
0.3737415075302124,
0.02273472771048546,
0.1419830620288849,
-0.07127799838781357,
0.2858346402645111,
0.28319278359413147,
0.15760008990764618,
-0.210875004529953,
-0.032219912856817245,
-0.19780752062797546,
0.23451533913612366,
0.26737040281295776,
0.14788848161697388,
0.1771988421678543,
-0.07618902623653412,
0.05202855169773102,
-0.009320000186562538,
0.1071329414844513,
0.13375261425971985,
0.6172818541526794,
-0.35770443081855774,
0.5941557884216309,
0.08983230590820312,
-0.24612337350845337,
-0.15502050518989563,
-0.060260213911533356,
-0.4136054813861847,
-0.34295985102653503,
0.168400377035141,
0.07488053292036057,
0.09999522566795349,
0.0931469053030014,
0.027872785925865173,
0.5275381207466125,
0.2056015282869339,
-0.0028753243386745453,
-0.4858003556728363,
-0.23557904362678528,
-0.1303752064704895,
-0.04180744290351868,
0.09657210111618042,
0.40879344940185547,
-0.16433987021446228,
0.025175411254167557,
-0.05274749547243118,
0.03889524191617966,
-0.07600266486406326,
-0.06595729291439056,
-0.07516654580831528,
-0.10980813950300217,
0.47121888399124146,
-0.17667730152606964,
-0.16780312359333038,
0.054650530219078064,
0.06995261460542679,
-0.027674658223986626,
-0.16757015883922577,
0.2591089606285095,
0.3686524033546448,
-0.021696843206882477,
-0.08591733872890472,
-0.19930240511894226,
0.10573691129684448,
-0.13102076947689056,
0.19295430183410645,
0.03252405300736427,
0.4097423255443573,
-0.03384260833263397,
0.010173061862587929,
0.08145758509635925,
-0.1849825382232666,
-0.1571706384420395,
0.4357893168926239,
-0.027800966054201126,
0.022631999105215073,
0.040021590888500214,
0.1433964967727661,
0.05533178523182869,
0.0911339744925499,
0.06787886470556259,
0.1400054544210434,
-0.08695124834775925,
0.0633329525589943,
-0.024615786969661713,
0.13945603370666504,
0.04318316653370857,
0.0664544552564621,
0.27345138788223267,
0.36730286478996277,
-0.33553066849708557,
-0.4909423291683197,
0.4694494605064392,
-0.0290350541472435,
-0.4675308167934418,
0.05921854078769684,
0.28919297456741333,
-0.2733149528503418,
-0.007534375414252281,
-0.567328929901123,
-0.2642901837825775,
0.2333587408065796,
-0.14826148748397827,
-0.14756205677986145,
0.4395500719547272,
-0.19291998445987701,
-0.08191707730293274,
-0.13833707571029663,
-0.0917259156703949,
0.0026225093752145767,
-0.08236538618803024,
0.06635525822639465,
-0.17748615145683289
] |
https://github.com/huggingface/datasets/issues/5129 | unexpected `cast` or `class_encode_column` result after `rename_column` | Hi, 方子东. I tried running the code with exact the same configuration (both datasets 2.5.2 and 2.6.1, python, pyarrow, pandas), but on Linux. The results seem to be the expected `{<pyarrow.Int64Scalar: 4>, <pyarrow.Int64Scalar: 2>, <pyarrow.Int64Scalar: 3>, <pyarrow.Int64Scalar: 0>, <pyarrow.Int64Scalar: 1>}`.
I don't have a Mac device. I can't verify whether this is a M1 chip-specific problem. | ## Describe the bug
When invoke `cast` or `class_encode_column` to a colunm renamed by `rename_column` , it will convert all the variables in this column into one variable. I also run this script in version 2.5.2, this bug does not appear. So I switched to the older version.
## Steps to reproduce the bug
```python
from datasets import load_dataset
dataset = load_dataset("amazon_reviews_multi", "en")
data = dataset['train']
data = data.remove_columns(
[
"review_id",
"product_id",
"reviewer_id",
"review_title",
"language",
"product_category",
]
)
data = data.rename_column("review_body", "text")
data1 = data.class_encode_column("stars")
print(set(data1.data.columns[0]))
# output: {<pyarrow.Int64Scalar: 4>, <pyarrow.Int64Scalar: 2>, <pyarrow.Int64Scalar: 3>, <pyarrow.Int64Scalar: 0>, <pyarrow.Int64Scalar: 1>}
data = data.rename_column("stars", "label")
print(set(data.data.columns[0]))
# output: {<pyarrow.Int32Scalar: 5>, <pyarrow.Int32Scalar: 4>, <pyarrow.Int32Scalar: 1>, <pyarrow.Int32Scalar: 3>, <pyarrow.Int32Scalar: 2>}
data2 = data.class_encode_column("label")
print(set(data2.data.columns[0]))
# output: {<pyarrow.Int64Scalar: 0>}
```
## Expected results
the last print should be:
{<pyarrow.Int64Scalar: 4>, <pyarrow.Int64Scalar: 2>, <pyarrow.Int64Scalar: 3>, <pyarrow.Int64Scalar: 0>, <pyarrow.Int64Scalar: 1>}
## Actual results
but it output:
{<pyarrow.Int64Scalar: 0>}
## Environment info
- `datasets` version: 2.6.1
- Platform: macOS-12.5.1-arm64-arm-64bit
- Python version: 3.10.6
- PyArrow version: 9.0.0
- Pandas version: 1.5.0
| 56 | unexpected `cast` or `class_encode_column` result after `rename_column`
## Describe the bug
When invoke `cast` or `class_encode_column` to a colunm renamed by `rename_column` , it will convert all the variables in this column into one variable. I also run this script in version 2.5.2, this bug does not appear. So I switched to the older version.
## Steps to reproduce the bug
```python
from datasets import load_dataset
dataset = load_dataset("amazon_reviews_multi", "en")
data = dataset['train']
data = data.remove_columns(
[
"review_id",
"product_id",
"reviewer_id",
"review_title",
"language",
"product_category",
]
)
data = data.rename_column("review_body", "text")
data1 = data.class_encode_column("stars")
print(set(data1.data.columns[0]))
# output: {<pyarrow.Int64Scalar: 4>, <pyarrow.Int64Scalar: 2>, <pyarrow.Int64Scalar: 3>, <pyarrow.Int64Scalar: 0>, <pyarrow.Int64Scalar: 1>}
data = data.rename_column("stars", "label")
print(set(data.data.columns[0]))
# output: {<pyarrow.Int32Scalar: 5>, <pyarrow.Int32Scalar: 4>, <pyarrow.Int32Scalar: 1>, <pyarrow.Int32Scalar: 3>, <pyarrow.Int32Scalar: 2>}
data2 = data.class_encode_column("label")
print(set(data2.data.columns[0]))
# output: {<pyarrow.Int64Scalar: 0>}
```
## Expected results
the last print should be:
{<pyarrow.Int64Scalar: 4>, <pyarrow.Int64Scalar: 2>, <pyarrow.Int64Scalar: 3>, <pyarrow.Int64Scalar: 0>, <pyarrow.Int64Scalar: 1>}
## Actual results
but it output:
{<pyarrow.Int64Scalar: 0>}
## Environment info
- `datasets` version: 2.6.1
- Platform: macOS-12.5.1-arm64-arm-64bit
- Python version: 3.10.6
- PyArrow version: 9.0.0
- Pandas version: 1.5.0
Hi, 方子东. I tried running the code with exact the same configuration (both datasets 2.5.2 and 2.6.1, python, pyarrow, pandas), but on Linux. The results seem to be the expected `{<pyarrow.Int64Scalar: 4>, <pyarrow.Int64Scalar: 2>, <pyarrow.Int64Scalar: 3>, <pyarrow.Int64Scalar: 0>, <pyarrow.Int64Scalar: 1>}`.
I don't have a Mac device. I can't verify whether this is a M1 chip-specific problem. | [
0.24168212711811066,
0.03820769488811493,
-0.0036129411309957504,
0.14938554167747498,
0.9369388818740845,
0.14646252989768982,
0.3778993785381317,
0.36240869760513306,
-0.3428438603878021,
0.18796268105506897,
-0.04112548381090164,
0.36037856340408325,
-0.08040358871221542,
-0.054241448640823364,
-0.06983652710914612,
-0.16540652513504028,
0.33657005429267883,
-0.0055044591426849365,
-0.1475563943386078,
-0.20108458399772644,
-0.5325029492378235,
0.21582385897636414,
-0.17949125170707703,
0.07549256831407547,
0.036329153925180435,
0.2641637921333313,
-0.15512357652187347,
-0.26291927695274353,
-0.12831607460975647,
-0.013422941789031029,
0.13632827997207642,
-0.17347818613052368,
-0.013315882533788681,
0.2713073492050171,
-0.00012193890142953023,
-0.10916660726070404,
-0.026581361889839172,
0.05468090623617172,
-0.059539660811424255,
-0.17849688231945038,
0.16210493445396423,
-0.2150120884180069,
0.1756884902715683,
-0.4767968952655792,
0.07073138654232025,
-0.15134364366531372,
-0.4293476343154907,
-0.29651427268981934,
-0.18688784539699554,
0.14538948237895966,
0.14049308001995087,
-0.04317294806241989,
-0.2954421639442444,
0.16867226362228394,
0.2026921659708023,
-0.18572352826595306,
-0.2784914970397949,
-0.18666012585163116,
0.09585040807723999,
0.2267215996980667,
0.09742482006549835,
0.3369523286819458,
-0.15799222886562347,
-0.3610498011112213,
0.20418214797973633,
0.20682597160339355,
0.18867391347885132,
-0.13928908109664917,
0.22151431441307068,
-0.15897223353385925,
0.3314962387084961,
-0.4348960816860199,
-0.16348211467266083,
0.11183402687311172,
0.37674397230148315,
-0.11336217820644379,
-0.0892397090792656,
0.1852419525384903,
0.3508427143096924,
0.01242029294371605,
-0.5506618022918701,
0.32373499870300293,
0.10862773656845093,
0.07879113405942917,
-0.11509426683187485,
0.1982828974723816,
-0.05417999252676964,
0.32830554246902466,
-0.1029292643070221,
0.11405858397483826,
0.35117194056510925,
0.07299993932247162,
-0.224713534116745,
-0.1560615450143814,
-0.3924584984779358,
-0.12122532725334167,
-0.07353390008211136,
0.11015300452709198,
-0.2862900495529175,
0.17499618232250214,
0.08862150460481644,
0.06314121931791306,
0.4328445494174957,
-0.007619597017765045,
0.13600236177444458,
0.26093849539756775,
-0.017661109566688538,
0.39775320887565613,
0.11174462735652924,
0.017414966598153114,
-0.11579552292823792,
-0.009030185639858246,
0.20269080996513367,
0.004674375988543034,
0.3617367744445801,
0.24216899275779724,
0.04495590180158615,
-0.1863355040550232,
-0.2177560031414032,
0.11652417480945587,
-0.19979903101921082,
0.31546372175216675,
0.07305613905191422,
0.2433600127696991,
0.12120696902275085,
0.5887877941131592,
0.3907206654548645,
0.4285851716995239,
0.1217384859919548,
-0.29057902097702026,
-0.1520032435655594,
0.2500867545604706,
-0.29362747073173523,
-0.13117779791355133,
0.04065379127860069,
0.44140979647636414,
-0.20194698870182037,
0.3229950964450836,
0.07930150628089905,
-0.5893115401268005,
-0.287627249956131,
-0.13504654169082642,
0.2624031603336334,
-0.004672233015298843,
-0.06471884995698929,
0.21914154291152954,
0.3639596700668335,
-0.23301184177398682,
-0.0062437504529953,
0.23191121220588684,
-0.10221750289201736,
-0.17588816583156586,
-0.24030975997447968,
0.11777573823928833,
0.21278440952301025,
0.09330113977193832,
0.18494954705238342,
-0.0099872425198555,
0.5348851680755615,
0.061792027205228806,
0.2179044783115387,
-0.45580899715423584,
0.23259758949279785,
-0.11468912661075592,
0.16412191092967987,
-0.11726804077625275,
-0.15792354941368103,
0.04130640625953674,
-0.11993364244699478,
0.21325872838497162,
0.29790693521499634,
0.05669284611940384,
0.04192217066884041,
-0.014512941241264343,
-0.07968176156282425,
-0.4052874445915222,
0.38763368129730225,
-0.363736629486084,
-0.1317051202058792,
-0.07736794650554657,
-0.09818820655345917,
-0.16777904331684113,
0.2232722043991089,
-0.035071272403001785,
-0.024183422327041626,
-0.03556892275810242,
0.0281917043030262,
0.06701695919036865,
0.07411081343889236,
0.249991774559021,
-0.2611984610557556,
-0.022787701338529587,
0.04648148640990257,
-0.05051403492689133,
0.08386082947254181,
0.30190420150756836,
0.056837067008018494,
-0.09453321248292923,
0.06170687451958656,
-0.29483962059020996,
0.21036115288734436,
0.12273332476615906,
-0.03844281658530235,
0.07571565359830856,
0.25932973623275757,
0.07601336389780045,
-0.30752208828926086,
-0.03693395480513573,
0.5004407167434692,
-0.201372891664505,
-0.22595350444316864,
-0.4018706679344177,
-0.034857966005802155,
-0.057889342308044434,
0.12192771583795547,
0.15076595544815063,
0.08165784925222397,
-0.11748407781124115,
0.07994432747364044,
-0.28171810507774353,
-0.14277729392051697,
-0.05255106836557388,
-0.2211286872625351,
0.20221206545829773,
-0.0876728892326355,
0.04438542574644089,
0.04874024540185928,
-0.14718681573867798,
-0.22923067212104797,
0.34906187653541565,
0.43705734610557556,
0.00964487623423338,
-0.05455837398767471,
0.46115586161613464,
-0.2042786031961441,
0.0959232822060585,
-0.4202348291873932,
-0.006395682692527771,
-0.28324970602989197,
0.024086248129606247,
0.0033556018024683,
-0.059209275990724564,
0.2927962839603424,
-0.05725772678852081,
0.04721105471253395,
0.39454948902130127,
0.013047698885202408,
0.46618473529815674,
-0.008401941508054733,
0.08194511383771896,
-0.17130224406719208,
-0.3236006796360016,
0.015158472582697868,
-0.3134274482727051,
-0.09717677533626556,
-0.09892943501472473,
0.03616049513220787,
-0.03484474867582321,
-0.30813688039779663,
0.23637232184410095,
0.4474530816078186,
0.02902853861451149,
-0.08035770803689957,
-0.07449062168598175,
-0.053534917533397675,
0.10995025187730789,
-0.2932494282722473,
0.4855404794216156,
0.5037856101989746,
0.06698980927467346,
-0.044290345162153244,
0.22082313895225525,
0.12495803087949753,
-0.0935686007142067,
0.24196168780326843,
0.3875245451927185,
-0.10427342355251312,
0.3712577819824219,
0.24103374779224396,
-0.06959685683250427,
-0.25682881474494934,
0.0994257926940918,
0.3577542006969452,
0.19835852086544037,
-0.5555068254470825,
0.30079394578933716,
-0.3674146234989166,
0.18796521425247192,
-0.33436742424964905,
0.07772337645292282,
0.3597473204135895,
-0.510582447052002,
-0.28653132915496826,
0.13572552800178528,
-0.15121673047542572,
-0.09965863078832626,
-0.22146357595920563,
0.0906205028295517,
-0.15103557705879211,
0.1793290227651596,
-0.1539250612258911,
-0.03351521119475365,
-0.12247151881456375,
-0.0660724937915802,
0.017370902001857758,
-0.36150088906288147,
-0.01690707914531231,
-0.10056918114423752,
-0.034524060785770416,
-0.28982529044151306,
-0.33356696367263794,
-0.1406053602695465,
-0.42658382654190063,
-0.06308948993682861,
0.15699343383312225,
-0.23911075294017792,
-0.36985868215560913,
-0.267909437417984,
0.20331577956676483,
0.08691239356994629,
0.10048140585422516,
0.4257066547870636,
0.16310952603816986,
-0.294687420129776,
-0.3148174583911896,
-0.3775513470172882,
-0.06717289239168167,
-0.039269402623176575,
0.14076265692710876,
-0.270340234041214,
-0.058436259627342224,
-0.5372507572174072,
-0.1149975135922432,
-0.07944332808256149,
0.23289556801319122,
0.2213057279586792,
-0.13128238916397095,
0.06148776039481163,
0.33928725123405457,
0.0027421764098107815,
-0.13730956614017487,
-0.13762328028678894,
0.12694138288497925,
0.072166807949543,
-0.05941811949014664,
-0.49767863750457764,
-0.029952801764011383,
-0.26634421944618225,
0.10593953728675842,
-0.08675238490104675,
-0.008912870660424232,
0.1725471466779709,
0.27492135763168335,
-0.08516985923051834,
-0.12132947891950607,
-0.1381966769695282,
-0.038447268307209015,
0.04089067503809929,
0.14619484543800354,
-0.2940424084663391,
0.5107004046440125,
0.08505953848361969,
0.015320025384426117,
0.026675771921873093,
-0.1602018028497696,
0.11757482588291168,
-0.03239894658327103,
-0.01107192412018776,
-0.04329349845647812,
-0.21142573654651642,
0.315725177526474,
-0.5937705039978027,
-0.044739581644535065,
-0.039483219385147095,
-0.25257787108421326,
-0.20392869412899017,
-0.01663859188556671,
0.4848221242427826,
-0.12418893724679947,
-0.2266121655702591,
0.08928185701370239,
-0.15140610933303833,
-0.057680971920490265,
0.07487735152244568,
0.20174044370651245,
0.10828503966331482,
-0.08576487749814987,
0.11870871484279633,
0.13469555974006653,
-0.3512750566005707,
-0.17680712044239044,
-0.2839195430278778,
-0.4649427533149719,
0.11586834490299225,
0.34273138642311096,
-0.000978580443188548,
0.33033913373947144,
0.2195560187101364,
-0.17400580644607544,
0.2992500066757202,
-0.02468430995941162,
0.8569425344467163,
-0.053909480571746826,
-0.0893092006444931,
0.30726349353790283,
0.1629585325717926,
-0.16501526534557343,
-0.36922475695610046,
-0.3278193473815918,
-0.06995659321546555,
0.20779496431350708,
0.2883707880973816,
-0.08125379681587219,
-0.04158096760511398,
0.5628620386123657,
0.27766504883766174,
-0.04595999792218208,
0.04003908112645149,
-0.14493748545646667,
-0.3692642152309418,
0.06277932971715927,
0.07064028829336166,
0.13109475374221802,
0.1622476875782013,
-0.4372277557849884,
-0.10618415474891663,
0.031453218311071396,
-0.281003475189209,
0.11686372011899948,
-0.1563480645418167,
0.20181456208229065,
-0.15370485186576843,
0.21459974348545074,
-0.4143661558628082,
-0.1784093976020813,
-0.016616886481642723,
0.514654278755188,
-0.06751446425914764,
-0.5457035303115845,
0.296208918094635,
-0.10841446369886398,
0.6010235548019409,
0.19799409806728363,
-0.025908324867486954,
0.11431683599948883,
-0.22653783857822418,
0.24100323021411896,
0.15924710035324097,
-0.33239221572875977,
0.48215872049331665,
0.08394382894039154,
-0.23343245685100555,
-0.18222995102405548,
0.39957860112190247,
0.2279740422964096,
0.017229974269866943,
0.064373679459095,
0.22034475207328796,
-0.3699217736721039,
0.15780895948410034,
0.19691868126392365,
1.188874363899231,
0.057109229266643524,
0.09518665075302124,
0.17643967270851135,
-0.41504162549972534,
0.29437002539634705,
-0.2206142246723175,
0.25940966606140137,
-0.5494281053543091,
-0.30078402161598206,
-0.061109960079193115,
-0.09065160900354385,
0.21671077609062195,
-0.11901848018169403,
-0.39796456694602966,
0.0012438457924872637,
-0.653392493724823,
0.1955995410680771,
-0.011648669838905334,
-0.2882121205329895,
-0.04524306207895279,
-0.32014942169189453,
0.03282037377357483,
0.0398034006357193,
-0.1156550943851471,
-0.3871751129627228,
0.18453529477119446,
0.17182707786560059,
-0.19905522465705872,
-0.21474125981330872,
-0.14678378403186798,
0.32568153738975525,
0.36539438366889954,
0.1913013905286789,
0.0997319146990776,
-0.480191171169281,
0.24554309248924255,
0.2592761516571045,
0.44653624296188354,
0.20023494958877563,
0.24055546522140503,
0.3150132894515991,
0.42818522453308105,
0.6215323805809021,
0.2889435887336731,
-0.08496883511543274,
0.21070706844329834,
0.15101242065429688,
-0.03235255181789398,
-0.07404126971960068,
0.0412135049700737,
0.027974754571914673,
-0.18838027119636536,
0.022247325628995895,
0.1191009134054184,
-0.6815565228462219,
0.014967706054449081,
0.18978841602802277,
0.19971321523189545,
-0.5955305099487305,
0.06448914110660553,
-0.24925436079502106,
-0.3143044710159302,
0.40426623821258545,
-0.17305530607700348,
-0.45108750462532043,
0.030329126864671707,
0.40401148796081543,
0.3795239329338074,
0.15276283025741577,
0.44381436705589294,
0.026064608246088028,
-0.20036882162094116,
-0.09734483063220978,
0.14913392066955566,
0.12311377376317978,
-0.4850994944572449,
0.37220335006713867,
-0.27447882294654846,
0.1286337524652481,
0.11275548487901688,
-0.04918121173977852,
-0.421425998210907,
0.2554877698421478,
-0.3168030083179474,
-0.24345575273036957,
0.11076762527227402,
0.0677693635225296,
0.3372640013694763,
0.08541187644004822,
0.050367847084999084,
0.30662059783935547,
-0.18949182331562042,
0.02387281134724617,
-0.18021249771118164,
-0.15231086313724518,
-0.08512280881404877,
0.3437771201133728,
-0.012044016271829605,
-0.038283973932266235,
-0.2982127368450165,
-0.08306558430194855,
0.20696765184402466,
0.25228041410446167,
0.19963768124580383,
-0.17326068878173828,
-0.3847360610961914,
0.18633566796779633,
0.27754685282707214,
0.3544697165489197,
-0.15958048403263092,
0.06915806233882904,
-0.11324527859687805,
-0.18663685023784637,
0.09848229587078094,
0.14199745655059814,
0.056162163615226746,
0.3104584515094757,
-0.16171881556510925,
0.1644798219203949,
0.1848083734512329,
-0.3068222105503082,
-0.17138782143592834,
-0.0691891610622406,
0.05829913541674614,
0.251289963722229,
0.17157483100891113,
0.11268959939479828,
-0.3764503300189972,
-0.03418687731027603,
-0.16337276995182037,
0.11681374907493591,
0.3647707998752594,
-0.293843150138855,
0.15998204052448273,
-0.2169640064239502,
0.14970853924751282,
0.5030732154846191,
-0.36118191480636597,
-0.3857111930847168,
0.13810834288597107,
0.0409560427069664,
-0.16892792284488678,
-0.11179021000862122,
-0.24045336246490479,
0.03595813736319542,
-0.20492485165596008,
0.27928292751312256,
-0.1528218686580658,
-0.36941128969192505,
-0.02626669406890869,
-0.22982844710350037,
0.7616552114486694,
-0.2775120735168457,
0.21440957486629486,
0.6045951843261719,
0.08511200547218323,
0.1794985681772232,
0.24359455704689026,
0.03454461321234703,
-0.2004326581954956,
0.3533861041069031,
0.08361683785915375,
-0.12277138233184814,
0.3205602765083313,
0.2443719059228897,
-0.06189670413732529,
0.07234114408493042,
0.4231169521808624,
0.032250285148620605,
-0.353951096534729,
0.24607840180397034,
0.02064470946788788,
0.004802681505680084,
-0.36066025495529175,
-0.2242426723241806,
-0.17526786029338837,
0.4133946895599365,
-0.23692399263381958,
-0.03981289267539978,
-0.09876267611980438,
0.09295179694890976,
-0.2864716053009033,
0.14514869451522827,
-0.1584824174642563,
0.0390816405415535,
0.4746707081794739,
0.1696157157421112,
-0.03927622735500336,
-0.30817458033561707,
-0.24267327785491943,
-0.02160363271832466,
0.4714626669883728,
-0.4393640160560608,
0.12305773049592972,
0.3737415075302124,
0.02273472771048546,
0.1419830620288849,
-0.07127799838781357,
0.2858346402645111,
0.28319278359413147,
0.15760008990764618,
-0.210875004529953,
-0.032219912856817245,
-0.19780752062797546,
0.23451533913612366,
0.26737040281295776,
0.14788848161697388,
0.1771988421678543,
-0.07618902623653412,
0.05202855169773102,
-0.009320000186562538,
0.1071329414844513,
0.13375261425971985,
0.6172818541526794,
-0.35770443081855774,
0.5941557884216309,
0.08983230590820312,
-0.24612337350845337,
-0.15502050518989563,
-0.060260213911533356,
-0.4136054813861847,
-0.34295985102653503,
0.168400377035141,
0.07488053292036057,
0.09999522566795349,
0.0931469053030014,
0.027872785925865173,
0.5275381207466125,
0.2056015282869339,
-0.0028753243386745453,
-0.4858003556728363,
-0.23557904362678528,
-0.1303752064704895,
-0.04180744290351868,
0.09657210111618042,
0.40879344940185547,
-0.16433987021446228,
0.025175411254167557,
-0.05274749547243118,
0.03889524191617966,
-0.07600266486406326,
-0.06595729291439056,
-0.07516654580831528,
-0.10980813950300217,
0.47121888399124146,
-0.17667730152606964,
-0.16780312359333038,
0.054650530219078064,
0.06995261460542679,
-0.027674658223986626,
-0.16757015883922577,
0.2591089606285095,
0.3686524033546448,
-0.021696843206882477,
-0.08591733872890472,
-0.19930240511894226,
0.10573691129684448,
-0.13102076947689056,
0.19295430183410645,
0.03252405300736427,
0.4097423255443573,
-0.03384260833263397,
0.010173061862587929,
0.08145758509635925,
-0.1849825382232666,
-0.1571706384420395,
0.4357893168926239,
-0.027800966054201126,
0.022631999105215073,
0.040021590888500214,
0.1433964967727661,
0.05533178523182869,
0.0911339744925499,
0.06787886470556259,
0.1400054544210434,
-0.08695124834775925,
0.0633329525589943,
-0.024615786969661713,
0.13945603370666504,
0.04318316653370857,
0.0664544552564621,
0.27345138788223267,
0.36730286478996277,
-0.33553066849708557,
-0.4909423291683197,
0.4694494605064392,
-0.0290350541472435,
-0.4675308167934418,
0.05921854078769684,
0.28919297456741333,
-0.2733149528503418,
-0.007534375414252281,
-0.567328929901123,
-0.2642901837825775,
0.2333587408065796,
-0.14826148748397827,
-0.14756205677986145,
0.4395500719547272,
-0.19291998445987701,
-0.08191707730293274,
-0.13833707571029663,
-0.0917259156703949,
0.0026225093752145767,
-0.08236538618803024,
0.06635525822639465,
-0.17748615145683289
] |
https://github.com/huggingface/datasets/issues/5129 | unexpected `cast` or `class_encode_column` result after `rename_column` | > Hi! Unfortunately, I can't reproduce this issue locally (in Python 3.7/3.10) or in Colab. I would assume this is due to a bug we fixed in the latest release, but your version is up-to-date, so I'm not sure if there is something we can do to help...
Thank you for your attention and feel sorry to take your time. Since this is a bug of old version, I think mybe my problem is because `cast` operation directaly used cached data generated by older verion of `datasets`. I tried to deleted the cached data and I got expected result.
| ## Describe the bug
When invoke `cast` or `class_encode_column` to a colunm renamed by `rename_column` , it will convert all the variables in this column into one variable. I also run this script in version 2.5.2, this bug does not appear. So I switched to the older version.
## Steps to reproduce the bug
```python
from datasets import load_dataset
dataset = load_dataset("amazon_reviews_multi", "en")
data = dataset['train']
data = data.remove_columns(
[
"review_id",
"product_id",
"reviewer_id",
"review_title",
"language",
"product_category",
]
)
data = data.rename_column("review_body", "text")
data1 = data.class_encode_column("stars")
print(set(data1.data.columns[0]))
# output: {<pyarrow.Int64Scalar: 4>, <pyarrow.Int64Scalar: 2>, <pyarrow.Int64Scalar: 3>, <pyarrow.Int64Scalar: 0>, <pyarrow.Int64Scalar: 1>}
data = data.rename_column("stars", "label")
print(set(data.data.columns[0]))
# output: {<pyarrow.Int32Scalar: 5>, <pyarrow.Int32Scalar: 4>, <pyarrow.Int32Scalar: 1>, <pyarrow.Int32Scalar: 3>, <pyarrow.Int32Scalar: 2>}
data2 = data.class_encode_column("label")
print(set(data2.data.columns[0]))
# output: {<pyarrow.Int64Scalar: 0>}
```
## Expected results
the last print should be:
{<pyarrow.Int64Scalar: 4>, <pyarrow.Int64Scalar: 2>, <pyarrow.Int64Scalar: 3>, <pyarrow.Int64Scalar: 0>, <pyarrow.Int64Scalar: 1>}
## Actual results
but it output:
{<pyarrow.Int64Scalar: 0>}
## Environment info
- `datasets` version: 2.6.1
- Platform: macOS-12.5.1-arm64-arm-64bit
- Python version: 3.10.6
- PyArrow version: 9.0.0
- Pandas version: 1.5.0
| 99 | unexpected `cast` or `class_encode_column` result after `rename_column`
## Describe the bug
When invoke `cast` or `class_encode_column` to a colunm renamed by `rename_column` , it will convert all the variables in this column into one variable. I also run this script in version 2.5.2, this bug does not appear. So I switched to the older version.
## Steps to reproduce the bug
```python
from datasets import load_dataset
dataset = load_dataset("amazon_reviews_multi", "en")
data = dataset['train']
data = data.remove_columns(
[
"review_id",
"product_id",
"reviewer_id",
"review_title",
"language",
"product_category",
]
)
data = data.rename_column("review_body", "text")
data1 = data.class_encode_column("stars")
print(set(data1.data.columns[0]))
# output: {<pyarrow.Int64Scalar: 4>, <pyarrow.Int64Scalar: 2>, <pyarrow.Int64Scalar: 3>, <pyarrow.Int64Scalar: 0>, <pyarrow.Int64Scalar: 1>}
data = data.rename_column("stars", "label")
print(set(data.data.columns[0]))
# output: {<pyarrow.Int32Scalar: 5>, <pyarrow.Int32Scalar: 4>, <pyarrow.Int32Scalar: 1>, <pyarrow.Int32Scalar: 3>, <pyarrow.Int32Scalar: 2>}
data2 = data.class_encode_column("label")
print(set(data2.data.columns[0]))
# output: {<pyarrow.Int64Scalar: 0>}
```
## Expected results
the last print should be:
{<pyarrow.Int64Scalar: 4>, <pyarrow.Int64Scalar: 2>, <pyarrow.Int64Scalar: 3>, <pyarrow.Int64Scalar: 0>, <pyarrow.Int64Scalar: 1>}
## Actual results
but it output:
{<pyarrow.Int64Scalar: 0>}
## Environment info
- `datasets` version: 2.6.1
- Platform: macOS-12.5.1-arm64-arm-64bit
- Python version: 3.10.6
- PyArrow version: 9.0.0
- Pandas version: 1.5.0
> Hi! Unfortunately, I can't reproduce this issue locally (in Python 3.7/3.10) or in Colab. I would assume this is due to a bug we fixed in the latest release, but your version is up-to-date, so I'm not sure if there is something we can do to help...
Thank you for your attention and feel sorry to take your time. Since this is a bug of old version, I think mybe my problem is because `cast` operation directaly used cached data generated by older verion of `datasets`. I tried to deleted the cached data and I got expected result.
| [
0.24168212711811066,
0.03820769488811493,
-0.0036129411309957504,
0.14938554167747498,
0.9369388818740845,
0.14646252989768982,
0.3778993785381317,
0.36240869760513306,
-0.3428438603878021,
0.18796268105506897,
-0.04112548381090164,
0.36037856340408325,
-0.08040358871221542,
-0.054241448640823364,
-0.06983652710914612,
-0.16540652513504028,
0.33657005429267883,
-0.0055044591426849365,
-0.1475563943386078,
-0.20108458399772644,
-0.5325029492378235,
0.21582385897636414,
-0.17949125170707703,
0.07549256831407547,
0.036329153925180435,
0.2641637921333313,
-0.15512357652187347,
-0.26291927695274353,
-0.12831607460975647,
-0.013422941789031029,
0.13632827997207642,
-0.17347818613052368,
-0.013315882533788681,
0.2713073492050171,
-0.00012193890142953023,
-0.10916660726070404,
-0.026581361889839172,
0.05468090623617172,
-0.059539660811424255,
-0.17849688231945038,
0.16210493445396423,
-0.2150120884180069,
0.1756884902715683,
-0.4767968952655792,
0.07073138654232025,
-0.15134364366531372,
-0.4293476343154907,
-0.29651427268981934,
-0.18688784539699554,
0.14538948237895966,
0.14049308001995087,
-0.04317294806241989,
-0.2954421639442444,
0.16867226362228394,
0.2026921659708023,
-0.18572352826595306,
-0.2784914970397949,
-0.18666012585163116,
0.09585040807723999,
0.2267215996980667,
0.09742482006549835,
0.3369523286819458,
-0.15799222886562347,
-0.3610498011112213,
0.20418214797973633,
0.20682597160339355,
0.18867391347885132,
-0.13928908109664917,
0.22151431441307068,
-0.15897223353385925,
0.3314962387084961,
-0.4348960816860199,
-0.16348211467266083,
0.11183402687311172,
0.37674397230148315,
-0.11336217820644379,
-0.0892397090792656,
0.1852419525384903,
0.3508427143096924,
0.01242029294371605,
-0.5506618022918701,
0.32373499870300293,
0.10862773656845093,
0.07879113405942917,
-0.11509426683187485,
0.1982828974723816,
-0.05417999252676964,
0.32830554246902466,
-0.1029292643070221,
0.11405858397483826,
0.35117194056510925,
0.07299993932247162,
-0.224713534116745,
-0.1560615450143814,
-0.3924584984779358,
-0.12122532725334167,
-0.07353390008211136,
0.11015300452709198,
-0.2862900495529175,
0.17499618232250214,
0.08862150460481644,
0.06314121931791306,
0.4328445494174957,
-0.007619597017765045,
0.13600236177444458,
0.26093849539756775,
-0.017661109566688538,
0.39775320887565613,
0.11174462735652924,
0.017414966598153114,
-0.11579552292823792,
-0.009030185639858246,
0.20269080996513367,
0.004674375988543034,
0.3617367744445801,
0.24216899275779724,
0.04495590180158615,
-0.1863355040550232,
-0.2177560031414032,
0.11652417480945587,
-0.19979903101921082,
0.31546372175216675,
0.07305613905191422,
0.2433600127696991,
0.12120696902275085,
0.5887877941131592,
0.3907206654548645,
0.4285851716995239,
0.1217384859919548,
-0.29057902097702026,
-0.1520032435655594,
0.2500867545604706,
-0.29362747073173523,
-0.13117779791355133,
0.04065379127860069,
0.44140979647636414,
-0.20194698870182037,
0.3229950964450836,
0.07930150628089905,
-0.5893115401268005,
-0.287627249956131,
-0.13504654169082642,
0.2624031603336334,
-0.004672233015298843,
-0.06471884995698929,
0.21914154291152954,
0.3639596700668335,
-0.23301184177398682,
-0.0062437504529953,
0.23191121220588684,
-0.10221750289201736,
-0.17588816583156586,
-0.24030975997447968,
0.11777573823928833,
0.21278440952301025,
0.09330113977193832,
0.18494954705238342,
-0.0099872425198555,
0.5348851680755615,
0.061792027205228806,
0.2179044783115387,
-0.45580899715423584,
0.23259758949279785,
-0.11468912661075592,
0.16412191092967987,
-0.11726804077625275,
-0.15792354941368103,
0.04130640625953674,
-0.11993364244699478,
0.21325872838497162,
0.29790693521499634,
0.05669284611940384,
0.04192217066884041,
-0.014512941241264343,
-0.07968176156282425,
-0.4052874445915222,
0.38763368129730225,
-0.363736629486084,
-0.1317051202058792,
-0.07736794650554657,
-0.09818820655345917,
-0.16777904331684113,
0.2232722043991089,
-0.035071272403001785,
-0.024183422327041626,
-0.03556892275810242,
0.0281917043030262,
0.06701695919036865,
0.07411081343889236,
0.249991774559021,
-0.2611984610557556,
-0.022787701338529587,
0.04648148640990257,
-0.05051403492689133,
0.08386082947254181,
0.30190420150756836,
0.056837067008018494,
-0.09453321248292923,
0.06170687451958656,
-0.29483962059020996,
0.21036115288734436,
0.12273332476615906,
-0.03844281658530235,
0.07571565359830856,
0.25932973623275757,
0.07601336389780045,
-0.30752208828926086,
-0.03693395480513573,
0.5004407167434692,
-0.201372891664505,
-0.22595350444316864,
-0.4018706679344177,
-0.034857966005802155,
-0.057889342308044434,
0.12192771583795547,
0.15076595544815063,
0.08165784925222397,
-0.11748407781124115,
0.07994432747364044,
-0.28171810507774353,
-0.14277729392051697,
-0.05255106836557388,
-0.2211286872625351,
0.20221206545829773,
-0.0876728892326355,
0.04438542574644089,
0.04874024540185928,
-0.14718681573867798,
-0.22923067212104797,
0.34906187653541565,
0.43705734610557556,
0.00964487623423338,
-0.05455837398767471,
0.46115586161613464,
-0.2042786031961441,
0.0959232822060585,
-0.4202348291873932,
-0.006395682692527771,
-0.28324970602989197,
0.024086248129606247,
0.0033556018024683,
-0.059209275990724564,
0.2927962839603424,
-0.05725772678852081,
0.04721105471253395,
0.39454948902130127,
0.013047698885202408,
0.46618473529815674,
-0.008401941508054733,
0.08194511383771896,
-0.17130224406719208,
-0.3236006796360016,
0.015158472582697868,
-0.3134274482727051,
-0.09717677533626556,
-0.09892943501472473,
0.03616049513220787,
-0.03484474867582321,
-0.30813688039779663,
0.23637232184410095,
0.4474530816078186,
0.02902853861451149,
-0.08035770803689957,
-0.07449062168598175,
-0.053534917533397675,
0.10995025187730789,
-0.2932494282722473,
0.4855404794216156,
0.5037856101989746,
0.06698980927467346,
-0.044290345162153244,
0.22082313895225525,
0.12495803087949753,
-0.0935686007142067,
0.24196168780326843,
0.3875245451927185,
-0.10427342355251312,
0.3712577819824219,
0.24103374779224396,
-0.06959685683250427,
-0.25682881474494934,
0.0994257926940918,
0.3577542006969452,
0.19835852086544037,
-0.5555068254470825,
0.30079394578933716,
-0.3674146234989166,
0.18796521425247192,
-0.33436742424964905,
0.07772337645292282,
0.3597473204135895,
-0.510582447052002,
-0.28653132915496826,
0.13572552800178528,
-0.15121673047542572,
-0.09965863078832626,
-0.22146357595920563,
0.0906205028295517,
-0.15103557705879211,
0.1793290227651596,
-0.1539250612258911,
-0.03351521119475365,
-0.12247151881456375,
-0.0660724937915802,
0.017370902001857758,
-0.36150088906288147,
-0.01690707914531231,
-0.10056918114423752,
-0.034524060785770416,
-0.28982529044151306,
-0.33356696367263794,
-0.1406053602695465,
-0.42658382654190063,
-0.06308948993682861,
0.15699343383312225,
-0.23911075294017792,
-0.36985868215560913,
-0.267909437417984,
0.20331577956676483,
0.08691239356994629,
0.10048140585422516,
0.4257066547870636,
0.16310952603816986,
-0.294687420129776,
-0.3148174583911896,
-0.3775513470172882,
-0.06717289239168167,
-0.039269402623176575,
0.14076265692710876,
-0.270340234041214,
-0.058436259627342224,
-0.5372507572174072,
-0.1149975135922432,
-0.07944332808256149,
0.23289556801319122,
0.2213057279586792,
-0.13128238916397095,
0.06148776039481163,
0.33928725123405457,
0.0027421764098107815,
-0.13730956614017487,
-0.13762328028678894,
0.12694138288497925,
0.072166807949543,
-0.05941811949014664,
-0.49767863750457764,
-0.029952801764011383,
-0.26634421944618225,
0.10593953728675842,
-0.08675238490104675,
-0.008912870660424232,
0.1725471466779709,
0.27492135763168335,
-0.08516985923051834,
-0.12132947891950607,
-0.1381966769695282,
-0.038447268307209015,
0.04089067503809929,
0.14619484543800354,
-0.2940424084663391,
0.5107004046440125,
0.08505953848361969,
0.015320025384426117,
0.026675771921873093,
-0.1602018028497696,
0.11757482588291168,
-0.03239894658327103,
-0.01107192412018776,
-0.04329349845647812,
-0.21142573654651642,
0.315725177526474,
-0.5937705039978027,
-0.044739581644535065,
-0.039483219385147095,
-0.25257787108421326,
-0.20392869412899017,
-0.01663859188556671,
0.4848221242427826,
-0.12418893724679947,
-0.2266121655702591,
0.08928185701370239,
-0.15140610933303833,
-0.057680971920490265,
0.07487735152244568,
0.20174044370651245,
0.10828503966331482,
-0.08576487749814987,
0.11870871484279633,
0.13469555974006653,
-0.3512750566005707,
-0.17680712044239044,
-0.2839195430278778,
-0.4649427533149719,
0.11586834490299225,
0.34273138642311096,
-0.000978580443188548,
0.33033913373947144,
0.2195560187101364,
-0.17400580644607544,
0.2992500066757202,
-0.02468430995941162,
0.8569425344467163,
-0.053909480571746826,
-0.0893092006444931,
0.30726349353790283,
0.1629585325717926,
-0.16501526534557343,
-0.36922475695610046,
-0.3278193473815918,
-0.06995659321546555,
0.20779496431350708,
0.2883707880973816,
-0.08125379681587219,
-0.04158096760511398,
0.5628620386123657,
0.27766504883766174,
-0.04595999792218208,
0.04003908112645149,
-0.14493748545646667,
-0.3692642152309418,
0.06277932971715927,
0.07064028829336166,
0.13109475374221802,
0.1622476875782013,
-0.4372277557849884,
-0.10618415474891663,
0.031453218311071396,
-0.281003475189209,
0.11686372011899948,
-0.1563480645418167,
0.20181456208229065,
-0.15370485186576843,
0.21459974348545074,
-0.4143661558628082,
-0.1784093976020813,
-0.016616886481642723,
0.514654278755188,
-0.06751446425914764,
-0.5457035303115845,
0.296208918094635,
-0.10841446369886398,
0.6010235548019409,
0.19799409806728363,
-0.025908324867486954,
0.11431683599948883,
-0.22653783857822418,
0.24100323021411896,
0.15924710035324097,
-0.33239221572875977,
0.48215872049331665,
0.08394382894039154,
-0.23343245685100555,
-0.18222995102405548,
0.39957860112190247,
0.2279740422964096,
0.017229974269866943,
0.064373679459095,
0.22034475207328796,
-0.3699217736721039,
0.15780895948410034,
0.19691868126392365,
1.188874363899231,
0.057109229266643524,
0.09518665075302124,
0.17643967270851135,
-0.41504162549972534,
0.29437002539634705,
-0.2206142246723175,
0.25940966606140137,
-0.5494281053543091,
-0.30078402161598206,
-0.061109960079193115,
-0.09065160900354385,
0.21671077609062195,
-0.11901848018169403,
-0.39796456694602966,
0.0012438457924872637,
-0.653392493724823,
0.1955995410680771,
-0.011648669838905334,
-0.2882121205329895,
-0.04524306207895279,
-0.32014942169189453,
0.03282037377357483,
0.0398034006357193,
-0.1156550943851471,
-0.3871751129627228,
0.18453529477119446,
0.17182707786560059,
-0.19905522465705872,
-0.21474125981330872,
-0.14678378403186798,
0.32568153738975525,
0.36539438366889954,
0.1913013905286789,
0.0997319146990776,
-0.480191171169281,
0.24554309248924255,
0.2592761516571045,
0.44653624296188354,
0.20023494958877563,
0.24055546522140503,
0.3150132894515991,
0.42818522453308105,
0.6215323805809021,
0.2889435887336731,
-0.08496883511543274,
0.21070706844329834,
0.15101242065429688,
-0.03235255181789398,
-0.07404126971960068,
0.0412135049700737,
0.027974754571914673,
-0.18838027119636536,
0.022247325628995895,
0.1191009134054184,
-0.6815565228462219,
0.014967706054449081,
0.18978841602802277,
0.19971321523189545,
-0.5955305099487305,
0.06448914110660553,
-0.24925436079502106,
-0.3143044710159302,
0.40426623821258545,
-0.17305530607700348,
-0.45108750462532043,
0.030329126864671707,
0.40401148796081543,
0.3795239329338074,
0.15276283025741577,
0.44381436705589294,
0.026064608246088028,
-0.20036882162094116,
-0.09734483063220978,
0.14913392066955566,
0.12311377376317978,
-0.4850994944572449,
0.37220335006713867,
-0.27447882294654846,
0.1286337524652481,
0.11275548487901688,
-0.04918121173977852,
-0.421425998210907,
0.2554877698421478,
-0.3168030083179474,
-0.24345575273036957,
0.11076762527227402,
0.0677693635225296,
0.3372640013694763,
0.08541187644004822,
0.050367847084999084,
0.30662059783935547,
-0.18949182331562042,
0.02387281134724617,
-0.18021249771118164,
-0.15231086313724518,
-0.08512280881404877,
0.3437771201133728,
-0.012044016271829605,
-0.038283973932266235,
-0.2982127368450165,
-0.08306558430194855,
0.20696765184402466,
0.25228041410446167,
0.19963768124580383,
-0.17326068878173828,
-0.3847360610961914,
0.18633566796779633,
0.27754685282707214,
0.3544697165489197,
-0.15958048403263092,
0.06915806233882904,
-0.11324527859687805,
-0.18663685023784637,
0.09848229587078094,
0.14199745655059814,
0.056162163615226746,
0.3104584515094757,
-0.16171881556510925,
0.1644798219203949,
0.1848083734512329,
-0.3068222105503082,
-0.17138782143592834,
-0.0691891610622406,
0.05829913541674614,
0.251289963722229,
0.17157483100891113,
0.11268959939479828,
-0.3764503300189972,
-0.03418687731027603,
-0.16337276995182037,
0.11681374907493591,
0.3647707998752594,
-0.293843150138855,
0.15998204052448273,
-0.2169640064239502,
0.14970853924751282,
0.5030732154846191,
-0.36118191480636597,
-0.3857111930847168,
0.13810834288597107,
0.0409560427069664,
-0.16892792284488678,
-0.11179021000862122,
-0.24045336246490479,
0.03595813736319542,
-0.20492485165596008,
0.27928292751312256,
-0.1528218686580658,
-0.36941128969192505,
-0.02626669406890869,
-0.22982844710350037,
0.7616552114486694,
-0.2775120735168457,
0.21440957486629486,
0.6045951843261719,
0.08511200547218323,
0.1794985681772232,
0.24359455704689026,
0.03454461321234703,
-0.2004326581954956,
0.3533861041069031,
0.08361683785915375,
-0.12277138233184814,
0.3205602765083313,
0.2443719059228897,
-0.06189670413732529,
0.07234114408493042,
0.4231169521808624,
0.032250285148620605,
-0.353951096534729,
0.24607840180397034,
0.02064470946788788,
0.004802681505680084,
-0.36066025495529175,
-0.2242426723241806,
-0.17526786029338837,
0.4133946895599365,
-0.23692399263381958,
-0.03981289267539978,
-0.09876267611980438,
0.09295179694890976,
-0.2864716053009033,
0.14514869451522827,
-0.1584824174642563,
0.0390816405415535,
0.4746707081794739,
0.1696157157421112,
-0.03927622735500336,
-0.30817458033561707,
-0.24267327785491943,
-0.02160363271832466,
0.4714626669883728,
-0.4393640160560608,
0.12305773049592972,
0.3737415075302124,
0.02273472771048546,
0.1419830620288849,
-0.07127799838781357,
0.2858346402645111,
0.28319278359413147,
0.15760008990764618,
-0.210875004529953,
-0.032219912856817245,
-0.19780752062797546,
0.23451533913612366,
0.26737040281295776,
0.14788848161697388,
0.1771988421678543,
-0.07618902623653412,
0.05202855169773102,
-0.009320000186562538,
0.1071329414844513,
0.13375261425971985,
0.6172818541526794,
-0.35770443081855774,
0.5941557884216309,
0.08983230590820312,
-0.24612337350845337,
-0.15502050518989563,
-0.060260213911533356,
-0.4136054813861847,
-0.34295985102653503,
0.168400377035141,
0.07488053292036057,
0.09999522566795349,
0.0931469053030014,
0.027872785925865173,
0.5275381207466125,
0.2056015282869339,
-0.0028753243386745453,
-0.4858003556728363,
-0.23557904362678528,
-0.1303752064704895,
-0.04180744290351868,
0.09657210111618042,
0.40879344940185547,
-0.16433987021446228,
0.025175411254167557,
-0.05274749547243118,
0.03889524191617966,
-0.07600266486406326,
-0.06595729291439056,
-0.07516654580831528,
-0.10980813950300217,
0.47121888399124146,
-0.17667730152606964,
-0.16780312359333038,
0.054650530219078064,
0.06995261460542679,
-0.027674658223986626,
-0.16757015883922577,
0.2591089606285095,
0.3686524033546448,
-0.021696843206882477,
-0.08591733872890472,
-0.19930240511894226,
0.10573691129684448,
-0.13102076947689056,
0.19295430183410645,
0.03252405300736427,
0.4097423255443573,
-0.03384260833263397,
0.010173061862587929,
0.08145758509635925,
-0.1849825382232666,
-0.1571706384420395,
0.4357893168926239,
-0.027800966054201126,
0.022631999105215073,
0.040021590888500214,
0.1433964967727661,
0.05533178523182869,
0.0911339744925499,
0.06787886470556259,
0.1400054544210434,
-0.08695124834775925,
0.0633329525589943,
-0.024615786969661713,
0.13945603370666504,
0.04318316653370857,
0.0664544552564621,
0.27345138788223267,
0.36730286478996277,
-0.33553066849708557,
-0.4909423291683197,
0.4694494605064392,
-0.0290350541472435,
-0.4675308167934418,
0.05921854078769684,
0.28919297456741333,
-0.2733149528503418,
-0.007534375414252281,
-0.567328929901123,
-0.2642901837825775,
0.2333587408065796,
-0.14826148748397827,
-0.14756205677986145,
0.4395500719547272,
-0.19291998445987701,
-0.08191707730293274,
-0.13833707571029663,
-0.0917259156703949,
0.0026225093752145767,
-0.08236538618803024,
0.06635525822639465,
-0.17748615145683289
] |
https://github.com/huggingface/datasets/issues/5123 | datasets freezes with streaming mode in multiple-gpu | @lhoestq I tested the script without accelerator, and I confirm this is due to datasets part as this gets similar results without accelerator. | ## Describe the bug
Hi. I am using this dataloader, which is for processing large datasets in streaming mode mentioned in one of examples of huggingface. I am using it to read c4: https://github.com/huggingface/transformers/blob/b48ac1a094e572d6076b46a9e4ed3e0ebe978afc/examples/research_projects/codeparrot/scripts/codeparrot_training.py#L22
During using multi-gpu in accelerator in one node, the code freezes, but works for 1 GPU:
```
10/16/2022 14:18:46 - INFO - datasets.info - Loading Dataset Infos from /home/jack/.cache/huggingface/modules/datasets_modules/datasets/c4/df532b158939272d032cc63ef19cd5b83e9b4d00c922b833e4cb18b2e9869b01
Steps: 0%| | 0/400000 [00:00<?, ?it/s]10/16/2022 14:18:47 - INFO - torch.utils.data.dataloader - Shared seed (135290893754684706) sent to store on rank 0
```
# Code to reproduce
please run this code with `accelerate launch code.py`
```
from accelerate import Accelerator
from accelerate.logging import get_logger
from datasets import load_dataset
from torch.utils.data.dataloader import DataLoader
import torch
from datasets import load_dataset
from transformers import AutoTokenizer
import torch
from accelerate.logging import get_logger
from torch.utils.data import IterableDataset
from torch.utils.data.datapipes.iter.combinatorics import ShufflerIterDataPipe
logger = get_logger(__name__)
class ConstantLengthDataset(IterableDataset):
"""
Iterable dataset that returns constant length chunks of tokens from stream of text files.
Args:
tokenizer (Tokenizer): The processor used for proccessing the data.
dataset (dataset.Dataset): Dataset with text files.
infinite (bool): If True the iterator is reset after dataset reaches end else stops.
max_seq_length (int): Length of token sequences to return.
num_of_sequences (int): Number of token sequences to keep in buffer.
chars_per_token (int): Number of characters per token used to estimate number of tokens in text buffer.
"""
def __init__(
self,
tokenizer,
dataset,
infinite=False,
max_seq_length=1024,
num_of_sequences=1024,
chars_per_token=3.6,
):
self.tokenizer = tokenizer
# self.concat_token_id = tokenizer.bos_token_id
self.dataset = dataset
self.max_seq_length = max_seq_length
self.epoch = 0
self.infinite = infinite
self.current_size = 0
self.max_buffer_size = max_seq_length * chars_per_token * num_of_sequences
self.content_field = "text"
def __iter__(self):
iterator = iter(self.dataset)
more_examples = True
while more_examples:
buffer, buffer_len = [], 0
while True:
if buffer_len >= self.max_buffer_size:
break
try:
buffer.append(next(iterator)[self.content_field])
buffer_len += len(buffer[-1])
except StopIteration:
if self.infinite:
iterator = iter(self.dataset)
self.epoch += 1
logger.info(f"Dataset epoch: {self.epoch}")
else:
more_examples = False
break
tokenized_inputs = self.tokenizer(buffer, truncation=False)["input_ids"]
all_token_ids = []
for tokenized_input in tokenized_inputs:
all_token_ids.extend(tokenized_input)
for i in range(0, len(all_token_ids), self.max_seq_length):
input_ids = all_token_ids[i : i + self.max_seq_length]
if len(input_ids) == self.max_seq_length:
self.current_size += 1
yield torch.tensor(input_ids)
def shuffle(self, buffer_size=1000):
return ShufflerIterDataPipe(self, buffer_size=buffer_size)
def create_dataloaders(tokenizer, accelerator):
ds_kwargs = {"streaming": True}
# In distributed training, the load_dataset function gaurantees that only one process
# can concurrently download the dataset.
datasets = load_dataset(
"c4",
"en",
cache_dir="cache_dir",
**ds_kwargs,
)
train_data, valid_data = datasets["train"], datasets["validation"]
with accelerator.main_process_first():
train_data = train_data.shuffle(buffer_size=10000, seed=None)
train_dataset = ConstantLengthDataset(
tokenizer,
train_data,
infinite=True,
max_seq_length=256,
)
valid_dataset = ConstantLengthDataset(
tokenizer,
valid_data,
infinite=False,
max_seq_length=256,
)
train_dataset = train_dataset.shuffle(buffer_size=10000)
train_dataloader = DataLoader(train_dataset, batch_size=160, shuffle=True)
eval_dataloader = DataLoader(valid_dataset, batch_size=160)
return train_dataloader, eval_dataloader
def main():
# Accelerator.
logging_dir = "data_save_dir/log"
accelerator = Accelerator(
gradient_accumulation_steps=1,
mixed_precision="bf16",
log_with="tensorboard",
logging_dir=logging_dir,
)
# We need to initialize the trackers we use, and also store our configuration.
# The trackers initializes automatically on the main process.
if accelerator.is_main_process:
accelerator.init_trackers("test")
tokenizer = AutoTokenizer.from_pretrained("bert-base-uncased")
# Load datasets and create dataloaders.
train_dataloader, _ = create_dataloaders(tokenizer, accelerator)
train_dataloader = accelerator.prepare(train_dataloader)
for step, batch in enumerate(train_dataloader, start=1):
print(step)
accelerator.end_training()
if __name__ == "__main__":
main()
```
## Results expected
Being able to run the code for streamining datasets with multi-gpu
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.5.2
- Platform: linux
- Python version: 3.9.12
- PyArrow version: 9.0.0
@lhoestq I do not have any idea why this freezing happens, and I removed the streaming mode and this was working fine, so I know this is caused by streaming mode of the dataloader part not working well with multi-gpu setting. Since datasets are large, I hope to keep the streamining mode. I very much appreciate your help.
| 23 | datasets freezes with streaming mode in multiple-gpu
## Describe the bug
Hi. I am using this dataloader, which is for processing large datasets in streaming mode mentioned in one of examples of huggingface. I am using it to read c4: https://github.com/huggingface/transformers/blob/b48ac1a094e572d6076b46a9e4ed3e0ebe978afc/examples/research_projects/codeparrot/scripts/codeparrot_training.py#L22
During using multi-gpu in accelerator in one node, the code freezes, but works for 1 GPU:
```
10/16/2022 14:18:46 - INFO - datasets.info - Loading Dataset Infos from /home/jack/.cache/huggingface/modules/datasets_modules/datasets/c4/df532b158939272d032cc63ef19cd5b83e9b4d00c922b833e4cb18b2e9869b01
Steps: 0%| | 0/400000 [00:00<?, ?it/s]10/16/2022 14:18:47 - INFO - torch.utils.data.dataloader - Shared seed (135290893754684706) sent to store on rank 0
```
# Code to reproduce
please run this code with `accelerate launch code.py`
```
from accelerate import Accelerator
from accelerate.logging import get_logger
from datasets import load_dataset
from torch.utils.data.dataloader import DataLoader
import torch
from datasets import load_dataset
from transformers import AutoTokenizer
import torch
from accelerate.logging import get_logger
from torch.utils.data import IterableDataset
from torch.utils.data.datapipes.iter.combinatorics import ShufflerIterDataPipe
logger = get_logger(__name__)
class ConstantLengthDataset(IterableDataset):
"""
Iterable dataset that returns constant length chunks of tokens from stream of text files.
Args:
tokenizer (Tokenizer): The processor used for proccessing the data.
dataset (dataset.Dataset): Dataset with text files.
infinite (bool): If True the iterator is reset after dataset reaches end else stops.
max_seq_length (int): Length of token sequences to return.
num_of_sequences (int): Number of token sequences to keep in buffer.
chars_per_token (int): Number of characters per token used to estimate number of tokens in text buffer.
"""
def __init__(
self,
tokenizer,
dataset,
infinite=False,
max_seq_length=1024,
num_of_sequences=1024,
chars_per_token=3.6,
):
self.tokenizer = tokenizer
# self.concat_token_id = tokenizer.bos_token_id
self.dataset = dataset
self.max_seq_length = max_seq_length
self.epoch = 0
self.infinite = infinite
self.current_size = 0
self.max_buffer_size = max_seq_length * chars_per_token * num_of_sequences
self.content_field = "text"
def __iter__(self):
iterator = iter(self.dataset)
more_examples = True
while more_examples:
buffer, buffer_len = [], 0
while True:
if buffer_len >= self.max_buffer_size:
break
try:
buffer.append(next(iterator)[self.content_field])
buffer_len += len(buffer[-1])
except StopIteration:
if self.infinite:
iterator = iter(self.dataset)
self.epoch += 1
logger.info(f"Dataset epoch: {self.epoch}")
else:
more_examples = False
break
tokenized_inputs = self.tokenizer(buffer, truncation=False)["input_ids"]
all_token_ids = []
for tokenized_input in tokenized_inputs:
all_token_ids.extend(tokenized_input)
for i in range(0, len(all_token_ids), self.max_seq_length):
input_ids = all_token_ids[i : i + self.max_seq_length]
if len(input_ids) == self.max_seq_length:
self.current_size += 1
yield torch.tensor(input_ids)
def shuffle(self, buffer_size=1000):
return ShufflerIterDataPipe(self, buffer_size=buffer_size)
def create_dataloaders(tokenizer, accelerator):
ds_kwargs = {"streaming": True}
# In distributed training, the load_dataset function gaurantees that only one process
# can concurrently download the dataset.
datasets = load_dataset(
"c4",
"en",
cache_dir="cache_dir",
**ds_kwargs,
)
train_data, valid_data = datasets["train"], datasets["validation"]
with accelerator.main_process_first():
train_data = train_data.shuffle(buffer_size=10000, seed=None)
train_dataset = ConstantLengthDataset(
tokenizer,
train_data,
infinite=True,
max_seq_length=256,
)
valid_dataset = ConstantLengthDataset(
tokenizer,
valid_data,
infinite=False,
max_seq_length=256,
)
train_dataset = train_dataset.shuffle(buffer_size=10000)
train_dataloader = DataLoader(train_dataset, batch_size=160, shuffle=True)
eval_dataloader = DataLoader(valid_dataset, batch_size=160)
return train_dataloader, eval_dataloader
def main():
# Accelerator.
logging_dir = "data_save_dir/log"
accelerator = Accelerator(
gradient_accumulation_steps=1,
mixed_precision="bf16",
log_with="tensorboard",
logging_dir=logging_dir,
)
# We need to initialize the trackers we use, and also store our configuration.
# The trackers initializes automatically on the main process.
if accelerator.is_main_process:
accelerator.init_trackers("test")
tokenizer = AutoTokenizer.from_pretrained("bert-base-uncased")
# Load datasets and create dataloaders.
train_dataloader, _ = create_dataloaders(tokenizer, accelerator)
train_dataloader = accelerator.prepare(train_dataloader)
for step, batch in enumerate(train_dataloader, start=1):
print(step)
accelerator.end_training()
if __name__ == "__main__":
main()
```
## Results expected
Being able to run the code for streamining datasets with multi-gpu
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.5.2
- Platform: linux
- Python version: 3.9.12
- PyArrow version: 9.0.0
@lhoestq I do not have any idea why this freezing happens, and I removed the streaming mode and this was working fine, so I know this is caused by streaming mode of the dataloader part not working well with multi-gpu setting. Since datasets are large, I hope to keep the streamining mode. I very much appreciate your help.
@lhoestq I tested the script without accelerator, and I confirm this is due to datasets part as this gets similar results without accelerator. | [
-0.320170134305954,
-0.31651610136032104,
-0.039002928882837296,
0.4769468307495117,
0.32108551263809204,
-0.05959709361195564,
0.370758980512619,
-0.0028037503361701965,
0.29125797748565674,
0.27730265259742737,
-0.1412859410047531,
0.06606162339448929,
-0.1297413855791092,
0.389516144990921,
-0.02885536476969719,
0.019152846187353134,
0.14081059396266937,
-0.06935961544513702,
-0.05934390425682068,
0.09264911711215973,
0.19574815034866333,
0.28171306848526,
-0.03017459809780121,
-0.2807106375694275,
-0.3968455195426941,
0.006201479583978653,
0.08898560702800751,
0.05466218665242195,
0.16394278407096863,
-0.1528581976890564,
0.05657128989696503,
0.3212423622608185,
-0.1962885558605194,
0.6732676029205322,
-0.00011721457849489525,
0.05330623686313629,
0.18269649147987366,
-0.002833753824234009,
-0.21490003168582916,
-0.17322935163974762,
-0.002865813672542572,
0.06839033216238022,
0.14951622486114502,
0.04682282358407974,
-0.17401543259620667,
-0.0174991674721241,
-0.1881343424320221,
-0.6604426503181458,
0.164658784866333,
-0.042508333921432495,
0.09482607245445251,
0.4577403962612152,
-0.1465912163257599,
-0.06909176707267761,
-0.20002222061157227,
-0.039952024817466736,
-0.14591027796268463,
0.07709209620952606,
0.31674060225486755,
0.07274440675973892,
-0.27099719643592834,
0.40121567249298096,
0.12219187617301941,
-0.015591144561767578,
0.08307396620512009,
-0.14754250645637512,
-0.350762277841568,
-0.13338522613048553,
0.026910532265901566,
0.15082837641239166,
0.027056343853473663,
-0.3233974277973175,
-0.1601693481206894,
-0.22570520639419556,
0.10727719217538834,
-0.3284243941307068,
0.201379656791687,
0.11525953561067581,
-0.25809207558631897,
-0.21668508648872375,
-0.4963834583759308,
0.01326315850019455,
-0.08960461616516113,
0.06837072968482971,
-0.07536549866199493,
0.2995816469192505,
-0.2987593412399292,
0.22882121801376343,
0.38512924313545227,
0.29899197816848755,
-0.15710687637329102,
-0.19772954285144806,
-0.002054654061794281,
-0.2263694405555725,
-0.8506759405136108,
0.210271418094635,
-0.1854097545146942,
-0.024569854140281677,
0.1130077913403511,
0.212607279419899,
0.2809174656867981,
0.15809139609336853,
0.0683353990316391,
0.07589592784643173,
0.14983536303043365,
-0.02965284138917923,
-0.005833819508552551,
-0.20412547886371613,
0.43327707052230835,
0.4074971079826355,
-0.2626340985298157,
-0.06723201274871826,
-0.013328848406672478,
-0.10992640256881714,
-0.2989759147167206,
-0.1457396149635315,
-0.08084538578987122,
-0.07573612779378891,
-0.13559462130069733,
-0.009245884604752064,
-0.11118854582309723,
0.03931012004613876,
0.4182609021663666,
0.44486111402511597,
0.07055307179689407,
0.3420749604701996,
-0.18277500569820404,
0.05916411429643631,
-0.21634776890277863,
-0.44875651597976685,
-0.18320819735527039,
-0.2635971009731293,
-0.1491444855928421,
0.23651264607906342,
0.25286436080932617,
-0.6722689270973206,
-0.033016908913850784,
0.2876058518886566,
0.4721084237098694,
-0.1694207787513733,
0.1245342344045639,
-0.29843664169311523,
-0.05029793828725815,
0.17948129773139954,
0.14669935405254364,
0.4921897351741791,
0.1822681725025177,
-0.04350600764155388,
0.05512329190969467,
-0.11150530725717545,
-0.06791342049837112,
-0.0317845344543457,
0.30285823345184326,
0.11863456666469574,
0.07360691577196121,
0.18476532399654388,
-0.4126509726047516,
0.11747676134109497,
0.005819007754325867,
-0.1398874670267105,
0.27309441566467285,
-0.04221192002296448,
-0.0008702687919139862,
-0.14555160701274872,
0.23987773060798645,
0.5760335326194763,
0.12451320886611938,
-0.1120918020606041,
-0.0443904772400856,
-0.2915104925632477,
0.038571104407310486,
0.5202218294143677,
-0.17591074109077454,
-0.3686400055885315,
-0.28145554661750793,
0.045004233717918396,
-0.0261261984705925,
-0.23804381489753723,
-0.20734138786792755,
0.4822528064250946,
-0.3851122260093689,
0.30897125601768494,
0.4230332672595978,
0.10372115671634674,
0.12219540029764175,
-0.03825599327683449,
0.19279813766479492,
0.2943075895309448,
-0.00635366328060627,
0.1087382510304451,
-0.14604146778583527,
0.06424739956855774,
0.2653828561306,
0.016305286437273026,
-0.17548853158950806,
-0.300058513879776,
-0.07963960617780685,
-0.002100619487464428,
0.31338000297546387,
-0.16503708064556122,
0.17526975274085999,
0.41101473569869995,
0.04371234029531479,
-0.11278930306434631,
0.0510147362947464,
-0.18153807520866394,
-0.574967622756958,
0.29064786434173584,
0.2165021002292633,
-0.2392047941684723,
0.09127096086740494,
-0.1333739012479782,
0.23764142394065857,
-0.07981850951910019,
-0.3315660059452057,
-0.37471505999565125,
-0.032935481518507004,
0.20669057965278625,
0.09787946939468384,
0.1326659917831421,
-0.02257602848112583,
0.7143674492835999,
-0.1326308399438858,
0.1235450878739357,
-0.2603522539138794,
0.3782622218132019,
0.08834384381771088,
-0.25329169631004333,
-0.07439586520195007,
-0.11012204736471176,
0.06136968731880188,
-0.32795479893684387,
-0.14810338616371155,
0.46449926495552063,
0.09641259908676147,
0.5647338628768921,
-0.26063627004623413,
0.11943359673023224,
0.38852575421333313,
-0.19571395218372345,
0.0814359039068222,
0.17112208902835846,
0.1621701866388321,
-0.2649763822555542,
-0.04232949763536453,
0.3338702619075775,
-0.21187607944011688,
0.14005300402641296,
0.1394023895263672,
-0.1506596952676773,
-0.009420773014426231,
0.2594158947467804,
-0.048738256096839905,
0.06878665089607239,
0.3883502185344696,
0.025583820417523384,
0.44588765501976013,
-0.011565407738089561,
-0.4989607632160187,
0.1430942267179489,
0.3377918601036072,
0.263149231672287,
-0.1941157579421997,
-0.05033130943775177,
-0.33004245162010193,
-0.05804133415222168,
0.2738502323627472,
-0.07551849633455276,
0.3668179512023926,
0.11351387202739716,
-0.0034544579684734344,
-0.10172093659639359,
0.08031477779150009,
-0.2999836206436157,
0.17736758291721344,
0.10195215046405792,
0.1618015617132187,
0.2187531590461731,
0.1172676607966423,
-0.15939673781394958,
-0.15111970901489258,
-0.18575450778007507,
0.32863739132881165,
-0.033362001180648804,
-0.3298265337944031,
0.32112830877304077,
-0.34599485993385315,
-0.24143052101135254,
-0.1842232346534729,
-0.07266464829444885,
-0.4802292585372925,
-0.10746444016695023,
-0.31277281045913696,
0.4952528774738312,
0.031738463789224625,
0.128421813249588,
0.10595707595348358,
0.0028597861528396606,
0.23697461187839508,
0.022782154381275177,
-0.28592273592948914,
0.02397690713405609,
-0.1963951587677002,
-0.05390238016843796,
0.417086124420166,
-0.06987275928258896,
0.1014823466539383,
0.45332422852516174,
-0.1511560082435608,
-0.35475510358810425,
-0.1686646193265915,
0.07441732287406921,
-0.14645811915397644,
0.1020779237151146,
-0.11136025190353394,
0.1631530225276947,
-0.035169538110494614,
-0.11404077708721161,
0.19351963698863983,
-0.43751364946365356,
-0.08548972010612488,
0.271707683801651,
-0.035255592316389084,
0.1995011270046234,
-0.22854772210121155,
0.006123870611190796,
-0.24477176368236542,
-0.3657911419868469,
0.3497276306152344,
-0.2352394163608551,
-0.13698385655879974,
0.0765804722905159,
0.1583414375782013,
0.21081340312957764,
-0.03315375745296478,
-0.18436570465564728,
-0.12409546226263046,
-0.19303375482559204,
0.14701849222183228,
-0.019072476774454117,
-0.40133482217788696,
-0.244588240981102,
0.16984441876411438,
-0.0025123171508312225,
0.3933245539665222,
-0.31243571639060974,
0.16146600246429443,
-0.3194584548473358,
-0.0547042042016983,
0.05831800401210785,
-0.05197394639253616,
0.2204650342464447,
-0.2151278406381607,
-0.01358164194971323,
-0.11399076133966446,
-0.04376517981290817,
0.1658928543329239,
-0.13448747992515564,
-0.015818089246749878,
-0.11097333580255508,
0.34720727801322937,
0.3296865224838257,
0.45010387897491455,
0.21204568445682526,
-0.03832007572054863,
0.31824856996536255,
-0.07278018444776535,
0.21965815126895905,
0.049487050622701645,
-0.20635905861854553,
0.31881412863731384,
-0.1726091206073761,
-0.0045239925384521484,
-0.018886566162109375,
-0.19593185186386108,
-0.037774957716464996,
-0.22168457508087158,
0.14016085863113403,
0.18190330266952515,
-0.1656782031059265,
0.29752710461616516,
0.06558997929096222,
0.10472086071968079,
-0.17760330438613892,
0.05752391368150711,
0.07364991307258606,
-0.1482866108417511,
0.01676757074892521,
0.2895659804344177,
-0.26418378949165344,
-0.009687433950603008,
-0.3947683870792389,
0.02734026499092579,
-0.1826173961162567,
0.17090697586536407,
0.17284563183784485,
0.41673579812049866,
0.10159271955490112,
-0.06316328048706055,
0.09674377739429474,
-0.3232256770133972,
0.7259926795959473,
0.34981125593185425,
-0.13147538900375366,
0.09626911580562592,
-0.3811025321483612,
-0.2965686321258545,
0.03321569785475731,
-0.37280064821243286,
0.02045464515686035,
0.2718900442123413,
0.5440722703933716,
-0.2527817189693451,
-0.39522165060043335,
-0.19789808988571167,
0.03606124222278595,
-0.018301930278539658,
-0.05184583365917206,
-0.22067338228225708,
0.1025443896651268,
-0.2376442700624466,
0.2315637767314911,
0.10310465842485428,
0.058098215609788895,
-0.401311993598938,
-0.05811883881688118,
0.1250377595424652,
-0.2197563648223877,
0.12035338580608368,
0.06208226457238197,
0.1526395082473755,
-0.150322824716568,
0.2186867594718933,
0.35755452513694763,
0.054748568683862686,
0.23012283444404602,
0.1911984086036682,
0.31224650144577026,
-0.20272251963615417,
0.4371161460876465,
0.2170461118221283,
0.3125962018966675,
0.45868751406669617,
-0.07028362900018692,
0.49929025769233704,
0.10524245351552963,
0.30283230543136597,
-0.12995973229408264,
0.2632194757461548,
0.21913288533687592,
0.3468329608440399,
-0.3923860788345337,
-0.458741158246994,
0.3937756419181824,
0.004316641017794609,
0.20219282805919647,
0.6175047159194946,
0.12552914023399353,
-0.07383781671524048,
-0.1385607123374939,
-0.16125336289405823,
0.6028099060058594,
-0.06719326972961426,
0.3586098551750183,
0.20923885703086853,
-0.22055551409721375,
0.5054243206977844,
-0.5937470197677612,
0.19814899563789368,
-0.1506689190864563,
-0.41321611404418945,
0.018765492364764214,
-0.2010648548603058,
0.43172067403793335,
-0.12246599793434143,
-0.08273948729038239,
0.1873295158147812,
0.06535287201404572,
0.3014884293079376,
-0.1806645393371582,
0.3034682273864746,
-0.34839895367622375,
-0.41509413719177246,
-0.45341211557388306,
0.04850274324417114,
-0.12633726000785828,
0.13370546698570251,
0.09538030624389648,
-0.09765797853469849,
0.08964815735816956,
-0.02583513781428337,
-0.33737561106681824,
0.009162712842226028,
-0.6102495193481445,
0.00030599720776081085,
-0.04006807133555412,
-0.41945672035217285,
0.3332884609699249,
0.14806488156318665,
-0.09767547249794006,
-0.06345473229885101,
-0.062499530613422394,
0.1720711886882782,
-0.14119413495063782,
0.08674008399248123,
-0.10608958452939987,
-0.3329578936100006,
0.09485097229480743,
-0.009610209614038467,
-0.1025252491235733,
0.19989141821861267,
0.09746816009283066,
-0.13958975672721863,
0.36389291286468506,
0.1336819976568222,
-0.15619789063930511,
0.058961160480976105,
-0.06450261175632477,
0.08951372653245926,
0.08699853718280792,
-0.274768590927124,
0.019831059500575066,
0.06901092082262039,
-0.17514300346374512,
-0.20943623781204224,
0.018488068133592606,
0.02346118539571762,
-0.20378780364990234,
0.7961738109588623,
-0.06900791078805923,
-0.22404277324676514,
0.346279114484787,
0.4273766875267029,
-0.10663463920354843,
-0.23933950066566467,
-0.02573203667998314,
0.3107742965221405,
-0.23372137546539307,
0.14335303008556366,
-0.3001023232936859,
-0.16458454728126526,
0.17259564995765686,
-0.0007974468171596527,
-0.017555326223373413,
-0.09870066493749619,
0.014036621898412704,
-0.3685116767883301,
-0.41476279497146606,
-0.05516313016414642,
-0.1779431700706482,
0.08709278702735901,
0.1761348843574524,
0.26979830861091614,
-0.0006913729012012482,
0.3773987293243408,
-0.2025117576122284,
-0.019583584740757942,
-0.1402473747730255,
-0.12250952422618866,
0.20925326645374298,
-0.1959984004497528,
0.3830168843269348,
-0.02707037702202797,
0.057350680232048035,
0.36506521701812744,
-0.05137687176465988,
-0.11634066700935364,
-0.1765683889389038,
0.11344491690397263,
-0.05546925961971283,
-0.08208806067705154,
0.028041504323482513,
-0.10280346870422363,
-0.12126904726028442,
-0.09933386743068695,
0.6700537800788879,
0.13897347450256348,
0.006425827741622925,
-0.20907703042030334,
0.19417019188404083,
0.010862313210964203,
-0.3726525902748108,
0.018590690568089485,
-0.19535791873931885,
-0.15798620879650116,
0.3542337119579315,
0.03664272651076317,
0.04119914397597313,
-0.0052753835916519165,
-0.4814819395542145,
-0.0036610066890716553,
0.34902793169021606,
0.08964759111404419,
0.21850088238716125,
-0.23463983833789825,
-0.14610576629638672,
-0.12128204107284546,
0.3502779006958008,
0.360932320356369,
-0.14266851544380188,
-0.1517164260149002,
0.0793684720993042,
0.05996345728635788,
-0.0272354893386364,
-0.00409953435882926,
-0.19534257054328918,
0.018120858818292618,
0.08164803683757782,
0.2565746009349823,
0.3063749670982361,
0.1292659491300583,
-0.06028912961483002,
0.2432013750076294,
0.10289052873849869,
0.1693509817123413,
0.2773444354534149,
-0.2257394790649414,
0.10426411032676697,
0.15127182006835938,
0.09524668753147125,
0.10445536673069,
-0.0252470001578331,
0.20106996595859528,
-0.13846591114997864,
0.27362290024757385,
0.1747645139694214,
0.1947527378797531,
0.14683261513710022,
-0.5698386430740356,
-0.39714014530181885,
0.09334786236286163,
-0.5674176216125488,
0.2225762903690338,
-0.1508185863494873,
0.43626347184181213,
-0.37798917293548584,
-0.21522557735443115,
-0.2594103515148163,
0.2358933687210083,
-0.23646557331085205,
0.037227656692266464,
0.19985072314739227,
-0.19495229423046112,
-0.23551325500011444,
0.17674444615840912,
-0.008310437202453613,
0.11880853772163391,
0.3892444372177124,
0.27836593985557556,
0.06494555622339249,
-0.3253641128540039,
-0.2908581495285034,
0.2944503128528595,
0.19019469618797302,
-0.12471812963485718,
0.39426568150520325,
0.4062999486923218,
-0.1472921222448349,
-0.012048386037349701,
-0.023800252005457878,
0.32988008856773376,
0.0258270725607872,
0.14542289078235626,
0.15760761499404907,
0.11603793501853943,
0.004418214783072472,
0.18759657442569733,
0.11953715234994888,
0.31844618916511536,
0.16899079084396362,
0.2034032940864563,
0.06254585087299347,
-0.1343478560447693,
-0.23187832534313202,
0.013515152037143707,
0.10823354125022888,
-0.590876042842865,
0.2150617092847824,
-0.35296428203582764,
0.04865726828575134,
-0.2588043808937073,
-0.12347038835287094,
-0.4918266534805298,
0.09293932467699051,
0.3377533257007599,
-0.18807686865329742,
0.0020675640553236008,
-0.10834556818008423,
0.029926974326372147,
0.33757779002189636,
0.7586604356765747,
0.01931166648864746,
-0.11100371927022934,
-0.22932112216949463,
-0.478585422039032,
-0.5296587944030762,
0.13045765459537506,
-0.04465487226843834,
0.19258005917072296,
-0.1350322663784027,
0.27857139706611633,
0.11657805740833282,
0.037997134029865265,
0.17734764516353607,
0.11425752937793732,
0.2575359344482422,
0.19555732607841492,
-0.5474047660827637,
0.0003874190151691437,
-0.28104811906814575,
-0.06977588683366776,
0.049724288284778595,
-0.08641490340232849,
0.3129313588142395,
0.23635233938694,
-0.0038938522338867188,
-0.12754181027412415,
0.19530734419822693,
-0.061308834701776505,
-0.16843582689762115,
0.07537266612052917,
0.022778604179620743,
0.3318895697593689,
0.11260268837213516,
-0.21790336072444916,
-0.20115309953689575,
0.13193413615226746,
-0.07558852434158325,
-0.15963539481163025,
-0.016645856201648712,
0.42679429054260254,
-0.0568099170923233,
-0.26696422696113586,
-0.4690762460231781,
0.5127025842666626,
0.12184463441371918,
-0.17341481149196625,
-0.20301532745361328,
0.2121679037809372,
-0.10536829382181168,
0.23657311499118805,
0.397504597902298,
0.7369195222854614,
0.0757630318403244,
-0.07086829841136932,
-0.34009864926338196,
-0.24795030057430267,
0.29750362038612366,
-0.5315229296684265,
-0.2666740119457245,
-0.20205818116664886,
0.28316405415534973,
0.29716551303863525,
0.09927716851234436,
-0.5282416343688965,
0.1667773425579071,
0.10719551146030426,
-0.1955672800540924,
-0.216616690158844,
0.14678995311260223,
-0.11242125928401947,
-0.07235011458396912,
-0.09623309969902039,
0.17933863401412964,
0.3893272578716278,
-0.20760643482208252,
0.24392300844192505,
-0.09752305597066879
] |
https://github.com/huggingface/datasets/issues/5123 | datasets freezes with streaming mode in multiple-gpu | Hi ! You said it works on 1 GPU but doesn't wortk without accelerator - what's the difference between running on 1 GPU and running without accelerator in your case ? | ## Describe the bug
Hi. I am using this dataloader, which is for processing large datasets in streaming mode mentioned in one of examples of huggingface. I am using it to read c4: https://github.com/huggingface/transformers/blob/b48ac1a094e572d6076b46a9e4ed3e0ebe978afc/examples/research_projects/codeparrot/scripts/codeparrot_training.py#L22
During using multi-gpu in accelerator in one node, the code freezes, but works for 1 GPU:
```
10/16/2022 14:18:46 - INFO - datasets.info - Loading Dataset Infos from /home/jack/.cache/huggingface/modules/datasets_modules/datasets/c4/df532b158939272d032cc63ef19cd5b83e9b4d00c922b833e4cb18b2e9869b01
Steps: 0%| | 0/400000 [00:00<?, ?it/s]10/16/2022 14:18:47 - INFO - torch.utils.data.dataloader - Shared seed (135290893754684706) sent to store on rank 0
```
# Code to reproduce
please run this code with `accelerate launch code.py`
```
from accelerate import Accelerator
from accelerate.logging import get_logger
from datasets import load_dataset
from torch.utils.data.dataloader import DataLoader
import torch
from datasets import load_dataset
from transformers import AutoTokenizer
import torch
from accelerate.logging import get_logger
from torch.utils.data import IterableDataset
from torch.utils.data.datapipes.iter.combinatorics import ShufflerIterDataPipe
logger = get_logger(__name__)
class ConstantLengthDataset(IterableDataset):
"""
Iterable dataset that returns constant length chunks of tokens from stream of text files.
Args:
tokenizer (Tokenizer): The processor used for proccessing the data.
dataset (dataset.Dataset): Dataset with text files.
infinite (bool): If True the iterator is reset after dataset reaches end else stops.
max_seq_length (int): Length of token sequences to return.
num_of_sequences (int): Number of token sequences to keep in buffer.
chars_per_token (int): Number of characters per token used to estimate number of tokens in text buffer.
"""
def __init__(
self,
tokenizer,
dataset,
infinite=False,
max_seq_length=1024,
num_of_sequences=1024,
chars_per_token=3.6,
):
self.tokenizer = tokenizer
# self.concat_token_id = tokenizer.bos_token_id
self.dataset = dataset
self.max_seq_length = max_seq_length
self.epoch = 0
self.infinite = infinite
self.current_size = 0
self.max_buffer_size = max_seq_length * chars_per_token * num_of_sequences
self.content_field = "text"
def __iter__(self):
iterator = iter(self.dataset)
more_examples = True
while more_examples:
buffer, buffer_len = [], 0
while True:
if buffer_len >= self.max_buffer_size:
break
try:
buffer.append(next(iterator)[self.content_field])
buffer_len += len(buffer[-1])
except StopIteration:
if self.infinite:
iterator = iter(self.dataset)
self.epoch += 1
logger.info(f"Dataset epoch: {self.epoch}")
else:
more_examples = False
break
tokenized_inputs = self.tokenizer(buffer, truncation=False)["input_ids"]
all_token_ids = []
for tokenized_input in tokenized_inputs:
all_token_ids.extend(tokenized_input)
for i in range(0, len(all_token_ids), self.max_seq_length):
input_ids = all_token_ids[i : i + self.max_seq_length]
if len(input_ids) == self.max_seq_length:
self.current_size += 1
yield torch.tensor(input_ids)
def shuffle(self, buffer_size=1000):
return ShufflerIterDataPipe(self, buffer_size=buffer_size)
def create_dataloaders(tokenizer, accelerator):
ds_kwargs = {"streaming": True}
# In distributed training, the load_dataset function gaurantees that only one process
# can concurrently download the dataset.
datasets = load_dataset(
"c4",
"en",
cache_dir="cache_dir",
**ds_kwargs,
)
train_data, valid_data = datasets["train"], datasets["validation"]
with accelerator.main_process_first():
train_data = train_data.shuffle(buffer_size=10000, seed=None)
train_dataset = ConstantLengthDataset(
tokenizer,
train_data,
infinite=True,
max_seq_length=256,
)
valid_dataset = ConstantLengthDataset(
tokenizer,
valid_data,
infinite=False,
max_seq_length=256,
)
train_dataset = train_dataset.shuffle(buffer_size=10000)
train_dataloader = DataLoader(train_dataset, batch_size=160, shuffle=True)
eval_dataloader = DataLoader(valid_dataset, batch_size=160)
return train_dataloader, eval_dataloader
def main():
# Accelerator.
logging_dir = "data_save_dir/log"
accelerator = Accelerator(
gradient_accumulation_steps=1,
mixed_precision="bf16",
log_with="tensorboard",
logging_dir=logging_dir,
)
# We need to initialize the trackers we use, and also store our configuration.
# The trackers initializes automatically on the main process.
if accelerator.is_main_process:
accelerator.init_trackers("test")
tokenizer = AutoTokenizer.from_pretrained("bert-base-uncased")
# Load datasets and create dataloaders.
train_dataloader, _ = create_dataloaders(tokenizer, accelerator)
train_dataloader = accelerator.prepare(train_dataloader)
for step, batch in enumerate(train_dataloader, start=1):
print(step)
accelerator.end_training()
if __name__ == "__main__":
main()
```
## Results expected
Being able to run the code for streamining datasets with multi-gpu
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.5.2
- Platform: linux
- Python version: 3.9.12
- PyArrow version: 9.0.0
@lhoestq I do not have any idea why this freezing happens, and I removed the streaming mode and this was working fine, so I know this is caused by streaming mode of the dataloader part not working well with multi-gpu setting. Since datasets are large, I hope to keep the streamining mode. I very much appreciate your help.
| 31 | datasets freezes with streaming mode in multiple-gpu
## Describe the bug
Hi. I am using this dataloader, which is for processing large datasets in streaming mode mentioned in one of examples of huggingface. I am using it to read c4: https://github.com/huggingface/transformers/blob/b48ac1a094e572d6076b46a9e4ed3e0ebe978afc/examples/research_projects/codeparrot/scripts/codeparrot_training.py#L22
During using multi-gpu in accelerator in one node, the code freezes, but works for 1 GPU:
```
10/16/2022 14:18:46 - INFO - datasets.info - Loading Dataset Infos from /home/jack/.cache/huggingface/modules/datasets_modules/datasets/c4/df532b158939272d032cc63ef19cd5b83e9b4d00c922b833e4cb18b2e9869b01
Steps: 0%| | 0/400000 [00:00<?, ?it/s]10/16/2022 14:18:47 - INFO - torch.utils.data.dataloader - Shared seed (135290893754684706) sent to store on rank 0
```
# Code to reproduce
please run this code with `accelerate launch code.py`
```
from accelerate import Accelerator
from accelerate.logging import get_logger
from datasets import load_dataset
from torch.utils.data.dataloader import DataLoader
import torch
from datasets import load_dataset
from transformers import AutoTokenizer
import torch
from accelerate.logging import get_logger
from torch.utils.data import IterableDataset
from torch.utils.data.datapipes.iter.combinatorics import ShufflerIterDataPipe
logger = get_logger(__name__)
class ConstantLengthDataset(IterableDataset):
"""
Iterable dataset that returns constant length chunks of tokens from stream of text files.
Args:
tokenizer (Tokenizer): The processor used for proccessing the data.
dataset (dataset.Dataset): Dataset with text files.
infinite (bool): If True the iterator is reset after dataset reaches end else stops.
max_seq_length (int): Length of token sequences to return.
num_of_sequences (int): Number of token sequences to keep in buffer.
chars_per_token (int): Number of characters per token used to estimate number of tokens in text buffer.
"""
def __init__(
self,
tokenizer,
dataset,
infinite=False,
max_seq_length=1024,
num_of_sequences=1024,
chars_per_token=3.6,
):
self.tokenizer = tokenizer
# self.concat_token_id = tokenizer.bos_token_id
self.dataset = dataset
self.max_seq_length = max_seq_length
self.epoch = 0
self.infinite = infinite
self.current_size = 0
self.max_buffer_size = max_seq_length * chars_per_token * num_of_sequences
self.content_field = "text"
def __iter__(self):
iterator = iter(self.dataset)
more_examples = True
while more_examples:
buffer, buffer_len = [], 0
while True:
if buffer_len >= self.max_buffer_size:
break
try:
buffer.append(next(iterator)[self.content_field])
buffer_len += len(buffer[-1])
except StopIteration:
if self.infinite:
iterator = iter(self.dataset)
self.epoch += 1
logger.info(f"Dataset epoch: {self.epoch}")
else:
more_examples = False
break
tokenized_inputs = self.tokenizer(buffer, truncation=False)["input_ids"]
all_token_ids = []
for tokenized_input in tokenized_inputs:
all_token_ids.extend(tokenized_input)
for i in range(0, len(all_token_ids), self.max_seq_length):
input_ids = all_token_ids[i : i + self.max_seq_length]
if len(input_ids) == self.max_seq_length:
self.current_size += 1
yield torch.tensor(input_ids)
def shuffle(self, buffer_size=1000):
return ShufflerIterDataPipe(self, buffer_size=buffer_size)
def create_dataloaders(tokenizer, accelerator):
ds_kwargs = {"streaming": True}
# In distributed training, the load_dataset function gaurantees that only one process
# can concurrently download the dataset.
datasets = load_dataset(
"c4",
"en",
cache_dir="cache_dir",
**ds_kwargs,
)
train_data, valid_data = datasets["train"], datasets["validation"]
with accelerator.main_process_first():
train_data = train_data.shuffle(buffer_size=10000, seed=None)
train_dataset = ConstantLengthDataset(
tokenizer,
train_data,
infinite=True,
max_seq_length=256,
)
valid_dataset = ConstantLengthDataset(
tokenizer,
valid_data,
infinite=False,
max_seq_length=256,
)
train_dataset = train_dataset.shuffle(buffer_size=10000)
train_dataloader = DataLoader(train_dataset, batch_size=160, shuffle=True)
eval_dataloader = DataLoader(valid_dataset, batch_size=160)
return train_dataloader, eval_dataloader
def main():
# Accelerator.
logging_dir = "data_save_dir/log"
accelerator = Accelerator(
gradient_accumulation_steps=1,
mixed_precision="bf16",
log_with="tensorboard",
logging_dir=logging_dir,
)
# We need to initialize the trackers we use, and also store our configuration.
# The trackers initializes automatically on the main process.
if accelerator.is_main_process:
accelerator.init_trackers("test")
tokenizer = AutoTokenizer.from_pretrained("bert-base-uncased")
# Load datasets and create dataloaders.
train_dataloader, _ = create_dataloaders(tokenizer, accelerator)
train_dataloader = accelerator.prepare(train_dataloader)
for step, batch in enumerate(train_dataloader, start=1):
print(step)
accelerator.end_training()
if __name__ == "__main__":
main()
```
## Results expected
Being able to run the code for streamining datasets with multi-gpu
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.5.2
- Platform: linux
- Python version: 3.9.12
- PyArrow version: 9.0.0
@lhoestq I do not have any idea why this freezing happens, and I removed the streaming mode and this was working fine, so I know this is caused by streaming mode of the dataloader part not working well with multi-gpu setting. Since datasets are large, I hope to keep the streamining mode. I very much appreciate your help.
Hi ! You said it works on 1 GPU but doesn't wortk without accelerator - what's the difference between running on 1 GPU and running without accelerator in your case ? | [
-0.320170134305954,
-0.31651610136032104,
-0.039002928882837296,
0.4769468307495117,
0.32108551263809204,
-0.05959709361195564,
0.370758980512619,
-0.0028037503361701965,
0.29125797748565674,
0.27730265259742737,
-0.1412859410047531,
0.06606162339448929,
-0.1297413855791092,
0.389516144990921,
-0.02885536476969719,
0.019152846187353134,
0.14081059396266937,
-0.06935961544513702,
-0.05934390425682068,
0.09264911711215973,
0.19574815034866333,
0.28171306848526,
-0.03017459809780121,
-0.2807106375694275,
-0.3968455195426941,
0.006201479583978653,
0.08898560702800751,
0.05466218665242195,
0.16394278407096863,
-0.1528581976890564,
0.05657128989696503,
0.3212423622608185,
-0.1962885558605194,
0.6732676029205322,
-0.00011721457849489525,
0.05330623686313629,
0.18269649147987366,
-0.002833753824234009,
-0.21490003168582916,
-0.17322935163974762,
-0.002865813672542572,
0.06839033216238022,
0.14951622486114502,
0.04682282358407974,
-0.17401543259620667,
-0.0174991674721241,
-0.1881343424320221,
-0.6604426503181458,
0.164658784866333,
-0.042508333921432495,
0.09482607245445251,
0.4577403962612152,
-0.1465912163257599,
-0.06909176707267761,
-0.20002222061157227,
-0.039952024817466736,
-0.14591027796268463,
0.07709209620952606,
0.31674060225486755,
0.07274440675973892,
-0.27099719643592834,
0.40121567249298096,
0.12219187617301941,
-0.015591144561767578,
0.08307396620512009,
-0.14754250645637512,
-0.350762277841568,
-0.13338522613048553,
0.026910532265901566,
0.15082837641239166,
0.027056343853473663,
-0.3233974277973175,
-0.1601693481206894,
-0.22570520639419556,
0.10727719217538834,
-0.3284243941307068,
0.201379656791687,
0.11525953561067581,
-0.25809207558631897,
-0.21668508648872375,
-0.4963834583759308,
0.01326315850019455,
-0.08960461616516113,
0.06837072968482971,
-0.07536549866199493,
0.2995816469192505,
-0.2987593412399292,
0.22882121801376343,
0.38512924313545227,
0.29899197816848755,
-0.15710687637329102,
-0.19772954285144806,
-0.002054654061794281,
-0.2263694405555725,
-0.8506759405136108,
0.210271418094635,
-0.1854097545146942,
-0.024569854140281677,
0.1130077913403511,
0.212607279419899,
0.2809174656867981,
0.15809139609336853,
0.0683353990316391,
0.07589592784643173,
0.14983536303043365,
-0.02965284138917923,
-0.005833819508552551,
-0.20412547886371613,
0.43327707052230835,
0.4074971079826355,
-0.2626340985298157,
-0.06723201274871826,
-0.013328848406672478,
-0.10992640256881714,
-0.2989759147167206,
-0.1457396149635315,
-0.08084538578987122,
-0.07573612779378891,
-0.13559462130069733,
-0.009245884604752064,
-0.11118854582309723,
0.03931012004613876,
0.4182609021663666,
0.44486111402511597,
0.07055307179689407,
0.3420749604701996,
-0.18277500569820404,
0.05916411429643631,
-0.21634776890277863,
-0.44875651597976685,
-0.18320819735527039,
-0.2635971009731293,
-0.1491444855928421,
0.23651264607906342,
0.25286436080932617,
-0.6722689270973206,
-0.033016908913850784,
0.2876058518886566,
0.4721084237098694,
-0.1694207787513733,
0.1245342344045639,
-0.29843664169311523,
-0.05029793828725815,
0.17948129773139954,
0.14669935405254364,
0.4921897351741791,
0.1822681725025177,
-0.04350600764155388,
0.05512329190969467,
-0.11150530725717545,
-0.06791342049837112,
-0.0317845344543457,
0.30285823345184326,
0.11863456666469574,
0.07360691577196121,
0.18476532399654388,
-0.4126509726047516,
0.11747676134109497,
0.005819007754325867,
-0.1398874670267105,
0.27309441566467285,
-0.04221192002296448,
-0.0008702687919139862,
-0.14555160701274872,
0.23987773060798645,
0.5760335326194763,
0.12451320886611938,
-0.1120918020606041,
-0.0443904772400856,
-0.2915104925632477,
0.038571104407310486,
0.5202218294143677,
-0.17591074109077454,
-0.3686400055885315,
-0.28145554661750793,
0.045004233717918396,
-0.0261261984705925,
-0.23804381489753723,
-0.20734138786792755,
0.4822528064250946,
-0.3851122260093689,
0.30897125601768494,
0.4230332672595978,
0.10372115671634674,
0.12219540029764175,
-0.03825599327683449,
0.19279813766479492,
0.2943075895309448,
-0.00635366328060627,
0.1087382510304451,
-0.14604146778583527,
0.06424739956855774,
0.2653828561306,
0.016305286437273026,
-0.17548853158950806,
-0.300058513879776,
-0.07963960617780685,
-0.002100619487464428,
0.31338000297546387,
-0.16503708064556122,
0.17526975274085999,
0.41101473569869995,
0.04371234029531479,
-0.11278930306434631,
0.0510147362947464,
-0.18153807520866394,
-0.574967622756958,
0.29064786434173584,
0.2165021002292633,
-0.2392047941684723,
0.09127096086740494,
-0.1333739012479782,
0.23764142394065857,
-0.07981850951910019,
-0.3315660059452057,
-0.37471505999565125,
-0.032935481518507004,
0.20669057965278625,
0.09787946939468384,
0.1326659917831421,
-0.02257602848112583,
0.7143674492835999,
-0.1326308399438858,
0.1235450878739357,
-0.2603522539138794,
0.3782622218132019,
0.08834384381771088,
-0.25329169631004333,
-0.07439586520195007,
-0.11012204736471176,
0.06136968731880188,
-0.32795479893684387,
-0.14810338616371155,
0.46449926495552063,
0.09641259908676147,
0.5647338628768921,
-0.26063627004623413,
0.11943359673023224,
0.38852575421333313,
-0.19571395218372345,
0.0814359039068222,
0.17112208902835846,
0.1621701866388321,
-0.2649763822555542,
-0.04232949763536453,
0.3338702619075775,
-0.21187607944011688,
0.14005300402641296,
0.1394023895263672,
-0.1506596952676773,
-0.009420773014426231,
0.2594158947467804,
-0.048738256096839905,
0.06878665089607239,
0.3883502185344696,
0.025583820417523384,
0.44588765501976013,
-0.011565407738089561,
-0.4989607632160187,
0.1430942267179489,
0.3377918601036072,
0.263149231672287,
-0.1941157579421997,
-0.05033130943775177,
-0.33004245162010193,
-0.05804133415222168,
0.2738502323627472,
-0.07551849633455276,
0.3668179512023926,
0.11351387202739716,
-0.0034544579684734344,
-0.10172093659639359,
0.08031477779150009,
-0.2999836206436157,
0.17736758291721344,
0.10195215046405792,
0.1618015617132187,
0.2187531590461731,
0.1172676607966423,
-0.15939673781394958,
-0.15111970901489258,
-0.18575450778007507,
0.32863739132881165,
-0.033362001180648804,
-0.3298265337944031,
0.32112830877304077,
-0.34599485993385315,
-0.24143052101135254,
-0.1842232346534729,
-0.07266464829444885,
-0.4802292585372925,
-0.10746444016695023,
-0.31277281045913696,
0.4952528774738312,
0.031738463789224625,
0.128421813249588,
0.10595707595348358,
0.0028597861528396606,
0.23697461187839508,
0.022782154381275177,
-0.28592273592948914,
0.02397690713405609,
-0.1963951587677002,
-0.05390238016843796,
0.417086124420166,
-0.06987275928258896,
0.1014823466539383,
0.45332422852516174,
-0.1511560082435608,
-0.35475510358810425,
-0.1686646193265915,
0.07441732287406921,
-0.14645811915397644,
0.1020779237151146,
-0.11136025190353394,
0.1631530225276947,
-0.035169538110494614,
-0.11404077708721161,
0.19351963698863983,
-0.43751364946365356,
-0.08548972010612488,
0.271707683801651,
-0.035255592316389084,
0.1995011270046234,
-0.22854772210121155,
0.006123870611190796,
-0.24477176368236542,
-0.3657911419868469,
0.3497276306152344,
-0.2352394163608551,
-0.13698385655879974,
0.0765804722905159,
0.1583414375782013,
0.21081340312957764,
-0.03315375745296478,
-0.18436570465564728,
-0.12409546226263046,
-0.19303375482559204,
0.14701849222183228,
-0.019072476774454117,
-0.40133482217788696,
-0.244588240981102,
0.16984441876411438,
-0.0025123171508312225,
0.3933245539665222,
-0.31243571639060974,
0.16146600246429443,
-0.3194584548473358,
-0.0547042042016983,
0.05831800401210785,
-0.05197394639253616,
0.2204650342464447,
-0.2151278406381607,
-0.01358164194971323,
-0.11399076133966446,
-0.04376517981290817,
0.1658928543329239,
-0.13448747992515564,
-0.015818089246749878,
-0.11097333580255508,
0.34720727801322937,
0.3296865224838257,
0.45010387897491455,
0.21204568445682526,
-0.03832007572054863,
0.31824856996536255,
-0.07278018444776535,
0.21965815126895905,
0.049487050622701645,
-0.20635905861854553,
0.31881412863731384,
-0.1726091206073761,
-0.0045239925384521484,
-0.018886566162109375,
-0.19593185186386108,
-0.037774957716464996,
-0.22168457508087158,
0.14016085863113403,
0.18190330266952515,
-0.1656782031059265,
0.29752710461616516,
0.06558997929096222,
0.10472086071968079,
-0.17760330438613892,
0.05752391368150711,
0.07364991307258606,
-0.1482866108417511,
0.01676757074892521,
0.2895659804344177,
-0.26418378949165344,
-0.009687433950603008,
-0.3947683870792389,
0.02734026499092579,
-0.1826173961162567,
0.17090697586536407,
0.17284563183784485,
0.41673579812049866,
0.10159271955490112,
-0.06316328048706055,
0.09674377739429474,
-0.3232256770133972,
0.7259926795959473,
0.34981125593185425,
-0.13147538900375366,
0.09626911580562592,
-0.3811025321483612,
-0.2965686321258545,
0.03321569785475731,
-0.37280064821243286,
0.02045464515686035,
0.2718900442123413,
0.5440722703933716,
-0.2527817189693451,
-0.39522165060043335,
-0.19789808988571167,
0.03606124222278595,
-0.018301930278539658,
-0.05184583365917206,
-0.22067338228225708,
0.1025443896651268,
-0.2376442700624466,
0.2315637767314911,
0.10310465842485428,
0.058098215609788895,
-0.401311993598938,
-0.05811883881688118,
0.1250377595424652,
-0.2197563648223877,
0.12035338580608368,
0.06208226457238197,
0.1526395082473755,
-0.150322824716568,
0.2186867594718933,
0.35755452513694763,
0.054748568683862686,
0.23012283444404602,
0.1911984086036682,
0.31224650144577026,
-0.20272251963615417,
0.4371161460876465,
0.2170461118221283,
0.3125962018966675,
0.45868751406669617,
-0.07028362900018692,
0.49929025769233704,
0.10524245351552963,
0.30283230543136597,
-0.12995973229408264,
0.2632194757461548,
0.21913288533687592,
0.3468329608440399,
-0.3923860788345337,
-0.458741158246994,
0.3937756419181824,
0.004316641017794609,
0.20219282805919647,
0.6175047159194946,
0.12552914023399353,
-0.07383781671524048,
-0.1385607123374939,
-0.16125336289405823,
0.6028099060058594,
-0.06719326972961426,
0.3586098551750183,
0.20923885703086853,
-0.22055551409721375,
0.5054243206977844,
-0.5937470197677612,
0.19814899563789368,
-0.1506689190864563,
-0.41321611404418945,
0.018765492364764214,
-0.2010648548603058,
0.43172067403793335,
-0.12246599793434143,
-0.08273948729038239,
0.1873295158147812,
0.06535287201404572,
0.3014884293079376,
-0.1806645393371582,
0.3034682273864746,
-0.34839895367622375,
-0.41509413719177246,
-0.45341211557388306,
0.04850274324417114,
-0.12633726000785828,
0.13370546698570251,
0.09538030624389648,
-0.09765797853469849,
0.08964815735816956,
-0.02583513781428337,
-0.33737561106681824,
0.009162712842226028,
-0.6102495193481445,
0.00030599720776081085,
-0.04006807133555412,
-0.41945672035217285,
0.3332884609699249,
0.14806488156318665,
-0.09767547249794006,
-0.06345473229885101,
-0.062499530613422394,
0.1720711886882782,
-0.14119413495063782,
0.08674008399248123,
-0.10608958452939987,
-0.3329578936100006,
0.09485097229480743,
-0.009610209614038467,
-0.1025252491235733,
0.19989141821861267,
0.09746816009283066,
-0.13958975672721863,
0.36389291286468506,
0.1336819976568222,
-0.15619789063930511,
0.058961160480976105,
-0.06450261175632477,
0.08951372653245926,
0.08699853718280792,
-0.274768590927124,
0.019831059500575066,
0.06901092082262039,
-0.17514300346374512,
-0.20943623781204224,
0.018488068133592606,
0.02346118539571762,
-0.20378780364990234,
0.7961738109588623,
-0.06900791078805923,
-0.22404277324676514,
0.346279114484787,
0.4273766875267029,
-0.10663463920354843,
-0.23933950066566467,
-0.02573203667998314,
0.3107742965221405,
-0.23372137546539307,
0.14335303008556366,
-0.3001023232936859,
-0.16458454728126526,
0.17259564995765686,
-0.0007974468171596527,
-0.017555326223373413,
-0.09870066493749619,
0.014036621898412704,
-0.3685116767883301,
-0.41476279497146606,
-0.05516313016414642,
-0.1779431700706482,
0.08709278702735901,
0.1761348843574524,
0.26979830861091614,
-0.0006913729012012482,
0.3773987293243408,
-0.2025117576122284,
-0.019583584740757942,
-0.1402473747730255,
-0.12250952422618866,
0.20925326645374298,
-0.1959984004497528,
0.3830168843269348,
-0.02707037702202797,
0.057350680232048035,
0.36506521701812744,
-0.05137687176465988,
-0.11634066700935364,
-0.1765683889389038,
0.11344491690397263,
-0.05546925961971283,
-0.08208806067705154,
0.028041504323482513,
-0.10280346870422363,
-0.12126904726028442,
-0.09933386743068695,
0.6700537800788879,
0.13897347450256348,
0.006425827741622925,
-0.20907703042030334,
0.19417019188404083,
0.010862313210964203,
-0.3726525902748108,
0.018590690568089485,
-0.19535791873931885,
-0.15798620879650116,
0.3542337119579315,
0.03664272651076317,
0.04119914397597313,
-0.0052753835916519165,
-0.4814819395542145,
-0.0036610066890716553,
0.34902793169021606,
0.08964759111404419,
0.21850088238716125,
-0.23463983833789825,
-0.14610576629638672,
-0.12128204107284546,
0.3502779006958008,
0.360932320356369,
-0.14266851544380188,
-0.1517164260149002,
0.0793684720993042,
0.05996345728635788,
-0.0272354893386364,
-0.00409953435882926,
-0.19534257054328918,
0.018120858818292618,
0.08164803683757782,
0.2565746009349823,
0.3063749670982361,
0.1292659491300583,
-0.06028912961483002,
0.2432013750076294,
0.10289052873849869,
0.1693509817123413,
0.2773444354534149,
-0.2257394790649414,
0.10426411032676697,
0.15127182006835938,
0.09524668753147125,
0.10445536673069,
-0.0252470001578331,
0.20106996595859528,
-0.13846591114997864,
0.27362290024757385,
0.1747645139694214,
0.1947527378797531,
0.14683261513710022,
-0.5698386430740356,
-0.39714014530181885,
0.09334786236286163,
-0.5674176216125488,
0.2225762903690338,
-0.1508185863494873,
0.43626347184181213,
-0.37798917293548584,
-0.21522557735443115,
-0.2594103515148163,
0.2358933687210083,
-0.23646557331085205,
0.037227656692266464,
0.19985072314739227,
-0.19495229423046112,
-0.23551325500011444,
0.17674444615840912,
-0.008310437202453613,
0.11880853772163391,
0.3892444372177124,
0.27836593985557556,
0.06494555622339249,
-0.3253641128540039,
-0.2908581495285034,
0.2944503128528595,
0.19019469618797302,
-0.12471812963485718,
0.39426568150520325,
0.4062999486923218,
-0.1472921222448349,
-0.012048386037349701,
-0.023800252005457878,
0.32988008856773376,
0.0258270725607872,
0.14542289078235626,
0.15760761499404907,
0.11603793501853943,
0.004418214783072472,
0.18759657442569733,
0.11953715234994888,
0.31844618916511536,
0.16899079084396362,
0.2034032940864563,
0.06254585087299347,
-0.1343478560447693,
-0.23187832534313202,
0.013515152037143707,
0.10823354125022888,
-0.590876042842865,
0.2150617092847824,
-0.35296428203582764,
0.04865726828575134,
-0.2588043808937073,
-0.12347038835287094,
-0.4918266534805298,
0.09293932467699051,
0.3377533257007599,
-0.18807686865329742,
0.0020675640553236008,
-0.10834556818008423,
0.029926974326372147,
0.33757779002189636,
0.7586604356765747,
0.01931166648864746,
-0.11100371927022934,
-0.22932112216949463,
-0.478585422039032,
-0.5296587944030762,
0.13045765459537506,
-0.04465487226843834,
0.19258005917072296,
-0.1350322663784027,
0.27857139706611633,
0.11657805740833282,
0.037997134029865265,
0.17734764516353607,
0.11425752937793732,
0.2575359344482422,
0.19555732607841492,
-0.5474047660827637,
0.0003874190151691437,
-0.28104811906814575,
-0.06977588683366776,
0.049724288284778595,
-0.08641490340232849,
0.3129313588142395,
0.23635233938694,
-0.0038938522338867188,
-0.12754181027412415,
0.19530734419822693,
-0.061308834701776505,
-0.16843582689762115,
0.07537266612052917,
0.022778604179620743,
0.3318895697593689,
0.11260268837213516,
-0.21790336072444916,
-0.20115309953689575,
0.13193413615226746,
-0.07558852434158325,
-0.15963539481163025,
-0.016645856201648712,
0.42679429054260254,
-0.0568099170923233,
-0.26696422696113586,
-0.4690762460231781,
0.5127025842666626,
0.12184463441371918,
-0.17341481149196625,
-0.20301532745361328,
0.2121679037809372,
-0.10536829382181168,
0.23657311499118805,
0.397504597902298,
0.7369195222854614,
0.0757630318403244,
-0.07086829841136932,
-0.34009864926338196,
-0.24795030057430267,
0.29750362038612366,
-0.5315229296684265,
-0.2666740119457245,
-0.20205818116664886,
0.28316405415534973,
0.29716551303863525,
0.09927716851234436,
-0.5282416343688965,
0.1667773425579071,
0.10719551146030426,
-0.1955672800540924,
-0.216616690158844,
0.14678995311260223,
-0.11242125928401947,
-0.07235011458396912,
-0.09623309969902039,
0.17933863401412964,
0.3893272578716278,
-0.20760643482208252,
0.24392300844192505,
-0.09752305597066879
] |
https://github.com/huggingface/datasets/issues/5123 | datasets freezes with streaming mode in multiple-gpu | Hi @lhoestq
thanks for coming back to me. Sorry for the confusion I made. I meant this works fine on 1 GPU, but on multi-gpu it is freezing. "accelerator" is not an issue as if you adapt the code without accelerator this still gets the same issue.
In order to test it. Please run "accelerate config", then use the setup for multi-gpu in one node.
After that run "accelerate launch code.py" and then you would see the freezing occurs. | ## Describe the bug
Hi. I am using this dataloader, which is for processing large datasets in streaming mode mentioned in one of examples of huggingface. I am using it to read c4: https://github.com/huggingface/transformers/blob/b48ac1a094e572d6076b46a9e4ed3e0ebe978afc/examples/research_projects/codeparrot/scripts/codeparrot_training.py#L22
During using multi-gpu in accelerator in one node, the code freezes, but works for 1 GPU:
```
10/16/2022 14:18:46 - INFO - datasets.info - Loading Dataset Infos from /home/jack/.cache/huggingface/modules/datasets_modules/datasets/c4/df532b158939272d032cc63ef19cd5b83e9b4d00c922b833e4cb18b2e9869b01
Steps: 0%| | 0/400000 [00:00<?, ?it/s]10/16/2022 14:18:47 - INFO - torch.utils.data.dataloader - Shared seed (135290893754684706) sent to store on rank 0
```
# Code to reproduce
please run this code with `accelerate launch code.py`
```
from accelerate import Accelerator
from accelerate.logging import get_logger
from datasets import load_dataset
from torch.utils.data.dataloader import DataLoader
import torch
from datasets import load_dataset
from transformers import AutoTokenizer
import torch
from accelerate.logging import get_logger
from torch.utils.data import IterableDataset
from torch.utils.data.datapipes.iter.combinatorics import ShufflerIterDataPipe
logger = get_logger(__name__)
class ConstantLengthDataset(IterableDataset):
"""
Iterable dataset that returns constant length chunks of tokens from stream of text files.
Args:
tokenizer (Tokenizer): The processor used for proccessing the data.
dataset (dataset.Dataset): Dataset with text files.
infinite (bool): If True the iterator is reset after dataset reaches end else stops.
max_seq_length (int): Length of token sequences to return.
num_of_sequences (int): Number of token sequences to keep in buffer.
chars_per_token (int): Number of characters per token used to estimate number of tokens in text buffer.
"""
def __init__(
self,
tokenizer,
dataset,
infinite=False,
max_seq_length=1024,
num_of_sequences=1024,
chars_per_token=3.6,
):
self.tokenizer = tokenizer
# self.concat_token_id = tokenizer.bos_token_id
self.dataset = dataset
self.max_seq_length = max_seq_length
self.epoch = 0
self.infinite = infinite
self.current_size = 0
self.max_buffer_size = max_seq_length * chars_per_token * num_of_sequences
self.content_field = "text"
def __iter__(self):
iterator = iter(self.dataset)
more_examples = True
while more_examples:
buffer, buffer_len = [], 0
while True:
if buffer_len >= self.max_buffer_size:
break
try:
buffer.append(next(iterator)[self.content_field])
buffer_len += len(buffer[-1])
except StopIteration:
if self.infinite:
iterator = iter(self.dataset)
self.epoch += 1
logger.info(f"Dataset epoch: {self.epoch}")
else:
more_examples = False
break
tokenized_inputs = self.tokenizer(buffer, truncation=False)["input_ids"]
all_token_ids = []
for tokenized_input in tokenized_inputs:
all_token_ids.extend(tokenized_input)
for i in range(0, len(all_token_ids), self.max_seq_length):
input_ids = all_token_ids[i : i + self.max_seq_length]
if len(input_ids) == self.max_seq_length:
self.current_size += 1
yield torch.tensor(input_ids)
def shuffle(self, buffer_size=1000):
return ShufflerIterDataPipe(self, buffer_size=buffer_size)
def create_dataloaders(tokenizer, accelerator):
ds_kwargs = {"streaming": True}
# In distributed training, the load_dataset function gaurantees that only one process
# can concurrently download the dataset.
datasets = load_dataset(
"c4",
"en",
cache_dir="cache_dir",
**ds_kwargs,
)
train_data, valid_data = datasets["train"], datasets["validation"]
with accelerator.main_process_first():
train_data = train_data.shuffle(buffer_size=10000, seed=None)
train_dataset = ConstantLengthDataset(
tokenizer,
train_data,
infinite=True,
max_seq_length=256,
)
valid_dataset = ConstantLengthDataset(
tokenizer,
valid_data,
infinite=False,
max_seq_length=256,
)
train_dataset = train_dataset.shuffle(buffer_size=10000)
train_dataloader = DataLoader(train_dataset, batch_size=160, shuffle=True)
eval_dataloader = DataLoader(valid_dataset, batch_size=160)
return train_dataloader, eval_dataloader
def main():
# Accelerator.
logging_dir = "data_save_dir/log"
accelerator = Accelerator(
gradient_accumulation_steps=1,
mixed_precision="bf16",
log_with="tensorboard",
logging_dir=logging_dir,
)
# We need to initialize the trackers we use, and also store our configuration.
# The trackers initializes automatically on the main process.
if accelerator.is_main_process:
accelerator.init_trackers("test")
tokenizer = AutoTokenizer.from_pretrained("bert-base-uncased")
# Load datasets and create dataloaders.
train_dataloader, _ = create_dataloaders(tokenizer, accelerator)
train_dataloader = accelerator.prepare(train_dataloader)
for step, batch in enumerate(train_dataloader, start=1):
print(step)
accelerator.end_training()
if __name__ == "__main__":
main()
```
## Results expected
Being able to run the code for streamining datasets with multi-gpu
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.5.2
- Platform: linux
- Python version: 3.9.12
- PyArrow version: 9.0.0
@lhoestq I do not have any idea why this freezing happens, and I removed the streaming mode and this was working fine, so I know this is caused by streaming mode of the dataloader part not working well with multi-gpu setting. Since datasets are large, I hope to keep the streamining mode. I very much appreciate your help.
| 79 | datasets freezes with streaming mode in multiple-gpu
## Describe the bug
Hi. I am using this dataloader, which is for processing large datasets in streaming mode mentioned in one of examples of huggingface. I am using it to read c4: https://github.com/huggingface/transformers/blob/b48ac1a094e572d6076b46a9e4ed3e0ebe978afc/examples/research_projects/codeparrot/scripts/codeparrot_training.py#L22
During using multi-gpu in accelerator in one node, the code freezes, but works for 1 GPU:
```
10/16/2022 14:18:46 - INFO - datasets.info - Loading Dataset Infos from /home/jack/.cache/huggingface/modules/datasets_modules/datasets/c4/df532b158939272d032cc63ef19cd5b83e9b4d00c922b833e4cb18b2e9869b01
Steps: 0%| | 0/400000 [00:00<?, ?it/s]10/16/2022 14:18:47 - INFO - torch.utils.data.dataloader - Shared seed (135290893754684706) sent to store on rank 0
```
# Code to reproduce
please run this code with `accelerate launch code.py`
```
from accelerate import Accelerator
from accelerate.logging import get_logger
from datasets import load_dataset
from torch.utils.data.dataloader import DataLoader
import torch
from datasets import load_dataset
from transformers import AutoTokenizer
import torch
from accelerate.logging import get_logger
from torch.utils.data import IterableDataset
from torch.utils.data.datapipes.iter.combinatorics import ShufflerIterDataPipe
logger = get_logger(__name__)
class ConstantLengthDataset(IterableDataset):
"""
Iterable dataset that returns constant length chunks of tokens from stream of text files.
Args:
tokenizer (Tokenizer): The processor used for proccessing the data.
dataset (dataset.Dataset): Dataset with text files.
infinite (bool): If True the iterator is reset after dataset reaches end else stops.
max_seq_length (int): Length of token sequences to return.
num_of_sequences (int): Number of token sequences to keep in buffer.
chars_per_token (int): Number of characters per token used to estimate number of tokens in text buffer.
"""
def __init__(
self,
tokenizer,
dataset,
infinite=False,
max_seq_length=1024,
num_of_sequences=1024,
chars_per_token=3.6,
):
self.tokenizer = tokenizer
# self.concat_token_id = tokenizer.bos_token_id
self.dataset = dataset
self.max_seq_length = max_seq_length
self.epoch = 0
self.infinite = infinite
self.current_size = 0
self.max_buffer_size = max_seq_length * chars_per_token * num_of_sequences
self.content_field = "text"
def __iter__(self):
iterator = iter(self.dataset)
more_examples = True
while more_examples:
buffer, buffer_len = [], 0
while True:
if buffer_len >= self.max_buffer_size:
break
try:
buffer.append(next(iterator)[self.content_field])
buffer_len += len(buffer[-1])
except StopIteration:
if self.infinite:
iterator = iter(self.dataset)
self.epoch += 1
logger.info(f"Dataset epoch: {self.epoch}")
else:
more_examples = False
break
tokenized_inputs = self.tokenizer(buffer, truncation=False)["input_ids"]
all_token_ids = []
for tokenized_input in tokenized_inputs:
all_token_ids.extend(tokenized_input)
for i in range(0, len(all_token_ids), self.max_seq_length):
input_ids = all_token_ids[i : i + self.max_seq_length]
if len(input_ids) == self.max_seq_length:
self.current_size += 1
yield torch.tensor(input_ids)
def shuffle(self, buffer_size=1000):
return ShufflerIterDataPipe(self, buffer_size=buffer_size)
def create_dataloaders(tokenizer, accelerator):
ds_kwargs = {"streaming": True}
# In distributed training, the load_dataset function gaurantees that only one process
# can concurrently download the dataset.
datasets = load_dataset(
"c4",
"en",
cache_dir="cache_dir",
**ds_kwargs,
)
train_data, valid_data = datasets["train"], datasets["validation"]
with accelerator.main_process_first():
train_data = train_data.shuffle(buffer_size=10000, seed=None)
train_dataset = ConstantLengthDataset(
tokenizer,
train_data,
infinite=True,
max_seq_length=256,
)
valid_dataset = ConstantLengthDataset(
tokenizer,
valid_data,
infinite=False,
max_seq_length=256,
)
train_dataset = train_dataset.shuffle(buffer_size=10000)
train_dataloader = DataLoader(train_dataset, batch_size=160, shuffle=True)
eval_dataloader = DataLoader(valid_dataset, batch_size=160)
return train_dataloader, eval_dataloader
def main():
# Accelerator.
logging_dir = "data_save_dir/log"
accelerator = Accelerator(
gradient_accumulation_steps=1,
mixed_precision="bf16",
log_with="tensorboard",
logging_dir=logging_dir,
)
# We need to initialize the trackers we use, and also store our configuration.
# The trackers initializes automatically on the main process.
if accelerator.is_main_process:
accelerator.init_trackers("test")
tokenizer = AutoTokenizer.from_pretrained("bert-base-uncased")
# Load datasets and create dataloaders.
train_dataloader, _ = create_dataloaders(tokenizer, accelerator)
train_dataloader = accelerator.prepare(train_dataloader)
for step, batch in enumerate(train_dataloader, start=1):
print(step)
accelerator.end_training()
if __name__ == "__main__":
main()
```
## Results expected
Being able to run the code for streamining datasets with multi-gpu
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.5.2
- Platform: linux
- Python version: 3.9.12
- PyArrow version: 9.0.0
@lhoestq I do not have any idea why this freezing happens, and I removed the streaming mode and this was working fine, so I know this is caused by streaming mode of the dataloader part not working well with multi-gpu setting. Since datasets are large, I hope to keep the streamining mode. I very much appreciate your help.
Hi @lhoestq
thanks for coming back to me. Sorry for the confusion I made. I meant this works fine on 1 GPU, but on multi-gpu it is freezing. "accelerator" is not an issue as if you adapt the code without accelerator this still gets the same issue.
In order to test it. Please run "accelerate config", then use the setup for multi-gpu in one node.
After that run "accelerate launch code.py" and then you would see the freezing occurs. | [
-0.320170134305954,
-0.31651610136032104,
-0.039002928882837296,
0.4769468307495117,
0.32108551263809204,
-0.05959709361195564,
0.370758980512619,
-0.0028037503361701965,
0.29125797748565674,
0.27730265259742737,
-0.1412859410047531,
0.06606162339448929,
-0.1297413855791092,
0.389516144990921,
-0.02885536476969719,
0.019152846187353134,
0.14081059396266937,
-0.06935961544513702,
-0.05934390425682068,
0.09264911711215973,
0.19574815034866333,
0.28171306848526,
-0.03017459809780121,
-0.2807106375694275,
-0.3968455195426941,
0.006201479583978653,
0.08898560702800751,
0.05466218665242195,
0.16394278407096863,
-0.1528581976890564,
0.05657128989696503,
0.3212423622608185,
-0.1962885558605194,
0.6732676029205322,
-0.00011721457849489525,
0.05330623686313629,
0.18269649147987366,
-0.002833753824234009,
-0.21490003168582916,
-0.17322935163974762,
-0.002865813672542572,
0.06839033216238022,
0.14951622486114502,
0.04682282358407974,
-0.17401543259620667,
-0.0174991674721241,
-0.1881343424320221,
-0.6604426503181458,
0.164658784866333,
-0.042508333921432495,
0.09482607245445251,
0.4577403962612152,
-0.1465912163257599,
-0.06909176707267761,
-0.20002222061157227,
-0.039952024817466736,
-0.14591027796268463,
0.07709209620952606,
0.31674060225486755,
0.07274440675973892,
-0.27099719643592834,
0.40121567249298096,
0.12219187617301941,
-0.015591144561767578,
0.08307396620512009,
-0.14754250645637512,
-0.350762277841568,
-0.13338522613048553,
0.026910532265901566,
0.15082837641239166,
0.027056343853473663,
-0.3233974277973175,
-0.1601693481206894,
-0.22570520639419556,
0.10727719217538834,
-0.3284243941307068,
0.201379656791687,
0.11525953561067581,
-0.25809207558631897,
-0.21668508648872375,
-0.4963834583759308,
0.01326315850019455,
-0.08960461616516113,
0.06837072968482971,
-0.07536549866199493,
0.2995816469192505,
-0.2987593412399292,
0.22882121801376343,
0.38512924313545227,
0.29899197816848755,
-0.15710687637329102,
-0.19772954285144806,
-0.002054654061794281,
-0.2263694405555725,
-0.8506759405136108,
0.210271418094635,
-0.1854097545146942,
-0.024569854140281677,
0.1130077913403511,
0.212607279419899,
0.2809174656867981,
0.15809139609336853,
0.0683353990316391,
0.07589592784643173,
0.14983536303043365,
-0.02965284138917923,
-0.005833819508552551,
-0.20412547886371613,
0.43327707052230835,
0.4074971079826355,
-0.2626340985298157,
-0.06723201274871826,
-0.013328848406672478,
-0.10992640256881714,
-0.2989759147167206,
-0.1457396149635315,
-0.08084538578987122,
-0.07573612779378891,
-0.13559462130069733,
-0.009245884604752064,
-0.11118854582309723,
0.03931012004613876,
0.4182609021663666,
0.44486111402511597,
0.07055307179689407,
0.3420749604701996,
-0.18277500569820404,
0.05916411429643631,
-0.21634776890277863,
-0.44875651597976685,
-0.18320819735527039,
-0.2635971009731293,
-0.1491444855928421,
0.23651264607906342,
0.25286436080932617,
-0.6722689270973206,
-0.033016908913850784,
0.2876058518886566,
0.4721084237098694,
-0.1694207787513733,
0.1245342344045639,
-0.29843664169311523,
-0.05029793828725815,
0.17948129773139954,
0.14669935405254364,
0.4921897351741791,
0.1822681725025177,
-0.04350600764155388,
0.05512329190969467,
-0.11150530725717545,
-0.06791342049837112,
-0.0317845344543457,
0.30285823345184326,
0.11863456666469574,
0.07360691577196121,
0.18476532399654388,
-0.4126509726047516,
0.11747676134109497,
0.005819007754325867,
-0.1398874670267105,
0.27309441566467285,
-0.04221192002296448,
-0.0008702687919139862,
-0.14555160701274872,
0.23987773060798645,
0.5760335326194763,
0.12451320886611938,
-0.1120918020606041,
-0.0443904772400856,
-0.2915104925632477,
0.038571104407310486,
0.5202218294143677,
-0.17591074109077454,
-0.3686400055885315,
-0.28145554661750793,
0.045004233717918396,
-0.0261261984705925,
-0.23804381489753723,
-0.20734138786792755,
0.4822528064250946,
-0.3851122260093689,
0.30897125601768494,
0.4230332672595978,
0.10372115671634674,
0.12219540029764175,
-0.03825599327683449,
0.19279813766479492,
0.2943075895309448,
-0.00635366328060627,
0.1087382510304451,
-0.14604146778583527,
0.06424739956855774,
0.2653828561306,
0.016305286437273026,
-0.17548853158950806,
-0.300058513879776,
-0.07963960617780685,
-0.002100619487464428,
0.31338000297546387,
-0.16503708064556122,
0.17526975274085999,
0.41101473569869995,
0.04371234029531479,
-0.11278930306434631,
0.0510147362947464,
-0.18153807520866394,
-0.574967622756958,
0.29064786434173584,
0.2165021002292633,
-0.2392047941684723,
0.09127096086740494,
-0.1333739012479782,
0.23764142394065857,
-0.07981850951910019,
-0.3315660059452057,
-0.37471505999565125,
-0.032935481518507004,
0.20669057965278625,
0.09787946939468384,
0.1326659917831421,
-0.02257602848112583,
0.7143674492835999,
-0.1326308399438858,
0.1235450878739357,
-0.2603522539138794,
0.3782622218132019,
0.08834384381771088,
-0.25329169631004333,
-0.07439586520195007,
-0.11012204736471176,
0.06136968731880188,
-0.32795479893684387,
-0.14810338616371155,
0.46449926495552063,
0.09641259908676147,
0.5647338628768921,
-0.26063627004623413,
0.11943359673023224,
0.38852575421333313,
-0.19571395218372345,
0.0814359039068222,
0.17112208902835846,
0.1621701866388321,
-0.2649763822555542,
-0.04232949763536453,
0.3338702619075775,
-0.21187607944011688,
0.14005300402641296,
0.1394023895263672,
-0.1506596952676773,
-0.009420773014426231,
0.2594158947467804,
-0.048738256096839905,
0.06878665089607239,
0.3883502185344696,
0.025583820417523384,
0.44588765501976013,
-0.011565407738089561,
-0.4989607632160187,
0.1430942267179489,
0.3377918601036072,
0.263149231672287,
-0.1941157579421997,
-0.05033130943775177,
-0.33004245162010193,
-0.05804133415222168,
0.2738502323627472,
-0.07551849633455276,
0.3668179512023926,
0.11351387202739716,
-0.0034544579684734344,
-0.10172093659639359,
0.08031477779150009,
-0.2999836206436157,
0.17736758291721344,
0.10195215046405792,
0.1618015617132187,
0.2187531590461731,
0.1172676607966423,
-0.15939673781394958,
-0.15111970901489258,
-0.18575450778007507,
0.32863739132881165,
-0.033362001180648804,
-0.3298265337944031,
0.32112830877304077,
-0.34599485993385315,
-0.24143052101135254,
-0.1842232346534729,
-0.07266464829444885,
-0.4802292585372925,
-0.10746444016695023,
-0.31277281045913696,
0.4952528774738312,
0.031738463789224625,
0.128421813249588,
0.10595707595348358,
0.0028597861528396606,
0.23697461187839508,
0.022782154381275177,
-0.28592273592948914,
0.02397690713405609,
-0.1963951587677002,
-0.05390238016843796,
0.417086124420166,
-0.06987275928258896,
0.1014823466539383,
0.45332422852516174,
-0.1511560082435608,
-0.35475510358810425,
-0.1686646193265915,
0.07441732287406921,
-0.14645811915397644,
0.1020779237151146,
-0.11136025190353394,
0.1631530225276947,
-0.035169538110494614,
-0.11404077708721161,
0.19351963698863983,
-0.43751364946365356,
-0.08548972010612488,
0.271707683801651,
-0.035255592316389084,
0.1995011270046234,
-0.22854772210121155,
0.006123870611190796,
-0.24477176368236542,
-0.3657911419868469,
0.3497276306152344,
-0.2352394163608551,
-0.13698385655879974,
0.0765804722905159,
0.1583414375782013,
0.21081340312957764,
-0.03315375745296478,
-0.18436570465564728,
-0.12409546226263046,
-0.19303375482559204,
0.14701849222183228,
-0.019072476774454117,
-0.40133482217788696,
-0.244588240981102,
0.16984441876411438,
-0.0025123171508312225,
0.3933245539665222,
-0.31243571639060974,
0.16146600246429443,
-0.3194584548473358,
-0.0547042042016983,
0.05831800401210785,
-0.05197394639253616,
0.2204650342464447,
-0.2151278406381607,
-0.01358164194971323,
-0.11399076133966446,
-0.04376517981290817,
0.1658928543329239,
-0.13448747992515564,
-0.015818089246749878,
-0.11097333580255508,
0.34720727801322937,
0.3296865224838257,
0.45010387897491455,
0.21204568445682526,
-0.03832007572054863,
0.31824856996536255,
-0.07278018444776535,
0.21965815126895905,
0.049487050622701645,
-0.20635905861854553,
0.31881412863731384,
-0.1726091206073761,
-0.0045239925384521484,
-0.018886566162109375,
-0.19593185186386108,
-0.037774957716464996,
-0.22168457508087158,
0.14016085863113403,
0.18190330266952515,
-0.1656782031059265,
0.29752710461616516,
0.06558997929096222,
0.10472086071968079,
-0.17760330438613892,
0.05752391368150711,
0.07364991307258606,
-0.1482866108417511,
0.01676757074892521,
0.2895659804344177,
-0.26418378949165344,
-0.009687433950603008,
-0.3947683870792389,
0.02734026499092579,
-0.1826173961162567,
0.17090697586536407,
0.17284563183784485,
0.41673579812049866,
0.10159271955490112,
-0.06316328048706055,
0.09674377739429474,
-0.3232256770133972,
0.7259926795959473,
0.34981125593185425,
-0.13147538900375366,
0.09626911580562592,
-0.3811025321483612,
-0.2965686321258545,
0.03321569785475731,
-0.37280064821243286,
0.02045464515686035,
0.2718900442123413,
0.5440722703933716,
-0.2527817189693451,
-0.39522165060043335,
-0.19789808988571167,
0.03606124222278595,
-0.018301930278539658,
-0.05184583365917206,
-0.22067338228225708,
0.1025443896651268,
-0.2376442700624466,
0.2315637767314911,
0.10310465842485428,
0.058098215609788895,
-0.401311993598938,
-0.05811883881688118,
0.1250377595424652,
-0.2197563648223877,
0.12035338580608368,
0.06208226457238197,
0.1526395082473755,
-0.150322824716568,
0.2186867594718933,
0.35755452513694763,
0.054748568683862686,
0.23012283444404602,
0.1911984086036682,
0.31224650144577026,
-0.20272251963615417,
0.4371161460876465,
0.2170461118221283,
0.3125962018966675,
0.45868751406669617,
-0.07028362900018692,
0.49929025769233704,
0.10524245351552963,
0.30283230543136597,
-0.12995973229408264,
0.2632194757461548,
0.21913288533687592,
0.3468329608440399,
-0.3923860788345337,
-0.458741158246994,
0.3937756419181824,
0.004316641017794609,
0.20219282805919647,
0.6175047159194946,
0.12552914023399353,
-0.07383781671524048,
-0.1385607123374939,
-0.16125336289405823,
0.6028099060058594,
-0.06719326972961426,
0.3586098551750183,
0.20923885703086853,
-0.22055551409721375,
0.5054243206977844,
-0.5937470197677612,
0.19814899563789368,
-0.1506689190864563,
-0.41321611404418945,
0.018765492364764214,
-0.2010648548603058,
0.43172067403793335,
-0.12246599793434143,
-0.08273948729038239,
0.1873295158147812,
0.06535287201404572,
0.3014884293079376,
-0.1806645393371582,
0.3034682273864746,
-0.34839895367622375,
-0.41509413719177246,
-0.45341211557388306,
0.04850274324417114,
-0.12633726000785828,
0.13370546698570251,
0.09538030624389648,
-0.09765797853469849,
0.08964815735816956,
-0.02583513781428337,
-0.33737561106681824,
0.009162712842226028,
-0.6102495193481445,
0.00030599720776081085,
-0.04006807133555412,
-0.41945672035217285,
0.3332884609699249,
0.14806488156318665,
-0.09767547249794006,
-0.06345473229885101,
-0.062499530613422394,
0.1720711886882782,
-0.14119413495063782,
0.08674008399248123,
-0.10608958452939987,
-0.3329578936100006,
0.09485097229480743,
-0.009610209614038467,
-0.1025252491235733,
0.19989141821861267,
0.09746816009283066,
-0.13958975672721863,
0.36389291286468506,
0.1336819976568222,
-0.15619789063930511,
0.058961160480976105,
-0.06450261175632477,
0.08951372653245926,
0.08699853718280792,
-0.274768590927124,
0.019831059500575066,
0.06901092082262039,
-0.17514300346374512,
-0.20943623781204224,
0.018488068133592606,
0.02346118539571762,
-0.20378780364990234,
0.7961738109588623,
-0.06900791078805923,
-0.22404277324676514,
0.346279114484787,
0.4273766875267029,
-0.10663463920354843,
-0.23933950066566467,
-0.02573203667998314,
0.3107742965221405,
-0.23372137546539307,
0.14335303008556366,
-0.3001023232936859,
-0.16458454728126526,
0.17259564995765686,
-0.0007974468171596527,
-0.017555326223373413,
-0.09870066493749619,
0.014036621898412704,
-0.3685116767883301,
-0.41476279497146606,
-0.05516313016414642,
-0.1779431700706482,
0.08709278702735901,
0.1761348843574524,
0.26979830861091614,
-0.0006913729012012482,
0.3773987293243408,
-0.2025117576122284,
-0.019583584740757942,
-0.1402473747730255,
-0.12250952422618866,
0.20925326645374298,
-0.1959984004497528,
0.3830168843269348,
-0.02707037702202797,
0.057350680232048035,
0.36506521701812744,
-0.05137687176465988,
-0.11634066700935364,
-0.1765683889389038,
0.11344491690397263,
-0.05546925961971283,
-0.08208806067705154,
0.028041504323482513,
-0.10280346870422363,
-0.12126904726028442,
-0.09933386743068695,
0.6700537800788879,
0.13897347450256348,
0.006425827741622925,
-0.20907703042030334,
0.19417019188404083,
0.010862313210964203,
-0.3726525902748108,
0.018590690568089485,
-0.19535791873931885,
-0.15798620879650116,
0.3542337119579315,
0.03664272651076317,
0.04119914397597313,
-0.0052753835916519165,
-0.4814819395542145,
-0.0036610066890716553,
0.34902793169021606,
0.08964759111404419,
0.21850088238716125,
-0.23463983833789825,
-0.14610576629638672,
-0.12128204107284546,
0.3502779006958008,
0.360932320356369,
-0.14266851544380188,
-0.1517164260149002,
0.0793684720993042,
0.05996345728635788,
-0.0272354893386364,
-0.00409953435882926,
-0.19534257054328918,
0.018120858818292618,
0.08164803683757782,
0.2565746009349823,
0.3063749670982361,
0.1292659491300583,
-0.06028912961483002,
0.2432013750076294,
0.10289052873849869,
0.1693509817123413,
0.2773444354534149,
-0.2257394790649414,
0.10426411032676697,
0.15127182006835938,
0.09524668753147125,
0.10445536673069,
-0.0252470001578331,
0.20106996595859528,
-0.13846591114997864,
0.27362290024757385,
0.1747645139694214,
0.1947527378797531,
0.14683261513710022,
-0.5698386430740356,
-0.39714014530181885,
0.09334786236286163,
-0.5674176216125488,
0.2225762903690338,
-0.1508185863494873,
0.43626347184181213,
-0.37798917293548584,
-0.21522557735443115,
-0.2594103515148163,
0.2358933687210083,
-0.23646557331085205,
0.037227656692266464,
0.19985072314739227,
-0.19495229423046112,
-0.23551325500011444,
0.17674444615840912,
-0.008310437202453613,
0.11880853772163391,
0.3892444372177124,
0.27836593985557556,
0.06494555622339249,
-0.3253641128540039,
-0.2908581495285034,
0.2944503128528595,
0.19019469618797302,
-0.12471812963485718,
0.39426568150520325,
0.4062999486923218,
-0.1472921222448349,
-0.012048386037349701,
-0.023800252005457878,
0.32988008856773376,
0.0258270725607872,
0.14542289078235626,
0.15760761499404907,
0.11603793501853943,
0.004418214783072472,
0.18759657442569733,
0.11953715234994888,
0.31844618916511536,
0.16899079084396362,
0.2034032940864563,
0.06254585087299347,
-0.1343478560447693,
-0.23187832534313202,
0.013515152037143707,
0.10823354125022888,
-0.590876042842865,
0.2150617092847824,
-0.35296428203582764,
0.04865726828575134,
-0.2588043808937073,
-0.12347038835287094,
-0.4918266534805298,
0.09293932467699051,
0.3377533257007599,
-0.18807686865329742,
0.0020675640553236008,
-0.10834556818008423,
0.029926974326372147,
0.33757779002189636,
0.7586604356765747,
0.01931166648864746,
-0.11100371927022934,
-0.22932112216949463,
-0.478585422039032,
-0.5296587944030762,
0.13045765459537506,
-0.04465487226843834,
0.19258005917072296,
-0.1350322663784027,
0.27857139706611633,
0.11657805740833282,
0.037997134029865265,
0.17734764516353607,
0.11425752937793732,
0.2575359344482422,
0.19555732607841492,
-0.5474047660827637,
0.0003874190151691437,
-0.28104811906814575,
-0.06977588683366776,
0.049724288284778595,
-0.08641490340232849,
0.3129313588142395,
0.23635233938694,
-0.0038938522338867188,
-0.12754181027412415,
0.19530734419822693,
-0.061308834701776505,
-0.16843582689762115,
0.07537266612052917,
0.022778604179620743,
0.3318895697593689,
0.11260268837213516,
-0.21790336072444916,
-0.20115309953689575,
0.13193413615226746,
-0.07558852434158325,
-0.15963539481163025,
-0.016645856201648712,
0.42679429054260254,
-0.0568099170923233,
-0.26696422696113586,
-0.4690762460231781,
0.5127025842666626,
0.12184463441371918,
-0.17341481149196625,
-0.20301532745361328,
0.2121679037809372,
-0.10536829382181168,
0.23657311499118805,
0.397504597902298,
0.7369195222854614,
0.0757630318403244,
-0.07086829841136932,
-0.34009864926338196,
-0.24795030057430267,
0.29750362038612366,
-0.5315229296684265,
-0.2666740119457245,
-0.20205818116664886,
0.28316405415534973,
0.29716551303863525,
0.09927716851234436,
-0.5282416343688965,
0.1667773425579071,
0.10719551146030426,
-0.1955672800540924,
-0.216616690158844,
0.14678995311260223,
-0.11242125928401947,
-0.07235011458396912,
-0.09623309969902039,
0.17933863401412964,
0.3893272578716278,
-0.20760643482208252,
0.24392300844192505,
-0.09752305597066879
] |
https://github.com/huggingface/datasets/issues/5123 | datasets freezes with streaming mode in multiple-gpu | Hi @lhoestq
could you have the chance to reproduce the error by running the minimal example shared?
thanks | ## Describe the bug
Hi. I am using this dataloader, which is for processing large datasets in streaming mode mentioned in one of examples of huggingface. I am using it to read c4: https://github.com/huggingface/transformers/blob/b48ac1a094e572d6076b46a9e4ed3e0ebe978afc/examples/research_projects/codeparrot/scripts/codeparrot_training.py#L22
During using multi-gpu in accelerator in one node, the code freezes, but works for 1 GPU:
```
10/16/2022 14:18:46 - INFO - datasets.info - Loading Dataset Infos from /home/jack/.cache/huggingface/modules/datasets_modules/datasets/c4/df532b158939272d032cc63ef19cd5b83e9b4d00c922b833e4cb18b2e9869b01
Steps: 0%| | 0/400000 [00:00<?, ?it/s]10/16/2022 14:18:47 - INFO - torch.utils.data.dataloader - Shared seed (135290893754684706) sent to store on rank 0
```
# Code to reproduce
please run this code with `accelerate launch code.py`
```
from accelerate import Accelerator
from accelerate.logging import get_logger
from datasets import load_dataset
from torch.utils.data.dataloader import DataLoader
import torch
from datasets import load_dataset
from transformers import AutoTokenizer
import torch
from accelerate.logging import get_logger
from torch.utils.data import IterableDataset
from torch.utils.data.datapipes.iter.combinatorics import ShufflerIterDataPipe
logger = get_logger(__name__)
class ConstantLengthDataset(IterableDataset):
"""
Iterable dataset that returns constant length chunks of tokens from stream of text files.
Args:
tokenizer (Tokenizer): The processor used for proccessing the data.
dataset (dataset.Dataset): Dataset with text files.
infinite (bool): If True the iterator is reset after dataset reaches end else stops.
max_seq_length (int): Length of token sequences to return.
num_of_sequences (int): Number of token sequences to keep in buffer.
chars_per_token (int): Number of characters per token used to estimate number of tokens in text buffer.
"""
def __init__(
self,
tokenizer,
dataset,
infinite=False,
max_seq_length=1024,
num_of_sequences=1024,
chars_per_token=3.6,
):
self.tokenizer = tokenizer
# self.concat_token_id = tokenizer.bos_token_id
self.dataset = dataset
self.max_seq_length = max_seq_length
self.epoch = 0
self.infinite = infinite
self.current_size = 0
self.max_buffer_size = max_seq_length * chars_per_token * num_of_sequences
self.content_field = "text"
def __iter__(self):
iterator = iter(self.dataset)
more_examples = True
while more_examples:
buffer, buffer_len = [], 0
while True:
if buffer_len >= self.max_buffer_size:
break
try:
buffer.append(next(iterator)[self.content_field])
buffer_len += len(buffer[-1])
except StopIteration:
if self.infinite:
iterator = iter(self.dataset)
self.epoch += 1
logger.info(f"Dataset epoch: {self.epoch}")
else:
more_examples = False
break
tokenized_inputs = self.tokenizer(buffer, truncation=False)["input_ids"]
all_token_ids = []
for tokenized_input in tokenized_inputs:
all_token_ids.extend(tokenized_input)
for i in range(0, len(all_token_ids), self.max_seq_length):
input_ids = all_token_ids[i : i + self.max_seq_length]
if len(input_ids) == self.max_seq_length:
self.current_size += 1
yield torch.tensor(input_ids)
def shuffle(self, buffer_size=1000):
return ShufflerIterDataPipe(self, buffer_size=buffer_size)
def create_dataloaders(tokenizer, accelerator):
ds_kwargs = {"streaming": True}
# In distributed training, the load_dataset function gaurantees that only one process
# can concurrently download the dataset.
datasets = load_dataset(
"c4",
"en",
cache_dir="cache_dir",
**ds_kwargs,
)
train_data, valid_data = datasets["train"], datasets["validation"]
with accelerator.main_process_first():
train_data = train_data.shuffle(buffer_size=10000, seed=None)
train_dataset = ConstantLengthDataset(
tokenizer,
train_data,
infinite=True,
max_seq_length=256,
)
valid_dataset = ConstantLengthDataset(
tokenizer,
valid_data,
infinite=False,
max_seq_length=256,
)
train_dataset = train_dataset.shuffle(buffer_size=10000)
train_dataloader = DataLoader(train_dataset, batch_size=160, shuffle=True)
eval_dataloader = DataLoader(valid_dataset, batch_size=160)
return train_dataloader, eval_dataloader
def main():
# Accelerator.
logging_dir = "data_save_dir/log"
accelerator = Accelerator(
gradient_accumulation_steps=1,
mixed_precision="bf16",
log_with="tensorboard",
logging_dir=logging_dir,
)
# We need to initialize the trackers we use, and also store our configuration.
# The trackers initializes automatically on the main process.
if accelerator.is_main_process:
accelerator.init_trackers("test")
tokenizer = AutoTokenizer.from_pretrained("bert-base-uncased")
# Load datasets and create dataloaders.
train_dataloader, _ = create_dataloaders(tokenizer, accelerator)
train_dataloader = accelerator.prepare(train_dataloader)
for step, batch in enumerate(train_dataloader, start=1):
print(step)
accelerator.end_training()
if __name__ == "__main__":
main()
```
## Results expected
Being able to run the code for streamining datasets with multi-gpu
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.5.2
- Platform: linux
- Python version: 3.9.12
- PyArrow version: 9.0.0
@lhoestq I do not have any idea why this freezing happens, and I removed the streaming mode and this was working fine, so I know this is caused by streaming mode of the dataloader part not working well with multi-gpu setting. Since datasets are large, I hope to keep the streamining mode. I very much appreciate your help.
| 18 | datasets freezes with streaming mode in multiple-gpu
## Describe the bug
Hi. I am using this dataloader, which is for processing large datasets in streaming mode mentioned in one of examples of huggingface. I am using it to read c4: https://github.com/huggingface/transformers/blob/b48ac1a094e572d6076b46a9e4ed3e0ebe978afc/examples/research_projects/codeparrot/scripts/codeparrot_training.py#L22
During using multi-gpu in accelerator in one node, the code freezes, but works for 1 GPU:
```
10/16/2022 14:18:46 - INFO - datasets.info - Loading Dataset Infos from /home/jack/.cache/huggingface/modules/datasets_modules/datasets/c4/df532b158939272d032cc63ef19cd5b83e9b4d00c922b833e4cb18b2e9869b01
Steps: 0%| | 0/400000 [00:00<?, ?it/s]10/16/2022 14:18:47 - INFO - torch.utils.data.dataloader - Shared seed (135290893754684706) sent to store on rank 0
```
# Code to reproduce
please run this code with `accelerate launch code.py`
```
from accelerate import Accelerator
from accelerate.logging import get_logger
from datasets import load_dataset
from torch.utils.data.dataloader import DataLoader
import torch
from datasets import load_dataset
from transformers import AutoTokenizer
import torch
from accelerate.logging import get_logger
from torch.utils.data import IterableDataset
from torch.utils.data.datapipes.iter.combinatorics import ShufflerIterDataPipe
logger = get_logger(__name__)
class ConstantLengthDataset(IterableDataset):
"""
Iterable dataset that returns constant length chunks of tokens from stream of text files.
Args:
tokenizer (Tokenizer): The processor used for proccessing the data.
dataset (dataset.Dataset): Dataset with text files.
infinite (bool): If True the iterator is reset after dataset reaches end else stops.
max_seq_length (int): Length of token sequences to return.
num_of_sequences (int): Number of token sequences to keep in buffer.
chars_per_token (int): Number of characters per token used to estimate number of tokens in text buffer.
"""
def __init__(
self,
tokenizer,
dataset,
infinite=False,
max_seq_length=1024,
num_of_sequences=1024,
chars_per_token=3.6,
):
self.tokenizer = tokenizer
# self.concat_token_id = tokenizer.bos_token_id
self.dataset = dataset
self.max_seq_length = max_seq_length
self.epoch = 0
self.infinite = infinite
self.current_size = 0
self.max_buffer_size = max_seq_length * chars_per_token * num_of_sequences
self.content_field = "text"
def __iter__(self):
iterator = iter(self.dataset)
more_examples = True
while more_examples:
buffer, buffer_len = [], 0
while True:
if buffer_len >= self.max_buffer_size:
break
try:
buffer.append(next(iterator)[self.content_field])
buffer_len += len(buffer[-1])
except StopIteration:
if self.infinite:
iterator = iter(self.dataset)
self.epoch += 1
logger.info(f"Dataset epoch: {self.epoch}")
else:
more_examples = False
break
tokenized_inputs = self.tokenizer(buffer, truncation=False)["input_ids"]
all_token_ids = []
for tokenized_input in tokenized_inputs:
all_token_ids.extend(tokenized_input)
for i in range(0, len(all_token_ids), self.max_seq_length):
input_ids = all_token_ids[i : i + self.max_seq_length]
if len(input_ids) == self.max_seq_length:
self.current_size += 1
yield torch.tensor(input_ids)
def shuffle(self, buffer_size=1000):
return ShufflerIterDataPipe(self, buffer_size=buffer_size)
def create_dataloaders(tokenizer, accelerator):
ds_kwargs = {"streaming": True}
# In distributed training, the load_dataset function gaurantees that only one process
# can concurrently download the dataset.
datasets = load_dataset(
"c4",
"en",
cache_dir="cache_dir",
**ds_kwargs,
)
train_data, valid_data = datasets["train"], datasets["validation"]
with accelerator.main_process_first():
train_data = train_data.shuffle(buffer_size=10000, seed=None)
train_dataset = ConstantLengthDataset(
tokenizer,
train_data,
infinite=True,
max_seq_length=256,
)
valid_dataset = ConstantLengthDataset(
tokenizer,
valid_data,
infinite=False,
max_seq_length=256,
)
train_dataset = train_dataset.shuffle(buffer_size=10000)
train_dataloader = DataLoader(train_dataset, batch_size=160, shuffle=True)
eval_dataloader = DataLoader(valid_dataset, batch_size=160)
return train_dataloader, eval_dataloader
def main():
# Accelerator.
logging_dir = "data_save_dir/log"
accelerator = Accelerator(
gradient_accumulation_steps=1,
mixed_precision="bf16",
log_with="tensorboard",
logging_dir=logging_dir,
)
# We need to initialize the trackers we use, and also store our configuration.
# The trackers initializes automatically on the main process.
if accelerator.is_main_process:
accelerator.init_trackers("test")
tokenizer = AutoTokenizer.from_pretrained("bert-base-uncased")
# Load datasets and create dataloaders.
train_dataloader, _ = create_dataloaders(tokenizer, accelerator)
train_dataloader = accelerator.prepare(train_dataloader)
for step, batch in enumerate(train_dataloader, start=1):
print(step)
accelerator.end_training()
if __name__ == "__main__":
main()
```
## Results expected
Being able to run the code for streamining datasets with multi-gpu
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.5.2
- Platform: linux
- Python version: 3.9.12
- PyArrow version: 9.0.0
@lhoestq I do not have any idea why this freezing happens, and I removed the streaming mode and this was working fine, so I know this is caused by streaming mode of the dataloader part not working well with multi-gpu setting. Since datasets are large, I hope to keep the streamining mode. I very much appreciate your help.
Hi @lhoestq
could you have the chance to reproduce the error by running the minimal example shared?
thanks | [
-0.320170134305954,
-0.31651610136032104,
-0.039002928882837296,
0.4769468307495117,
0.32108551263809204,
-0.05959709361195564,
0.370758980512619,
-0.0028037503361701965,
0.29125797748565674,
0.27730265259742737,
-0.1412859410047531,
0.06606162339448929,
-0.1297413855791092,
0.389516144990921,
-0.02885536476969719,
0.019152846187353134,
0.14081059396266937,
-0.06935961544513702,
-0.05934390425682068,
0.09264911711215973,
0.19574815034866333,
0.28171306848526,
-0.03017459809780121,
-0.2807106375694275,
-0.3968455195426941,
0.006201479583978653,
0.08898560702800751,
0.05466218665242195,
0.16394278407096863,
-0.1528581976890564,
0.05657128989696503,
0.3212423622608185,
-0.1962885558605194,
0.6732676029205322,
-0.00011721457849489525,
0.05330623686313629,
0.18269649147987366,
-0.002833753824234009,
-0.21490003168582916,
-0.17322935163974762,
-0.002865813672542572,
0.06839033216238022,
0.14951622486114502,
0.04682282358407974,
-0.17401543259620667,
-0.0174991674721241,
-0.1881343424320221,
-0.6604426503181458,
0.164658784866333,
-0.042508333921432495,
0.09482607245445251,
0.4577403962612152,
-0.1465912163257599,
-0.06909176707267761,
-0.20002222061157227,
-0.039952024817466736,
-0.14591027796268463,
0.07709209620952606,
0.31674060225486755,
0.07274440675973892,
-0.27099719643592834,
0.40121567249298096,
0.12219187617301941,
-0.015591144561767578,
0.08307396620512009,
-0.14754250645637512,
-0.350762277841568,
-0.13338522613048553,
0.026910532265901566,
0.15082837641239166,
0.027056343853473663,
-0.3233974277973175,
-0.1601693481206894,
-0.22570520639419556,
0.10727719217538834,
-0.3284243941307068,
0.201379656791687,
0.11525953561067581,
-0.25809207558631897,
-0.21668508648872375,
-0.4963834583759308,
0.01326315850019455,
-0.08960461616516113,
0.06837072968482971,
-0.07536549866199493,
0.2995816469192505,
-0.2987593412399292,
0.22882121801376343,
0.38512924313545227,
0.29899197816848755,
-0.15710687637329102,
-0.19772954285144806,
-0.002054654061794281,
-0.2263694405555725,
-0.8506759405136108,
0.210271418094635,
-0.1854097545146942,
-0.024569854140281677,
0.1130077913403511,
0.212607279419899,
0.2809174656867981,
0.15809139609336853,
0.0683353990316391,
0.07589592784643173,
0.14983536303043365,
-0.02965284138917923,
-0.005833819508552551,
-0.20412547886371613,
0.43327707052230835,
0.4074971079826355,
-0.2626340985298157,
-0.06723201274871826,
-0.013328848406672478,
-0.10992640256881714,
-0.2989759147167206,
-0.1457396149635315,
-0.08084538578987122,
-0.07573612779378891,
-0.13559462130069733,
-0.009245884604752064,
-0.11118854582309723,
0.03931012004613876,
0.4182609021663666,
0.44486111402511597,
0.07055307179689407,
0.3420749604701996,
-0.18277500569820404,
0.05916411429643631,
-0.21634776890277863,
-0.44875651597976685,
-0.18320819735527039,
-0.2635971009731293,
-0.1491444855928421,
0.23651264607906342,
0.25286436080932617,
-0.6722689270973206,
-0.033016908913850784,
0.2876058518886566,
0.4721084237098694,
-0.1694207787513733,
0.1245342344045639,
-0.29843664169311523,
-0.05029793828725815,
0.17948129773139954,
0.14669935405254364,
0.4921897351741791,
0.1822681725025177,
-0.04350600764155388,
0.05512329190969467,
-0.11150530725717545,
-0.06791342049837112,
-0.0317845344543457,
0.30285823345184326,
0.11863456666469574,
0.07360691577196121,
0.18476532399654388,
-0.4126509726047516,
0.11747676134109497,
0.005819007754325867,
-0.1398874670267105,
0.27309441566467285,
-0.04221192002296448,
-0.0008702687919139862,
-0.14555160701274872,
0.23987773060798645,
0.5760335326194763,
0.12451320886611938,
-0.1120918020606041,
-0.0443904772400856,
-0.2915104925632477,
0.038571104407310486,
0.5202218294143677,
-0.17591074109077454,
-0.3686400055885315,
-0.28145554661750793,
0.045004233717918396,
-0.0261261984705925,
-0.23804381489753723,
-0.20734138786792755,
0.4822528064250946,
-0.3851122260093689,
0.30897125601768494,
0.4230332672595978,
0.10372115671634674,
0.12219540029764175,
-0.03825599327683449,
0.19279813766479492,
0.2943075895309448,
-0.00635366328060627,
0.1087382510304451,
-0.14604146778583527,
0.06424739956855774,
0.2653828561306,
0.016305286437273026,
-0.17548853158950806,
-0.300058513879776,
-0.07963960617780685,
-0.002100619487464428,
0.31338000297546387,
-0.16503708064556122,
0.17526975274085999,
0.41101473569869995,
0.04371234029531479,
-0.11278930306434631,
0.0510147362947464,
-0.18153807520866394,
-0.574967622756958,
0.29064786434173584,
0.2165021002292633,
-0.2392047941684723,
0.09127096086740494,
-0.1333739012479782,
0.23764142394065857,
-0.07981850951910019,
-0.3315660059452057,
-0.37471505999565125,
-0.032935481518507004,
0.20669057965278625,
0.09787946939468384,
0.1326659917831421,
-0.02257602848112583,
0.7143674492835999,
-0.1326308399438858,
0.1235450878739357,
-0.2603522539138794,
0.3782622218132019,
0.08834384381771088,
-0.25329169631004333,
-0.07439586520195007,
-0.11012204736471176,
0.06136968731880188,
-0.32795479893684387,
-0.14810338616371155,
0.46449926495552063,
0.09641259908676147,
0.5647338628768921,
-0.26063627004623413,
0.11943359673023224,
0.38852575421333313,
-0.19571395218372345,
0.0814359039068222,
0.17112208902835846,
0.1621701866388321,
-0.2649763822555542,
-0.04232949763536453,
0.3338702619075775,
-0.21187607944011688,
0.14005300402641296,
0.1394023895263672,
-0.1506596952676773,
-0.009420773014426231,
0.2594158947467804,
-0.048738256096839905,
0.06878665089607239,
0.3883502185344696,
0.025583820417523384,
0.44588765501976013,
-0.011565407738089561,
-0.4989607632160187,
0.1430942267179489,
0.3377918601036072,
0.263149231672287,
-0.1941157579421997,
-0.05033130943775177,
-0.33004245162010193,
-0.05804133415222168,
0.2738502323627472,
-0.07551849633455276,
0.3668179512023926,
0.11351387202739716,
-0.0034544579684734344,
-0.10172093659639359,
0.08031477779150009,
-0.2999836206436157,
0.17736758291721344,
0.10195215046405792,
0.1618015617132187,
0.2187531590461731,
0.1172676607966423,
-0.15939673781394958,
-0.15111970901489258,
-0.18575450778007507,
0.32863739132881165,
-0.033362001180648804,
-0.3298265337944031,
0.32112830877304077,
-0.34599485993385315,
-0.24143052101135254,
-0.1842232346534729,
-0.07266464829444885,
-0.4802292585372925,
-0.10746444016695023,
-0.31277281045913696,
0.4952528774738312,
0.031738463789224625,
0.128421813249588,
0.10595707595348358,
0.0028597861528396606,
0.23697461187839508,
0.022782154381275177,
-0.28592273592948914,
0.02397690713405609,
-0.1963951587677002,
-0.05390238016843796,
0.417086124420166,
-0.06987275928258896,
0.1014823466539383,
0.45332422852516174,
-0.1511560082435608,
-0.35475510358810425,
-0.1686646193265915,
0.07441732287406921,
-0.14645811915397644,
0.1020779237151146,
-0.11136025190353394,
0.1631530225276947,
-0.035169538110494614,
-0.11404077708721161,
0.19351963698863983,
-0.43751364946365356,
-0.08548972010612488,
0.271707683801651,
-0.035255592316389084,
0.1995011270046234,
-0.22854772210121155,
0.006123870611190796,
-0.24477176368236542,
-0.3657911419868469,
0.3497276306152344,
-0.2352394163608551,
-0.13698385655879974,
0.0765804722905159,
0.1583414375782013,
0.21081340312957764,
-0.03315375745296478,
-0.18436570465564728,
-0.12409546226263046,
-0.19303375482559204,
0.14701849222183228,
-0.019072476774454117,
-0.40133482217788696,
-0.244588240981102,
0.16984441876411438,
-0.0025123171508312225,
0.3933245539665222,
-0.31243571639060974,
0.16146600246429443,
-0.3194584548473358,
-0.0547042042016983,
0.05831800401210785,
-0.05197394639253616,
0.2204650342464447,
-0.2151278406381607,
-0.01358164194971323,
-0.11399076133966446,
-0.04376517981290817,
0.1658928543329239,
-0.13448747992515564,
-0.015818089246749878,
-0.11097333580255508,
0.34720727801322937,
0.3296865224838257,
0.45010387897491455,
0.21204568445682526,
-0.03832007572054863,
0.31824856996536255,
-0.07278018444776535,
0.21965815126895905,
0.049487050622701645,
-0.20635905861854553,
0.31881412863731384,
-0.1726091206073761,
-0.0045239925384521484,
-0.018886566162109375,
-0.19593185186386108,
-0.037774957716464996,
-0.22168457508087158,
0.14016085863113403,
0.18190330266952515,
-0.1656782031059265,
0.29752710461616516,
0.06558997929096222,
0.10472086071968079,
-0.17760330438613892,
0.05752391368150711,
0.07364991307258606,
-0.1482866108417511,
0.01676757074892521,
0.2895659804344177,
-0.26418378949165344,
-0.009687433950603008,
-0.3947683870792389,
0.02734026499092579,
-0.1826173961162567,
0.17090697586536407,
0.17284563183784485,
0.41673579812049866,
0.10159271955490112,
-0.06316328048706055,
0.09674377739429474,
-0.3232256770133972,
0.7259926795959473,
0.34981125593185425,
-0.13147538900375366,
0.09626911580562592,
-0.3811025321483612,
-0.2965686321258545,
0.03321569785475731,
-0.37280064821243286,
0.02045464515686035,
0.2718900442123413,
0.5440722703933716,
-0.2527817189693451,
-0.39522165060043335,
-0.19789808988571167,
0.03606124222278595,
-0.018301930278539658,
-0.05184583365917206,
-0.22067338228225708,
0.1025443896651268,
-0.2376442700624466,
0.2315637767314911,
0.10310465842485428,
0.058098215609788895,
-0.401311993598938,
-0.05811883881688118,
0.1250377595424652,
-0.2197563648223877,
0.12035338580608368,
0.06208226457238197,
0.1526395082473755,
-0.150322824716568,
0.2186867594718933,
0.35755452513694763,
0.054748568683862686,
0.23012283444404602,
0.1911984086036682,
0.31224650144577026,
-0.20272251963615417,
0.4371161460876465,
0.2170461118221283,
0.3125962018966675,
0.45868751406669617,
-0.07028362900018692,
0.49929025769233704,
0.10524245351552963,
0.30283230543136597,
-0.12995973229408264,
0.2632194757461548,
0.21913288533687592,
0.3468329608440399,
-0.3923860788345337,
-0.458741158246994,
0.3937756419181824,
0.004316641017794609,
0.20219282805919647,
0.6175047159194946,
0.12552914023399353,
-0.07383781671524048,
-0.1385607123374939,
-0.16125336289405823,
0.6028099060058594,
-0.06719326972961426,
0.3586098551750183,
0.20923885703086853,
-0.22055551409721375,
0.5054243206977844,
-0.5937470197677612,
0.19814899563789368,
-0.1506689190864563,
-0.41321611404418945,
0.018765492364764214,
-0.2010648548603058,
0.43172067403793335,
-0.12246599793434143,
-0.08273948729038239,
0.1873295158147812,
0.06535287201404572,
0.3014884293079376,
-0.1806645393371582,
0.3034682273864746,
-0.34839895367622375,
-0.41509413719177246,
-0.45341211557388306,
0.04850274324417114,
-0.12633726000785828,
0.13370546698570251,
0.09538030624389648,
-0.09765797853469849,
0.08964815735816956,
-0.02583513781428337,
-0.33737561106681824,
0.009162712842226028,
-0.6102495193481445,
0.00030599720776081085,
-0.04006807133555412,
-0.41945672035217285,
0.3332884609699249,
0.14806488156318665,
-0.09767547249794006,
-0.06345473229885101,
-0.062499530613422394,
0.1720711886882782,
-0.14119413495063782,
0.08674008399248123,
-0.10608958452939987,
-0.3329578936100006,
0.09485097229480743,
-0.009610209614038467,
-0.1025252491235733,
0.19989141821861267,
0.09746816009283066,
-0.13958975672721863,
0.36389291286468506,
0.1336819976568222,
-0.15619789063930511,
0.058961160480976105,
-0.06450261175632477,
0.08951372653245926,
0.08699853718280792,
-0.274768590927124,
0.019831059500575066,
0.06901092082262039,
-0.17514300346374512,
-0.20943623781204224,
0.018488068133592606,
0.02346118539571762,
-0.20378780364990234,
0.7961738109588623,
-0.06900791078805923,
-0.22404277324676514,
0.346279114484787,
0.4273766875267029,
-0.10663463920354843,
-0.23933950066566467,
-0.02573203667998314,
0.3107742965221405,
-0.23372137546539307,
0.14335303008556366,
-0.3001023232936859,
-0.16458454728126526,
0.17259564995765686,
-0.0007974468171596527,
-0.017555326223373413,
-0.09870066493749619,
0.014036621898412704,
-0.3685116767883301,
-0.41476279497146606,
-0.05516313016414642,
-0.1779431700706482,
0.08709278702735901,
0.1761348843574524,
0.26979830861091614,
-0.0006913729012012482,
0.3773987293243408,
-0.2025117576122284,
-0.019583584740757942,
-0.1402473747730255,
-0.12250952422618866,
0.20925326645374298,
-0.1959984004497528,
0.3830168843269348,
-0.02707037702202797,
0.057350680232048035,
0.36506521701812744,
-0.05137687176465988,
-0.11634066700935364,
-0.1765683889389038,
0.11344491690397263,
-0.05546925961971283,
-0.08208806067705154,
0.028041504323482513,
-0.10280346870422363,
-0.12126904726028442,
-0.09933386743068695,
0.6700537800788879,
0.13897347450256348,
0.006425827741622925,
-0.20907703042030334,
0.19417019188404083,
0.010862313210964203,
-0.3726525902748108,
0.018590690568089485,
-0.19535791873931885,
-0.15798620879650116,
0.3542337119579315,
0.03664272651076317,
0.04119914397597313,
-0.0052753835916519165,
-0.4814819395542145,
-0.0036610066890716553,
0.34902793169021606,
0.08964759111404419,
0.21850088238716125,
-0.23463983833789825,
-0.14610576629638672,
-0.12128204107284546,
0.3502779006958008,
0.360932320356369,
-0.14266851544380188,
-0.1517164260149002,
0.0793684720993042,
0.05996345728635788,
-0.0272354893386364,
-0.00409953435882926,
-0.19534257054328918,
0.018120858818292618,
0.08164803683757782,
0.2565746009349823,
0.3063749670982361,
0.1292659491300583,
-0.06028912961483002,
0.2432013750076294,
0.10289052873849869,
0.1693509817123413,
0.2773444354534149,
-0.2257394790649414,
0.10426411032676697,
0.15127182006835938,
0.09524668753147125,
0.10445536673069,
-0.0252470001578331,
0.20106996595859528,
-0.13846591114997864,
0.27362290024757385,
0.1747645139694214,
0.1947527378797531,
0.14683261513710022,
-0.5698386430740356,
-0.39714014530181885,
0.09334786236286163,
-0.5674176216125488,
0.2225762903690338,
-0.1508185863494873,
0.43626347184181213,
-0.37798917293548584,
-0.21522557735443115,
-0.2594103515148163,
0.2358933687210083,
-0.23646557331085205,
0.037227656692266464,
0.19985072314739227,
-0.19495229423046112,
-0.23551325500011444,
0.17674444615840912,
-0.008310437202453613,
0.11880853772163391,
0.3892444372177124,
0.27836593985557556,
0.06494555622339249,
-0.3253641128540039,
-0.2908581495285034,
0.2944503128528595,
0.19019469618797302,
-0.12471812963485718,
0.39426568150520325,
0.4062999486923218,
-0.1472921222448349,
-0.012048386037349701,
-0.023800252005457878,
0.32988008856773376,
0.0258270725607872,
0.14542289078235626,
0.15760761499404907,
0.11603793501853943,
0.004418214783072472,
0.18759657442569733,
0.11953715234994888,
0.31844618916511536,
0.16899079084396362,
0.2034032940864563,
0.06254585087299347,
-0.1343478560447693,
-0.23187832534313202,
0.013515152037143707,
0.10823354125022888,
-0.590876042842865,
0.2150617092847824,
-0.35296428203582764,
0.04865726828575134,
-0.2588043808937073,
-0.12347038835287094,
-0.4918266534805298,
0.09293932467699051,
0.3377533257007599,
-0.18807686865329742,
0.0020675640553236008,
-0.10834556818008423,
0.029926974326372147,
0.33757779002189636,
0.7586604356765747,
0.01931166648864746,
-0.11100371927022934,
-0.22932112216949463,
-0.478585422039032,
-0.5296587944030762,
0.13045765459537506,
-0.04465487226843834,
0.19258005917072296,
-0.1350322663784027,
0.27857139706611633,
0.11657805740833282,
0.037997134029865265,
0.17734764516353607,
0.11425752937793732,
0.2575359344482422,
0.19555732607841492,
-0.5474047660827637,
0.0003874190151691437,
-0.28104811906814575,
-0.06977588683366776,
0.049724288284778595,
-0.08641490340232849,
0.3129313588142395,
0.23635233938694,
-0.0038938522338867188,
-0.12754181027412415,
0.19530734419822693,
-0.061308834701776505,
-0.16843582689762115,
0.07537266612052917,
0.022778604179620743,
0.3318895697593689,
0.11260268837213516,
-0.21790336072444916,
-0.20115309953689575,
0.13193413615226746,
-0.07558852434158325,
-0.15963539481163025,
-0.016645856201648712,
0.42679429054260254,
-0.0568099170923233,
-0.26696422696113586,
-0.4690762460231781,
0.5127025842666626,
0.12184463441371918,
-0.17341481149196625,
-0.20301532745361328,
0.2121679037809372,
-0.10536829382181168,
0.23657311499118805,
0.397504597902298,
0.7369195222854614,
0.0757630318403244,
-0.07086829841136932,
-0.34009864926338196,
-0.24795030057430267,
0.29750362038612366,
-0.5315229296684265,
-0.2666740119457245,
-0.20205818116664886,
0.28316405415534973,
0.29716551303863525,
0.09927716851234436,
-0.5282416343688965,
0.1667773425579071,
0.10719551146030426,
-0.1955672800540924,
-0.216616690158844,
0.14678995311260223,
-0.11242125928401947,
-0.07235011458396912,
-0.09623309969902039,
0.17933863401412964,
0.3893272578716278,
-0.20760643482208252,
0.24392300844192505,
-0.09752305597066879
] |
https://github.com/huggingface/datasets/issues/5123 | datasets freezes with streaming mode in multiple-gpu | I think you need to do `train_dataset = train_dataset.with_format("torch")` to work with the DataLoader in a multiprocessing setup :)
The hang is probably caused by our streamign lib `fsspec` which doesn't work in multiprocessing out of the box - but we made it work with the PyTorch DataLoader when the dataset format is set to "torch" | ## Describe the bug
Hi. I am using this dataloader, which is for processing large datasets in streaming mode mentioned in one of examples of huggingface. I am using it to read c4: https://github.com/huggingface/transformers/blob/b48ac1a094e572d6076b46a9e4ed3e0ebe978afc/examples/research_projects/codeparrot/scripts/codeparrot_training.py#L22
During using multi-gpu in accelerator in one node, the code freezes, but works for 1 GPU:
```
10/16/2022 14:18:46 - INFO - datasets.info - Loading Dataset Infos from /home/jack/.cache/huggingface/modules/datasets_modules/datasets/c4/df532b158939272d032cc63ef19cd5b83e9b4d00c922b833e4cb18b2e9869b01
Steps: 0%| | 0/400000 [00:00<?, ?it/s]10/16/2022 14:18:47 - INFO - torch.utils.data.dataloader - Shared seed (135290893754684706) sent to store on rank 0
```
# Code to reproduce
please run this code with `accelerate launch code.py`
```
from accelerate import Accelerator
from accelerate.logging import get_logger
from datasets import load_dataset
from torch.utils.data.dataloader import DataLoader
import torch
from datasets import load_dataset
from transformers import AutoTokenizer
import torch
from accelerate.logging import get_logger
from torch.utils.data import IterableDataset
from torch.utils.data.datapipes.iter.combinatorics import ShufflerIterDataPipe
logger = get_logger(__name__)
class ConstantLengthDataset(IterableDataset):
"""
Iterable dataset that returns constant length chunks of tokens from stream of text files.
Args:
tokenizer (Tokenizer): The processor used for proccessing the data.
dataset (dataset.Dataset): Dataset with text files.
infinite (bool): If True the iterator is reset after dataset reaches end else stops.
max_seq_length (int): Length of token sequences to return.
num_of_sequences (int): Number of token sequences to keep in buffer.
chars_per_token (int): Number of characters per token used to estimate number of tokens in text buffer.
"""
def __init__(
self,
tokenizer,
dataset,
infinite=False,
max_seq_length=1024,
num_of_sequences=1024,
chars_per_token=3.6,
):
self.tokenizer = tokenizer
# self.concat_token_id = tokenizer.bos_token_id
self.dataset = dataset
self.max_seq_length = max_seq_length
self.epoch = 0
self.infinite = infinite
self.current_size = 0
self.max_buffer_size = max_seq_length * chars_per_token * num_of_sequences
self.content_field = "text"
def __iter__(self):
iterator = iter(self.dataset)
more_examples = True
while more_examples:
buffer, buffer_len = [], 0
while True:
if buffer_len >= self.max_buffer_size:
break
try:
buffer.append(next(iterator)[self.content_field])
buffer_len += len(buffer[-1])
except StopIteration:
if self.infinite:
iterator = iter(self.dataset)
self.epoch += 1
logger.info(f"Dataset epoch: {self.epoch}")
else:
more_examples = False
break
tokenized_inputs = self.tokenizer(buffer, truncation=False)["input_ids"]
all_token_ids = []
for tokenized_input in tokenized_inputs:
all_token_ids.extend(tokenized_input)
for i in range(0, len(all_token_ids), self.max_seq_length):
input_ids = all_token_ids[i : i + self.max_seq_length]
if len(input_ids) == self.max_seq_length:
self.current_size += 1
yield torch.tensor(input_ids)
def shuffle(self, buffer_size=1000):
return ShufflerIterDataPipe(self, buffer_size=buffer_size)
def create_dataloaders(tokenizer, accelerator):
ds_kwargs = {"streaming": True}
# In distributed training, the load_dataset function gaurantees that only one process
# can concurrently download the dataset.
datasets = load_dataset(
"c4",
"en",
cache_dir="cache_dir",
**ds_kwargs,
)
train_data, valid_data = datasets["train"], datasets["validation"]
with accelerator.main_process_first():
train_data = train_data.shuffle(buffer_size=10000, seed=None)
train_dataset = ConstantLengthDataset(
tokenizer,
train_data,
infinite=True,
max_seq_length=256,
)
valid_dataset = ConstantLengthDataset(
tokenizer,
valid_data,
infinite=False,
max_seq_length=256,
)
train_dataset = train_dataset.shuffle(buffer_size=10000)
train_dataloader = DataLoader(train_dataset, batch_size=160, shuffle=True)
eval_dataloader = DataLoader(valid_dataset, batch_size=160)
return train_dataloader, eval_dataloader
def main():
# Accelerator.
logging_dir = "data_save_dir/log"
accelerator = Accelerator(
gradient_accumulation_steps=1,
mixed_precision="bf16",
log_with="tensorboard",
logging_dir=logging_dir,
)
# We need to initialize the trackers we use, and also store our configuration.
# The trackers initializes automatically on the main process.
if accelerator.is_main_process:
accelerator.init_trackers("test")
tokenizer = AutoTokenizer.from_pretrained("bert-base-uncased")
# Load datasets and create dataloaders.
train_dataloader, _ = create_dataloaders(tokenizer, accelerator)
train_dataloader = accelerator.prepare(train_dataloader)
for step, batch in enumerate(train_dataloader, start=1):
print(step)
accelerator.end_training()
if __name__ == "__main__":
main()
```
## Results expected
Being able to run the code for streamining datasets with multi-gpu
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.5.2
- Platform: linux
- Python version: 3.9.12
- PyArrow version: 9.0.0
@lhoestq I do not have any idea why this freezing happens, and I removed the streaming mode and this was working fine, so I know this is caused by streaming mode of the dataloader part not working well with multi-gpu setting. Since datasets are large, I hope to keep the streamining mode. I very much appreciate your help.
| 56 | datasets freezes with streaming mode in multiple-gpu
## Describe the bug
Hi. I am using this dataloader, which is for processing large datasets in streaming mode mentioned in one of examples of huggingface. I am using it to read c4: https://github.com/huggingface/transformers/blob/b48ac1a094e572d6076b46a9e4ed3e0ebe978afc/examples/research_projects/codeparrot/scripts/codeparrot_training.py#L22
During using multi-gpu in accelerator in one node, the code freezes, but works for 1 GPU:
```
10/16/2022 14:18:46 - INFO - datasets.info - Loading Dataset Infos from /home/jack/.cache/huggingface/modules/datasets_modules/datasets/c4/df532b158939272d032cc63ef19cd5b83e9b4d00c922b833e4cb18b2e9869b01
Steps: 0%| | 0/400000 [00:00<?, ?it/s]10/16/2022 14:18:47 - INFO - torch.utils.data.dataloader - Shared seed (135290893754684706) sent to store on rank 0
```
# Code to reproduce
please run this code with `accelerate launch code.py`
```
from accelerate import Accelerator
from accelerate.logging import get_logger
from datasets import load_dataset
from torch.utils.data.dataloader import DataLoader
import torch
from datasets import load_dataset
from transformers import AutoTokenizer
import torch
from accelerate.logging import get_logger
from torch.utils.data import IterableDataset
from torch.utils.data.datapipes.iter.combinatorics import ShufflerIterDataPipe
logger = get_logger(__name__)
class ConstantLengthDataset(IterableDataset):
"""
Iterable dataset that returns constant length chunks of tokens from stream of text files.
Args:
tokenizer (Tokenizer): The processor used for proccessing the data.
dataset (dataset.Dataset): Dataset with text files.
infinite (bool): If True the iterator is reset after dataset reaches end else stops.
max_seq_length (int): Length of token sequences to return.
num_of_sequences (int): Number of token sequences to keep in buffer.
chars_per_token (int): Number of characters per token used to estimate number of tokens in text buffer.
"""
def __init__(
self,
tokenizer,
dataset,
infinite=False,
max_seq_length=1024,
num_of_sequences=1024,
chars_per_token=3.6,
):
self.tokenizer = tokenizer
# self.concat_token_id = tokenizer.bos_token_id
self.dataset = dataset
self.max_seq_length = max_seq_length
self.epoch = 0
self.infinite = infinite
self.current_size = 0
self.max_buffer_size = max_seq_length * chars_per_token * num_of_sequences
self.content_field = "text"
def __iter__(self):
iterator = iter(self.dataset)
more_examples = True
while more_examples:
buffer, buffer_len = [], 0
while True:
if buffer_len >= self.max_buffer_size:
break
try:
buffer.append(next(iterator)[self.content_field])
buffer_len += len(buffer[-1])
except StopIteration:
if self.infinite:
iterator = iter(self.dataset)
self.epoch += 1
logger.info(f"Dataset epoch: {self.epoch}")
else:
more_examples = False
break
tokenized_inputs = self.tokenizer(buffer, truncation=False)["input_ids"]
all_token_ids = []
for tokenized_input in tokenized_inputs:
all_token_ids.extend(tokenized_input)
for i in range(0, len(all_token_ids), self.max_seq_length):
input_ids = all_token_ids[i : i + self.max_seq_length]
if len(input_ids) == self.max_seq_length:
self.current_size += 1
yield torch.tensor(input_ids)
def shuffle(self, buffer_size=1000):
return ShufflerIterDataPipe(self, buffer_size=buffer_size)
def create_dataloaders(tokenizer, accelerator):
ds_kwargs = {"streaming": True}
# In distributed training, the load_dataset function gaurantees that only one process
# can concurrently download the dataset.
datasets = load_dataset(
"c4",
"en",
cache_dir="cache_dir",
**ds_kwargs,
)
train_data, valid_data = datasets["train"], datasets["validation"]
with accelerator.main_process_first():
train_data = train_data.shuffle(buffer_size=10000, seed=None)
train_dataset = ConstantLengthDataset(
tokenizer,
train_data,
infinite=True,
max_seq_length=256,
)
valid_dataset = ConstantLengthDataset(
tokenizer,
valid_data,
infinite=False,
max_seq_length=256,
)
train_dataset = train_dataset.shuffle(buffer_size=10000)
train_dataloader = DataLoader(train_dataset, batch_size=160, shuffle=True)
eval_dataloader = DataLoader(valid_dataset, batch_size=160)
return train_dataloader, eval_dataloader
def main():
# Accelerator.
logging_dir = "data_save_dir/log"
accelerator = Accelerator(
gradient_accumulation_steps=1,
mixed_precision="bf16",
log_with="tensorboard",
logging_dir=logging_dir,
)
# We need to initialize the trackers we use, and also store our configuration.
# The trackers initializes automatically on the main process.
if accelerator.is_main_process:
accelerator.init_trackers("test")
tokenizer = AutoTokenizer.from_pretrained("bert-base-uncased")
# Load datasets and create dataloaders.
train_dataloader, _ = create_dataloaders(tokenizer, accelerator)
train_dataloader = accelerator.prepare(train_dataloader)
for step, batch in enumerate(train_dataloader, start=1):
print(step)
accelerator.end_training()
if __name__ == "__main__":
main()
```
## Results expected
Being able to run the code for streamining datasets with multi-gpu
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.5.2
- Platform: linux
- Python version: 3.9.12
- PyArrow version: 9.0.0
@lhoestq I do not have any idea why this freezing happens, and I removed the streaming mode and this was working fine, so I know this is caused by streaming mode of the dataloader part not working well with multi-gpu setting. Since datasets are large, I hope to keep the streamining mode. I very much appreciate your help.
I think you need to do `train_dataset = train_dataset.with_format("torch")` to work with the DataLoader in a multiprocessing setup :)
The hang is probably caused by our streamign lib `fsspec` which doesn't work in multiprocessing out of the box - but we made it work with the PyTorch DataLoader when the dataset format is set to "torch" | [
-0.320170134305954,
-0.31651610136032104,
-0.039002928882837296,
0.4769468307495117,
0.32108551263809204,
-0.05959709361195564,
0.370758980512619,
-0.0028037503361701965,
0.29125797748565674,
0.27730265259742737,
-0.1412859410047531,
0.06606162339448929,
-0.1297413855791092,
0.389516144990921,
-0.02885536476969719,
0.019152846187353134,
0.14081059396266937,
-0.06935961544513702,
-0.05934390425682068,
0.09264911711215973,
0.19574815034866333,
0.28171306848526,
-0.03017459809780121,
-0.2807106375694275,
-0.3968455195426941,
0.006201479583978653,
0.08898560702800751,
0.05466218665242195,
0.16394278407096863,
-0.1528581976890564,
0.05657128989696503,
0.3212423622608185,
-0.1962885558605194,
0.6732676029205322,
-0.00011721457849489525,
0.05330623686313629,
0.18269649147987366,
-0.002833753824234009,
-0.21490003168582916,
-0.17322935163974762,
-0.002865813672542572,
0.06839033216238022,
0.14951622486114502,
0.04682282358407974,
-0.17401543259620667,
-0.0174991674721241,
-0.1881343424320221,
-0.6604426503181458,
0.164658784866333,
-0.042508333921432495,
0.09482607245445251,
0.4577403962612152,
-0.1465912163257599,
-0.06909176707267761,
-0.20002222061157227,
-0.039952024817466736,
-0.14591027796268463,
0.07709209620952606,
0.31674060225486755,
0.07274440675973892,
-0.27099719643592834,
0.40121567249298096,
0.12219187617301941,
-0.015591144561767578,
0.08307396620512009,
-0.14754250645637512,
-0.350762277841568,
-0.13338522613048553,
0.026910532265901566,
0.15082837641239166,
0.027056343853473663,
-0.3233974277973175,
-0.1601693481206894,
-0.22570520639419556,
0.10727719217538834,
-0.3284243941307068,
0.201379656791687,
0.11525953561067581,
-0.25809207558631897,
-0.21668508648872375,
-0.4963834583759308,
0.01326315850019455,
-0.08960461616516113,
0.06837072968482971,
-0.07536549866199493,
0.2995816469192505,
-0.2987593412399292,
0.22882121801376343,
0.38512924313545227,
0.29899197816848755,
-0.15710687637329102,
-0.19772954285144806,
-0.002054654061794281,
-0.2263694405555725,
-0.8506759405136108,
0.210271418094635,
-0.1854097545146942,
-0.024569854140281677,
0.1130077913403511,
0.212607279419899,
0.2809174656867981,
0.15809139609336853,
0.0683353990316391,
0.07589592784643173,
0.14983536303043365,
-0.02965284138917923,
-0.005833819508552551,
-0.20412547886371613,
0.43327707052230835,
0.4074971079826355,
-0.2626340985298157,
-0.06723201274871826,
-0.013328848406672478,
-0.10992640256881714,
-0.2989759147167206,
-0.1457396149635315,
-0.08084538578987122,
-0.07573612779378891,
-0.13559462130069733,
-0.009245884604752064,
-0.11118854582309723,
0.03931012004613876,
0.4182609021663666,
0.44486111402511597,
0.07055307179689407,
0.3420749604701996,
-0.18277500569820404,
0.05916411429643631,
-0.21634776890277863,
-0.44875651597976685,
-0.18320819735527039,
-0.2635971009731293,
-0.1491444855928421,
0.23651264607906342,
0.25286436080932617,
-0.6722689270973206,
-0.033016908913850784,
0.2876058518886566,
0.4721084237098694,
-0.1694207787513733,
0.1245342344045639,
-0.29843664169311523,
-0.05029793828725815,
0.17948129773139954,
0.14669935405254364,
0.4921897351741791,
0.1822681725025177,
-0.04350600764155388,
0.05512329190969467,
-0.11150530725717545,
-0.06791342049837112,
-0.0317845344543457,
0.30285823345184326,
0.11863456666469574,
0.07360691577196121,
0.18476532399654388,
-0.4126509726047516,
0.11747676134109497,
0.005819007754325867,
-0.1398874670267105,
0.27309441566467285,
-0.04221192002296448,
-0.0008702687919139862,
-0.14555160701274872,
0.23987773060798645,
0.5760335326194763,
0.12451320886611938,
-0.1120918020606041,
-0.0443904772400856,
-0.2915104925632477,
0.038571104407310486,
0.5202218294143677,
-0.17591074109077454,
-0.3686400055885315,
-0.28145554661750793,
0.045004233717918396,
-0.0261261984705925,
-0.23804381489753723,
-0.20734138786792755,
0.4822528064250946,
-0.3851122260093689,
0.30897125601768494,
0.4230332672595978,
0.10372115671634674,
0.12219540029764175,
-0.03825599327683449,
0.19279813766479492,
0.2943075895309448,
-0.00635366328060627,
0.1087382510304451,
-0.14604146778583527,
0.06424739956855774,
0.2653828561306,
0.016305286437273026,
-0.17548853158950806,
-0.300058513879776,
-0.07963960617780685,
-0.002100619487464428,
0.31338000297546387,
-0.16503708064556122,
0.17526975274085999,
0.41101473569869995,
0.04371234029531479,
-0.11278930306434631,
0.0510147362947464,
-0.18153807520866394,
-0.574967622756958,
0.29064786434173584,
0.2165021002292633,
-0.2392047941684723,
0.09127096086740494,
-0.1333739012479782,
0.23764142394065857,
-0.07981850951910019,
-0.3315660059452057,
-0.37471505999565125,
-0.032935481518507004,
0.20669057965278625,
0.09787946939468384,
0.1326659917831421,
-0.02257602848112583,
0.7143674492835999,
-0.1326308399438858,
0.1235450878739357,
-0.2603522539138794,
0.3782622218132019,
0.08834384381771088,
-0.25329169631004333,
-0.07439586520195007,
-0.11012204736471176,
0.06136968731880188,
-0.32795479893684387,
-0.14810338616371155,
0.46449926495552063,
0.09641259908676147,
0.5647338628768921,
-0.26063627004623413,
0.11943359673023224,
0.38852575421333313,
-0.19571395218372345,
0.0814359039068222,
0.17112208902835846,
0.1621701866388321,
-0.2649763822555542,
-0.04232949763536453,
0.3338702619075775,
-0.21187607944011688,
0.14005300402641296,
0.1394023895263672,
-0.1506596952676773,
-0.009420773014426231,
0.2594158947467804,
-0.048738256096839905,
0.06878665089607239,
0.3883502185344696,
0.025583820417523384,
0.44588765501976013,
-0.011565407738089561,
-0.4989607632160187,
0.1430942267179489,
0.3377918601036072,
0.263149231672287,
-0.1941157579421997,
-0.05033130943775177,
-0.33004245162010193,
-0.05804133415222168,
0.2738502323627472,
-0.07551849633455276,
0.3668179512023926,
0.11351387202739716,
-0.0034544579684734344,
-0.10172093659639359,
0.08031477779150009,
-0.2999836206436157,
0.17736758291721344,
0.10195215046405792,
0.1618015617132187,
0.2187531590461731,
0.1172676607966423,
-0.15939673781394958,
-0.15111970901489258,
-0.18575450778007507,
0.32863739132881165,
-0.033362001180648804,
-0.3298265337944031,
0.32112830877304077,
-0.34599485993385315,
-0.24143052101135254,
-0.1842232346534729,
-0.07266464829444885,
-0.4802292585372925,
-0.10746444016695023,
-0.31277281045913696,
0.4952528774738312,
0.031738463789224625,
0.128421813249588,
0.10595707595348358,
0.0028597861528396606,
0.23697461187839508,
0.022782154381275177,
-0.28592273592948914,
0.02397690713405609,
-0.1963951587677002,
-0.05390238016843796,
0.417086124420166,
-0.06987275928258896,
0.1014823466539383,
0.45332422852516174,
-0.1511560082435608,
-0.35475510358810425,
-0.1686646193265915,
0.07441732287406921,
-0.14645811915397644,
0.1020779237151146,
-0.11136025190353394,
0.1631530225276947,
-0.035169538110494614,
-0.11404077708721161,
0.19351963698863983,
-0.43751364946365356,
-0.08548972010612488,
0.271707683801651,
-0.035255592316389084,
0.1995011270046234,
-0.22854772210121155,
0.006123870611190796,
-0.24477176368236542,
-0.3657911419868469,
0.3497276306152344,
-0.2352394163608551,
-0.13698385655879974,
0.0765804722905159,
0.1583414375782013,
0.21081340312957764,
-0.03315375745296478,
-0.18436570465564728,
-0.12409546226263046,
-0.19303375482559204,
0.14701849222183228,
-0.019072476774454117,
-0.40133482217788696,
-0.244588240981102,
0.16984441876411438,
-0.0025123171508312225,
0.3933245539665222,
-0.31243571639060974,
0.16146600246429443,
-0.3194584548473358,
-0.0547042042016983,
0.05831800401210785,
-0.05197394639253616,
0.2204650342464447,
-0.2151278406381607,
-0.01358164194971323,
-0.11399076133966446,
-0.04376517981290817,
0.1658928543329239,
-0.13448747992515564,
-0.015818089246749878,
-0.11097333580255508,
0.34720727801322937,
0.3296865224838257,
0.45010387897491455,
0.21204568445682526,
-0.03832007572054863,
0.31824856996536255,
-0.07278018444776535,
0.21965815126895905,
0.049487050622701645,
-0.20635905861854553,
0.31881412863731384,
-0.1726091206073761,
-0.0045239925384521484,
-0.018886566162109375,
-0.19593185186386108,
-0.037774957716464996,
-0.22168457508087158,
0.14016085863113403,
0.18190330266952515,
-0.1656782031059265,
0.29752710461616516,
0.06558997929096222,
0.10472086071968079,
-0.17760330438613892,
0.05752391368150711,
0.07364991307258606,
-0.1482866108417511,
0.01676757074892521,
0.2895659804344177,
-0.26418378949165344,
-0.009687433950603008,
-0.3947683870792389,
0.02734026499092579,
-0.1826173961162567,
0.17090697586536407,
0.17284563183784485,
0.41673579812049866,
0.10159271955490112,
-0.06316328048706055,
0.09674377739429474,
-0.3232256770133972,
0.7259926795959473,
0.34981125593185425,
-0.13147538900375366,
0.09626911580562592,
-0.3811025321483612,
-0.2965686321258545,
0.03321569785475731,
-0.37280064821243286,
0.02045464515686035,
0.2718900442123413,
0.5440722703933716,
-0.2527817189693451,
-0.39522165060043335,
-0.19789808988571167,
0.03606124222278595,
-0.018301930278539658,
-0.05184583365917206,
-0.22067338228225708,
0.1025443896651268,
-0.2376442700624466,
0.2315637767314911,
0.10310465842485428,
0.058098215609788895,
-0.401311993598938,
-0.05811883881688118,
0.1250377595424652,
-0.2197563648223877,
0.12035338580608368,
0.06208226457238197,
0.1526395082473755,
-0.150322824716568,
0.2186867594718933,
0.35755452513694763,
0.054748568683862686,
0.23012283444404602,
0.1911984086036682,
0.31224650144577026,
-0.20272251963615417,
0.4371161460876465,
0.2170461118221283,
0.3125962018966675,
0.45868751406669617,
-0.07028362900018692,
0.49929025769233704,
0.10524245351552963,
0.30283230543136597,
-0.12995973229408264,
0.2632194757461548,
0.21913288533687592,
0.3468329608440399,
-0.3923860788345337,
-0.458741158246994,
0.3937756419181824,
0.004316641017794609,
0.20219282805919647,
0.6175047159194946,
0.12552914023399353,
-0.07383781671524048,
-0.1385607123374939,
-0.16125336289405823,
0.6028099060058594,
-0.06719326972961426,
0.3586098551750183,
0.20923885703086853,
-0.22055551409721375,
0.5054243206977844,
-0.5937470197677612,
0.19814899563789368,
-0.1506689190864563,
-0.41321611404418945,
0.018765492364764214,
-0.2010648548603058,
0.43172067403793335,
-0.12246599793434143,
-0.08273948729038239,
0.1873295158147812,
0.06535287201404572,
0.3014884293079376,
-0.1806645393371582,
0.3034682273864746,
-0.34839895367622375,
-0.41509413719177246,
-0.45341211557388306,
0.04850274324417114,
-0.12633726000785828,
0.13370546698570251,
0.09538030624389648,
-0.09765797853469849,
0.08964815735816956,
-0.02583513781428337,
-0.33737561106681824,
0.009162712842226028,
-0.6102495193481445,
0.00030599720776081085,
-0.04006807133555412,
-0.41945672035217285,
0.3332884609699249,
0.14806488156318665,
-0.09767547249794006,
-0.06345473229885101,
-0.062499530613422394,
0.1720711886882782,
-0.14119413495063782,
0.08674008399248123,
-0.10608958452939987,
-0.3329578936100006,
0.09485097229480743,
-0.009610209614038467,
-0.1025252491235733,
0.19989141821861267,
0.09746816009283066,
-0.13958975672721863,
0.36389291286468506,
0.1336819976568222,
-0.15619789063930511,
0.058961160480976105,
-0.06450261175632477,
0.08951372653245926,
0.08699853718280792,
-0.274768590927124,
0.019831059500575066,
0.06901092082262039,
-0.17514300346374512,
-0.20943623781204224,
0.018488068133592606,
0.02346118539571762,
-0.20378780364990234,
0.7961738109588623,
-0.06900791078805923,
-0.22404277324676514,
0.346279114484787,
0.4273766875267029,
-0.10663463920354843,
-0.23933950066566467,
-0.02573203667998314,
0.3107742965221405,
-0.23372137546539307,
0.14335303008556366,
-0.3001023232936859,
-0.16458454728126526,
0.17259564995765686,
-0.0007974468171596527,
-0.017555326223373413,
-0.09870066493749619,
0.014036621898412704,
-0.3685116767883301,
-0.41476279497146606,
-0.05516313016414642,
-0.1779431700706482,
0.08709278702735901,
0.1761348843574524,
0.26979830861091614,
-0.0006913729012012482,
0.3773987293243408,
-0.2025117576122284,
-0.019583584740757942,
-0.1402473747730255,
-0.12250952422618866,
0.20925326645374298,
-0.1959984004497528,
0.3830168843269348,
-0.02707037702202797,
0.057350680232048035,
0.36506521701812744,
-0.05137687176465988,
-0.11634066700935364,
-0.1765683889389038,
0.11344491690397263,
-0.05546925961971283,
-0.08208806067705154,
0.028041504323482513,
-0.10280346870422363,
-0.12126904726028442,
-0.09933386743068695,
0.6700537800788879,
0.13897347450256348,
0.006425827741622925,
-0.20907703042030334,
0.19417019188404083,
0.010862313210964203,
-0.3726525902748108,
0.018590690568089485,
-0.19535791873931885,
-0.15798620879650116,
0.3542337119579315,
0.03664272651076317,
0.04119914397597313,
-0.0052753835916519165,
-0.4814819395542145,
-0.0036610066890716553,
0.34902793169021606,
0.08964759111404419,
0.21850088238716125,
-0.23463983833789825,
-0.14610576629638672,
-0.12128204107284546,
0.3502779006958008,
0.360932320356369,
-0.14266851544380188,
-0.1517164260149002,
0.0793684720993042,
0.05996345728635788,
-0.0272354893386364,
-0.00409953435882926,
-0.19534257054328918,
0.018120858818292618,
0.08164803683757782,
0.2565746009349823,
0.3063749670982361,
0.1292659491300583,
-0.06028912961483002,
0.2432013750076294,
0.10289052873849869,
0.1693509817123413,
0.2773444354534149,
-0.2257394790649414,
0.10426411032676697,
0.15127182006835938,
0.09524668753147125,
0.10445536673069,
-0.0252470001578331,
0.20106996595859528,
-0.13846591114997864,
0.27362290024757385,
0.1747645139694214,
0.1947527378797531,
0.14683261513710022,
-0.5698386430740356,
-0.39714014530181885,
0.09334786236286163,
-0.5674176216125488,
0.2225762903690338,
-0.1508185863494873,
0.43626347184181213,
-0.37798917293548584,
-0.21522557735443115,
-0.2594103515148163,
0.2358933687210083,
-0.23646557331085205,
0.037227656692266464,
0.19985072314739227,
-0.19495229423046112,
-0.23551325500011444,
0.17674444615840912,
-0.008310437202453613,
0.11880853772163391,
0.3892444372177124,
0.27836593985557556,
0.06494555622339249,
-0.3253641128540039,
-0.2908581495285034,
0.2944503128528595,
0.19019469618797302,
-0.12471812963485718,
0.39426568150520325,
0.4062999486923218,
-0.1472921222448349,
-0.012048386037349701,
-0.023800252005457878,
0.32988008856773376,
0.0258270725607872,
0.14542289078235626,
0.15760761499404907,
0.11603793501853943,
0.004418214783072472,
0.18759657442569733,
0.11953715234994888,
0.31844618916511536,
0.16899079084396362,
0.2034032940864563,
0.06254585087299347,
-0.1343478560447693,
-0.23187832534313202,
0.013515152037143707,
0.10823354125022888,
-0.590876042842865,
0.2150617092847824,
-0.35296428203582764,
0.04865726828575134,
-0.2588043808937073,
-0.12347038835287094,
-0.4918266534805298,
0.09293932467699051,
0.3377533257007599,
-0.18807686865329742,
0.0020675640553236008,
-0.10834556818008423,
0.029926974326372147,
0.33757779002189636,
0.7586604356765747,
0.01931166648864746,
-0.11100371927022934,
-0.22932112216949463,
-0.478585422039032,
-0.5296587944030762,
0.13045765459537506,
-0.04465487226843834,
0.19258005917072296,
-0.1350322663784027,
0.27857139706611633,
0.11657805740833282,
0.037997134029865265,
0.17734764516353607,
0.11425752937793732,
0.2575359344482422,
0.19555732607841492,
-0.5474047660827637,
0.0003874190151691437,
-0.28104811906814575,
-0.06977588683366776,
0.049724288284778595,
-0.08641490340232849,
0.3129313588142395,
0.23635233938694,
-0.0038938522338867188,
-0.12754181027412415,
0.19530734419822693,
-0.061308834701776505,
-0.16843582689762115,
0.07537266612052917,
0.022778604179620743,
0.3318895697593689,
0.11260268837213516,
-0.21790336072444916,
-0.20115309953689575,
0.13193413615226746,
-0.07558852434158325,
-0.15963539481163025,
-0.016645856201648712,
0.42679429054260254,
-0.0568099170923233,
-0.26696422696113586,
-0.4690762460231781,
0.5127025842666626,
0.12184463441371918,
-0.17341481149196625,
-0.20301532745361328,
0.2121679037809372,
-0.10536829382181168,
0.23657311499118805,
0.397504597902298,
0.7369195222854614,
0.0757630318403244,
-0.07086829841136932,
-0.34009864926338196,
-0.24795030057430267,
0.29750362038612366,
-0.5315229296684265,
-0.2666740119457245,
-0.20205818116664886,
0.28316405415534973,
0.29716551303863525,
0.09927716851234436,
-0.5282416343688965,
0.1667773425579071,
0.10719551146030426,
-0.1955672800540924,
-0.216616690158844,
0.14678995311260223,
-0.11242125928401947,
-0.07235011458396912,
-0.09623309969902039,
0.17933863401412964,
0.3893272578716278,
-0.20760643482208252,
0.24392300844192505,
-0.09752305597066879
] |
https://github.com/huggingface/datasets/issues/5123 | datasets freezes with streaming mode in multiple-gpu | Hi @lhoestq
thanks for the response. I added the line suggested right before calling `with accelerator.main_process_first():` in the code above and I confirm this also freezes. to reproduce it please run "accelerate launch code.py". I was wondering if you could have more suggestions for me? I do not have an idea how to fix this or debug this freezing. many thanks. | ## Describe the bug
Hi. I am using this dataloader, which is for processing large datasets in streaming mode mentioned in one of examples of huggingface. I am using it to read c4: https://github.com/huggingface/transformers/blob/b48ac1a094e572d6076b46a9e4ed3e0ebe978afc/examples/research_projects/codeparrot/scripts/codeparrot_training.py#L22
During using multi-gpu in accelerator in one node, the code freezes, but works for 1 GPU:
```
10/16/2022 14:18:46 - INFO - datasets.info - Loading Dataset Infos from /home/jack/.cache/huggingface/modules/datasets_modules/datasets/c4/df532b158939272d032cc63ef19cd5b83e9b4d00c922b833e4cb18b2e9869b01
Steps: 0%| | 0/400000 [00:00<?, ?it/s]10/16/2022 14:18:47 - INFO - torch.utils.data.dataloader - Shared seed (135290893754684706) sent to store on rank 0
```
# Code to reproduce
please run this code with `accelerate launch code.py`
```
from accelerate import Accelerator
from accelerate.logging import get_logger
from datasets import load_dataset
from torch.utils.data.dataloader import DataLoader
import torch
from datasets import load_dataset
from transformers import AutoTokenizer
import torch
from accelerate.logging import get_logger
from torch.utils.data import IterableDataset
from torch.utils.data.datapipes.iter.combinatorics import ShufflerIterDataPipe
logger = get_logger(__name__)
class ConstantLengthDataset(IterableDataset):
"""
Iterable dataset that returns constant length chunks of tokens from stream of text files.
Args:
tokenizer (Tokenizer): The processor used for proccessing the data.
dataset (dataset.Dataset): Dataset with text files.
infinite (bool): If True the iterator is reset after dataset reaches end else stops.
max_seq_length (int): Length of token sequences to return.
num_of_sequences (int): Number of token sequences to keep in buffer.
chars_per_token (int): Number of characters per token used to estimate number of tokens in text buffer.
"""
def __init__(
self,
tokenizer,
dataset,
infinite=False,
max_seq_length=1024,
num_of_sequences=1024,
chars_per_token=3.6,
):
self.tokenizer = tokenizer
# self.concat_token_id = tokenizer.bos_token_id
self.dataset = dataset
self.max_seq_length = max_seq_length
self.epoch = 0
self.infinite = infinite
self.current_size = 0
self.max_buffer_size = max_seq_length * chars_per_token * num_of_sequences
self.content_field = "text"
def __iter__(self):
iterator = iter(self.dataset)
more_examples = True
while more_examples:
buffer, buffer_len = [], 0
while True:
if buffer_len >= self.max_buffer_size:
break
try:
buffer.append(next(iterator)[self.content_field])
buffer_len += len(buffer[-1])
except StopIteration:
if self.infinite:
iterator = iter(self.dataset)
self.epoch += 1
logger.info(f"Dataset epoch: {self.epoch}")
else:
more_examples = False
break
tokenized_inputs = self.tokenizer(buffer, truncation=False)["input_ids"]
all_token_ids = []
for tokenized_input in tokenized_inputs:
all_token_ids.extend(tokenized_input)
for i in range(0, len(all_token_ids), self.max_seq_length):
input_ids = all_token_ids[i : i + self.max_seq_length]
if len(input_ids) == self.max_seq_length:
self.current_size += 1
yield torch.tensor(input_ids)
def shuffle(self, buffer_size=1000):
return ShufflerIterDataPipe(self, buffer_size=buffer_size)
def create_dataloaders(tokenizer, accelerator):
ds_kwargs = {"streaming": True}
# In distributed training, the load_dataset function gaurantees that only one process
# can concurrently download the dataset.
datasets = load_dataset(
"c4",
"en",
cache_dir="cache_dir",
**ds_kwargs,
)
train_data, valid_data = datasets["train"], datasets["validation"]
with accelerator.main_process_first():
train_data = train_data.shuffle(buffer_size=10000, seed=None)
train_dataset = ConstantLengthDataset(
tokenizer,
train_data,
infinite=True,
max_seq_length=256,
)
valid_dataset = ConstantLengthDataset(
tokenizer,
valid_data,
infinite=False,
max_seq_length=256,
)
train_dataset = train_dataset.shuffle(buffer_size=10000)
train_dataloader = DataLoader(train_dataset, batch_size=160, shuffle=True)
eval_dataloader = DataLoader(valid_dataset, batch_size=160)
return train_dataloader, eval_dataloader
def main():
# Accelerator.
logging_dir = "data_save_dir/log"
accelerator = Accelerator(
gradient_accumulation_steps=1,
mixed_precision="bf16",
log_with="tensorboard",
logging_dir=logging_dir,
)
# We need to initialize the trackers we use, and also store our configuration.
# The trackers initializes automatically on the main process.
if accelerator.is_main_process:
accelerator.init_trackers("test")
tokenizer = AutoTokenizer.from_pretrained("bert-base-uncased")
# Load datasets and create dataloaders.
train_dataloader, _ = create_dataloaders(tokenizer, accelerator)
train_dataloader = accelerator.prepare(train_dataloader)
for step, batch in enumerate(train_dataloader, start=1):
print(step)
accelerator.end_training()
if __name__ == "__main__":
main()
```
## Results expected
Being able to run the code for streamining datasets with multi-gpu
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.5.2
- Platform: linux
- Python version: 3.9.12
- PyArrow version: 9.0.0
@lhoestq I do not have any idea why this freezing happens, and I removed the streaming mode and this was working fine, so I know this is caused by streaming mode of the dataloader part not working well with multi-gpu setting. Since datasets are large, I hope to keep the streamining mode. I very much appreciate your help.
| 61 | datasets freezes with streaming mode in multiple-gpu
## Describe the bug
Hi. I am using this dataloader, which is for processing large datasets in streaming mode mentioned in one of examples of huggingface. I am using it to read c4: https://github.com/huggingface/transformers/blob/b48ac1a094e572d6076b46a9e4ed3e0ebe978afc/examples/research_projects/codeparrot/scripts/codeparrot_training.py#L22
During using multi-gpu in accelerator in one node, the code freezes, but works for 1 GPU:
```
10/16/2022 14:18:46 - INFO - datasets.info - Loading Dataset Infos from /home/jack/.cache/huggingface/modules/datasets_modules/datasets/c4/df532b158939272d032cc63ef19cd5b83e9b4d00c922b833e4cb18b2e9869b01
Steps: 0%| | 0/400000 [00:00<?, ?it/s]10/16/2022 14:18:47 - INFO - torch.utils.data.dataloader - Shared seed (135290893754684706) sent to store on rank 0
```
# Code to reproduce
please run this code with `accelerate launch code.py`
```
from accelerate import Accelerator
from accelerate.logging import get_logger
from datasets import load_dataset
from torch.utils.data.dataloader import DataLoader
import torch
from datasets import load_dataset
from transformers import AutoTokenizer
import torch
from accelerate.logging import get_logger
from torch.utils.data import IterableDataset
from torch.utils.data.datapipes.iter.combinatorics import ShufflerIterDataPipe
logger = get_logger(__name__)
class ConstantLengthDataset(IterableDataset):
"""
Iterable dataset that returns constant length chunks of tokens from stream of text files.
Args:
tokenizer (Tokenizer): The processor used for proccessing the data.
dataset (dataset.Dataset): Dataset with text files.
infinite (bool): If True the iterator is reset after dataset reaches end else stops.
max_seq_length (int): Length of token sequences to return.
num_of_sequences (int): Number of token sequences to keep in buffer.
chars_per_token (int): Number of characters per token used to estimate number of tokens in text buffer.
"""
def __init__(
self,
tokenizer,
dataset,
infinite=False,
max_seq_length=1024,
num_of_sequences=1024,
chars_per_token=3.6,
):
self.tokenizer = tokenizer
# self.concat_token_id = tokenizer.bos_token_id
self.dataset = dataset
self.max_seq_length = max_seq_length
self.epoch = 0
self.infinite = infinite
self.current_size = 0
self.max_buffer_size = max_seq_length * chars_per_token * num_of_sequences
self.content_field = "text"
def __iter__(self):
iterator = iter(self.dataset)
more_examples = True
while more_examples:
buffer, buffer_len = [], 0
while True:
if buffer_len >= self.max_buffer_size:
break
try:
buffer.append(next(iterator)[self.content_field])
buffer_len += len(buffer[-1])
except StopIteration:
if self.infinite:
iterator = iter(self.dataset)
self.epoch += 1
logger.info(f"Dataset epoch: {self.epoch}")
else:
more_examples = False
break
tokenized_inputs = self.tokenizer(buffer, truncation=False)["input_ids"]
all_token_ids = []
for tokenized_input in tokenized_inputs:
all_token_ids.extend(tokenized_input)
for i in range(0, len(all_token_ids), self.max_seq_length):
input_ids = all_token_ids[i : i + self.max_seq_length]
if len(input_ids) == self.max_seq_length:
self.current_size += 1
yield torch.tensor(input_ids)
def shuffle(self, buffer_size=1000):
return ShufflerIterDataPipe(self, buffer_size=buffer_size)
def create_dataloaders(tokenizer, accelerator):
ds_kwargs = {"streaming": True}
# In distributed training, the load_dataset function gaurantees that only one process
# can concurrently download the dataset.
datasets = load_dataset(
"c4",
"en",
cache_dir="cache_dir",
**ds_kwargs,
)
train_data, valid_data = datasets["train"], datasets["validation"]
with accelerator.main_process_first():
train_data = train_data.shuffle(buffer_size=10000, seed=None)
train_dataset = ConstantLengthDataset(
tokenizer,
train_data,
infinite=True,
max_seq_length=256,
)
valid_dataset = ConstantLengthDataset(
tokenizer,
valid_data,
infinite=False,
max_seq_length=256,
)
train_dataset = train_dataset.shuffle(buffer_size=10000)
train_dataloader = DataLoader(train_dataset, batch_size=160, shuffle=True)
eval_dataloader = DataLoader(valid_dataset, batch_size=160)
return train_dataloader, eval_dataloader
def main():
# Accelerator.
logging_dir = "data_save_dir/log"
accelerator = Accelerator(
gradient_accumulation_steps=1,
mixed_precision="bf16",
log_with="tensorboard",
logging_dir=logging_dir,
)
# We need to initialize the trackers we use, and also store our configuration.
# The trackers initializes automatically on the main process.
if accelerator.is_main_process:
accelerator.init_trackers("test")
tokenizer = AutoTokenizer.from_pretrained("bert-base-uncased")
# Load datasets and create dataloaders.
train_dataloader, _ = create_dataloaders(tokenizer, accelerator)
train_dataloader = accelerator.prepare(train_dataloader)
for step, batch in enumerate(train_dataloader, start=1):
print(step)
accelerator.end_training()
if __name__ == "__main__":
main()
```
## Results expected
Being able to run the code for streamining datasets with multi-gpu
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.5.2
- Platform: linux
- Python version: 3.9.12
- PyArrow version: 9.0.0
@lhoestq I do not have any idea why this freezing happens, and I removed the streaming mode and this was working fine, so I know this is caused by streaming mode of the dataloader part not working well with multi-gpu setting. Since datasets are large, I hope to keep the streamining mode. I very much appreciate your help.
Hi @lhoestq
thanks for the response. I added the line suggested right before calling `with accelerator.main_process_first():` in the code above and I confirm this also freezes. to reproduce it please run "accelerate launch code.py". I was wondering if you could have more suggestions for me? I do not have an idea how to fix this or debug this freezing. many thanks. | [
-0.320170134305954,
-0.31651610136032104,
-0.039002928882837296,
0.4769468307495117,
0.32108551263809204,
-0.05959709361195564,
0.370758980512619,
-0.0028037503361701965,
0.29125797748565674,
0.27730265259742737,
-0.1412859410047531,
0.06606162339448929,
-0.1297413855791092,
0.389516144990921,
-0.02885536476969719,
0.019152846187353134,
0.14081059396266937,
-0.06935961544513702,
-0.05934390425682068,
0.09264911711215973,
0.19574815034866333,
0.28171306848526,
-0.03017459809780121,
-0.2807106375694275,
-0.3968455195426941,
0.006201479583978653,
0.08898560702800751,
0.05466218665242195,
0.16394278407096863,
-0.1528581976890564,
0.05657128989696503,
0.3212423622608185,
-0.1962885558605194,
0.6732676029205322,
-0.00011721457849489525,
0.05330623686313629,
0.18269649147987366,
-0.002833753824234009,
-0.21490003168582916,
-0.17322935163974762,
-0.002865813672542572,
0.06839033216238022,
0.14951622486114502,
0.04682282358407974,
-0.17401543259620667,
-0.0174991674721241,
-0.1881343424320221,
-0.6604426503181458,
0.164658784866333,
-0.042508333921432495,
0.09482607245445251,
0.4577403962612152,
-0.1465912163257599,
-0.06909176707267761,
-0.20002222061157227,
-0.039952024817466736,
-0.14591027796268463,
0.07709209620952606,
0.31674060225486755,
0.07274440675973892,
-0.27099719643592834,
0.40121567249298096,
0.12219187617301941,
-0.015591144561767578,
0.08307396620512009,
-0.14754250645637512,
-0.350762277841568,
-0.13338522613048553,
0.026910532265901566,
0.15082837641239166,
0.027056343853473663,
-0.3233974277973175,
-0.1601693481206894,
-0.22570520639419556,
0.10727719217538834,
-0.3284243941307068,
0.201379656791687,
0.11525953561067581,
-0.25809207558631897,
-0.21668508648872375,
-0.4963834583759308,
0.01326315850019455,
-0.08960461616516113,
0.06837072968482971,
-0.07536549866199493,
0.2995816469192505,
-0.2987593412399292,
0.22882121801376343,
0.38512924313545227,
0.29899197816848755,
-0.15710687637329102,
-0.19772954285144806,
-0.002054654061794281,
-0.2263694405555725,
-0.8506759405136108,
0.210271418094635,
-0.1854097545146942,
-0.024569854140281677,
0.1130077913403511,
0.212607279419899,
0.2809174656867981,
0.15809139609336853,
0.0683353990316391,
0.07589592784643173,
0.14983536303043365,
-0.02965284138917923,
-0.005833819508552551,
-0.20412547886371613,
0.43327707052230835,
0.4074971079826355,
-0.2626340985298157,
-0.06723201274871826,
-0.013328848406672478,
-0.10992640256881714,
-0.2989759147167206,
-0.1457396149635315,
-0.08084538578987122,
-0.07573612779378891,
-0.13559462130069733,
-0.009245884604752064,
-0.11118854582309723,
0.03931012004613876,
0.4182609021663666,
0.44486111402511597,
0.07055307179689407,
0.3420749604701996,
-0.18277500569820404,
0.05916411429643631,
-0.21634776890277863,
-0.44875651597976685,
-0.18320819735527039,
-0.2635971009731293,
-0.1491444855928421,
0.23651264607906342,
0.25286436080932617,
-0.6722689270973206,
-0.033016908913850784,
0.2876058518886566,
0.4721084237098694,
-0.1694207787513733,
0.1245342344045639,
-0.29843664169311523,
-0.05029793828725815,
0.17948129773139954,
0.14669935405254364,
0.4921897351741791,
0.1822681725025177,
-0.04350600764155388,
0.05512329190969467,
-0.11150530725717545,
-0.06791342049837112,
-0.0317845344543457,
0.30285823345184326,
0.11863456666469574,
0.07360691577196121,
0.18476532399654388,
-0.4126509726047516,
0.11747676134109497,
0.005819007754325867,
-0.1398874670267105,
0.27309441566467285,
-0.04221192002296448,
-0.0008702687919139862,
-0.14555160701274872,
0.23987773060798645,
0.5760335326194763,
0.12451320886611938,
-0.1120918020606041,
-0.0443904772400856,
-0.2915104925632477,
0.038571104407310486,
0.5202218294143677,
-0.17591074109077454,
-0.3686400055885315,
-0.28145554661750793,
0.045004233717918396,
-0.0261261984705925,
-0.23804381489753723,
-0.20734138786792755,
0.4822528064250946,
-0.3851122260093689,
0.30897125601768494,
0.4230332672595978,
0.10372115671634674,
0.12219540029764175,
-0.03825599327683449,
0.19279813766479492,
0.2943075895309448,
-0.00635366328060627,
0.1087382510304451,
-0.14604146778583527,
0.06424739956855774,
0.2653828561306,
0.016305286437273026,
-0.17548853158950806,
-0.300058513879776,
-0.07963960617780685,
-0.002100619487464428,
0.31338000297546387,
-0.16503708064556122,
0.17526975274085999,
0.41101473569869995,
0.04371234029531479,
-0.11278930306434631,
0.0510147362947464,
-0.18153807520866394,
-0.574967622756958,
0.29064786434173584,
0.2165021002292633,
-0.2392047941684723,
0.09127096086740494,
-0.1333739012479782,
0.23764142394065857,
-0.07981850951910019,
-0.3315660059452057,
-0.37471505999565125,
-0.032935481518507004,
0.20669057965278625,
0.09787946939468384,
0.1326659917831421,
-0.02257602848112583,
0.7143674492835999,
-0.1326308399438858,
0.1235450878739357,
-0.2603522539138794,
0.3782622218132019,
0.08834384381771088,
-0.25329169631004333,
-0.07439586520195007,
-0.11012204736471176,
0.06136968731880188,
-0.32795479893684387,
-0.14810338616371155,
0.46449926495552063,
0.09641259908676147,
0.5647338628768921,
-0.26063627004623413,
0.11943359673023224,
0.38852575421333313,
-0.19571395218372345,
0.0814359039068222,
0.17112208902835846,
0.1621701866388321,
-0.2649763822555542,
-0.04232949763536453,
0.3338702619075775,
-0.21187607944011688,
0.14005300402641296,
0.1394023895263672,
-0.1506596952676773,
-0.009420773014426231,
0.2594158947467804,
-0.048738256096839905,
0.06878665089607239,
0.3883502185344696,
0.025583820417523384,
0.44588765501976013,
-0.011565407738089561,
-0.4989607632160187,
0.1430942267179489,
0.3377918601036072,
0.263149231672287,
-0.1941157579421997,
-0.05033130943775177,
-0.33004245162010193,
-0.05804133415222168,
0.2738502323627472,
-0.07551849633455276,
0.3668179512023926,
0.11351387202739716,
-0.0034544579684734344,
-0.10172093659639359,
0.08031477779150009,
-0.2999836206436157,
0.17736758291721344,
0.10195215046405792,
0.1618015617132187,
0.2187531590461731,
0.1172676607966423,
-0.15939673781394958,
-0.15111970901489258,
-0.18575450778007507,
0.32863739132881165,
-0.033362001180648804,
-0.3298265337944031,
0.32112830877304077,
-0.34599485993385315,
-0.24143052101135254,
-0.1842232346534729,
-0.07266464829444885,
-0.4802292585372925,
-0.10746444016695023,
-0.31277281045913696,
0.4952528774738312,
0.031738463789224625,
0.128421813249588,
0.10595707595348358,
0.0028597861528396606,
0.23697461187839508,
0.022782154381275177,
-0.28592273592948914,
0.02397690713405609,
-0.1963951587677002,
-0.05390238016843796,
0.417086124420166,
-0.06987275928258896,
0.1014823466539383,
0.45332422852516174,
-0.1511560082435608,
-0.35475510358810425,
-0.1686646193265915,
0.07441732287406921,
-0.14645811915397644,
0.1020779237151146,
-0.11136025190353394,
0.1631530225276947,
-0.035169538110494614,
-0.11404077708721161,
0.19351963698863983,
-0.43751364946365356,
-0.08548972010612488,
0.271707683801651,
-0.035255592316389084,
0.1995011270046234,
-0.22854772210121155,
0.006123870611190796,
-0.24477176368236542,
-0.3657911419868469,
0.3497276306152344,
-0.2352394163608551,
-0.13698385655879974,
0.0765804722905159,
0.1583414375782013,
0.21081340312957764,
-0.03315375745296478,
-0.18436570465564728,
-0.12409546226263046,
-0.19303375482559204,
0.14701849222183228,
-0.019072476774454117,
-0.40133482217788696,
-0.244588240981102,
0.16984441876411438,
-0.0025123171508312225,
0.3933245539665222,
-0.31243571639060974,
0.16146600246429443,
-0.3194584548473358,
-0.0547042042016983,
0.05831800401210785,
-0.05197394639253616,
0.2204650342464447,
-0.2151278406381607,
-0.01358164194971323,
-0.11399076133966446,
-0.04376517981290817,
0.1658928543329239,
-0.13448747992515564,
-0.015818089246749878,
-0.11097333580255508,
0.34720727801322937,
0.3296865224838257,
0.45010387897491455,
0.21204568445682526,
-0.03832007572054863,
0.31824856996536255,
-0.07278018444776535,
0.21965815126895905,
0.049487050622701645,
-0.20635905861854553,
0.31881412863731384,
-0.1726091206073761,
-0.0045239925384521484,
-0.018886566162109375,
-0.19593185186386108,
-0.037774957716464996,
-0.22168457508087158,
0.14016085863113403,
0.18190330266952515,
-0.1656782031059265,
0.29752710461616516,
0.06558997929096222,
0.10472086071968079,
-0.17760330438613892,
0.05752391368150711,
0.07364991307258606,
-0.1482866108417511,
0.01676757074892521,
0.2895659804344177,
-0.26418378949165344,
-0.009687433950603008,
-0.3947683870792389,
0.02734026499092579,
-0.1826173961162567,
0.17090697586536407,
0.17284563183784485,
0.41673579812049866,
0.10159271955490112,
-0.06316328048706055,
0.09674377739429474,
-0.3232256770133972,
0.7259926795959473,
0.34981125593185425,
-0.13147538900375366,
0.09626911580562592,
-0.3811025321483612,
-0.2965686321258545,
0.03321569785475731,
-0.37280064821243286,
0.02045464515686035,
0.2718900442123413,
0.5440722703933716,
-0.2527817189693451,
-0.39522165060043335,
-0.19789808988571167,
0.03606124222278595,
-0.018301930278539658,
-0.05184583365917206,
-0.22067338228225708,
0.1025443896651268,
-0.2376442700624466,
0.2315637767314911,
0.10310465842485428,
0.058098215609788895,
-0.401311993598938,
-0.05811883881688118,
0.1250377595424652,
-0.2197563648223877,
0.12035338580608368,
0.06208226457238197,
0.1526395082473755,
-0.150322824716568,
0.2186867594718933,
0.35755452513694763,
0.054748568683862686,
0.23012283444404602,
0.1911984086036682,
0.31224650144577026,
-0.20272251963615417,
0.4371161460876465,
0.2170461118221283,
0.3125962018966675,
0.45868751406669617,
-0.07028362900018692,
0.49929025769233704,
0.10524245351552963,
0.30283230543136597,
-0.12995973229408264,
0.2632194757461548,
0.21913288533687592,
0.3468329608440399,
-0.3923860788345337,
-0.458741158246994,
0.3937756419181824,
0.004316641017794609,
0.20219282805919647,
0.6175047159194946,
0.12552914023399353,
-0.07383781671524048,
-0.1385607123374939,
-0.16125336289405823,
0.6028099060058594,
-0.06719326972961426,
0.3586098551750183,
0.20923885703086853,
-0.22055551409721375,
0.5054243206977844,
-0.5937470197677612,
0.19814899563789368,
-0.1506689190864563,
-0.41321611404418945,
0.018765492364764214,
-0.2010648548603058,
0.43172067403793335,
-0.12246599793434143,
-0.08273948729038239,
0.1873295158147812,
0.06535287201404572,
0.3014884293079376,
-0.1806645393371582,
0.3034682273864746,
-0.34839895367622375,
-0.41509413719177246,
-0.45341211557388306,
0.04850274324417114,
-0.12633726000785828,
0.13370546698570251,
0.09538030624389648,
-0.09765797853469849,
0.08964815735816956,
-0.02583513781428337,
-0.33737561106681824,
0.009162712842226028,
-0.6102495193481445,
0.00030599720776081085,
-0.04006807133555412,
-0.41945672035217285,
0.3332884609699249,
0.14806488156318665,
-0.09767547249794006,
-0.06345473229885101,
-0.062499530613422394,
0.1720711886882782,
-0.14119413495063782,
0.08674008399248123,
-0.10608958452939987,
-0.3329578936100006,
0.09485097229480743,
-0.009610209614038467,
-0.1025252491235733,
0.19989141821861267,
0.09746816009283066,
-0.13958975672721863,
0.36389291286468506,
0.1336819976568222,
-0.15619789063930511,
0.058961160480976105,
-0.06450261175632477,
0.08951372653245926,
0.08699853718280792,
-0.274768590927124,
0.019831059500575066,
0.06901092082262039,
-0.17514300346374512,
-0.20943623781204224,
0.018488068133592606,
0.02346118539571762,
-0.20378780364990234,
0.7961738109588623,
-0.06900791078805923,
-0.22404277324676514,
0.346279114484787,
0.4273766875267029,
-0.10663463920354843,
-0.23933950066566467,
-0.02573203667998314,
0.3107742965221405,
-0.23372137546539307,
0.14335303008556366,
-0.3001023232936859,
-0.16458454728126526,
0.17259564995765686,
-0.0007974468171596527,
-0.017555326223373413,
-0.09870066493749619,
0.014036621898412704,
-0.3685116767883301,
-0.41476279497146606,
-0.05516313016414642,
-0.1779431700706482,
0.08709278702735901,
0.1761348843574524,
0.26979830861091614,
-0.0006913729012012482,
0.3773987293243408,
-0.2025117576122284,
-0.019583584740757942,
-0.1402473747730255,
-0.12250952422618866,
0.20925326645374298,
-0.1959984004497528,
0.3830168843269348,
-0.02707037702202797,
0.057350680232048035,
0.36506521701812744,
-0.05137687176465988,
-0.11634066700935364,
-0.1765683889389038,
0.11344491690397263,
-0.05546925961971283,
-0.08208806067705154,
0.028041504323482513,
-0.10280346870422363,
-0.12126904726028442,
-0.09933386743068695,
0.6700537800788879,
0.13897347450256348,
0.006425827741622925,
-0.20907703042030334,
0.19417019188404083,
0.010862313210964203,
-0.3726525902748108,
0.018590690568089485,
-0.19535791873931885,
-0.15798620879650116,
0.3542337119579315,
0.03664272651076317,
0.04119914397597313,
-0.0052753835916519165,
-0.4814819395542145,
-0.0036610066890716553,
0.34902793169021606,
0.08964759111404419,
0.21850088238716125,
-0.23463983833789825,
-0.14610576629638672,
-0.12128204107284546,
0.3502779006958008,
0.360932320356369,
-0.14266851544380188,
-0.1517164260149002,
0.0793684720993042,
0.05996345728635788,
-0.0272354893386364,
-0.00409953435882926,
-0.19534257054328918,
0.018120858818292618,
0.08164803683757782,
0.2565746009349823,
0.3063749670982361,
0.1292659491300583,
-0.06028912961483002,
0.2432013750076294,
0.10289052873849869,
0.1693509817123413,
0.2773444354534149,
-0.2257394790649414,
0.10426411032676697,
0.15127182006835938,
0.09524668753147125,
0.10445536673069,
-0.0252470001578331,
0.20106996595859528,
-0.13846591114997864,
0.27362290024757385,
0.1747645139694214,
0.1947527378797531,
0.14683261513710022,
-0.5698386430740356,
-0.39714014530181885,
0.09334786236286163,
-0.5674176216125488,
0.2225762903690338,
-0.1508185863494873,
0.43626347184181213,
-0.37798917293548584,
-0.21522557735443115,
-0.2594103515148163,
0.2358933687210083,
-0.23646557331085205,
0.037227656692266464,
0.19985072314739227,
-0.19495229423046112,
-0.23551325500011444,
0.17674444615840912,
-0.008310437202453613,
0.11880853772163391,
0.3892444372177124,
0.27836593985557556,
0.06494555622339249,
-0.3253641128540039,
-0.2908581495285034,
0.2944503128528595,
0.19019469618797302,
-0.12471812963485718,
0.39426568150520325,
0.4062999486923218,
-0.1472921222448349,
-0.012048386037349701,
-0.023800252005457878,
0.32988008856773376,
0.0258270725607872,
0.14542289078235626,
0.15760761499404907,
0.11603793501853943,
0.004418214783072472,
0.18759657442569733,
0.11953715234994888,
0.31844618916511536,
0.16899079084396362,
0.2034032940864563,
0.06254585087299347,
-0.1343478560447693,
-0.23187832534313202,
0.013515152037143707,
0.10823354125022888,
-0.590876042842865,
0.2150617092847824,
-0.35296428203582764,
0.04865726828575134,
-0.2588043808937073,
-0.12347038835287094,
-0.4918266534805298,
0.09293932467699051,
0.3377533257007599,
-0.18807686865329742,
0.0020675640553236008,
-0.10834556818008423,
0.029926974326372147,
0.33757779002189636,
0.7586604356765747,
0.01931166648864746,
-0.11100371927022934,
-0.22932112216949463,
-0.478585422039032,
-0.5296587944030762,
0.13045765459537506,
-0.04465487226843834,
0.19258005917072296,
-0.1350322663784027,
0.27857139706611633,
0.11657805740833282,
0.037997134029865265,
0.17734764516353607,
0.11425752937793732,
0.2575359344482422,
0.19555732607841492,
-0.5474047660827637,
0.0003874190151691437,
-0.28104811906814575,
-0.06977588683366776,
0.049724288284778595,
-0.08641490340232849,
0.3129313588142395,
0.23635233938694,
-0.0038938522338867188,
-0.12754181027412415,
0.19530734419822693,
-0.061308834701776505,
-0.16843582689762115,
0.07537266612052917,
0.022778604179620743,
0.3318895697593689,
0.11260268837213516,
-0.21790336072444916,
-0.20115309953689575,
0.13193413615226746,
-0.07558852434158325,
-0.15963539481163025,
-0.016645856201648712,
0.42679429054260254,
-0.0568099170923233,
-0.26696422696113586,
-0.4690762460231781,
0.5127025842666626,
0.12184463441371918,
-0.17341481149196625,
-0.20301532745361328,
0.2121679037809372,
-0.10536829382181168,
0.23657311499118805,
0.397504597902298,
0.7369195222854614,
0.0757630318403244,
-0.07086829841136932,
-0.34009864926338196,
-0.24795030057430267,
0.29750362038612366,
-0.5315229296684265,
-0.2666740119457245,
-0.20205818116664886,
0.28316405415534973,
0.29716551303863525,
0.09927716851234436,
-0.5282416343688965,
0.1667773425579071,
0.10719551146030426,
-0.1955672800540924,
-0.216616690158844,
0.14678995311260223,
-0.11242125928401947,
-0.07235011458396912,
-0.09623309969902039,
0.17933863401412964,
0.3893272578716278,
-0.20760643482208252,
0.24392300844192505,
-0.09752305597066879
] |
https://github.com/huggingface/datasets/issues/5123 | datasets freezes with streaming mode in multiple-gpu | Maybe the `fsspec` stuff need to be clearer even before - can you try to run this function at the very beginning of your script ?
```python
import fsspec
def _set_fsspec_for_multiprocess() -> None:
"""
Clear reference to the loop and thread.
This is necessary otherwise HTTPFileSystem hangs in the ML training loop.
Only required for fsspec >= 0.9.0
See https://github.com/fsspec/gcsfs/issues/379
"""
fsspec.asyn.iothread[0] = None
fsspec.asyn.loop[0] = None
_set_fsspec_for_multiprocess()
``` | ## Describe the bug
Hi. I am using this dataloader, which is for processing large datasets in streaming mode mentioned in one of examples of huggingface. I am using it to read c4: https://github.com/huggingface/transformers/blob/b48ac1a094e572d6076b46a9e4ed3e0ebe978afc/examples/research_projects/codeparrot/scripts/codeparrot_training.py#L22
During using multi-gpu in accelerator in one node, the code freezes, but works for 1 GPU:
```
10/16/2022 14:18:46 - INFO - datasets.info - Loading Dataset Infos from /home/jack/.cache/huggingface/modules/datasets_modules/datasets/c4/df532b158939272d032cc63ef19cd5b83e9b4d00c922b833e4cb18b2e9869b01
Steps: 0%| | 0/400000 [00:00<?, ?it/s]10/16/2022 14:18:47 - INFO - torch.utils.data.dataloader - Shared seed (135290893754684706) sent to store on rank 0
```
# Code to reproduce
please run this code with `accelerate launch code.py`
```
from accelerate import Accelerator
from accelerate.logging import get_logger
from datasets import load_dataset
from torch.utils.data.dataloader import DataLoader
import torch
from datasets import load_dataset
from transformers import AutoTokenizer
import torch
from accelerate.logging import get_logger
from torch.utils.data import IterableDataset
from torch.utils.data.datapipes.iter.combinatorics import ShufflerIterDataPipe
logger = get_logger(__name__)
class ConstantLengthDataset(IterableDataset):
"""
Iterable dataset that returns constant length chunks of tokens from stream of text files.
Args:
tokenizer (Tokenizer): The processor used for proccessing the data.
dataset (dataset.Dataset): Dataset with text files.
infinite (bool): If True the iterator is reset after dataset reaches end else stops.
max_seq_length (int): Length of token sequences to return.
num_of_sequences (int): Number of token sequences to keep in buffer.
chars_per_token (int): Number of characters per token used to estimate number of tokens in text buffer.
"""
def __init__(
self,
tokenizer,
dataset,
infinite=False,
max_seq_length=1024,
num_of_sequences=1024,
chars_per_token=3.6,
):
self.tokenizer = tokenizer
# self.concat_token_id = tokenizer.bos_token_id
self.dataset = dataset
self.max_seq_length = max_seq_length
self.epoch = 0
self.infinite = infinite
self.current_size = 0
self.max_buffer_size = max_seq_length * chars_per_token * num_of_sequences
self.content_field = "text"
def __iter__(self):
iterator = iter(self.dataset)
more_examples = True
while more_examples:
buffer, buffer_len = [], 0
while True:
if buffer_len >= self.max_buffer_size:
break
try:
buffer.append(next(iterator)[self.content_field])
buffer_len += len(buffer[-1])
except StopIteration:
if self.infinite:
iterator = iter(self.dataset)
self.epoch += 1
logger.info(f"Dataset epoch: {self.epoch}")
else:
more_examples = False
break
tokenized_inputs = self.tokenizer(buffer, truncation=False)["input_ids"]
all_token_ids = []
for tokenized_input in tokenized_inputs:
all_token_ids.extend(tokenized_input)
for i in range(0, len(all_token_ids), self.max_seq_length):
input_ids = all_token_ids[i : i + self.max_seq_length]
if len(input_ids) == self.max_seq_length:
self.current_size += 1
yield torch.tensor(input_ids)
def shuffle(self, buffer_size=1000):
return ShufflerIterDataPipe(self, buffer_size=buffer_size)
def create_dataloaders(tokenizer, accelerator):
ds_kwargs = {"streaming": True}
# In distributed training, the load_dataset function gaurantees that only one process
# can concurrently download the dataset.
datasets = load_dataset(
"c4",
"en",
cache_dir="cache_dir",
**ds_kwargs,
)
train_data, valid_data = datasets["train"], datasets["validation"]
with accelerator.main_process_first():
train_data = train_data.shuffle(buffer_size=10000, seed=None)
train_dataset = ConstantLengthDataset(
tokenizer,
train_data,
infinite=True,
max_seq_length=256,
)
valid_dataset = ConstantLengthDataset(
tokenizer,
valid_data,
infinite=False,
max_seq_length=256,
)
train_dataset = train_dataset.shuffle(buffer_size=10000)
train_dataloader = DataLoader(train_dataset, batch_size=160, shuffle=True)
eval_dataloader = DataLoader(valid_dataset, batch_size=160)
return train_dataloader, eval_dataloader
def main():
# Accelerator.
logging_dir = "data_save_dir/log"
accelerator = Accelerator(
gradient_accumulation_steps=1,
mixed_precision="bf16",
log_with="tensorboard",
logging_dir=logging_dir,
)
# We need to initialize the trackers we use, and also store our configuration.
# The trackers initializes automatically on the main process.
if accelerator.is_main_process:
accelerator.init_trackers("test")
tokenizer = AutoTokenizer.from_pretrained("bert-base-uncased")
# Load datasets and create dataloaders.
train_dataloader, _ = create_dataloaders(tokenizer, accelerator)
train_dataloader = accelerator.prepare(train_dataloader)
for step, batch in enumerate(train_dataloader, start=1):
print(step)
accelerator.end_training()
if __name__ == "__main__":
main()
```
## Results expected
Being able to run the code for streamining datasets with multi-gpu
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.5.2
- Platform: linux
- Python version: 3.9.12
- PyArrow version: 9.0.0
@lhoestq I do not have any idea why this freezing happens, and I removed the streaming mode and this was working fine, so I know this is caused by streaming mode of the dataloader part not working well with multi-gpu setting. Since datasets are large, I hope to keep the streamining mode. I very much appreciate your help.
| 69 | datasets freezes with streaming mode in multiple-gpu
## Describe the bug
Hi. I am using this dataloader, which is for processing large datasets in streaming mode mentioned in one of examples of huggingface. I am using it to read c4: https://github.com/huggingface/transformers/blob/b48ac1a094e572d6076b46a9e4ed3e0ebe978afc/examples/research_projects/codeparrot/scripts/codeparrot_training.py#L22
During using multi-gpu in accelerator in one node, the code freezes, but works for 1 GPU:
```
10/16/2022 14:18:46 - INFO - datasets.info - Loading Dataset Infos from /home/jack/.cache/huggingface/modules/datasets_modules/datasets/c4/df532b158939272d032cc63ef19cd5b83e9b4d00c922b833e4cb18b2e9869b01
Steps: 0%| | 0/400000 [00:00<?, ?it/s]10/16/2022 14:18:47 - INFO - torch.utils.data.dataloader - Shared seed (135290893754684706) sent to store on rank 0
```
# Code to reproduce
please run this code with `accelerate launch code.py`
```
from accelerate import Accelerator
from accelerate.logging import get_logger
from datasets import load_dataset
from torch.utils.data.dataloader import DataLoader
import torch
from datasets import load_dataset
from transformers import AutoTokenizer
import torch
from accelerate.logging import get_logger
from torch.utils.data import IterableDataset
from torch.utils.data.datapipes.iter.combinatorics import ShufflerIterDataPipe
logger = get_logger(__name__)
class ConstantLengthDataset(IterableDataset):
"""
Iterable dataset that returns constant length chunks of tokens from stream of text files.
Args:
tokenizer (Tokenizer): The processor used for proccessing the data.
dataset (dataset.Dataset): Dataset with text files.
infinite (bool): If True the iterator is reset after dataset reaches end else stops.
max_seq_length (int): Length of token sequences to return.
num_of_sequences (int): Number of token sequences to keep in buffer.
chars_per_token (int): Number of characters per token used to estimate number of tokens in text buffer.
"""
def __init__(
self,
tokenizer,
dataset,
infinite=False,
max_seq_length=1024,
num_of_sequences=1024,
chars_per_token=3.6,
):
self.tokenizer = tokenizer
# self.concat_token_id = tokenizer.bos_token_id
self.dataset = dataset
self.max_seq_length = max_seq_length
self.epoch = 0
self.infinite = infinite
self.current_size = 0
self.max_buffer_size = max_seq_length * chars_per_token * num_of_sequences
self.content_field = "text"
def __iter__(self):
iterator = iter(self.dataset)
more_examples = True
while more_examples:
buffer, buffer_len = [], 0
while True:
if buffer_len >= self.max_buffer_size:
break
try:
buffer.append(next(iterator)[self.content_field])
buffer_len += len(buffer[-1])
except StopIteration:
if self.infinite:
iterator = iter(self.dataset)
self.epoch += 1
logger.info(f"Dataset epoch: {self.epoch}")
else:
more_examples = False
break
tokenized_inputs = self.tokenizer(buffer, truncation=False)["input_ids"]
all_token_ids = []
for tokenized_input in tokenized_inputs:
all_token_ids.extend(tokenized_input)
for i in range(0, len(all_token_ids), self.max_seq_length):
input_ids = all_token_ids[i : i + self.max_seq_length]
if len(input_ids) == self.max_seq_length:
self.current_size += 1
yield torch.tensor(input_ids)
def shuffle(self, buffer_size=1000):
return ShufflerIterDataPipe(self, buffer_size=buffer_size)
def create_dataloaders(tokenizer, accelerator):
ds_kwargs = {"streaming": True}
# In distributed training, the load_dataset function gaurantees that only one process
# can concurrently download the dataset.
datasets = load_dataset(
"c4",
"en",
cache_dir="cache_dir",
**ds_kwargs,
)
train_data, valid_data = datasets["train"], datasets["validation"]
with accelerator.main_process_first():
train_data = train_data.shuffle(buffer_size=10000, seed=None)
train_dataset = ConstantLengthDataset(
tokenizer,
train_data,
infinite=True,
max_seq_length=256,
)
valid_dataset = ConstantLengthDataset(
tokenizer,
valid_data,
infinite=False,
max_seq_length=256,
)
train_dataset = train_dataset.shuffle(buffer_size=10000)
train_dataloader = DataLoader(train_dataset, batch_size=160, shuffle=True)
eval_dataloader = DataLoader(valid_dataset, batch_size=160)
return train_dataloader, eval_dataloader
def main():
# Accelerator.
logging_dir = "data_save_dir/log"
accelerator = Accelerator(
gradient_accumulation_steps=1,
mixed_precision="bf16",
log_with="tensorboard",
logging_dir=logging_dir,
)
# We need to initialize the trackers we use, and also store our configuration.
# The trackers initializes automatically on the main process.
if accelerator.is_main_process:
accelerator.init_trackers("test")
tokenizer = AutoTokenizer.from_pretrained("bert-base-uncased")
# Load datasets and create dataloaders.
train_dataloader, _ = create_dataloaders(tokenizer, accelerator)
train_dataloader = accelerator.prepare(train_dataloader)
for step, batch in enumerate(train_dataloader, start=1):
print(step)
accelerator.end_training()
if __name__ == "__main__":
main()
```
## Results expected
Being able to run the code for streamining datasets with multi-gpu
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.5.2
- Platform: linux
- Python version: 3.9.12
- PyArrow version: 9.0.0
@lhoestq I do not have any idea why this freezing happens, and I removed the streaming mode and this was working fine, so I know this is caused by streaming mode of the dataloader part not working well with multi-gpu setting. Since datasets are large, I hope to keep the streamining mode. I very much appreciate your help.
Maybe the `fsspec` stuff need to be clearer even before - can you try to run this function at the very beginning of your script ?
```python
import fsspec
def _set_fsspec_for_multiprocess() -> None:
"""
Clear reference to the loop and thread.
This is necessary otherwise HTTPFileSystem hangs in the ML training loop.
Only required for fsspec >= 0.9.0
See https://github.com/fsspec/gcsfs/issues/379
"""
fsspec.asyn.iothread[0] = None
fsspec.asyn.loop[0] = None
_set_fsspec_for_multiprocess()
``` | [
-0.320170134305954,
-0.31651610136032104,
-0.039002928882837296,
0.4769468307495117,
0.32108551263809204,
-0.05959709361195564,
0.370758980512619,
-0.0028037503361701965,
0.29125797748565674,
0.27730265259742737,
-0.1412859410047531,
0.06606162339448929,
-0.1297413855791092,
0.389516144990921,
-0.02885536476969719,
0.019152846187353134,
0.14081059396266937,
-0.06935961544513702,
-0.05934390425682068,
0.09264911711215973,
0.19574815034866333,
0.28171306848526,
-0.03017459809780121,
-0.2807106375694275,
-0.3968455195426941,
0.006201479583978653,
0.08898560702800751,
0.05466218665242195,
0.16394278407096863,
-0.1528581976890564,
0.05657128989696503,
0.3212423622608185,
-0.1962885558605194,
0.6732676029205322,
-0.00011721457849489525,
0.05330623686313629,
0.18269649147987366,
-0.002833753824234009,
-0.21490003168582916,
-0.17322935163974762,
-0.002865813672542572,
0.06839033216238022,
0.14951622486114502,
0.04682282358407974,
-0.17401543259620667,
-0.0174991674721241,
-0.1881343424320221,
-0.6604426503181458,
0.164658784866333,
-0.042508333921432495,
0.09482607245445251,
0.4577403962612152,
-0.1465912163257599,
-0.06909176707267761,
-0.20002222061157227,
-0.039952024817466736,
-0.14591027796268463,
0.07709209620952606,
0.31674060225486755,
0.07274440675973892,
-0.27099719643592834,
0.40121567249298096,
0.12219187617301941,
-0.015591144561767578,
0.08307396620512009,
-0.14754250645637512,
-0.350762277841568,
-0.13338522613048553,
0.026910532265901566,
0.15082837641239166,
0.027056343853473663,
-0.3233974277973175,
-0.1601693481206894,
-0.22570520639419556,
0.10727719217538834,
-0.3284243941307068,
0.201379656791687,
0.11525953561067581,
-0.25809207558631897,
-0.21668508648872375,
-0.4963834583759308,
0.01326315850019455,
-0.08960461616516113,
0.06837072968482971,
-0.07536549866199493,
0.2995816469192505,
-0.2987593412399292,
0.22882121801376343,
0.38512924313545227,
0.29899197816848755,
-0.15710687637329102,
-0.19772954285144806,
-0.002054654061794281,
-0.2263694405555725,
-0.8506759405136108,
0.210271418094635,
-0.1854097545146942,
-0.024569854140281677,
0.1130077913403511,
0.212607279419899,
0.2809174656867981,
0.15809139609336853,
0.0683353990316391,
0.07589592784643173,
0.14983536303043365,
-0.02965284138917923,
-0.005833819508552551,
-0.20412547886371613,
0.43327707052230835,
0.4074971079826355,
-0.2626340985298157,
-0.06723201274871826,
-0.013328848406672478,
-0.10992640256881714,
-0.2989759147167206,
-0.1457396149635315,
-0.08084538578987122,
-0.07573612779378891,
-0.13559462130069733,
-0.009245884604752064,
-0.11118854582309723,
0.03931012004613876,
0.4182609021663666,
0.44486111402511597,
0.07055307179689407,
0.3420749604701996,
-0.18277500569820404,
0.05916411429643631,
-0.21634776890277863,
-0.44875651597976685,
-0.18320819735527039,
-0.2635971009731293,
-0.1491444855928421,
0.23651264607906342,
0.25286436080932617,
-0.6722689270973206,
-0.033016908913850784,
0.2876058518886566,
0.4721084237098694,
-0.1694207787513733,
0.1245342344045639,
-0.29843664169311523,
-0.05029793828725815,
0.17948129773139954,
0.14669935405254364,
0.4921897351741791,
0.1822681725025177,
-0.04350600764155388,
0.05512329190969467,
-0.11150530725717545,
-0.06791342049837112,
-0.0317845344543457,
0.30285823345184326,
0.11863456666469574,
0.07360691577196121,
0.18476532399654388,
-0.4126509726047516,
0.11747676134109497,
0.005819007754325867,
-0.1398874670267105,
0.27309441566467285,
-0.04221192002296448,
-0.0008702687919139862,
-0.14555160701274872,
0.23987773060798645,
0.5760335326194763,
0.12451320886611938,
-0.1120918020606041,
-0.0443904772400856,
-0.2915104925632477,
0.038571104407310486,
0.5202218294143677,
-0.17591074109077454,
-0.3686400055885315,
-0.28145554661750793,
0.045004233717918396,
-0.0261261984705925,
-0.23804381489753723,
-0.20734138786792755,
0.4822528064250946,
-0.3851122260093689,
0.30897125601768494,
0.4230332672595978,
0.10372115671634674,
0.12219540029764175,
-0.03825599327683449,
0.19279813766479492,
0.2943075895309448,
-0.00635366328060627,
0.1087382510304451,
-0.14604146778583527,
0.06424739956855774,
0.2653828561306,
0.016305286437273026,
-0.17548853158950806,
-0.300058513879776,
-0.07963960617780685,
-0.002100619487464428,
0.31338000297546387,
-0.16503708064556122,
0.17526975274085999,
0.41101473569869995,
0.04371234029531479,
-0.11278930306434631,
0.0510147362947464,
-0.18153807520866394,
-0.574967622756958,
0.29064786434173584,
0.2165021002292633,
-0.2392047941684723,
0.09127096086740494,
-0.1333739012479782,
0.23764142394065857,
-0.07981850951910019,
-0.3315660059452057,
-0.37471505999565125,
-0.032935481518507004,
0.20669057965278625,
0.09787946939468384,
0.1326659917831421,
-0.02257602848112583,
0.7143674492835999,
-0.1326308399438858,
0.1235450878739357,
-0.2603522539138794,
0.3782622218132019,
0.08834384381771088,
-0.25329169631004333,
-0.07439586520195007,
-0.11012204736471176,
0.06136968731880188,
-0.32795479893684387,
-0.14810338616371155,
0.46449926495552063,
0.09641259908676147,
0.5647338628768921,
-0.26063627004623413,
0.11943359673023224,
0.38852575421333313,
-0.19571395218372345,
0.0814359039068222,
0.17112208902835846,
0.1621701866388321,
-0.2649763822555542,
-0.04232949763536453,
0.3338702619075775,
-0.21187607944011688,
0.14005300402641296,
0.1394023895263672,
-0.1506596952676773,
-0.009420773014426231,
0.2594158947467804,
-0.048738256096839905,
0.06878665089607239,
0.3883502185344696,
0.025583820417523384,
0.44588765501976013,
-0.011565407738089561,
-0.4989607632160187,
0.1430942267179489,
0.3377918601036072,
0.263149231672287,
-0.1941157579421997,
-0.05033130943775177,
-0.33004245162010193,
-0.05804133415222168,
0.2738502323627472,
-0.07551849633455276,
0.3668179512023926,
0.11351387202739716,
-0.0034544579684734344,
-0.10172093659639359,
0.08031477779150009,
-0.2999836206436157,
0.17736758291721344,
0.10195215046405792,
0.1618015617132187,
0.2187531590461731,
0.1172676607966423,
-0.15939673781394958,
-0.15111970901489258,
-0.18575450778007507,
0.32863739132881165,
-0.033362001180648804,
-0.3298265337944031,
0.32112830877304077,
-0.34599485993385315,
-0.24143052101135254,
-0.1842232346534729,
-0.07266464829444885,
-0.4802292585372925,
-0.10746444016695023,
-0.31277281045913696,
0.4952528774738312,
0.031738463789224625,
0.128421813249588,
0.10595707595348358,
0.0028597861528396606,
0.23697461187839508,
0.022782154381275177,
-0.28592273592948914,
0.02397690713405609,
-0.1963951587677002,
-0.05390238016843796,
0.417086124420166,
-0.06987275928258896,
0.1014823466539383,
0.45332422852516174,
-0.1511560082435608,
-0.35475510358810425,
-0.1686646193265915,
0.07441732287406921,
-0.14645811915397644,
0.1020779237151146,
-0.11136025190353394,
0.1631530225276947,
-0.035169538110494614,
-0.11404077708721161,
0.19351963698863983,
-0.43751364946365356,
-0.08548972010612488,
0.271707683801651,
-0.035255592316389084,
0.1995011270046234,
-0.22854772210121155,
0.006123870611190796,
-0.24477176368236542,
-0.3657911419868469,
0.3497276306152344,
-0.2352394163608551,
-0.13698385655879974,
0.0765804722905159,
0.1583414375782013,
0.21081340312957764,
-0.03315375745296478,
-0.18436570465564728,
-0.12409546226263046,
-0.19303375482559204,
0.14701849222183228,
-0.019072476774454117,
-0.40133482217788696,
-0.244588240981102,
0.16984441876411438,
-0.0025123171508312225,
0.3933245539665222,
-0.31243571639060974,
0.16146600246429443,
-0.3194584548473358,
-0.0547042042016983,
0.05831800401210785,
-0.05197394639253616,
0.2204650342464447,
-0.2151278406381607,
-0.01358164194971323,
-0.11399076133966446,
-0.04376517981290817,
0.1658928543329239,
-0.13448747992515564,
-0.015818089246749878,
-0.11097333580255508,
0.34720727801322937,
0.3296865224838257,
0.45010387897491455,
0.21204568445682526,
-0.03832007572054863,
0.31824856996536255,
-0.07278018444776535,
0.21965815126895905,
0.049487050622701645,
-0.20635905861854553,
0.31881412863731384,
-0.1726091206073761,
-0.0045239925384521484,
-0.018886566162109375,
-0.19593185186386108,
-0.037774957716464996,
-0.22168457508087158,
0.14016085863113403,
0.18190330266952515,
-0.1656782031059265,
0.29752710461616516,
0.06558997929096222,
0.10472086071968079,
-0.17760330438613892,
0.05752391368150711,
0.07364991307258606,
-0.1482866108417511,
0.01676757074892521,
0.2895659804344177,
-0.26418378949165344,
-0.009687433950603008,
-0.3947683870792389,
0.02734026499092579,
-0.1826173961162567,
0.17090697586536407,
0.17284563183784485,
0.41673579812049866,
0.10159271955490112,
-0.06316328048706055,
0.09674377739429474,
-0.3232256770133972,
0.7259926795959473,
0.34981125593185425,
-0.13147538900375366,
0.09626911580562592,
-0.3811025321483612,
-0.2965686321258545,
0.03321569785475731,
-0.37280064821243286,
0.02045464515686035,
0.2718900442123413,
0.5440722703933716,
-0.2527817189693451,
-0.39522165060043335,
-0.19789808988571167,
0.03606124222278595,
-0.018301930278539658,
-0.05184583365917206,
-0.22067338228225708,
0.1025443896651268,
-0.2376442700624466,
0.2315637767314911,
0.10310465842485428,
0.058098215609788895,
-0.401311993598938,
-0.05811883881688118,
0.1250377595424652,
-0.2197563648223877,
0.12035338580608368,
0.06208226457238197,
0.1526395082473755,
-0.150322824716568,
0.2186867594718933,
0.35755452513694763,
0.054748568683862686,
0.23012283444404602,
0.1911984086036682,
0.31224650144577026,
-0.20272251963615417,
0.4371161460876465,
0.2170461118221283,
0.3125962018966675,
0.45868751406669617,
-0.07028362900018692,
0.49929025769233704,
0.10524245351552963,
0.30283230543136597,
-0.12995973229408264,
0.2632194757461548,
0.21913288533687592,
0.3468329608440399,
-0.3923860788345337,
-0.458741158246994,
0.3937756419181824,
0.004316641017794609,
0.20219282805919647,
0.6175047159194946,
0.12552914023399353,
-0.07383781671524048,
-0.1385607123374939,
-0.16125336289405823,
0.6028099060058594,
-0.06719326972961426,
0.3586098551750183,
0.20923885703086853,
-0.22055551409721375,
0.5054243206977844,
-0.5937470197677612,
0.19814899563789368,
-0.1506689190864563,
-0.41321611404418945,
0.018765492364764214,
-0.2010648548603058,
0.43172067403793335,
-0.12246599793434143,
-0.08273948729038239,
0.1873295158147812,
0.06535287201404572,
0.3014884293079376,
-0.1806645393371582,
0.3034682273864746,
-0.34839895367622375,
-0.41509413719177246,
-0.45341211557388306,
0.04850274324417114,
-0.12633726000785828,
0.13370546698570251,
0.09538030624389648,
-0.09765797853469849,
0.08964815735816956,
-0.02583513781428337,
-0.33737561106681824,
0.009162712842226028,
-0.6102495193481445,
0.00030599720776081085,
-0.04006807133555412,
-0.41945672035217285,
0.3332884609699249,
0.14806488156318665,
-0.09767547249794006,
-0.06345473229885101,
-0.062499530613422394,
0.1720711886882782,
-0.14119413495063782,
0.08674008399248123,
-0.10608958452939987,
-0.3329578936100006,
0.09485097229480743,
-0.009610209614038467,
-0.1025252491235733,
0.19989141821861267,
0.09746816009283066,
-0.13958975672721863,
0.36389291286468506,
0.1336819976568222,
-0.15619789063930511,
0.058961160480976105,
-0.06450261175632477,
0.08951372653245926,
0.08699853718280792,
-0.274768590927124,
0.019831059500575066,
0.06901092082262039,
-0.17514300346374512,
-0.20943623781204224,
0.018488068133592606,
0.02346118539571762,
-0.20378780364990234,
0.7961738109588623,
-0.06900791078805923,
-0.22404277324676514,
0.346279114484787,
0.4273766875267029,
-0.10663463920354843,
-0.23933950066566467,
-0.02573203667998314,
0.3107742965221405,
-0.23372137546539307,
0.14335303008556366,
-0.3001023232936859,
-0.16458454728126526,
0.17259564995765686,
-0.0007974468171596527,
-0.017555326223373413,
-0.09870066493749619,
0.014036621898412704,
-0.3685116767883301,
-0.41476279497146606,
-0.05516313016414642,
-0.1779431700706482,
0.08709278702735901,
0.1761348843574524,
0.26979830861091614,
-0.0006913729012012482,
0.3773987293243408,
-0.2025117576122284,
-0.019583584740757942,
-0.1402473747730255,
-0.12250952422618866,
0.20925326645374298,
-0.1959984004497528,
0.3830168843269348,
-0.02707037702202797,
0.057350680232048035,
0.36506521701812744,
-0.05137687176465988,
-0.11634066700935364,
-0.1765683889389038,
0.11344491690397263,
-0.05546925961971283,
-0.08208806067705154,
0.028041504323482513,
-0.10280346870422363,
-0.12126904726028442,
-0.09933386743068695,
0.6700537800788879,
0.13897347450256348,
0.006425827741622925,
-0.20907703042030334,
0.19417019188404083,
0.010862313210964203,
-0.3726525902748108,
0.018590690568089485,
-0.19535791873931885,
-0.15798620879650116,
0.3542337119579315,
0.03664272651076317,
0.04119914397597313,
-0.0052753835916519165,
-0.4814819395542145,
-0.0036610066890716553,
0.34902793169021606,
0.08964759111404419,
0.21850088238716125,
-0.23463983833789825,
-0.14610576629638672,
-0.12128204107284546,
0.3502779006958008,
0.360932320356369,
-0.14266851544380188,
-0.1517164260149002,
0.0793684720993042,
0.05996345728635788,
-0.0272354893386364,
-0.00409953435882926,
-0.19534257054328918,
0.018120858818292618,
0.08164803683757782,
0.2565746009349823,
0.3063749670982361,
0.1292659491300583,
-0.06028912961483002,
0.2432013750076294,
0.10289052873849869,
0.1693509817123413,
0.2773444354534149,
-0.2257394790649414,
0.10426411032676697,
0.15127182006835938,
0.09524668753147125,
0.10445536673069,
-0.0252470001578331,
0.20106996595859528,
-0.13846591114997864,
0.27362290024757385,
0.1747645139694214,
0.1947527378797531,
0.14683261513710022,
-0.5698386430740356,
-0.39714014530181885,
0.09334786236286163,
-0.5674176216125488,
0.2225762903690338,
-0.1508185863494873,
0.43626347184181213,
-0.37798917293548584,
-0.21522557735443115,
-0.2594103515148163,
0.2358933687210083,
-0.23646557331085205,
0.037227656692266464,
0.19985072314739227,
-0.19495229423046112,
-0.23551325500011444,
0.17674444615840912,
-0.008310437202453613,
0.11880853772163391,
0.3892444372177124,
0.27836593985557556,
0.06494555622339249,
-0.3253641128540039,
-0.2908581495285034,
0.2944503128528595,
0.19019469618797302,
-0.12471812963485718,
0.39426568150520325,
0.4062999486923218,
-0.1472921222448349,
-0.012048386037349701,
-0.023800252005457878,
0.32988008856773376,
0.0258270725607872,
0.14542289078235626,
0.15760761499404907,
0.11603793501853943,
0.004418214783072472,
0.18759657442569733,
0.11953715234994888,
0.31844618916511536,
0.16899079084396362,
0.2034032940864563,
0.06254585087299347,
-0.1343478560447693,
-0.23187832534313202,
0.013515152037143707,
0.10823354125022888,
-0.590876042842865,
0.2150617092847824,
-0.35296428203582764,
0.04865726828575134,
-0.2588043808937073,
-0.12347038835287094,
-0.4918266534805298,
0.09293932467699051,
0.3377533257007599,
-0.18807686865329742,
0.0020675640553236008,
-0.10834556818008423,
0.029926974326372147,
0.33757779002189636,
0.7586604356765747,
0.01931166648864746,
-0.11100371927022934,
-0.22932112216949463,
-0.478585422039032,
-0.5296587944030762,
0.13045765459537506,
-0.04465487226843834,
0.19258005917072296,
-0.1350322663784027,
0.27857139706611633,
0.11657805740833282,
0.037997134029865265,
0.17734764516353607,
0.11425752937793732,
0.2575359344482422,
0.19555732607841492,
-0.5474047660827637,
0.0003874190151691437,
-0.28104811906814575,
-0.06977588683366776,
0.049724288284778595,
-0.08641490340232849,
0.3129313588142395,
0.23635233938694,
-0.0038938522338867188,
-0.12754181027412415,
0.19530734419822693,
-0.061308834701776505,
-0.16843582689762115,
0.07537266612052917,
0.022778604179620743,
0.3318895697593689,
0.11260268837213516,
-0.21790336072444916,
-0.20115309953689575,
0.13193413615226746,
-0.07558852434158325,
-0.15963539481163025,
-0.016645856201648712,
0.42679429054260254,
-0.0568099170923233,
-0.26696422696113586,
-0.4690762460231781,
0.5127025842666626,
0.12184463441371918,
-0.17341481149196625,
-0.20301532745361328,
0.2121679037809372,
-0.10536829382181168,
0.23657311499118805,
0.397504597902298,
0.7369195222854614,
0.0757630318403244,
-0.07086829841136932,
-0.34009864926338196,
-0.24795030057430267,
0.29750362038612366,
-0.5315229296684265,
-0.2666740119457245,
-0.20205818116664886,
0.28316405415534973,
0.29716551303863525,
0.09927716851234436,
-0.5282416343688965,
0.1667773425579071,
0.10719551146030426,
-0.1955672800540924,
-0.216616690158844,
0.14678995311260223,
-0.11242125928401947,
-0.07235011458396912,
-0.09623309969902039,
0.17933863401412964,
0.3893272578716278,
-0.20760643482208252,
0.24392300844192505,
-0.09752305597066879
] |
https://github.com/huggingface/datasets/issues/5123 | datasets freezes with streaming mode in multiple-gpu | Hi @lhoestq
thank you. I tried it, I am getting `AttributeError: module 'fsspec' has no attribute 'asyn'`. which version of fsspect do you use?
I am using
```fsspec 2022.8.2 pypi_0 pypi```
thank you. | ## Describe the bug
Hi. I am using this dataloader, which is for processing large datasets in streaming mode mentioned in one of examples of huggingface. I am using it to read c4: https://github.com/huggingface/transformers/blob/b48ac1a094e572d6076b46a9e4ed3e0ebe978afc/examples/research_projects/codeparrot/scripts/codeparrot_training.py#L22
During using multi-gpu in accelerator in one node, the code freezes, but works for 1 GPU:
```
10/16/2022 14:18:46 - INFO - datasets.info - Loading Dataset Infos from /home/jack/.cache/huggingface/modules/datasets_modules/datasets/c4/df532b158939272d032cc63ef19cd5b83e9b4d00c922b833e4cb18b2e9869b01
Steps: 0%| | 0/400000 [00:00<?, ?it/s]10/16/2022 14:18:47 - INFO - torch.utils.data.dataloader - Shared seed (135290893754684706) sent to store on rank 0
```
# Code to reproduce
please run this code with `accelerate launch code.py`
```
from accelerate import Accelerator
from accelerate.logging import get_logger
from datasets import load_dataset
from torch.utils.data.dataloader import DataLoader
import torch
from datasets import load_dataset
from transformers import AutoTokenizer
import torch
from accelerate.logging import get_logger
from torch.utils.data import IterableDataset
from torch.utils.data.datapipes.iter.combinatorics import ShufflerIterDataPipe
logger = get_logger(__name__)
class ConstantLengthDataset(IterableDataset):
"""
Iterable dataset that returns constant length chunks of tokens from stream of text files.
Args:
tokenizer (Tokenizer): The processor used for proccessing the data.
dataset (dataset.Dataset): Dataset with text files.
infinite (bool): If True the iterator is reset after dataset reaches end else stops.
max_seq_length (int): Length of token sequences to return.
num_of_sequences (int): Number of token sequences to keep in buffer.
chars_per_token (int): Number of characters per token used to estimate number of tokens in text buffer.
"""
def __init__(
self,
tokenizer,
dataset,
infinite=False,
max_seq_length=1024,
num_of_sequences=1024,
chars_per_token=3.6,
):
self.tokenizer = tokenizer
# self.concat_token_id = tokenizer.bos_token_id
self.dataset = dataset
self.max_seq_length = max_seq_length
self.epoch = 0
self.infinite = infinite
self.current_size = 0
self.max_buffer_size = max_seq_length * chars_per_token * num_of_sequences
self.content_field = "text"
def __iter__(self):
iterator = iter(self.dataset)
more_examples = True
while more_examples:
buffer, buffer_len = [], 0
while True:
if buffer_len >= self.max_buffer_size:
break
try:
buffer.append(next(iterator)[self.content_field])
buffer_len += len(buffer[-1])
except StopIteration:
if self.infinite:
iterator = iter(self.dataset)
self.epoch += 1
logger.info(f"Dataset epoch: {self.epoch}")
else:
more_examples = False
break
tokenized_inputs = self.tokenizer(buffer, truncation=False)["input_ids"]
all_token_ids = []
for tokenized_input in tokenized_inputs:
all_token_ids.extend(tokenized_input)
for i in range(0, len(all_token_ids), self.max_seq_length):
input_ids = all_token_ids[i : i + self.max_seq_length]
if len(input_ids) == self.max_seq_length:
self.current_size += 1
yield torch.tensor(input_ids)
def shuffle(self, buffer_size=1000):
return ShufflerIterDataPipe(self, buffer_size=buffer_size)
def create_dataloaders(tokenizer, accelerator):
ds_kwargs = {"streaming": True}
# In distributed training, the load_dataset function gaurantees that only one process
# can concurrently download the dataset.
datasets = load_dataset(
"c4",
"en",
cache_dir="cache_dir",
**ds_kwargs,
)
train_data, valid_data = datasets["train"], datasets["validation"]
with accelerator.main_process_first():
train_data = train_data.shuffle(buffer_size=10000, seed=None)
train_dataset = ConstantLengthDataset(
tokenizer,
train_data,
infinite=True,
max_seq_length=256,
)
valid_dataset = ConstantLengthDataset(
tokenizer,
valid_data,
infinite=False,
max_seq_length=256,
)
train_dataset = train_dataset.shuffle(buffer_size=10000)
train_dataloader = DataLoader(train_dataset, batch_size=160, shuffle=True)
eval_dataloader = DataLoader(valid_dataset, batch_size=160)
return train_dataloader, eval_dataloader
def main():
# Accelerator.
logging_dir = "data_save_dir/log"
accelerator = Accelerator(
gradient_accumulation_steps=1,
mixed_precision="bf16",
log_with="tensorboard",
logging_dir=logging_dir,
)
# We need to initialize the trackers we use, and also store our configuration.
# The trackers initializes automatically on the main process.
if accelerator.is_main_process:
accelerator.init_trackers("test")
tokenizer = AutoTokenizer.from_pretrained("bert-base-uncased")
# Load datasets and create dataloaders.
train_dataloader, _ = create_dataloaders(tokenizer, accelerator)
train_dataloader = accelerator.prepare(train_dataloader)
for step, batch in enumerate(train_dataloader, start=1):
print(step)
accelerator.end_training()
if __name__ == "__main__":
main()
```
## Results expected
Being able to run the code for streamining datasets with multi-gpu
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.5.2
- Platform: linux
- Python version: 3.9.12
- PyArrow version: 9.0.0
@lhoestq I do not have any idea why this freezing happens, and I removed the streaming mode and this was working fine, so I know this is caused by streaming mode of the dataloader part not working well with multi-gpu setting. Since datasets are large, I hope to keep the streamining mode. I very much appreciate your help.
| 33 | datasets freezes with streaming mode in multiple-gpu
## Describe the bug
Hi. I am using this dataloader, which is for processing large datasets in streaming mode mentioned in one of examples of huggingface. I am using it to read c4: https://github.com/huggingface/transformers/blob/b48ac1a094e572d6076b46a9e4ed3e0ebe978afc/examples/research_projects/codeparrot/scripts/codeparrot_training.py#L22
During using multi-gpu in accelerator in one node, the code freezes, but works for 1 GPU:
```
10/16/2022 14:18:46 - INFO - datasets.info - Loading Dataset Infos from /home/jack/.cache/huggingface/modules/datasets_modules/datasets/c4/df532b158939272d032cc63ef19cd5b83e9b4d00c922b833e4cb18b2e9869b01
Steps: 0%| | 0/400000 [00:00<?, ?it/s]10/16/2022 14:18:47 - INFO - torch.utils.data.dataloader - Shared seed (135290893754684706) sent to store on rank 0
```
# Code to reproduce
please run this code with `accelerate launch code.py`
```
from accelerate import Accelerator
from accelerate.logging import get_logger
from datasets import load_dataset
from torch.utils.data.dataloader import DataLoader
import torch
from datasets import load_dataset
from transformers import AutoTokenizer
import torch
from accelerate.logging import get_logger
from torch.utils.data import IterableDataset
from torch.utils.data.datapipes.iter.combinatorics import ShufflerIterDataPipe
logger = get_logger(__name__)
class ConstantLengthDataset(IterableDataset):
"""
Iterable dataset that returns constant length chunks of tokens from stream of text files.
Args:
tokenizer (Tokenizer): The processor used for proccessing the data.
dataset (dataset.Dataset): Dataset with text files.
infinite (bool): If True the iterator is reset after dataset reaches end else stops.
max_seq_length (int): Length of token sequences to return.
num_of_sequences (int): Number of token sequences to keep in buffer.
chars_per_token (int): Number of characters per token used to estimate number of tokens in text buffer.
"""
def __init__(
self,
tokenizer,
dataset,
infinite=False,
max_seq_length=1024,
num_of_sequences=1024,
chars_per_token=3.6,
):
self.tokenizer = tokenizer
# self.concat_token_id = tokenizer.bos_token_id
self.dataset = dataset
self.max_seq_length = max_seq_length
self.epoch = 0
self.infinite = infinite
self.current_size = 0
self.max_buffer_size = max_seq_length * chars_per_token * num_of_sequences
self.content_field = "text"
def __iter__(self):
iterator = iter(self.dataset)
more_examples = True
while more_examples:
buffer, buffer_len = [], 0
while True:
if buffer_len >= self.max_buffer_size:
break
try:
buffer.append(next(iterator)[self.content_field])
buffer_len += len(buffer[-1])
except StopIteration:
if self.infinite:
iterator = iter(self.dataset)
self.epoch += 1
logger.info(f"Dataset epoch: {self.epoch}")
else:
more_examples = False
break
tokenized_inputs = self.tokenizer(buffer, truncation=False)["input_ids"]
all_token_ids = []
for tokenized_input in tokenized_inputs:
all_token_ids.extend(tokenized_input)
for i in range(0, len(all_token_ids), self.max_seq_length):
input_ids = all_token_ids[i : i + self.max_seq_length]
if len(input_ids) == self.max_seq_length:
self.current_size += 1
yield torch.tensor(input_ids)
def shuffle(self, buffer_size=1000):
return ShufflerIterDataPipe(self, buffer_size=buffer_size)
def create_dataloaders(tokenizer, accelerator):
ds_kwargs = {"streaming": True}
# In distributed training, the load_dataset function gaurantees that only one process
# can concurrently download the dataset.
datasets = load_dataset(
"c4",
"en",
cache_dir="cache_dir",
**ds_kwargs,
)
train_data, valid_data = datasets["train"], datasets["validation"]
with accelerator.main_process_first():
train_data = train_data.shuffle(buffer_size=10000, seed=None)
train_dataset = ConstantLengthDataset(
tokenizer,
train_data,
infinite=True,
max_seq_length=256,
)
valid_dataset = ConstantLengthDataset(
tokenizer,
valid_data,
infinite=False,
max_seq_length=256,
)
train_dataset = train_dataset.shuffle(buffer_size=10000)
train_dataloader = DataLoader(train_dataset, batch_size=160, shuffle=True)
eval_dataloader = DataLoader(valid_dataset, batch_size=160)
return train_dataloader, eval_dataloader
def main():
# Accelerator.
logging_dir = "data_save_dir/log"
accelerator = Accelerator(
gradient_accumulation_steps=1,
mixed_precision="bf16",
log_with="tensorboard",
logging_dir=logging_dir,
)
# We need to initialize the trackers we use, and also store our configuration.
# The trackers initializes automatically on the main process.
if accelerator.is_main_process:
accelerator.init_trackers("test")
tokenizer = AutoTokenizer.from_pretrained("bert-base-uncased")
# Load datasets and create dataloaders.
train_dataloader, _ = create_dataloaders(tokenizer, accelerator)
train_dataloader = accelerator.prepare(train_dataloader)
for step, batch in enumerate(train_dataloader, start=1):
print(step)
accelerator.end_training()
if __name__ == "__main__":
main()
```
## Results expected
Being able to run the code for streamining datasets with multi-gpu
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.5.2
- Platform: linux
- Python version: 3.9.12
- PyArrow version: 9.0.0
@lhoestq I do not have any idea why this freezing happens, and I removed the streaming mode and this was working fine, so I know this is caused by streaming mode of the dataloader part not working well with multi-gpu setting. Since datasets are large, I hope to keep the streamining mode. I very much appreciate your help.
Hi @lhoestq
thank you. I tried it, I am getting `AttributeError: module 'fsspec' has no attribute 'asyn'`. which version of fsspect do you use?
I am using
```fsspec 2022.8.2 pypi_0 pypi```
thank you. | [
-0.320170134305954,
-0.31651610136032104,
-0.039002928882837296,
0.4769468307495117,
0.32108551263809204,
-0.05959709361195564,
0.370758980512619,
-0.0028037503361701965,
0.29125797748565674,
0.27730265259742737,
-0.1412859410047531,
0.06606162339448929,
-0.1297413855791092,
0.389516144990921,
-0.02885536476969719,
0.019152846187353134,
0.14081059396266937,
-0.06935961544513702,
-0.05934390425682068,
0.09264911711215973,
0.19574815034866333,
0.28171306848526,
-0.03017459809780121,
-0.2807106375694275,
-0.3968455195426941,
0.006201479583978653,
0.08898560702800751,
0.05466218665242195,
0.16394278407096863,
-0.1528581976890564,
0.05657128989696503,
0.3212423622608185,
-0.1962885558605194,
0.6732676029205322,
-0.00011721457849489525,
0.05330623686313629,
0.18269649147987366,
-0.002833753824234009,
-0.21490003168582916,
-0.17322935163974762,
-0.002865813672542572,
0.06839033216238022,
0.14951622486114502,
0.04682282358407974,
-0.17401543259620667,
-0.0174991674721241,
-0.1881343424320221,
-0.6604426503181458,
0.164658784866333,
-0.042508333921432495,
0.09482607245445251,
0.4577403962612152,
-0.1465912163257599,
-0.06909176707267761,
-0.20002222061157227,
-0.039952024817466736,
-0.14591027796268463,
0.07709209620952606,
0.31674060225486755,
0.07274440675973892,
-0.27099719643592834,
0.40121567249298096,
0.12219187617301941,
-0.015591144561767578,
0.08307396620512009,
-0.14754250645637512,
-0.350762277841568,
-0.13338522613048553,
0.026910532265901566,
0.15082837641239166,
0.027056343853473663,
-0.3233974277973175,
-0.1601693481206894,
-0.22570520639419556,
0.10727719217538834,
-0.3284243941307068,
0.201379656791687,
0.11525953561067581,
-0.25809207558631897,
-0.21668508648872375,
-0.4963834583759308,
0.01326315850019455,
-0.08960461616516113,
0.06837072968482971,
-0.07536549866199493,
0.2995816469192505,
-0.2987593412399292,
0.22882121801376343,
0.38512924313545227,
0.29899197816848755,
-0.15710687637329102,
-0.19772954285144806,
-0.002054654061794281,
-0.2263694405555725,
-0.8506759405136108,
0.210271418094635,
-0.1854097545146942,
-0.024569854140281677,
0.1130077913403511,
0.212607279419899,
0.2809174656867981,
0.15809139609336853,
0.0683353990316391,
0.07589592784643173,
0.14983536303043365,
-0.02965284138917923,
-0.005833819508552551,
-0.20412547886371613,
0.43327707052230835,
0.4074971079826355,
-0.2626340985298157,
-0.06723201274871826,
-0.013328848406672478,
-0.10992640256881714,
-0.2989759147167206,
-0.1457396149635315,
-0.08084538578987122,
-0.07573612779378891,
-0.13559462130069733,
-0.009245884604752064,
-0.11118854582309723,
0.03931012004613876,
0.4182609021663666,
0.44486111402511597,
0.07055307179689407,
0.3420749604701996,
-0.18277500569820404,
0.05916411429643631,
-0.21634776890277863,
-0.44875651597976685,
-0.18320819735527039,
-0.2635971009731293,
-0.1491444855928421,
0.23651264607906342,
0.25286436080932617,
-0.6722689270973206,
-0.033016908913850784,
0.2876058518886566,
0.4721084237098694,
-0.1694207787513733,
0.1245342344045639,
-0.29843664169311523,
-0.05029793828725815,
0.17948129773139954,
0.14669935405254364,
0.4921897351741791,
0.1822681725025177,
-0.04350600764155388,
0.05512329190969467,
-0.11150530725717545,
-0.06791342049837112,
-0.0317845344543457,
0.30285823345184326,
0.11863456666469574,
0.07360691577196121,
0.18476532399654388,
-0.4126509726047516,
0.11747676134109497,
0.005819007754325867,
-0.1398874670267105,
0.27309441566467285,
-0.04221192002296448,
-0.0008702687919139862,
-0.14555160701274872,
0.23987773060798645,
0.5760335326194763,
0.12451320886611938,
-0.1120918020606041,
-0.0443904772400856,
-0.2915104925632477,
0.038571104407310486,
0.5202218294143677,
-0.17591074109077454,
-0.3686400055885315,
-0.28145554661750793,
0.045004233717918396,
-0.0261261984705925,
-0.23804381489753723,
-0.20734138786792755,
0.4822528064250946,
-0.3851122260093689,
0.30897125601768494,
0.4230332672595978,
0.10372115671634674,
0.12219540029764175,
-0.03825599327683449,
0.19279813766479492,
0.2943075895309448,
-0.00635366328060627,
0.1087382510304451,
-0.14604146778583527,
0.06424739956855774,
0.2653828561306,
0.016305286437273026,
-0.17548853158950806,
-0.300058513879776,
-0.07963960617780685,
-0.002100619487464428,
0.31338000297546387,
-0.16503708064556122,
0.17526975274085999,
0.41101473569869995,
0.04371234029531479,
-0.11278930306434631,
0.0510147362947464,
-0.18153807520866394,
-0.574967622756958,
0.29064786434173584,
0.2165021002292633,
-0.2392047941684723,
0.09127096086740494,
-0.1333739012479782,
0.23764142394065857,
-0.07981850951910019,
-0.3315660059452057,
-0.37471505999565125,
-0.032935481518507004,
0.20669057965278625,
0.09787946939468384,
0.1326659917831421,
-0.02257602848112583,
0.7143674492835999,
-0.1326308399438858,
0.1235450878739357,
-0.2603522539138794,
0.3782622218132019,
0.08834384381771088,
-0.25329169631004333,
-0.07439586520195007,
-0.11012204736471176,
0.06136968731880188,
-0.32795479893684387,
-0.14810338616371155,
0.46449926495552063,
0.09641259908676147,
0.5647338628768921,
-0.26063627004623413,
0.11943359673023224,
0.38852575421333313,
-0.19571395218372345,
0.0814359039068222,
0.17112208902835846,
0.1621701866388321,
-0.2649763822555542,
-0.04232949763536453,
0.3338702619075775,
-0.21187607944011688,
0.14005300402641296,
0.1394023895263672,
-0.1506596952676773,
-0.009420773014426231,
0.2594158947467804,
-0.048738256096839905,
0.06878665089607239,
0.3883502185344696,
0.025583820417523384,
0.44588765501976013,
-0.011565407738089561,
-0.4989607632160187,
0.1430942267179489,
0.3377918601036072,
0.263149231672287,
-0.1941157579421997,
-0.05033130943775177,
-0.33004245162010193,
-0.05804133415222168,
0.2738502323627472,
-0.07551849633455276,
0.3668179512023926,
0.11351387202739716,
-0.0034544579684734344,
-0.10172093659639359,
0.08031477779150009,
-0.2999836206436157,
0.17736758291721344,
0.10195215046405792,
0.1618015617132187,
0.2187531590461731,
0.1172676607966423,
-0.15939673781394958,
-0.15111970901489258,
-0.18575450778007507,
0.32863739132881165,
-0.033362001180648804,
-0.3298265337944031,
0.32112830877304077,
-0.34599485993385315,
-0.24143052101135254,
-0.1842232346534729,
-0.07266464829444885,
-0.4802292585372925,
-0.10746444016695023,
-0.31277281045913696,
0.4952528774738312,
0.031738463789224625,
0.128421813249588,
0.10595707595348358,
0.0028597861528396606,
0.23697461187839508,
0.022782154381275177,
-0.28592273592948914,
0.02397690713405609,
-0.1963951587677002,
-0.05390238016843796,
0.417086124420166,
-0.06987275928258896,
0.1014823466539383,
0.45332422852516174,
-0.1511560082435608,
-0.35475510358810425,
-0.1686646193265915,
0.07441732287406921,
-0.14645811915397644,
0.1020779237151146,
-0.11136025190353394,
0.1631530225276947,
-0.035169538110494614,
-0.11404077708721161,
0.19351963698863983,
-0.43751364946365356,
-0.08548972010612488,
0.271707683801651,
-0.035255592316389084,
0.1995011270046234,
-0.22854772210121155,
0.006123870611190796,
-0.24477176368236542,
-0.3657911419868469,
0.3497276306152344,
-0.2352394163608551,
-0.13698385655879974,
0.0765804722905159,
0.1583414375782013,
0.21081340312957764,
-0.03315375745296478,
-0.18436570465564728,
-0.12409546226263046,
-0.19303375482559204,
0.14701849222183228,
-0.019072476774454117,
-0.40133482217788696,
-0.244588240981102,
0.16984441876411438,
-0.0025123171508312225,
0.3933245539665222,
-0.31243571639060974,
0.16146600246429443,
-0.3194584548473358,
-0.0547042042016983,
0.05831800401210785,
-0.05197394639253616,
0.2204650342464447,
-0.2151278406381607,
-0.01358164194971323,
-0.11399076133966446,
-0.04376517981290817,
0.1658928543329239,
-0.13448747992515564,
-0.015818089246749878,
-0.11097333580255508,
0.34720727801322937,
0.3296865224838257,
0.45010387897491455,
0.21204568445682526,
-0.03832007572054863,
0.31824856996536255,
-0.07278018444776535,
0.21965815126895905,
0.049487050622701645,
-0.20635905861854553,
0.31881412863731384,
-0.1726091206073761,
-0.0045239925384521484,
-0.018886566162109375,
-0.19593185186386108,
-0.037774957716464996,
-0.22168457508087158,
0.14016085863113403,
0.18190330266952515,
-0.1656782031059265,
0.29752710461616516,
0.06558997929096222,
0.10472086071968079,
-0.17760330438613892,
0.05752391368150711,
0.07364991307258606,
-0.1482866108417511,
0.01676757074892521,
0.2895659804344177,
-0.26418378949165344,
-0.009687433950603008,
-0.3947683870792389,
0.02734026499092579,
-0.1826173961162567,
0.17090697586536407,
0.17284563183784485,
0.41673579812049866,
0.10159271955490112,
-0.06316328048706055,
0.09674377739429474,
-0.3232256770133972,
0.7259926795959473,
0.34981125593185425,
-0.13147538900375366,
0.09626911580562592,
-0.3811025321483612,
-0.2965686321258545,
0.03321569785475731,
-0.37280064821243286,
0.02045464515686035,
0.2718900442123413,
0.5440722703933716,
-0.2527817189693451,
-0.39522165060043335,
-0.19789808988571167,
0.03606124222278595,
-0.018301930278539658,
-0.05184583365917206,
-0.22067338228225708,
0.1025443896651268,
-0.2376442700624466,
0.2315637767314911,
0.10310465842485428,
0.058098215609788895,
-0.401311993598938,
-0.05811883881688118,
0.1250377595424652,
-0.2197563648223877,
0.12035338580608368,
0.06208226457238197,
0.1526395082473755,
-0.150322824716568,
0.2186867594718933,
0.35755452513694763,
0.054748568683862686,
0.23012283444404602,
0.1911984086036682,
0.31224650144577026,
-0.20272251963615417,
0.4371161460876465,
0.2170461118221283,
0.3125962018966675,
0.45868751406669617,
-0.07028362900018692,
0.49929025769233704,
0.10524245351552963,
0.30283230543136597,
-0.12995973229408264,
0.2632194757461548,
0.21913288533687592,
0.3468329608440399,
-0.3923860788345337,
-0.458741158246994,
0.3937756419181824,
0.004316641017794609,
0.20219282805919647,
0.6175047159194946,
0.12552914023399353,
-0.07383781671524048,
-0.1385607123374939,
-0.16125336289405823,
0.6028099060058594,
-0.06719326972961426,
0.3586098551750183,
0.20923885703086853,
-0.22055551409721375,
0.5054243206977844,
-0.5937470197677612,
0.19814899563789368,
-0.1506689190864563,
-0.41321611404418945,
0.018765492364764214,
-0.2010648548603058,
0.43172067403793335,
-0.12246599793434143,
-0.08273948729038239,
0.1873295158147812,
0.06535287201404572,
0.3014884293079376,
-0.1806645393371582,
0.3034682273864746,
-0.34839895367622375,
-0.41509413719177246,
-0.45341211557388306,
0.04850274324417114,
-0.12633726000785828,
0.13370546698570251,
0.09538030624389648,
-0.09765797853469849,
0.08964815735816956,
-0.02583513781428337,
-0.33737561106681824,
0.009162712842226028,
-0.6102495193481445,
0.00030599720776081085,
-0.04006807133555412,
-0.41945672035217285,
0.3332884609699249,
0.14806488156318665,
-0.09767547249794006,
-0.06345473229885101,
-0.062499530613422394,
0.1720711886882782,
-0.14119413495063782,
0.08674008399248123,
-0.10608958452939987,
-0.3329578936100006,
0.09485097229480743,
-0.009610209614038467,
-0.1025252491235733,
0.19989141821861267,
0.09746816009283066,
-0.13958975672721863,
0.36389291286468506,
0.1336819976568222,
-0.15619789063930511,
0.058961160480976105,
-0.06450261175632477,
0.08951372653245926,
0.08699853718280792,
-0.274768590927124,
0.019831059500575066,
0.06901092082262039,
-0.17514300346374512,
-0.20943623781204224,
0.018488068133592606,
0.02346118539571762,
-0.20378780364990234,
0.7961738109588623,
-0.06900791078805923,
-0.22404277324676514,
0.346279114484787,
0.4273766875267029,
-0.10663463920354843,
-0.23933950066566467,
-0.02573203667998314,
0.3107742965221405,
-0.23372137546539307,
0.14335303008556366,
-0.3001023232936859,
-0.16458454728126526,
0.17259564995765686,
-0.0007974468171596527,
-0.017555326223373413,
-0.09870066493749619,
0.014036621898412704,
-0.3685116767883301,
-0.41476279497146606,
-0.05516313016414642,
-0.1779431700706482,
0.08709278702735901,
0.1761348843574524,
0.26979830861091614,
-0.0006913729012012482,
0.3773987293243408,
-0.2025117576122284,
-0.019583584740757942,
-0.1402473747730255,
-0.12250952422618866,
0.20925326645374298,
-0.1959984004497528,
0.3830168843269348,
-0.02707037702202797,
0.057350680232048035,
0.36506521701812744,
-0.05137687176465988,
-0.11634066700935364,
-0.1765683889389038,
0.11344491690397263,
-0.05546925961971283,
-0.08208806067705154,
0.028041504323482513,
-0.10280346870422363,
-0.12126904726028442,
-0.09933386743068695,
0.6700537800788879,
0.13897347450256348,
0.006425827741622925,
-0.20907703042030334,
0.19417019188404083,
0.010862313210964203,
-0.3726525902748108,
0.018590690568089485,
-0.19535791873931885,
-0.15798620879650116,
0.3542337119579315,
0.03664272651076317,
0.04119914397597313,
-0.0052753835916519165,
-0.4814819395542145,
-0.0036610066890716553,
0.34902793169021606,
0.08964759111404419,
0.21850088238716125,
-0.23463983833789825,
-0.14610576629638672,
-0.12128204107284546,
0.3502779006958008,
0.360932320356369,
-0.14266851544380188,
-0.1517164260149002,
0.0793684720993042,
0.05996345728635788,
-0.0272354893386364,
-0.00409953435882926,
-0.19534257054328918,
0.018120858818292618,
0.08164803683757782,
0.2565746009349823,
0.3063749670982361,
0.1292659491300583,
-0.06028912961483002,
0.2432013750076294,
0.10289052873849869,
0.1693509817123413,
0.2773444354534149,
-0.2257394790649414,
0.10426411032676697,
0.15127182006835938,
0.09524668753147125,
0.10445536673069,
-0.0252470001578331,
0.20106996595859528,
-0.13846591114997864,
0.27362290024757385,
0.1747645139694214,
0.1947527378797531,
0.14683261513710022,
-0.5698386430740356,
-0.39714014530181885,
0.09334786236286163,
-0.5674176216125488,
0.2225762903690338,
-0.1508185863494873,
0.43626347184181213,
-0.37798917293548584,
-0.21522557735443115,
-0.2594103515148163,
0.2358933687210083,
-0.23646557331085205,
0.037227656692266464,
0.19985072314739227,
-0.19495229423046112,
-0.23551325500011444,
0.17674444615840912,
-0.008310437202453613,
0.11880853772163391,
0.3892444372177124,
0.27836593985557556,
0.06494555622339249,
-0.3253641128540039,
-0.2908581495285034,
0.2944503128528595,
0.19019469618797302,
-0.12471812963485718,
0.39426568150520325,
0.4062999486923218,
-0.1472921222448349,
-0.012048386037349701,
-0.023800252005457878,
0.32988008856773376,
0.0258270725607872,
0.14542289078235626,
0.15760761499404907,
0.11603793501853943,
0.004418214783072472,
0.18759657442569733,
0.11953715234994888,
0.31844618916511536,
0.16899079084396362,
0.2034032940864563,
0.06254585087299347,
-0.1343478560447693,
-0.23187832534313202,
0.013515152037143707,
0.10823354125022888,
-0.590876042842865,
0.2150617092847824,
-0.35296428203582764,
0.04865726828575134,
-0.2588043808937073,
-0.12347038835287094,
-0.4918266534805298,
0.09293932467699051,
0.3377533257007599,
-0.18807686865329742,
0.0020675640553236008,
-0.10834556818008423,
0.029926974326372147,
0.33757779002189636,
0.7586604356765747,
0.01931166648864746,
-0.11100371927022934,
-0.22932112216949463,
-0.478585422039032,
-0.5296587944030762,
0.13045765459537506,
-0.04465487226843834,
0.19258005917072296,
-0.1350322663784027,
0.27857139706611633,
0.11657805740833282,
0.037997134029865265,
0.17734764516353607,
0.11425752937793732,
0.2575359344482422,
0.19555732607841492,
-0.5474047660827637,
0.0003874190151691437,
-0.28104811906814575,
-0.06977588683366776,
0.049724288284778595,
-0.08641490340232849,
0.3129313588142395,
0.23635233938694,
-0.0038938522338867188,
-0.12754181027412415,
0.19530734419822693,
-0.061308834701776505,
-0.16843582689762115,
0.07537266612052917,
0.022778604179620743,
0.3318895697593689,
0.11260268837213516,
-0.21790336072444916,
-0.20115309953689575,
0.13193413615226746,
-0.07558852434158325,
-0.15963539481163025,
-0.016645856201648712,
0.42679429054260254,
-0.0568099170923233,
-0.26696422696113586,
-0.4690762460231781,
0.5127025842666626,
0.12184463441371918,
-0.17341481149196625,
-0.20301532745361328,
0.2121679037809372,
-0.10536829382181168,
0.23657311499118805,
0.397504597902298,
0.7369195222854614,
0.0757630318403244,
-0.07086829841136932,
-0.34009864926338196,
-0.24795030057430267,
0.29750362038612366,
-0.5315229296684265,
-0.2666740119457245,
-0.20205818116664886,
0.28316405415534973,
0.29716551303863525,
0.09927716851234436,
-0.5282416343688965,
0.1667773425579071,
0.10719551146030426,
-0.1955672800540924,
-0.216616690158844,
0.14678995311260223,
-0.11242125928401947,
-0.07235011458396912,
-0.09623309969902039,
0.17933863401412964,
0.3893272578716278,
-0.20760643482208252,
0.24392300844192505,
-0.09752305597066879
] |
https://github.com/huggingface/datasets/issues/5123 | datasets freezes with streaming mode in multiple-gpu | Hi @lhoestq
I solved `fsspec` error with this hack for now https://discuss.huggingface.co/t/attributeerror-module-fsspec-has-no-attribute-asyn/19255 but this is still freezing, I greatly appreciate if you could run this script on your side. Many thanks.
```
import fsspec
def _set_fsspec_for_multiprocess() -> None:
"""
Clear reference to the loop and thread.
This is necessary otherwise HTTPFileSystem hangs in the ML training loop.
Only required for fsspec >= 0.9.0
See https://github.com/fsspec/gcsfs/issues/379
"""
fsspec.asyn.iothread[0] = None
fsspec.asyn.loop[0] = None
_set_fsspec_for_multiprocess()
from accelerate import Accelerator
from accelerate.logging import get_logger
from datasets import load_dataset
from torch.utils.data.dataloader import DataLoader
import torch
from datasets import load_dataset
from transformers import AutoTokenizer
import torch
from accelerate.logging import get_logger
from torch.utils.data import IterableDataset
from torch.utils.data.datapipes.iter.combinatorics import ShufflerIterDataPipe
logger = get_logger(__name__)
class ConstantLengthDataset(IterableDataset):
"""
Iterable dataset that returns constant length chunks of tokens from stream of text files.
Args:
tokenizer (Tokenizer): The processor used for proccessing the data.
dataset (dataset.Dataset): Dataset with text files.
infinite (bool): If True the iterator is reset after dataset reaches end else stops.
max_seq_length (int): Length of token sequences to return.
num_of_sequences (int): Number of token sequences to keep in buffer.
chars_per_token (int): Number of characters per token used to estimate number of tokens in text buffer.
"""
def __init__(
self,
tokenizer,
dataset,
infinite=False,
max_seq_length=1024,
num_of_sequences=1024,
chars_per_token=3.6,
):
self.tokenizer = tokenizer
# self.concat_token_id = tokenizer.bos_token_id
self.dataset = dataset
self.max_seq_length = max_seq_length
self.epoch = 0
self.infinite = infinite
self.current_size = 0
self.max_buffer_size = max_seq_length * chars_per_token * num_of_sequences
self.content_field = "text"
def __iter__(self):
iterator = iter(self.dataset)
more_examples = True
while more_examples:
buffer, buffer_len = [], 0
while True:
if buffer_len >= self.max_buffer_size:
break
try:
buffer.append(next(iterator)[self.content_field])
buffer_len += len(buffer[-1])
except StopIteration:
if self.infinite:
iterator = iter(self.dataset)
self.epoch += 1
logger.info(f"Dataset epoch: {self.epoch}")
else:
more_examples = False
break
tokenized_inputs = self.tokenizer(buffer, truncation=False)["input_ids"]
all_token_ids = []
for tokenized_input in tokenized_inputs:
all_token_ids.extend(tokenized_input)
for i in range(0, len(all_token_ids), self.max_seq_length):
input_ids = all_token_ids[i : i + self.max_seq_length]
if len(input_ids) == self.max_seq_length:
self.current_size += 1
yield torch.tensor(input_ids)
def shuffle(self, buffer_size=1000):
return ShufflerIterDataPipe(self, buffer_size=buffer_size)
def create_dataloaders(tokenizer, accelerator):
ds_kwargs = {"streaming": True}
# In distributed training, the load_dataset function gaurantees that only one process
# can concurrently download the dataset.
datasets = load_dataset(
"c4",
"en",
cache_dir="cache_dir",
**ds_kwargs,
)
train_data, valid_data = datasets["train"], datasets["validation"]
with accelerator.main_process_first():
train_data = train_data.shuffle(buffer_size=10000, seed=None)
train_dataset = ConstantLengthDataset(
tokenizer,
train_data,
infinite=True,
max_seq_length=256,
)
valid_dataset = ConstantLengthDataset(
tokenizer,
valid_data,
infinite=False,
max_seq_length=256,
)
train_dataset = train_dataset.shuffle(buffer_size=10000)
train_dataloader = DataLoader(train_dataset, batch_size=160, shuffle=True)
eval_dataloader = DataLoader(valid_dataset, batch_size=160)
return train_dataloader, eval_dataloader
def main():
# Accelerator.
logging_dir = "data_save_dir/log"
accelerator = Accelerator(
gradient_accumulation_steps=1,
mixed_precision="bf16",
log_with="tensorboard",
logging_dir=logging_dir,
)
# We need to initialize the trackers we use, and also store our configuration.
# The trackers initializes automatically on the main process.
if accelerator.is_main_process:
accelerator.init_trackers("test")
tokenizer = AutoTokenizer.from_pretrained("bert-base-uncased")
# Load datasets and create dataloaders.
train_dataloader, _ = create_dataloaders(tokenizer, accelerator)
train_dataloader = accelerator.prepare(train_dataloader)
for step, batch in enumerate(train_dataloader, start=1):
print(step)
accelerator.end_training()
if __name__ == "__main__":
main()
``` | ## Describe the bug
Hi. I am using this dataloader, which is for processing large datasets in streaming mode mentioned in one of examples of huggingface. I am using it to read c4: https://github.com/huggingface/transformers/blob/b48ac1a094e572d6076b46a9e4ed3e0ebe978afc/examples/research_projects/codeparrot/scripts/codeparrot_training.py#L22
During using multi-gpu in accelerator in one node, the code freezes, but works for 1 GPU:
```
10/16/2022 14:18:46 - INFO - datasets.info - Loading Dataset Infos from /home/jack/.cache/huggingface/modules/datasets_modules/datasets/c4/df532b158939272d032cc63ef19cd5b83e9b4d00c922b833e4cb18b2e9869b01
Steps: 0%| | 0/400000 [00:00<?, ?it/s]10/16/2022 14:18:47 - INFO - torch.utils.data.dataloader - Shared seed (135290893754684706) sent to store on rank 0
```
# Code to reproduce
please run this code with `accelerate launch code.py`
```
from accelerate import Accelerator
from accelerate.logging import get_logger
from datasets import load_dataset
from torch.utils.data.dataloader import DataLoader
import torch
from datasets import load_dataset
from transformers import AutoTokenizer
import torch
from accelerate.logging import get_logger
from torch.utils.data import IterableDataset
from torch.utils.data.datapipes.iter.combinatorics import ShufflerIterDataPipe
logger = get_logger(__name__)
class ConstantLengthDataset(IterableDataset):
"""
Iterable dataset that returns constant length chunks of tokens from stream of text files.
Args:
tokenizer (Tokenizer): The processor used for proccessing the data.
dataset (dataset.Dataset): Dataset with text files.
infinite (bool): If True the iterator is reset after dataset reaches end else stops.
max_seq_length (int): Length of token sequences to return.
num_of_sequences (int): Number of token sequences to keep in buffer.
chars_per_token (int): Number of characters per token used to estimate number of tokens in text buffer.
"""
def __init__(
self,
tokenizer,
dataset,
infinite=False,
max_seq_length=1024,
num_of_sequences=1024,
chars_per_token=3.6,
):
self.tokenizer = tokenizer
# self.concat_token_id = tokenizer.bos_token_id
self.dataset = dataset
self.max_seq_length = max_seq_length
self.epoch = 0
self.infinite = infinite
self.current_size = 0
self.max_buffer_size = max_seq_length * chars_per_token * num_of_sequences
self.content_field = "text"
def __iter__(self):
iterator = iter(self.dataset)
more_examples = True
while more_examples:
buffer, buffer_len = [], 0
while True:
if buffer_len >= self.max_buffer_size:
break
try:
buffer.append(next(iterator)[self.content_field])
buffer_len += len(buffer[-1])
except StopIteration:
if self.infinite:
iterator = iter(self.dataset)
self.epoch += 1
logger.info(f"Dataset epoch: {self.epoch}")
else:
more_examples = False
break
tokenized_inputs = self.tokenizer(buffer, truncation=False)["input_ids"]
all_token_ids = []
for tokenized_input in tokenized_inputs:
all_token_ids.extend(tokenized_input)
for i in range(0, len(all_token_ids), self.max_seq_length):
input_ids = all_token_ids[i : i + self.max_seq_length]
if len(input_ids) == self.max_seq_length:
self.current_size += 1
yield torch.tensor(input_ids)
def shuffle(self, buffer_size=1000):
return ShufflerIterDataPipe(self, buffer_size=buffer_size)
def create_dataloaders(tokenizer, accelerator):
ds_kwargs = {"streaming": True}
# In distributed training, the load_dataset function gaurantees that only one process
# can concurrently download the dataset.
datasets = load_dataset(
"c4",
"en",
cache_dir="cache_dir",
**ds_kwargs,
)
train_data, valid_data = datasets["train"], datasets["validation"]
with accelerator.main_process_first():
train_data = train_data.shuffle(buffer_size=10000, seed=None)
train_dataset = ConstantLengthDataset(
tokenizer,
train_data,
infinite=True,
max_seq_length=256,
)
valid_dataset = ConstantLengthDataset(
tokenizer,
valid_data,
infinite=False,
max_seq_length=256,
)
train_dataset = train_dataset.shuffle(buffer_size=10000)
train_dataloader = DataLoader(train_dataset, batch_size=160, shuffle=True)
eval_dataloader = DataLoader(valid_dataset, batch_size=160)
return train_dataloader, eval_dataloader
def main():
# Accelerator.
logging_dir = "data_save_dir/log"
accelerator = Accelerator(
gradient_accumulation_steps=1,
mixed_precision="bf16",
log_with="tensorboard",
logging_dir=logging_dir,
)
# We need to initialize the trackers we use, and also store our configuration.
# The trackers initializes automatically on the main process.
if accelerator.is_main_process:
accelerator.init_trackers("test")
tokenizer = AutoTokenizer.from_pretrained("bert-base-uncased")
# Load datasets and create dataloaders.
train_dataloader, _ = create_dataloaders(tokenizer, accelerator)
train_dataloader = accelerator.prepare(train_dataloader)
for step, batch in enumerate(train_dataloader, start=1):
print(step)
accelerator.end_training()
if __name__ == "__main__":
main()
```
## Results expected
Being able to run the code for streamining datasets with multi-gpu
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.5.2
- Platform: linux
- Python version: 3.9.12
- PyArrow version: 9.0.0
@lhoestq I do not have any idea why this freezing happens, and I removed the streaming mode and this was working fine, so I know this is caused by streaming mode of the dataloader part not working well with multi-gpu setting. Since datasets are large, I hope to keep the streamining mode. I very much appreciate your help.
| 472 | datasets freezes with streaming mode in multiple-gpu
## Describe the bug
Hi. I am using this dataloader, which is for processing large datasets in streaming mode mentioned in one of examples of huggingface. I am using it to read c4: https://github.com/huggingface/transformers/blob/b48ac1a094e572d6076b46a9e4ed3e0ebe978afc/examples/research_projects/codeparrot/scripts/codeparrot_training.py#L22
During using multi-gpu in accelerator in one node, the code freezes, but works for 1 GPU:
```
10/16/2022 14:18:46 - INFO - datasets.info - Loading Dataset Infos from /home/jack/.cache/huggingface/modules/datasets_modules/datasets/c4/df532b158939272d032cc63ef19cd5b83e9b4d00c922b833e4cb18b2e9869b01
Steps: 0%| | 0/400000 [00:00<?, ?it/s]10/16/2022 14:18:47 - INFO - torch.utils.data.dataloader - Shared seed (135290893754684706) sent to store on rank 0
```
# Code to reproduce
please run this code with `accelerate launch code.py`
```
from accelerate import Accelerator
from accelerate.logging import get_logger
from datasets import load_dataset
from torch.utils.data.dataloader import DataLoader
import torch
from datasets import load_dataset
from transformers import AutoTokenizer
import torch
from accelerate.logging import get_logger
from torch.utils.data import IterableDataset
from torch.utils.data.datapipes.iter.combinatorics import ShufflerIterDataPipe
logger = get_logger(__name__)
class ConstantLengthDataset(IterableDataset):
"""
Iterable dataset that returns constant length chunks of tokens from stream of text files.
Args:
tokenizer (Tokenizer): The processor used for proccessing the data.
dataset (dataset.Dataset): Dataset with text files.
infinite (bool): If True the iterator is reset after dataset reaches end else stops.
max_seq_length (int): Length of token sequences to return.
num_of_sequences (int): Number of token sequences to keep in buffer.
chars_per_token (int): Number of characters per token used to estimate number of tokens in text buffer.
"""
def __init__(
self,
tokenizer,
dataset,
infinite=False,
max_seq_length=1024,
num_of_sequences=1024,
chars_per_token=3.6,
):
self.tokenizer = tokenizer
# self.concat_token_id = tokenizer.bos_token_id
self.dataset = dataset
self.max_seq_length = max_seq_length
self.epoch = 0
self.infinite = infinite
self.current_size = 0
self.max_buffer_size = max_seq_length * chars_per_token * num_of_sequences
self.content_field = "text"
def __iter__(self):
iterator = iter(self.dataset)
more_examples = True
while more_examples:
buffer, buffer_len = [], 0
while True:
if buffer_len >= self.max_buffer_size:
break
try:
buffer.append(next(iterator)[self.content_field])
buffer_len += len(buffer[-1])
except StopIteration:
if self.infinite:
iterator = iter(self.dataset)
self.epoch += 1
logger.info(f"Dataset epoch: {self.epoch}")
else:
more_examples = False
break
tokenized_inputs = self.tokenizer(buffer, truncation=False)["input_ids"]
all_token_ids = []
for tokenized_input in tokenized_inputs:
all_token_ids.extend(tokenized_input)
for i in range(0, len(all_token_ids), self.max_seq_length):
input_ids = all_token_ids[i : i + self.max_seq_length]
if len(input_ids) == self.max_seq_length:
self.current_size += 1
yield torch.tensor(input_ids)
def shuffle(self, buffer_size=1000):
return ShufflerIterDataPipe(self, buffer_size=buffer_size)
def create_dataloaders(tokenizer, accelerator):
ds_kwargs = {"streaming": True}
# In distributed training, the load_dataset function gaurantees that only one process
# can concurrently download the dataset.
datasets = load_dataset(
"c4",
"en",
cache_dir="cache_dir",
**ds_kwargs,
)
train_data, valid_data = datasets["train"], datasets["validation"]
with accelerator.main_process_first():
train_data = train_data.shuffle(buffer_size=10000, seed=None)
train_dataset = ConstantLengthDataset(
tokenizer,
train_data,
infinite=True,
max_seq_length=256,
)
valid_dataset = ConstantLengthDataset(
tokenizer,
valid_data,
infinite=False,
max_seq_length=256,
)
train_dataset = train_dataset.shuffle(buffer_size=10000)
train_dataloader = DataLoader(train_dataset, batch_size=160, shuffle=True)
eval_dataloader = DataLoader(valid_dataset, batch_size=160)
return train_dataloader, eval_dataloader
def main():
# Accelerator.
logging_dir = "data_save_dir/log"
accelerator = Accelerator(
gradient_accumulation_steps=1,
mixed_precision="bf16",
log_with="tensorboard",
logging_dir=logging_dir,
)
# We need to initialize the trackers we use, and also store our configuration.
# The trackers initializes automatically on the main process.
if accelerator.is_main_process:
accelerator.init_trackers("test")
tokenizer = AutoTokenizer.from_pretrained("bert-base-uncased")
# Load datasets and create dataloaders.
train_dataloader, _ = create_dataloaders(tokenizer, accelerator)
train_dataloader = accelerator.prepare(train_dataloader)
for step, batch in enumerate(train_dataloader, start=1):
print(step)
accelerator.end_training()
if __name__ == "__main__":
main()
```
## Results expected
Being able to run the code for streamining datasets with multi-gpu
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.5.2
- Platform: linux
- Python version: 3.9.12
- PyArrow version: 9.0.0
@lhoestq I do not have any idea why this freezing happens, and I removed the streaming mode and this was working fine, so I know this is caused by streaming mode of the dataloader part not working well with multi-gpu setting. Since datasets are large, I hope to keep the streamining mode. I very much appreciate your help.
Hi @lhoestq
I solved `fsspec` error with this hack for now https://discuss.huggingface.co/t/attributeerror-module-fsspec-has-no-attribute-asyn/19255 but this is still freezing, I greatly appreciate if you could run this script on your side. Many thanks.
```
import fsspec
def _set_fsspec_for_multiprocess() -> None:
"""
Clear reference to the loop and thread.
This is necessary otherwise HTTPFileSystem hangs in the ML training loop.
Only required for fsspec >= 0.9.0
See https://github.com/fsspec/gcsfs/issues/379
"""
fsspec.asyn.iothread[0] = None
fsspec.asyn.loop[0] = None
_set_fsspec_for_multiprocess()
from accelerate import Accelerator
from accelerate.logging import get_logger
from datasets import load_dataset
from torch.utils.data.dataloader import DataLoader
import torch
from datasets import load_dataset
from transformers import AutoTokenizer
import torch
from accelerate.logging import get_logger
from torch.utils.data import IterableDataset
from torch.utils.data.datapipes.iter.combinatorics import ShufflerIterDataPipe
logger = get_logger(__name__)
class ConstantLengthDataset(IterableDataset):
"""
Iterable dataset that returns constant length chunks of tokens from stream of text files.
Args:
tokenizer (Tokenizer): The processor used for proccessing the data.
dataset (dataset.Dataset): Dataset with text files.
infinite (bool): If True the iterator is reset after dataset reaches end else stops.
max_seq_length (int): Length of token sequences to return.
num_of_sequences (int): Number of token sequences to keep in buffer.
chars_per_token (int): Number of characters per token used to estimate number of tokens in text buffer.
"""
def __init__(
self,
tokenizer,
dataset,
infinite=False,
max_seq_length=1024,
num_of_sequences=1024,
chars_per_token=3.6,
):
self.tokenizer = tokenizer
# self.concat_token_id = tokenizer.bos_token_id
self.dataset = dataset
self.max_seq_length = max_seq_length
self.epoch = 0
self.infinite = infinite
self.current_size = 0
self.max_buffer_size = max_seq_length * chars_per_token * num_of_sequences
self.content_field = "text"
def __iter__(self):
iterator = iter(self.dataset)
more_examples = True
while more_examples:
buffer, buffer_len = [], 0
while True:
if buffer_len >= self.max_buffer_size:
break
try:
buffer.append(next(iterator)[self.content_field])
buffer_len += len(buffer[-1])
except StopIteration:
if self.infinite:
iterator = iter(self.dataset)
self.epoch += 1
logger.info(f"Dataset epoch: {self.epoch}")
else:
more_examples = False
break
tokenized_inputs = self.tokenizer(buffer, truncation=False)["input_ids"]
all_token_ids = []
for tokenized_input in tokenized_inputs:
all_token_ids.extend(tokenized_input)
for i in range(0, len(all_token_ids), self.max_seq_length):
input_ids = all_token_ids[i : i + self.max_seq_length]
if len(input_ids) == self.max_seq_length:
self.current_size += 1
yield torch.tensor(input_ids)
def shuffle(self, buffer_size=1000):
return ShufflerIterDataPipe(self, buffer_size=buffer_size)
def create_dataloaders(tokenizer, accelerator):
ds_kwargs = {"streaming": True}
# In distributed training, the load_dataset function gaurantees that only one process
# can concurrently download the dataset.
datasets = load_dataset(
"c4",
"en",
cache_dir="cache_dir",
**ds_kwargs,
)
train_data, valid_data = datasets["train"], datasets["validation"]
with accelerator.main_process_first():
train_data = train_data.shuffle(buffer_size=10000, seed=None)
train_dataset = ConstantLengthDataset(
tokenizer,
train_data,
infinite=True,
max_seq_length=256,
)
valid_dataset = ConstantLengthDataset(
tokenizer,
valid_data,
infinite=False,
max_seq_length=256,
)
train_dataset = train_dataset.shuffle(buffer_size=10000)
train_dataloader = DataLoader(train_dataset, batch_size=160, shuffle=True)
eval_dataloader = DataLoader(valid_dataset, batch_size=160)
return train_dataloader, eval_dataloader
def main():
# Accelerator.
logging_dir = "data_save_dir/log"
accelerator = Accelerator(
gradient_accumulation_steps=1,
mixed_precision="bf16",
log_with="tensorboard",
logging_dir=logging_dir,
)
# We need to initialize the trackers we use, and also store our configuration.
# The trackers initializes automatically on the main process.
if accelerator.is_main_process:
accelerator.init_trackers("test")
tokenizer = AutoTokenizer.from_pretrained("bert-base-uncased")
# Load datasets and create dataloaders.
train_dataloader, _ = create_dataloaders(tokenizer, accelerator)
train_dataloader = accelerator.prepare(train_dataloader)
for step, batch in enumerate(train_dataloader, start=1):
print(step)
accelerator.end_training()
if __name__ == "__main__":
main()
``` | [
-0.320170134305954,
-0.31651610136032104,
-0.039002928882837296,
0.4769468307495117,
0.32108551263809204,
-0.05959709361195564,
0.370758980512619,
-0.0028037503361701965,
0.29125797748565674,
0.27730265259742737,
-0.1412859410047531,
0.06606162339448929,
-0.1297413855791092,
0.389516144990921,
-0.02885536476969719,
0.019152846187353134,
0.14081059396266937,
-0.06935961544513702,
-0.05934390425682068,
0.09264911711215973,
0.19574815034866333,
0.28171306848526,
-0.03017459809780121,
-0.2807106375694275,
-0.3968455195426941,
0.006201479583978653,
0.08898560702800751,
0.05466218665242195,
0.16394278407096863,
-0.1528581976890564,
0.05657128989696503,
0.3212423622608185,
-0.1962885558605194,
0.6732676029205322,
-0.00011721457849489525,
0.05330623686313629,
0.18269649147987366,
-0.002833753824234009,
-0.21490003168582916,
-0.17322935163974762,
-0.002865813672542572,
0.06839033216238022,
0.14951622486114502,
0.04682282358407974,
-0.17401543259620667,
-0.0174991674721241,
-0.1881343424320221,
-0.6604426503181458,
0.164658784866333,
-0.042508333921432495,
0.09482607245445251,
0.4577403962612152,
-0.1465912163257599,
-0.06909176707267761,
-0.20002222061157227,
-0.039952024817466736,
-0.14591027796268463,
0.07709209620952606,
0.31674060225486755,
0.07274440675973892,
-0.27099719643592834,
0.40121567249298096,
0.12219187617301941,
-0.015591144561767578,
0.08307396620512009,
-0.14754250645637512,
-0.350762277841568,
-0.13338522613048553,
0.026910532265901566,
0.15082837641239166,
0.027056343853473663,
-0.3233974277973175,
-0.1601693481206894,
-0.22570520639419556,
0.10727719217538834,
-0.3284243941307068,
0.201379656791687,
0.11525953561067581,
-0.25809207558631897,
-0.21668508648872375,
-0.4963834583759308,
0.01326315850019455,
-0.08960461616516113,
0.06837072968482971,
-0.07536549866199493,
0.2995816469192505,
-0.2987593412399292,
0.22882121801376343,
0.38512924313545227,
0.29899197816848755,
-0.15710687637329102,
-0.19772954285144806,
-0.002054654061794281,
-0.2263694405555725,
-0.8506759405136108,
0.210271418094635,
-0.1854097545146942,
-0.024569854140281677,
0.1130077913403511,
0.212607279419899,
0.2809174656867981,
0.15809139609336853,
0.0683353990316391,
0.07589592784643173,
0.14983536303043365,
-0.02965284138917923,
-0.005833819508552551,
-0.20412547886371613,
0.43327707052230835,
0.4074971079826355,
-0.2626340985298157,
-0.06723201274871826,
-0.013328848406672478,
-0.10992640256881714,
-0.2989759147167206,
-0.1457396149635315,
-0.08084538578987122,
-0.07573612779378891,
-0.13559462130069733,
-0.009245884604752064,
-0.11118854582309723,
0.03931012004613876,
0.4182609021663666,
0.44486111402511597,
0.07055307179689407,
0.3420749604701996,
-0.18277500569820404,
0.05916411429643631,
-0.21634776890277863,
-0.44875651597976685,
-0.18320819735527039,
-0.2635971009731293,
-0.1491444855928421,
0.23651264607906342,
0.25286436080932617,
-0.6722689270973206,
-0.033016908913850784,
0.2876058518886566,
0.4721084237098694,
-0.1694207787513733,
0.1245342344045639,
-0.29843664169311523,
-0.05029793828725815,
0.17948129773139954,
0.14669935405254364,
0.4921897351741791,
0.1822681725025177,
-0.04350600764155388,
0.05512329190969467,
-0.11150530725717545,
-0.06791342049837112,
-0.0317845344543457,
0.30285823345184326,
0.11863456666469574,
0.07360691577196121,
0.18476532399654388,
-0.4126509726047516,
0.11747676134109497,
0.005819007754325867,
-0.1398874670267105,
0.27309441566467285,
-0.04221192002296448,
-0.0008702687919139862,
-0.14555160701274872,
0.23987773060798645,
0.5760335326194763,
0.12451320886611938,
-0.1120918020606041,
-0.0443904772400856,
-0.2915104925632477,
0.038571104407310486,
0.5202218294143677,
-0.17591074109077454,
-0.3686400055885315,
-0.28145554661750793,
0.045004233717918396,
-0.0261261984705925,
-0.23804381489753723,
-0.20734138786792755,
0.4822528064250946,
-0.3851122260093689,
0.30897125601768494,
0.4230332672595978,
0.10372115671634674,
0.12219540029764175,
-0.03825599327683449,
0.19279813766479492,
0.2943075895309448,
-0.00635366328060627,
0.1087382510304451,
-0.14604146778583527,
0.06424739956855774,
0.2653828561306,
0.016305286437273026,
-0.17548853158950806,
-0.300058513879776,
-0.07963960617780685,
-0.002100619487464428,
0.31338000297546387,
-0.16503708064556122,
0.17526975274085999,
0.41101473569869995,
0.04371234029531479,
-0.11278930306434631,
0.0510147362947464,
-0.18153807520866394,
-0.574967622756958,
0.29064786434173584,
0.2165021002292633,
-0.2392047941684723,
0.09127096086740494,
-0.1333739012479782,
0.23764142394065857,
-0.07981850951910019,
-0.3315660059452057,
-0.37471505999565125,
-0.032935481518507004,
0.20669057965278625,
0.09787946939468384,
0.1326659917831421,
-0.02257602848112583,
0.7143674492835999,
-0.1326308399438858,
0.1235450878739357,
-0.2603522539138794,
0.3782622218132019,
0.08834384381771088,
-0.25329169631004333,
-0.07439586520195007,
-0.11012204736471176,
0.06136968731880188,
-0.32795479893684387,
-0.14810338616371155,
0.46449926495552063,
0.09641259908676147,
0.5647338628768921,
-0.26063627004623413,
0.11943359673023224,
0.38852575421333313,
-0.19571395218372345,
0.0814359039068222,
0.17112208902835846,
0.1621701866388321,
-0.2649763822555542,
-0.04232949763536453,
0.3338702619075775,
-0.21187607944011688,
0.14005300402641296,
0.1394023895263672,
-0.1506596952676773,
-0.009420773014426231,
0.2594158947467804,
-0.048738256096839905,
0.06878665089607239,
0.3883502185344696,
0.025583820417523384,
0.44588765501976013,
-0.011565407738089561,
-0.4989607632160187,
0.1430942267179489,
0.3377918601036072,
0.263149231672287,
-0.1941157579421997,
-0.05033130943775177,
-0.33004245162010193,
-0.05804133415222168,
0.2738502323627472,
-0.07551849633455276,
0.3668179512023926,
0.11351387202739716,
-0.0034544579684734344,
-0.10172093659639359,
0.08031477779150009,
-0.2999836206436157,
0.17736758291721344,
0.10195215046405792,
0.1618015617132187,
0.2187531590461731,
0.1172676607966423,
-0.15939673781394958,
-0.15111970901489258,
-0.18575450778007507,
0.32863739132881165,
-0.033362001180648804,
-0.3298265337944031,
0.32112830877304077,
-0.34599485993385315,
-0.24143052101135254,
-0.1842232346534729,
-0.07266464829444885,
-0.4802292585372925,
-0.10746444016695023,
-0.31277281045913696,
0.4952528774738312,
0.031738463789224625,
0.128421813249588,
0.10595707595348358,
0.0028597861528396606,
0.23697461187839508,
0.022782154381275177,
-0.28592273592948914,
0.02397690713405609,
-0.1963951587677002,
-0.05390238016843796,
0.417086124420166,
-0.06987275928258896,
0.1014823466539383,
0.45332422852516174,
-0.1511560082435608,
-0.35475510358810425,
-0.1686646193265915,
0.07441732287406921,
-0.14645811915397644,
0.1020779237151146,
-0.11136025190353394,
0.1631530225276947,
-0.035169538110494614,
-0.11404077708721161,
0.19351963698863983,
-0.43751364946365356,
-0.08548972010612488,
0.271707683801651,
-0.035255592316389084,
0.1995011270046234,
-0.22854772210121155,
0.006123870611190796,
-0.24477176368236542,
-0.3657911419868469,
0.3497276306152344,
-0.2352394163608551,
-0.13698385655879974,
0.0765804722905159,
0.1583414375782013,
0.21081340312957764,
-0.03315375745296478,
-0.18436570465564728,
-0.12409546226263046,
-0.19303375482559204,
0.14701849222183228,
-0.019072476774454117,
-0.40133482217788696,
-0.244588240981102,
0.16984441876411438,
-0.0025123171508312225,
0.3933245539665222,
-0.31243571639060974,
0.16146600246429443,
-0.3194584548473358,
-0.0547042042016983,
0.05831800401210785,
-0.05197394639253616,
0.2204650342464447,
-0.2151278406381607,
-0.01358164194971323,
-0.11399076133966446,
-0.04376517981290817,
0.1658928543329239,
-0.13448747992515564,
-0.015818089246749878,
-0.11097333580255508,
0.34720727801322937,
0.3296865224838257,
0.45010387897491455,
0.21204568445682526,
-0.03832007572054863,
0.31824856996536255,
-0.07278018444776535,
0.21965815126895905,
0.049487050622701645,
-0.20635905861854553,
0.31881412863731384,
-0.1726091206073761,
-0.0045239925384521484,
-0.018886566162109375,
-0.19593185186386108,
-0.037774957716464996,
-0.22168457508087158,
0.14016085863113403,
0.18190330266952515,
-0.1656782031059265,
0.29752710461616516,
0.06558997929096222,
0.10472086071968079,
-0.17760330438613892,
0.05752391368150711,
0.07364991307258606,
-0.1482866108417511,
0.01676757074892521,
0.2895659804344177,
-0.26418378949165344,
-0.009687433950603008,
-0.3947683870792389,
0.02734026499092579,
-0.1826173961162567,
0.17090697586536407,
0.17284563183784485,
0.41673579812049866,
0.10159271955490112,
-0.06316328048706055,
0.09674377739429474,
-0.3232256770133972,
0.7259926795959473,
0.34981125593185425,
-0.13147538900375366,
0.09626911580562592,
-0.3811025321483612,
-0.2965686321258545,
0.03321569785475731,
-0.37280064821243286,
0.02045464515686035,
0.2718900442123413,
0.5440722703933716,
-0.2527817189693451,
-0.39522165060043335,
-0.19789808988571167,
0.03606124222278595,
-0.018301930278539658,
-0.05184583365917206,
-0.22067338228225708,
0.1025443896651268,
-0.2376442700624466,
0.2315637767314911,
0.10310465842485428,
0.058098215609788895,
-0.401311993598938,
-0.05811883881688118,
0.1250377595424652,
-0.2197563648223877,
0.12035338580608368,
0.06208226457238197,
0.1526395082473755,
-0.150322824716568,
0.2186867594718933,
0.35755452513694763,
0.054748568683862686,
0.23012283444404602,
0.1911984086036682,
0.31224650144577026,
-0.20272251963615417,
0.4371161460876465,
0.2170461118221283,
0.3125962018966675,
0.45868751406669617,
-0.07028362900018692,
0.49929025769233704,
0.10524245351552963,
0.30283230543136597,
-0.12995973229408264,
0.2632194757461548,
0.21913288533687592,
0.3468329608440399,
-0.3923860788345337,
-0.458741158246994,
0.3937756419181824,
0.004316641017794609,
0.20219282805919647,
0.6175047159194946,
0.12552914023399353,
-0.07383781671524048,
-0.1385607123374939,
-0.16125336289405823,
0.6028099060058594,
-0.06719326972961426,
0.3586098551750183,
0.20923885703086853,
-0.22055551409721375,
0.5054243206977844,
-0.5937470197677612,
0.19814899563789368,
-0.1506689190864563,
-0.41321611404418945,
0.018765492364764214,
-0.2010648548603058,
0.43172067403793335,
-0.12246599793434143,
-0.08273948729038239,
0.1873295158147812,
0.06535287201404572,
0.3014884293079376,
-0.1806645393371582,
0.3034682273864746,
-0.34839895367622375,
-0.41509413719177246,
-0.45341211557388306,
0.04850274324417114,
-0.12633726000785828,
0.13370546698570251,
0.09538030624389648,
-0.09765797853469849,
0.08964815735816956,
-0.02583513781428337,
-0.33737561106681824,
0.009162712842226028,
-0.6102495193481445,
0.00030599720776081085,
-0.04006807133555412,
-0.41945672035217285,
0.3332884609699249,
0.14806488156318665,
-0.09767547249794006,
-0.06345473229885101,
-0.062499530613422394,
0.1720711886882782,
-0.14119413495063782,
0.08674008399248123,
-0.10608958452939987,
-0.3329578936100006,
0.09485097229480743,
-0.009610209614038467,
-0.1025252491235733,
0.19989141821861267,
0.09746816009283066,
-0.13958975672721863,
0.36389291286468506,
0.1336819976568222,
-0.15619789063930511,
0.058961160480976105,
-0.06450261175632477,
0.08951372653245926,
0.08699853718280792,
-0.274768590927124,
0.019831059500575066,
0.06901092082262039,
-0.17514300346374512,
-0.20943623781204224,
0.018488068133592606,
0.02346118539571762,
-0.20378780364990234,
0.7961738109588623,
-0.06900791078805923,
-0.22404277324676514,
0.346279114484787,
0.4273766875267029,
-0.10663463920354843,
-0.23933950066566467,
-0.02573203667998314,
0.3107742965221405,
-0.23372137546539307,
0.14335303008556366,
-0.3001023232936859,
-0.16458454728126526,
0.17259564995765686,
-0.0007974468171596527,
-0.017555326223373413,
-0.09870066493749619,
0.014036621898412704,
-0.3685116767883301,
-0.41476279497146606,
-0.05516313016414642,
-0.1779431700706482,
0.08709278702735901,
0.1761348843574524,
0.26979830861091614,
-0.0006913729012012482,
0.3773987293243408,
-0.2025117576122284,
-0.019583584740757942,
-0.1402473747730255,
-0.12250952422618866,
0.20925326645374298,
-0.1959984004497528,
0.3830168843269348,
-0.02707037702202797,
0.057350680232048035,
0.36506521701812744,
-0.05137687176465988,
-0.11634066700935364,
-0.1765683889389038,
0.11344491690397263,
-0.05546925961971283,
-0.08208806067705154,
0.028041504323482513,
-0.10280346870422363,
-0.12126904726028442,
-0.09933386743068695,
0.6700537800788879,
0.13897347450256348,
0.006425827741622925,
-0.20907703042030334,
0.19417019188404083,
0.010862313210964203,
-0.3726525902748108,
0.018590690568089485,
-0.19535791873931885,
-0.15798620879650116,
0.3542337119579315,
0.03664272651076317,
0.04119914397597313,
-0.0052753835916519165,
-0.4814819395542145,
-0.0036610066890716553,
0.34902793169021606,
0.08964759111404419,
0.21850088238716125,
-0.23463983833789825,
-0.14610576629638672,
-0.12128204107284546,
0.3502779006958008,
0.360932320356369,
-0.14266851544380188,
-0.1517164260149002,
0.0793684720993042,
0.05996345728635788,
-0.0272354893386364,
-0.00409953435882926,
-0.19534257054328918,
0.018120858818292618,
0.08164803683757782,
0.2565746009349823,
0.3063749670982361,
0.1292659491300583,
-0.06028912961483002,
0.2432013750076294,
0.10289052873849869,
0.1693509817123413,
0.2773444354534149,
-0.2257394790649414,
0.10426411032676697,
0.15127182006835938,
0.09524668753147125,
0.10445536673069,
-0.0252470001578331,
0.20106996595859528,
-0.13846591114997864,
0.27362290024757385,
0.1747645139694214,
0.1947527378797531,
0.14683261513710022,
-0.5698386430740356,
-0.39714014530181885,
0.09334786236286163,
-0.5674176216125488,
0.2225762903690338,
-0.1508185863494873,
0.43626347184181213,
-0.37798917293548584,
-0.21522557735443115,
-0.2594103515148163,
0.2358933687210083,
-0.23646557331085205,
0.037227656692266464,
0.19985072314739227,
-0.19495229423046112,
-0.23551325500011444,
0.17674444615840912,
-0.008310437202453613,
0.11880853772163391,
0.3892444372177124,
0.27836593985557556,
0.06494555622339249,
-0.3253641128540039,
-0.2908581495285034,
0.2944503128528595,
0.19019469618797302,
-0.12471812963485718,
0.39426568150520325,
0.4062999486923218,
-0.1472921222448349,
-0.012048386037349701,
-0.023800252005457878,
0.32988008856773376,
0.0258270725607872,
0.14542289078235626,
0.15760761499404907,
0.11603793501853943,
0.004418214783072472,
0.18759657442569733,
0.11953715234994888,
0.31844618916511536,
0.16899079084396362,
0.2034032940864563,
0.06254585087299347,
-0.1343478560447693,
-0.23187832534313202,
0.013515152037143707,
0.10823354125022888,
-0.590876042842865,
0.2150617092847824,
-0.35296428203582764,
0.04865726828575134,
-0.2588043808937073,
-0.12347038835287094,
-0.4918266534805298,
0.09293932467699051,
0.3377533257007599,
-0.18807686865329742,
0.0020675640553236008,
-0.10834556818008423,
0.029926974326372147,
0.33757779002189636,
0.7586604356765747,
0.01931166648864746,
-0.11100371927022934,
-0.22932112216949463,
-0.478585422039032,
-0.5296587944030762,
0.13045765459537506,
-0.04465487226843834,
0.19258005917072296,
-0.1350322663784027,
0.27857139706611633,
0.11657805740833282,
0.037997134029865265,
0.17734764516353607,
0.11425752937793732,
0.2575359344482422,
0.19555732607841492,
-0.5474047660827637,
0.0003874190151691437,
-0.28104811906814575,
-0.06977588683366776,
0.049724288284778595,
-0.08641490340232849,
0.3129313588142395,
0.23635233938694,
-0.0038938522338867188,
-0.12754181027412415,
0.19530734419822693,
-0.061308834701776505,
-0.16843582689762115,
0.07537266612052917,
0.022778604179620743,
0.3318895697593689,
0.11260268837213516,
-0.21790336072444916,
-0.20115309953689575,
0.13193413615226746,
-0.07558852434158325,
-0.15963539481163025,
-0.016645856201648712,
0.42679429054260254,
-0.0568099170923233,
-0.26696422696113586,
-0.4690762460231781,
0.5127025842666626,
0.12184463441371918,
-0.17341481149196625,
-0.20301532745361328,
0.2121679037809372,
-0.10536829382181168,
0.23657311499118805,
0.397504597902298,
0.7369195222854614,
0.0757630318403244,
-0.07086829841136932,
-0.34009864926338196,
-0.24795030057430267,
0.29750362038612366,
-0.5315229296684265,
-0.2666740119457245,
-0.20205818116664886,
0.28316405415534973,
0.29716551303863525,
0.09927716851234436,
-0.5282416343688965,
0.1667773425579071,
0.10719551146030426,
-0.1955672800540924,
-0.216616690158844,
0.14678995311260223,
-0.11242125928401947,
-0.07235011458396912,
-0.09623309969902039,
0.17933863401412964,
0.3893272578716278,
-0.20760643482208252,
0.24392300844192505,
-0.09752305597066879
] |
https://github.com/huggingface/datasets/issues/5123 | datasets freezes with streaming mode in multiple-gpu | Are you using `Pytorch 1.11`? Otherwise the script freezes because of the shuffling in this line:
```
return ShufflerIterDataPipe(self, buffer_size=buffer_size)
```
`ShufflerIterDataPipe` behavior must have changed for newer Pytorch versions. But this doesn't change whether you're using streaming or not in `datasets`, so probably not the same issue, but something to try. | ## Describe the bug
Hi. I am using this dataloader, which is for processing large datasets in streaming mode mentioned in one of examples of huggingface. I am using it to read c4: https://github.com/huggingface/transformers/blob/b48ac1a094e572d6076b46a9e4ed3e0ebe978afc/examples/research_projects/codeparrot/scripts/codeparrot_training.py#L22
During using multi-gpu in accelerator in one node, the code freezes, but works for 1 GPU:
```
10/16/2022 14:18:46 - INFO - datasets.info - Loading Dataset Infos from /home/jack/.cache/huggingface/modules/datasets_modules/datasets/c4/df532b158939272d032cc63ef19cd5b83e9b4d00c922b833e4cb18b2e9869b01
Steps: 0%| | 0/400000 [00:00<?, ?it/s]10/16/2022 14:18:47 - INFO - torch.utils.data.dataloader - Shared seed (135290893754684706) sent to store on rank 0
```
# Code to reproduce
please run this code with `accelerate launch code.py`
```
from accelerate import Accelerator
from accelerate.logging import get_logger
from datasets import load_dataset
from torch.utils.data.dataloader import DataLoader
import torch
from datasets import load_dataset
from transformers import AutoTokenizer
import torch
from accelerate.logging import get_logger
from torch.utils.data import IterableDataset
from torch.utils.data.datapipes.iter.combinatorics import ShufflerIterDataPipe
logger = get_logger(__name__)
class ConstantLengthDataset(IterableDataset):
"""
Iterable dataset that returns constant length chunks of tokens from stream of text files.
Args:
tokenizer (Tokenizer): The processor used for proccessing the data.
dataset (dataset.Dataset): Dataset with text files.
infinite (bool): If True the iterator is reset after dataset reaches end else stops.
max_seq_length (int): Length of token sequences to return.
num_of_sequences (int): Number of token sequences to keep in buffer.
chars_per_token (int): Number of characters per token used to estimate number of tokens in text buffer.
"""
def __init__(
self,
tokenizer,
dataset,
infinite=False,
max_seq_length=1024,
num_of_sequences=1024,
chars_per_token=3.6,
):
self.tokenizer = tokenizer
# self.concat_token_id = tokenizer.bos_token_id
self.dataset = dataset
self.max_seq_length = max_seq_length
self.epoch = 0
self.infinite = infinite
self.current_size = 0
self.max_buffer_size = max_seq_length * chars_per_token * num_of_sequences
self.content_field = "text"
def __iter__(self):
iterator = iter(self.dataset)
more_examples = True
while more_examples:
buffer, buffer_len = [], 0
while True:
if buffer_len >= self.max_buffer_size:
break
try:
buffer.append(next(iterator)[self.content_field])
buffer_len += len(buffer[-1])
except StopIteration:
if self.infinite:
iterator = iter(self.dataset)
self.epoch += 1
logger.info(f"Dataset epoch: {self.epoch}")
else:
more_examples = False
break
tokenized_inputs = self.tokenizer(buffer, truncation=False)["input_ids"]
all_token_ids = []
for tokenized_input in tokenized_inputs:
all_token_ids.extend(tokenized_input)
for i in range(0, len(all_token_ids), self.max_seq_length):
input_ids = all_token_ids[i : i + self.max_seq_length]
if len(input_ids) == self.max_seq_length:
self.current_size += 1
yield torch.tensor(input_ids)
def shuffle(self, buffer_size=1000):
return ShufflerIterDataPipe(self, buffer_size=buffer_size)
def create_dataloaders(tokenizer, accelerator):
ds_kwargs = {"streaming": True}
# In distributed training, the load_dataset function gaurantees that only one process
# can concurrently download the dataset.
datasets = load_dataset(
"c4",
"en",
cache_dir="cache_dir",
**ds_kwargs,
)
train_data, valid_data = datasets["train"], datasets["validation"]
with accelerator.main_process_first():
train_data = train_data.shuffle(buffer_size=10000, seed=None)
train_dataset = ConstantLengthDataset(
tokenizer,
train_data,
infinite=True,
max_seq_length=256,
)
valid_dataset = ConstantLengthDataset(
tokenizer,
valid_data,
infinite=False,
max_seq_length=256,
)
train_dataset = train_dataset.shuffle(buffer_size=10000)
train_dataloader = DataLoader(train_dataset, batch_size=160, shuffle=True)
eval_dataloader = DataLoader(valid_dataset, batch_size=160)
return train_dataloader, eval_dataloader
def main():
# Accelerator.
logging_dir = "data_save_dir/log"
accelerator = Accelerator(
gradient_accumulation_steps=1,
mixed_precision="bf16",
log_with="tensorboard",
logging_dir=logging_dir,
)
# We need to initialize the trackers we use, and also store our configuration.
# The trackers initializes automatically on the main process.
if accelerator.is_main_process:
accelerator.init_trackers("test")
tokenizer = AutoTokenizer.from_pretrained("bert-base-uncased")
# Load datasets and create dataloaders.
train_dataloader, _ = create_dataloaders(tokenizer, accelerator)
train_dataloader = accelerator.prepare(train_dataloader)
for step, batch in enumerate(train_dataloader, start=1):
print(step)
accelerator.end_training()
if __name__ == "__main__":
main()
```
## Results expected
Being able to run the code for streamining datasets with multi-gpu
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.5.2
- Platform: linux
- Python version: 3.9.12
- PyArrow version: 9.0.0
@lhoestq I do not have any idea why this freezing happens, and I removed the streaming mode and this was working fine, so I know this is caused by streaming mode of the dataloader part not working well with multi-gpu setting. Since datasets are large, I hope to keep the streamining mode. I very much appreciate your help.
| 52 | datasets freezes with streaming mode in multiple-gpu
## Describe the bug
Hi. I am using this dataloader, which is for processing large datasets in streaming mode mentioned in one of examples of huggingface. I am using it to read c4: https://github.com/huggingface/transformers/blob/b48ac1a094e572d6076b46a9e4ed3e0ebe978afc/examples/research_projects/codeparrot/scripts/codeparrot_training.py#L22
During using multi-gpu in accelerator in one node, the code freezes, but works for 1 GPU:
```
10/16/2022 14:18:46 - INFO - datasets.info - Loading Dataset Infos from /home/jack/.cache/huggingface/modules/datasets_modules/datasets/c4/df532b158939272d032cc63ef19cd5b83e9b4d00c922b833e4cb18b2e9869b01
Steps: 0%| | 0/400000 [00:00<?, ?it/s]10/16/2022 14:18:47 - INFO - torch.utils.data.dataloader - Shared seed (135290893754684706) sent to store on rank 0
```
# Code to reproduce
please run this code with `accelerate launch code.py`
```
from accelerate import Accelerator
from accelerate.logging import get_logger
from datasets import load_dataset
from torch.utils.data.dataloader import DataLoader
import torch
from datasets import load_dataset
from transformers import AutoTokenizer
import torch
from accelerate.logging import get_logger
from torch.utils.data import IterableDataset
from torch.utils.data.datapipes.iter.combinatorics import ShufflerIterDataPipe
logger = get_logger(__name__)
class ConstantLengthDataset(IterableDataset):
"""
Iterable dataset that returns constant length chunks of tokens from stream of text files.
Args:
tokenizer (Tokenizer): The processor used for proccessing the data.
dataset (dataset.Dataset): Dataset with text files.
infinite (bool): If True the iterator is reset after dataset reaches end else stops.
max_seq_length (int): Length of token sequences to return.
num_of_sequences (int): Number of token sequences to keep in buffer.
chars_per_token (int): Number of characters per token used to estimate number of tokens in text buffer.
"""
def __init__(
self,
tokenizer,
dataset,
infinite=False,
max_seq_length=1024,
num_of_sequences=1024,
chars_per_token=3.6,
):
self.tokenizer = tokenizer
# self.concat_token_id = tokenizer.bos_token_id
self.dataset = dataset
self.max_seq_length = max_seq_length
self.epoch = 0
self.infinite = infinite
self.current_size = 0
self.max_buffer_size = max_seq_length * chars_per_token * num_of_sequences
self.content_field = "text"
def __iter__(self):
iterator = iter(self.dataset)
more_examples = True
while more_examples:
buffer, buffer_len = [], 0
while True:
if buffer_len >= self.max_buffer_size:
break
try:
buffer.append(next(iterator)[self.content_field])
buffer_len += len(buffer[-1])
except StopIteration:
if self.infinite:
iterator = iter(self.dataset)
self.epoch += 1
logger.info(f"Dataset epoch: {self.epoch}")
else:
more_examples = False
break
tokenized_inputs = self.tokenizer(buffer, truncation=False)["input_ids"]
all_token_ids = []
for tokenized_input in tokenized_inputs:
all_token_ids.extend(tokenized_input)
for i in range(0, len(all_token_ids), self.max_seq_length):
input_ids = all_token_ids[i : i + self.max_seq_length]
if len(input_ids) == self.max_seq_length:
self.current_size += 1
yield torch.tensor(input_ids)
def shuffle(self, buffer_size=1000):
return ShufflerIterDataPipe(self, buffer_size=buffer_size)
def create_dataloaders(tokenizer, accelerator):
ds_kwargs = {"streaming": True}
# In distributed training, the load_dataset function gaurantees that only one process
# can concurrently download the dataset.
datasets = load_dataset(
"c4",
"en",
cache_dir="cache_dir",
**ds_kwargs,
)
train_data, valid_data = datasets["train"], datasets["validation"]
with accelerator.main_process_first():
train_data = train_data.shuffle(buffer_size=10000, seed=None)
train_dataset = ConstantLengthDataset(
tokenizer,
train_data,
infinite=True,
max_seq_length=256,
)
valid_dataset = ConstantLengthDataset(
tokenizer,
valid_data,
infinite=False,
max_seq_length=256,
)
train_dataset = train_dataset.shuffle(buffer_size=10000)
train_dataloader = DataLoader(train_dataset, batch_size=160, shuffle=True)
eval_dataloader = DataLoader(valid_dataset, batch_size=160)
return train_dataloader, eval_dataloader
def main():
# Accelerator.
logging_dir = "data_save_dir/log"
accelerator = Accelerator(
gradient_accumulation_steps=1,
mixed_precision="bf16",
log_with="tensorboard",
logging_dir=logging_dir,
)
# We need to initialize the trackers we use, and also store our configuration.
# The trackers initializes automatically on the main process.
if accelerator.is_main_process:
accelerator.init_trackers("test")
tokenizer = AutoTokenizer.from_pretrained("bert-base-uncased")
# Load datasets and create dataloaders.
train_dataloader, _ = create_dataloaders(tokenizer, accelerator)
train_dataloader = accelerator.prepare(train_dataloader)
for step, batch in enumerate(train_dataloader, start=1):
print(step)
accelerator.end_training()
if __name__ == "__main__":
main()
```
## Results expected
Being able to run the code for streamining datasets with multi-gpu
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.5.2
- Platform: linux
- Python version: 3.9.12
- PyArrow version: 9.0.0
@lhoestq I do not have any idea why this freezing happens, and I removed the streaming mode and this was working fine, so I know this is caused by streaming mode of the dataloader part not working well with multi-gpu setting. Since datasets are large, I hope to keep the streamining mode. I very much appreciate your help.
Are you using `Pytorch 1.11`? Otherwise the script freezes because of the shuffling in this line:
```
return ShufflerIterDataPipe(self, buffer_size=buffer_size)
```
`ShufflerIterDataPipe` behavior must have changed for newer Pytorch versions. But this doesn't change whether you're using streaming or not in `datasets`, so probably not the same issue, but something to try. | [
-0.320170134305954,
-0.31651610136032104,
-0.039002928882837296,
0.4769468307495117,
0.32108551263809204,
-0.05959709361195564,
0.370758980512619,
-0.0028037503361701965,
0.29125797748565674,
0.27730265259742737,
-0.1412859410047531,
0.06606162339448929,
-0.1297413855791092,
0.389516144990921,
-0.02885536476969719,
0.019152846187353134,
0.14081059396266937,
-0.06935961544513702,
-0.05934390425682068,
0.09264911711215973,
0.19574815034866333,
0.28171306848526,
-0.03017459809780121,
-0.2807106375694275,
-0.3968455195426941,
0.006201479583978653,
0.08898560702800751,
0.05466218665242195,
0.16394278407096863,
-0.1528581976890564,
0.05657128989696503,
0.3212423622608185,
-0.1962885558605194,
0.6732676029205322,
-0.00011721457849489525,
0.05330623686313629,
0.18269649147987366,
-0.002833753824234009,
-0.21490003168582916,
-0.17322935163974762,
-0.002865813672542572,
0.06839033216238022,
0.14951622486114502,
0.04682282358407974,
-0.17401543259620667,
-0.0174991674721241,
-0.1881343424320221,
-0.6604426503181458,
0.164658784866333,
-0.042508333921432495,
0.09482607245445251,
0.4577403962612152,
-0.1465912163257599,
-0.06909176707267761,
-0.20002222061157227,
-0.039952024817466736,
-0.14591027796268463,
0.07709209620952606,
0.31674060225486755,
0.07274440675973892,
-0.27099719643592834,
0.40121567249298096,
0.12219187617301941,
-0.015591144561767578,
0.08307396620512009,
-0.14754250645637512,
-0.350762277841568,
-0.13338522613048553,
0.026910532265901566,
0.15082837641239166,
0.027056343853473663,
-0.3233974277973175,
-0.1601693481206894,
-0.22570520639419556,
0.10727719217538834,
-0.3284243941307068,
0.201379656791687,
0.11525953561067581,
-0.25809207558631897,
-0.21668508648872375,
-0.4963834583759308,
0.01326315850019455,
-0.08960461616516113,
0.06837072968482971,
-0.07536549866199493,
0.2995816469192505,
-0.2987593412399292,
0.22882121801376343,
0.38512924313545227,
0.29899197816848755,
-0.15710687637329102,
-0.19772954285144806,
-0.002054654061794281,
-0.2263694405555725,
-0.8506759405136108,
0.210271418094635,
-0.1854097545146942,
-0.024569854140281677,
0.1130077913403511,
0.212607279419899,
0.2809174656867981,
0.15809139609336853,
0.0683353990316391,
0.07589592784643173,
0.14983536303043365,
-0.02965284138917923,
-0.005833819508552551,
-0.20412547886371613,
0.43327707052230835,
0.4074971079826355,
-0.2626340985298157,
-0.06723201274871826,
-0.013328848406672478,
-0.10992640256881714,
-0.2989759147167206,
-0.1457396149635315,
-0.08084538578987122,
-0.07573612779378891,
-0.13559462130069733,
-0.009245884604752064,
-0.11118854582309723,
0.03931012004613876,
0.4182609021663666,
0.44486111402511597,
0.07055307179689407,
0.3420749604701996,
-0.18277500569820404,
0.05916411429643631,
-0.21634776890277863,
-0.44875651597976685,
-0.18320819735527039,
-0.2635971009731293,
-0.1491444855928421,
0.23651264607906342,
0.25286436080932617,
-0.6722689270973206,
-0.033016908913850784,
0.2876058518886566,
0.4721084237098694,
-0.1694207787513733,
0.1245342344045639,
-0.29843664169311523,
-0.05029793828725815,
0.17948129773139954,
0.14669935405254364,
0.4921897351741791,
0.1822681725025177,
-0.04350600764155388,
0.05512329190969467,
-0.11150530725717545,
-0.06791342049837112,
-0.0317845344543457,
0.30285823345184326,
0.11863456666469574,
0.07360691577196121,
0.18476532399654388,
-0.4126509726047516,
0.11747676134109497,
0.005819007754325867,
-0.1398874670267105,
0.27309441566467285,
-0.04221192002296448,
-0.0008702687919139862,
-0.14555160701274872,
0.23987773060798645,
0.5760335326194763,
0.12451320886611938,
-0.1120918020606041,
-0.0443904772400856,
-0.2915104925632477,
0.038571104407310486,
0.5202218294143677,
-0.17591074109077454,
-0.3686400055885315,
-0.28145554661750793,
0.045004233717918396,
-0.0261261984705925,
-0.23804381489753723,
-0.20734138786792755,
0.4822528064250946,
-0.3851122260093689,
0.30897125601768494,
0.4230332672595978,
0.10372115671634674,
0.12219540029764175,
-0.03825599327683449,
0.19279813766479492,
0.2943075895309448,
-0.00635366328060627,
0.1087382510304451,
-0.14604146778583527,
0.06424739956855774,
0.2653828561306,
0.016305286437273026,
-0.17548853158950806,
-0.300058513879776,
-0.07963960617780685,
-0.002100619487464428,
0.31338000297546387,
-0.16503708064556122,
0.17526975274085999,
0.41101473569869995,
0.04371234029531479,
-0.11278930306434631,
0.0510147362947464,
-0.18153807520866394,
-0.574967622756958,
0.29064786434173584,
0.2165021002292633,
-0.2392047941684723,
0.09127096086740494,
-0.1333739012479782,
0.23764142394065857,
-0.07981850951910019,
-0.3315660059452057,
-0.37471505999565125,
-0.032935481518507004,
0.20669057965278625,
0.09787946939468384,
0.1326659917831421,
-0.02257602848112583,
0.7143674492835999,
-0.1326308399438858,
0.1235450878739357,
-0.2603522539138794,
0.3782622218132019,
0.08834384381771088,
-0.25329169631004333,
-0.07439586520195007,
-0.11012204736471176,
0.06136968731880188,
-0.32795479893684387,
-0.14810338616371155,
0.46449926495552063,
0.09641259908676147,
0.5647338628768921,
-0.26063627004623413,
0.11943359673023224,
0.38852575421333313,
-0.19571395218372345,
0.0814359039068222,
0.17112208902835846,
0.1621701866388321,
-0.2649763822555542,
-0.04232949763536453,
0.3338702619075775,
-0.21187607944011688,
0.14005300402641296,
0.1394023895263672,
-0.1506596952676773,
-0.009420773014426231,
0.2594158947467804,
-0.048738256096839905,
0.06878665089607239,
0.3883502185344696,
0.025583820417523384,
0.44588765501976013,
-0.011565407738089561,
-0.4989607632160187,
0.1430942267179489,
0.3377918601036072,
0.263149231672287,
-0.1941157579421997,
-0.05033130943775177,
-0.33004245162010193,
-0.05804133415222168,
0.2738502323627472,
-0.07551849633455276,
0.3668179512023926,
0.11351387202739716,
-0.0034544579684734344,
-0.10172093659639359,
0.08031477779150009,
-0.2999836206436157,
0.17736758291721344,
0.10195215046405792,
0.1618015617132187,
0.2187531590461731,
0.1172676607966423,
-0.15939673781394958,
-0.15111970901489258,
-0.18575450778007507,
0.32863739132881165,
-0.033362001180648804,
-0.3298265337944031,
0.32112830877304077,
-0.34599485993385315,
-0.24143052101135254,
-0.1842232346534729,
-0.07266464829444885,
-0.4802292585372925,
-0.10746444016695023,
-0.31277281045913696,
0.4952528774738312,
0.031738463789224625,
0.128421813249588,
0.10595707595348358,
0.0028597861528396606,
0.23697461187839508,
0.022782154381275177,
-0.28592273592948914,
0.02397690713405609,
-0.1963951587677002,
-0.05390238016843796,
0.417086124420166,
-0.06987275928258896,
0.1014823466539383,
0.45332422852516174,
-0.1511560082435608,
-0.35475510358810425,
-0.1686646193265915,
0.07441732287406921,
-0.14645811915397644,
0.1020779237151146,
-0.11136025190353394,
0.1631530225276947,
-0.035169538110494614,
-0.11404077708721161,
0.19351963698863983,
-0.43751364946365356,
-0.08548972010612488,
0.271707683801651,
-0.035255592316389084,
0.1995011270046234,
-0.22854772210121155,
0.006123870611190796,
-0.24477176368236542,
-0.3657911419868469,
0.3497276306152344,
-0.2352394163608551,
-0.13698385655879974,
0.0765804722905159,
0.1583414375782013,
0.21081340312957764,
-0.03315375745296478,
-0.18436570465564728,
-0.12409546226263046,
-0.19303375482559204,
0.14701849222183228,
-0.019072476774454117,
-0.40133482217788696,
-0.244588240981102,
0.16984441876411438,
-0.0025123171508312225,
0.3933245539665222,
-0.31243571639060974,
0.16146600246429443,
-0.3194584548473358,
-0.0547042042016983,
0.05831800401210785,
-0.05197394639253616,
0.2204650342464447,
-0.2151278406381607,
-0.01358164194971323,
-0.11399076133966446,
-0.04376517981290817,
0.1658928543329239,
-0.13448747992515564,
-0.015818089246749878,
-0.11097333580255508,
0.34720727801322937,
0.3296865224838257,
0.45010387897491455,
0.21204568445682526,
-0.03832007572054863,
0.31824856996536255,
-0.07278018444776535,
0.21965815126895905,
0.049487050622701645,
-0.20635905861854553,
0.31881412863731384,
-0.1726091206073761,
-0.0045239925384521484,
-0.018886566162109375,
-0.19593185186386108,
-0.037774957716464996,
-0.22168457508087158,
0.14016085863113403,
0.18190330266952515,
-0.1656782031059265,
0.29752710461616516,
0.06558997929096222,
0.10472086071968079,
-0.17760330438613892,
0.05752391368150711,
0.07364991307258606,
-0.1482866108417511,
0.01676757074892521,
0.2895659804344177,
-0.26418378949165344,
-0.009687433950603008,
-0.3947683870792389,
0.02734026499092579,
-0.1826173961162567,
0.17090697586536407,
0.17284563183784485,
0.41673579812049866,
0.10159271955490112,
-0.06316328048706055,
0.09674377739429474,
-0.3232256770133972,
0.7259926795959473,
0.34981125593185425,
-0.13147538900375366,
0.09626911580562592,
-0.3811025321483612,
-0.2965686321258545,
0.03321569785475731,
-0.37280064821243286,
0.02045464515686035,
0.2718900442123413,
0.5440722703933716,
-0.2527817189693451,
-0.39522165060043335,
-0.19789808988571167,
0.03606124222278595,
-0.018301930278539658,
-0.05184583365917206,
-0.22067338228225708,
0.1025443896651268,
-0.2376442700624466,
0.2315637767314911,
0.10310465842485428,
0.058098215609788895,
-0.401311993598938,
-0.05811883881688118,
0.1250377595424652,
-0.2197563648223877,
0.12035338580608368,
0.06208226457238197,
0.1526395082473755,
-0.150322824716568,
0.2186867594718933,
0.35755452513694763,
0.054748568683862686,
0.23012283444404602,
0.1911984086036682,
0.31224650144577026,
-0.20272251963615417,
0.4371161460876465,
0.2170461118221283,
0.3125962018966675,
0.45868751406669617,
-0.07028362900018692,
0.49929025769233704,
0.10524245351552963,
0.30283230543136597,
-0.12995973229408264,
0.2632194757461548,
0.21913288533687592,
0.3468329608440399,
-0.3923860788345337,
-0.458741158246994,
0.3937756419181824,
0.004316641017794609,
0.20219282805919647,
0.6175047159194946,
0.12552914023399353,
-0.07383781671524048,
-0.1385607123374939,
-0.16125336289405823,
0.6028099060058594,
-0.06719326972961426,
0.3586098551750183,
0.20923885703086853,
-0.22055551409721375,
0.5054243206977844,
-0.5937470197677612,
0.19814899563789368,
-0.1506689190864563,
-0.41321611404418945,
0.018765492364764214,
-0.2010648548603058,
0.43172067403793335,
-0.12246599793434143,
-0.08273948729038239,
0.1873295158147812,
0.06535287201404572,
0.3014884293079376,
-0.1806645393371582,
0.3034682273864746,
-0.34839895367622375,
-0.41509413719177246,
-0.45341211557388306,
0.04850274324417114,
-0.12633726000785828,
0.13370546698570251,
0.09538030624389648,
-0.09765797853469849,
0.08964815735816956,
-0.02583513781428337,
-0.33737561106681824,
0.009162712842226028,
-0.6102495193481445,
0.00030599720776081085,
-0.04006807133555412,
-0.41945672035217285,
0.3332884609699249,
0.14806488156318665,
-0.09767547249794006,
-0.06345473229885101,
-0.062499530613422394,
0.1720711886882782,
-0.14119413495063782,
0.08674008399248123,
-0.10608958452939987,
-0.3329578936100006,
0.09485097229480743,
-0.009610209614038467,
-0.1025252491235733,
0.19989141821861267,
0.09746816009283066,
-0.13958975672721863,
0.36389291286468506,
0.1336819976568222,
-0.15619789063930511,
0.058961160480976105,
-0.06450261175632477,
0.08951372653245926,
0.08699853718280792,
-0.274768590927124,
0.019831059500575066,
0.06901092082262039,
-0.17514300346374512,
-0.20943623781204224,
0.018488068133592606,
0.02346118539571762,
-0.20378780364990234,
0.7961738109588623,
-0.06900791078805923,
-0.22404277324676514,
0.346279114484787,
0.4273766875267029,
-0.10663463920354843,
-0.23933950066566467,
-0.02573203667998314,
0.3107742965221405,
-0.23372137546539307,
0.14335303008556366,
-0.3001023232936859,
-0.16458454728126526,
0.17259564995765686,
-0.0007974468171596527,
-0.017555326223373413,
-0.09870066493749619,
0.014036621898412704,
-0.3685116767883301,
-0.41476279497146606,
-0.05516313016414642,
-0.1779431700706482,
0.08709278702735901,
0.1761348843574524,
0.26979830861091614,
-0.0006913729012012482,
0.3773987293243408,
-0.2025117576122284,
-0.019583584740757942,
-0.1402473747730255,
-0.12250952422618866,
0.20925326645374298,
-0.1959984004497528,
0.3830168843269348,
-0.02707037702202797,
0.057350680232048035,
0.36506521701812744,
-0.05137687176465988,
-0.11634066700935364,
-0.1765683889389038,
0.11344491690397263,
-0.05546925961971283,
-0.08208806067705154,
0.028041504323482513,
-0.10280346870422363,
-0.12126904726028442,
-0.09933386743068695,
0.6700537800788879,
0.13897347450256348,
0.006425827741622925,
-0.20907703042030334,
0.19417019188404083,
0.010862313210964203,
-0.3726525902748108,
0.018590690568089485,
-0.19535791873931885,
-0.15798620879650116,
0.3542337119579315,
0.03664272651076317,
0.04119914397597313,
-0.0052753835916519165,
-0.4814819395542145,
-0.0036610066890716553,
0.34902793169021606,
0.08964759111404419,
0.21850088238716125,
-0.23463983833789825,
-0.14610576629638672,
-0.12128204107284546,
0.3502779006958008,
0.360932320356369,
-0.14266851544380188,
-0.1517164260149002,
0.0793684720993042,
0.05996345728635788,
-0.0272354893386364,
-0.00409953435882926,
-0.19534257054328918,
0.018120858818292618,
0.08164803683757782,
0.2565746009349823,
0.3063749670982361,
0.1292659491300583,
-0.06028912961483002,
0.2432013750076294,
0.10289052873849869,
0.1693509817123413,
0.2773444354534149,
-0.2257394790649414,
0.10426411032676697,
0.15127182006835938,
0.09524668753147125,
0.10445536673069,
-0.0252470001578331,
0.20106996595859528,
-0.13846591114997864,
0.27362290024757385,
0.1747645139694214,
0.1947527378797531,
0.14683261513710022,
-0.5698386430740356,
-0.39714014530181885,
0.09334786236286163,
-0.5674176216125488,
0.2225762903690338,
-0.1508185863494873,
0.43626347184181213,
-0.37798917293548584,
-0.21522557735443115,
-0.2594103515148163,
0.2358933687210083,
-0.23646557331085205,
0.037227656692266464,
0.19985072314739227,
-0.19495229423046112,
-0.23551325500011444,
0.17674444615840912,
-0.008310437202453613,
0.11880853772163391,
0.3892444372177124,
0.27836593985557556,
0.06494555622339249,
-0.3253641128540039,
-0.2908581495285034,
0.2944503128528595,
0.19019469618797302,
-0.12471812963485718,
0.39426568150520325,
0.4062999486923218,
-0.1472921222448349,
-0.012048386037349701,
-0.023800252005457878,
0.32988008856773376,
0.0258270725607872,
0.14542289078235626,
0.15760761499404907,
0.11603793501853943,
0.004418214783072472,
0.18759657442569733,
0.11953715234994888,
0.31844618916511536,
0.16899079084396362,
0.2034032940864563,
0.06254585087299347,
-0.1343478560447693,
-0.23187832534313202,
0.013515152037143707,
0.10823354125022888,
-0.590876042842865,
0.2150617092847824,
-0.35296428203582764,
0.04865726828575134,
-0.2588043808937073,
-0.12347038835287094,
-0.4918266534805298,
0.09293932467699051,
0.3377533257007599,
-0.18807686865329742,
0.0020675640553236008,
-0.10834556818008423,
0.029926974326372147,
0.33757779002189636,
0.7586604356765747,
0.01931166648864746,
-0.11100371927022934,
-0.22932112216949463,
-0.478585422039032,
-0.5296587944030762,
0.13045765459537506,
-0.04465487226843834,
0.19258005917072296,
-0.1350322663784027,
0.27857139706611633,
0.11657805740833282,
0.037997134029865265,
0.17734764516353607,
0.11425752937793732,
0.2575359344482422,
0.19555732607841492,
-0.5474047660827637,
0.0003874190151691437,
-0.28104811906814575,
-0.06977588683366776,
0.049724288284778595,
-0.08641490340232849,
0.3129313588142395,
0.23635233938694,
-0.0038938522338867188,
-0.12754181027412415,
0.19530734419822693,
-0.061308834701776505,
-0.16843582689762115,
0.07537266612052917,
0.022778604179620743,
0.3318895697593689,
0.11260268837213516,
-0.21790336072444916,
-0.20115309953689575,
0.13193413615226746,
-0.07558852434158325,
-0.15963539481163025,
-0.016645856201648712,
0.42679429054260254,
-0.0568099170923233,
-0.26696422696113586,
-0.4690762460231781,
0.5127025842666626,
0.12184463441371918,
-0.17341481149196625,
-0.20301532745361328,
0.2121679037809372,
-0.10536829382181168,
0.23657311499118805,
0.397504597902298,
0.7369195222854614,
0.0757630318403244,
-0.07086829841136932,
-0.34009864926338196,
-0.24795030057430267,
0.29750362038612366,
-0.5315229296684265,
-0.2666740119457245,
-0.20205818116664886,
0.28316405415534973,
0.29716551303863525,
0.09927716851234436,
-0.5282416343688965,
0.1667773425579071,
0.10719551146030426,
-0.1955672800540924,
-0.216616690158844,
0.14678995311260223,
-0.11242125928401947,
-0.07235011458396912,
-0.09623309969902039,
0.17933863401412964,
0.3893272578716278,
-0.20760643482208252,
0.24392300844192505,
-0.09752305597066879
] |
https://github.com/huggingface/datasets/issues/5123 | datasets freezes with streaming mode in multiple-gpu | > Are you using `Pytorch 1.11`? Otherwise the script freezes because of the shuffling in this line:
>
> ```
> return ShufflerIterDataPipe(self, buffer_size=buffer_size)
> ```
>
> `ShufflerIterDataPipe` behavior must have changed for newer Pytorch versions. But this doesn't change whether you're using streaming or not in `datasets`, so probably not the same issue, but something to try.
I met the same issue for pytorch 1.12 and 1.13, is there a way to work around for this function for newer pytorch versions? | ## Describe the bug
Hi. I am using this dataloader, which is for processing large datasets in streaming mode mentioned in one of examples of huggingface. I am using it to read c4: https://github.com/huggingface/transformers/blob/b48ac1a094e572d6076b46a9e4ed3e0ebe978afc/examples/research_projects/codeparrot/scripts/codeparrot_training.py#L22
During using multi-gpu in accelerator in one node, the code freezes, but works for 1 GPU:
```
10/16/2022 14:18:46 - INFO - datasets.info - Loading Dataset Infos from /home/jack/.cache/huggingface/modules/datasets_modules/datasets/c4/df532b158939272d032cc63ef19cd5b83e9b4d00c922b833e4cb18b2e9869b01
Steps: 0%| | 0/400000 [00:00<?, ?it/s]10/16/2022 14:18:47 - INFO - torch.utils.data.dataloader - Shared seed (135290893754684706) sent to store on rank 0
```
# Code to reproduce
please run this code with `accelerate launch code.py`
```
from accelerate import Accelerator
from accelerate.logging import get_logger
from datasets import load_dataset
from torch.utils.data.dataloader import DataLoader
import torch
from datasets import load_dataset
from transformers import AutoTokenizer
import torch
from accelerate.logging import get_logger
from torch.utils.data import IterableDataset
from torch.utils.data.datapipes.iter.combinatorics import ShufflerIterDataPipe
logger = get_logger(__name__)
class ConstantLengthDataset(IterableDataset):
"""
Iterable dataset that returns constant length chunks of tokens from stream of text files.
Args:
tokenizer (Tokenizer): The processor used for proccessing the data.
dataset (dataset.Dataset): Dataset with text files.
infinite (bool): If True the iterator is reset after dataset reaches end else stops.
max_seq_length (int): Length of token sequences to return.
num_of_sequences (int): Number of token sequences to keep in buffer.
chars_per_token (int): Number of characters per token used to estimate number of tokens in text buffer.
"""
def __init__(
self,
tokenizer,
dataset,
infinite=False,
max_seq_length=1024,
num_of_sequences=1024,
chars_per_token=3.6,
):
self.tokenizer = tokenizer
# self.concat_token_id = tokenizer.bos_token_id
self.dataset = dataset
self.max_seq_length = max_seq_length
self.epoch = 0
self.infinite = infinite
self.current_size = 0
self.max_buffer_size = max_seq_length * chars_per_token * num_of_sequences
self.content_field = "text"
def __iter__(self):
iterator = iter(self.dataset)
more_examples = True
while more_examples:
buffer, buffer_len = [], 0
while True:
if buffer_len >= self.max_buffer_size:
break
try:
buffer.append(next(iterator)[self.content_field])
buffer_len += len(buffer[-1])
except StopIteration:
if self.infinite:
iterator = iter(self.dataset)
self.epoch += 1
logger.info(f"Dataset epoch: {self.epoch}")
else:
more_examples = False
break
tokenized_inputs = self.tokenizer(buffer, truncation=False)["input_ids"]
all_token_ids = []
for tokenized_input in tokenized_inputs:
all_token_ids.extend(tokenized_input)
for i in range(0, len(all_token_ids), self.max_seq_length):
input_ids = all_token_ids[i : i + self.max_seq_length]
if len(input_ids) == self.max_seq_length:
self.current_size += 1
yield torch.tensor(input_ids)
def shuffle(self, buffer_size=1000):
return ShufflerIterDataPipe(self, buffer_size=buffer_size)
def create_dataloaders(tokenizer, accelerator):
ds_kwargs = {"streaming": True}
# In distributed training, the load_dataset function gaurantees that only one process
# can concurrently download the dataset.
datasets = load_dataset(
"c4",
"en",
cache_dir="cache_dir",
**ds_kwargs,
)
train_data, valid_data = datasets["train"], datasets["validation"]
with accelerator.main_process_first():
train_data = train_data.shuffle(buffer_size=10000, seed=None)
train_dataset = ConstantLengthDataset(
tokenizer,
train_data,
infinite=True,
max_seq_length=256,
)
valid_dataset = ConstantLengthDataset(
tokenizer,
valid_data,
infinite=False,
max_seq_length=256,
)
train_dataset = train_dataset.shuffle(buffer_size=10000)
train_dataloader = DataLoader(train_dataset, batch_size=160, shuffle=True)
eval_dataloader = DataLoader(valid_dataset, batch_size=160)
return train_dataloader, eval_dataloader
def main():
# Accelerator.
logging_dir = "data_save_dir/log"
accelerator = Accelerator(
gradient_accumulation_steps=1,
mixed_precision="bf16",
log_with="tensorboard",
logging_dir=logging_dir,
)
# We need to initialize the trackers we use, and also store our configuration.
# The trackers initializes automatically on the main process.
if accelerator.is_main_process:
accelerator.init_trackers("test")
tokenizer = AutoTokenizer.from_pretrained("bert-base-uncased")
# Load datasets and create dataloaders.
train_dataloader, _ = create_dataloaders(tokenizer, accelerator)
train_dataloader = accelerator.prepare(train_dataloader)
for step, batch in enumerate(train_dataloader, start=1):
print(step)
accelerator.end_training()
if __name__ == "__main__":
main()
```
## Results expected
Being able to run the code for streamining datasets with multi-gpu
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.5.2
- Platform: linux
- Python version: 3.9.12
- PyArrow version: 9.0.0
@lhoestq I do not have any idea why this freezing happens, and I removed the streaming mode and this was working fine, so I know this is caused by streaming mode of the dataloader part not working well with multi-gpu setting. Since datasets are large, I hope to keep the streamining mode. I very much appreciate your help.
| 83 | datasets freezes with streaming mode in multiple-gpu
## Describe the bug
Hi. I am using this dataloader, which is for processing large datasets in streaming mode mentioned in one of examples of huggingface. I am using it to read c4: https://github.com/huggingface/transformers/blob/b48ac1a094e572d6076b46a9e4ed3e0ebe978afc/examples/research_projects/codeparrot/scripts/codeparrot_training.py#L22
During using multi-gpu in accelerator in one node, the code freezes, but works for 1 GPU:
```
10/16/2022 14:18:46 - INFO - datasets.info - Loading Dataset Infos from /home/jack/.cache/huggingface/modules/datasets_modules/datasets/c4/df532b158939272d032cc63ef19cd5b83e9b4d00c922b833e4cb18b2e9869b01
Steps: 0%| | 0/400000 [00:00<?, ?it/s]10/16/2022 14:18:47 - INFO - torch.utils.data.dataloader - Shared seed (135290893754684706) sent to store on rank 0
```
# Code to reproduce
please run this code with `accelerate launch code.py`
```
from accelerate import Accelerator
from accelerate.logging import get_logger
from datasets import load_dataset
from torch.utils.data.dataloader import DataLoader
import torch
from datasets import load_dataset
from transformers import AutoTokenizer
import torch
from accelerate.logging import get_logger
from torch.utils.data import IterableDataset
from torch.utils.data.datapipes.iter.combinatorics import ShufflerIterDataPipe
logger = get_logger(__name__)
class ConstantLengthDataset(IterableDataset):
"""
Iterable dataset that returns constant length chunks of tokens from stream of text files.
Args:
tokenizer (Tokenizer): The processor used for proccessing the data.
dataset (dataset.Dataset): Dataset with text files.
infinite (bool): If True the iterator is reset after dataset reaches end else stops.
max_seq_length (int): Length of token sequences to return.
num_of_sequences (int): Number of token sequences to keep in buffer.
chars_per_token (int): Number of characters per token used to estimate number of tokens in text buffer.
"""
def __init__(
self,
tokenizer,
dataset,
infinite=False,
max_seq_length=1024,
num_of_sequences=1024,
chars_per_token=3.6,
):
self.tokenizer = tokenizer
# self.concat_token_id = tokenizer.bos_token_id
self.dataset = dataset
self.max_seq_length = max_seq_length
self.epoch = 0
self.infinite = infinite
self.current_size = 0
self.max_buffer_size = max_seq_length * chars_per_token * num_of_sequences
self.content_field = "text"
def __iter__(self):
iterator = iter(self.dataset)
more_examples = True
while more_examples:
buffer, buffer_len = [], 0
while True:
if buffer_len >= self.max_buffer_size:
break
try:
buffer.append(next(iterator)[self.content_field])
buffer_len += len(buffer[-1])
except StopIteration:
if self.infinite:
iterator = iter(self.dataset)
self.epoch += 1
logger.info(f"Dataset epoch: {self.epoch}")
else:
more_examples = False
break
tokenized_inputs = self.tokenizer(buffer, truncation=False)["input_ids"]
all_token_ids = []
for tokenized_input in tokenized_inputs:
all_token_ids.extend(tokenized_input)
for i in range(0, len(all_token_ids), self.max_seq_length):
input_ids = all_token_ids[i : i + self.max_seq_length]
if len(input_ids) == self.max_seq_length:
self.current_size += 1
yield torch.tensor(input_ids)
def shuffle(self, buffer_size=1000):
return ShufflerIterDataPipe(self, buffer_size=buffer_size)
def create_dataloaders(tokenizer, accelerator):
ds_kwargs = {"streaming": True}
# In distributed training, the load_dataset function gaurantees that only one process
# can concurrently download the dataset.
datasets = load_dataset(
"c4",
"en",
cache_dir="cache_dir",
**ds_kwargs,
)
train_data, valid_data = datasets["train"], datasets["validation"]
with accelerator.main_process_first():
train_data = train_data.shuffle(buffer_size=10000, seed=None)
train_dataset = ConstantLengthDataset(
tokenizer,
train_data,
infinite=True,
max_seq_length=256,
)
valid_dataset = ConstantLengthDataset(
tokenizer,
valid_data,
infinite=False,
max_seq_length=256,
)
train_dataset = train_dataset.shuffle(buffer_size=10000)
train_dataloader = DataLoader(train_dataset, batch_size=160, shuffle=True)
eval_dataloader = DataLoader(valid_dataset, batch_size=160)
return train_dataloader, eval_dataloader
def main():
# Accelerator.
logging_dir = "data_save_dir/log"
accelerator = Accelerator(
gradient_accumulation_steps=1,
mixed_precision="bf16",
log_with="tensorboard",
logging_dir=logging_dir,
)
# We need to initialize the trackers we use, and also store our configuration.
# The trackers initializes automatically on the main process.
if accelerator.is_main_process:
accelerator.init_trackers("test")
tokenizer = AutoTokenizer.from_pretrained("bert-base-uncased")
# Load datasets and create dataloaders.
train_dataloader, _ = create_dataloaders(tokenizer, accelerator)
train_dataloader = accelerator.prepare(train_dataloader)
for step, batch in enumerate(train_dataloader, start=1):
print(step)
accelerator.end_training()
if __name__ == "__main__":
main()
```
## Results expected
Being able to run the code for streamining datasets with multi-gpu
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.5.2
- Platform: linux
- Python version: 3.9.12
- PyArrow version: 9.0.0
@lhoestq I do not have any idea why this freezing happens, and I removed the streaming mode and this was working fine, so I know this is caused by streaming mode of the dataloader part not working well with multi-gpu setting. Since datasets are large, I hope to keep the streamining mode. I very much appreciate your help.
> Are you using `Pytorch 1.11`? Otherwise the script freezes because of the shuffling in this line:
>
> ```
> return ShufflerIterDataPipe(self, buffer_size=buffer_size)
> ```
>
> `ShufflerIterDataPipe` behavior must have changed for newer Pytorch versions. But this doesn't change whether you're using streaming or not in `datasets`, so probably not the same issue, but something to try.
I met the same issue for pytorch 1.12 and 1.13, is there a way to work around for this function for newer pytorch versions? | [
-0.320170134305954,
-0.31651610136032104,
-0.039002928882837296,
0.4769468307495117,
0.32108551263809204,
-0.05959709361195564,
0.370758980512619,
-0.0028037503361701965,
0.29125797748565674,
0.27730265259742737,
-0.1412859410047531,
0.06606162339448929,
-0.1297413855791092,
0.389516144990921,
-0.02885536476969719,
0.019152846187353134,
0.14081059396266937,
-0.06935961544513702,
-0.05934390425682068,
0.09264911711215973,
0.19574815034866333,
0.28171306848526,
-0.03017459809780121,
-0.2807106375694275,
-0.3968455195426941,
0.006201479583978653,
0.08898560702800751,
0.05466218665242195,
0.16394278407096863,
-0.1528581976890564,
0.05657128989696503,
0.3212423622608185,
-0.1962885558605194,
0.6732676029205322,
-0.00011721457849489525,
0.05330623686313629,
0.18269649147987366,
-0.002833753824234009,
-0.21490003168582916,
-0.17322935163974762,
-0.002865813672542572,
0.06839033216238022,
0.14951622486114502,
0.04682282358407974,
-0.17401543259620667,
-0.0174991674721241,
-0.1881343424320221,
-0.6604426503181458,
0.164658784866333,
-0.042508333921432495,
0.09482607245445251,
0.4577403962612152,
-0.1465912163257599,
-0.06909176707267761,
-0.20002222061157227,
-0.039952024817466736,
-0.14591027796268463,
0.07709209620952606,
0.31674060225486755,
0.07274440675973892,
-0.27099719643592834,
0.40121567249298096,
0.12219187617301941,
-0.015591144561767578,
0.08307396620512009,
-0.14754250645637512,
-0.350762277841568,
-0.13338522613048553,
0.026910532265901566,
0.15082837641239166,
0.027056343853473663,
-0.3233974277973175,
-0.1601693481206894,
-0.22570520639419556,
0.10727719217538834,
-0.3284243941307068,
0.201379656791687,
0.11525953561067581,
-0.25809207558631897,
-0.21668508648872375,
-0.4963834583759308,
0.01326315850019455,
-0.08960461616516113,
0.06837072968482971,
-0.07536549866199493,
0.2995816469192505,
-0.2987593412399292,
0.22882121801376343,
0.38512924313545227,
0.29899197816848755,
-0.15710687637329102,
-0.19772954285144806,
-0.002054654061794281,
-0.2263694405555725,
-0.8506759405136108,
0.210271418094635,
-0.1854097545146942,
-0.024569854140281677,
0.1130077913403511,
0.212607279419899,
0.2809174656867981,
0.15809139609336853,
0.0683353990316391,
0.07589592784643173,
0.14983536303043365,
-0.02965284138917923,
-0.005833819508552551,
-0.20412547886371613,
0.43327707052230835,
0.4074971079826355,
-0.2626340985298157,
-0.06723201274871826,
-0.013328848406672478,
-0.10992640256881714,
-0.2989759147167206,
-0.1457396149635315,
-0.08084538578987122,
-0.07573612779378891,
-0.13559462130069733,
-0.009245884604752064,
-0.11118854582309723,
0.03931012004613876,
0.4182609021663666,
0.44486111402511597,
0.07055307179689407,
0.3420749604701996,
-0.18277500569820404,
0.05916411429643631,
-0.21634776890277863,
-0.44875651597976685,
-0.18320819735527039,
-0.2635971009731293,
-0.1491444855928421,
0.23651264607906342,
0.25286436080932617,
-0.6722689270973206,
-0.033016908913850784,
0.2876058518886566,
0.4721084237098694,
-0.1694207787513733,
0.1245342344045639,
-0.29843664169311523,
-0.05029793828725815,
0.17948129773139954,
0.14669935405254364,
0.4921897351741791,
0.1822681725025177,
-0.04350600764155388,
0.05512329190969467,
-0.11150530725717545,
-0.06791342049837112,
-0.0317845344543457,
0.30285823345184326,
0.11863456666469574,
0.07360691577196121,
0.18476532399654388,
-0.4126509726047516,
0.11747676134109497,
0.005819007754325867,
-0.1398874670267105,
0.27309441566467285,
-0.04221192002296448,
-0.0008702687919139862,
-0.14555160701274872,
0.23987773060798645,
0.5760335326194763,
0.12451320886611938,
-0.1120918020606041,
-0.0443904772400856,
-0.2915104925632477,
0.038571104407310486,
0.5202218294143677,
-0.17591074109077454,
-0.3686400055885315,
-0.28145554661750793,
0.045004233717918396,
-0.0261261984705925,
-0.23804381489753723,
-0.20734138786792755,
0.4822528064250946,
-0.3851122260093689,
0.30897125601768494,
0.4230332672595978,
0.10372115671634674,
0.12219540029764175,
-0.03825599327683449,
0.19279813766479492,
0.2943075895309448,
-0.00635366328060627,
0.1087382510304451,
-0.14604146778583527,
0.06424739956855774,
0.2653828561306,
0.016305286437273026,
-0.17548853158950806,
-0.300058513879776,
-0.07963960617780685,
-0.002100619487464428,
0.31338000297546387,
-0.16503708064556122,
0.17526975274085999,
0.41101473569869995,
0.04371234029531479,
-0.11278930306434631,
0.0510147362947464,
-0.18153807520866394,
-0.574967622756958,
0.29064786434173584,
0.2165021002292633,
-0.2392047941684723,
0.09127096086740494,
-0.1333739012479782,
0.23764142394065857,
-0.07981850951910019,
-0.3315660059452057,
-0.37471505999565125,
-0.032935481518507004,
0.20669057965278625,
0.09787946939468384,
0.1326659917831421,
-0.02257602848112583,
0.7143674492835999,
-0.1326308399438858,
0.1235450878739357,
-0.2603522539138794,
0.3782622218132019,
0.08834384381771088,
-0.25329169631004333,
-0.07439586520195007,
-0.11012204736471176,
0.06136968731880188,
-0.32795479893684387,
-0.14810338616371155,
0.46449926495552063,
0.09641259908676147,
0.5647338628768921,
-0.26063627004623413,
0.11943359673023224,
0.38852575421333313,
-0.19571395218372345,
0.0814359039068222,
0.17112208902835846,
0.1621701866388321,
-0.2649763822555542,
-0.04232949763536453,
0.3338702619075775,
-0.21187607944011688,
0.14005300402641296,
0.1394023895263672,
-0.1506596952676773,
-0.009420773014426231,
0.2594158947467804,
-0.048738256096839905,
0.06878665089607239,
0.3883502185344696,
0.025583820417523384,
0.44588765501976013,
-0.011565407738089561,
-0.4989607632160187,
0.1430942267179489,
0.3377918601036072,
0.263149231672287,
-0.1941157579421997,
-0.05033130943775177,
-0.33004245162010193,
-0.05804133415222168,
0.2738502323627472,
-0.07551849633455276,
0.3668179512023926,
0.11351387202739716,
-0.0034544579684734344,
-0.10172093659639359,
0.08031477779150009,
-0.2999836206436157,
0.17736758291721344,
0.10195215046405792,
0.1618015617132187,
0.2187531590461731,
0.1172676607966423,
-0.15939673781394958,
-0.15111970901489258,
-0.18575450778007507,
0.32863739132881165,
-0.033362001180648804,
-0.3298265337944031,
0.32112830877304077,
-0.34599485993385315,
-0.24143052101135254,
-0.1842232346534729,
-0.07266464829444885,
-0.4802292585372925,
-0.10746444016695023,
-0.31277281045913696,
0.4952528774738312,
0.031738463789224625,
0.128421813249588,
0.10595707595348358,
0.0028597861528396606,
0.23697461187839508,
0.022782154381275177,
-0.28592273592948914,
0.02397690713405609,
-0.1963951587677002,
-0.05390238016843796,
0.417086124420166,
-0.06987275928258896,
0.1014823466539383,
0.45332422852516174,
-0.1511560082435608,
-0.35475510358810425,
-0.1686646193265915,
0.07441732287406921,
-0.14645811915397644,
0.1020779237151146,
-0.11136025190353394,
0.1631530225276947,
-0.035169538110494614,
-0.11404077708721161,
0.19351963698863983,
-0.43751364946365356,
-0.08548972010612488,
0.271707683801651,
-0.035255592316389084,
0.1995011270046234,
-0.22854772210121155,
0.006123870611190796,
-0.24477176368236542,
-0.3657911419868469,
0.3497276306152344,
-0.2352394163608551,
-0.13698385655879974,
0.0765804722905159,
0.1583414375782013,
0.21081340312957764,
-0.03315375745296478,
-0.18436570465564728,
-0.12409546226263046,
-0.19303375482559204,
0.14701849222183228,
-0.019072476774454117,
-0.40133482217788696,
-0.244588240981102,
0.16984441876411438,
-0.0025123171508312225,
0.3933245539665222,
-0.31243571639060974,
0.16146600246429443,
-0.3194584548473358,
-0.0547042042016983,
0.05831800401210785,
-0.05197394639253616,
0.2204650342464447,
-0.2151278406381607,
-0.01358164194971323,
-0.11399076133966446,
-0.04376517981290817,
0.1658928543329239,
-0.13448747992515564,
-0.015818089246749878,
-0.11097333580255508,
0.34720727801322937,
0.3296865224838257,
0.45010387897491455,
0.21204568445682526,
-0.03832007572054863,
0.31824856996536255,
-0.07278018444776535,
0.21965815126895905,
0.049487050622701645,
-0.20635905861854553,
0.31881412863731384,
-0.1726091206073761,
-0.0045239925384521484,
-0.018886566162109375,
-0.19593185186386108,
-0.037774957716464996,
-0.22168457508087158,
0.14016085863113403,
0.18190330266952515,
-0.1656782031059265,
0.29752710461616516,
0.06558997929096222,
0.10472086071968079,
-0.17760330438613892,
0.05752391368150711,
0.07364991307258606,
-0.1482866108417511,
0.01676757074892521,
0.2895659804344177,
-0.26418378949165344,
-0.009687433950603008,
-0.3947683870792389,
0.02734026499092579,
-0.1826173961162567,
0.17090697586536407,
0.17284563183784485,
0.41673579812049866,
0.10159271955490112,
-0.06316328048706055,
0.09674377739429474,
-0.3232256770133972,
0.7259926795959473,
0.34981125593185425,
-0.13147538900375366,
0.09626911580562592,
-0.3811025321483612,
-0.2965686321258545,
0.03321569785475731,
-0.37280064821243286,
0.02045464515686035,
0.2718900442123413,
0.5440722703933716,
-0.2527817189693451,
-0.39522165060043335,
-0.19789808988571167,
0.03606124222278595,
-0.018301930278539658,
-0.05184583365917206,
-0.22067338228225708,
0.1025443896651268,
-0.2376442700624466,
0.2315637767314911,
0.10310465842485428,
0.058098215609788895,
-0.401311993598938,
-0.05811883881688118,
0.1250377595424652,
-0.2197563648223877,
0.12035338580608368,
0.06208226457238197,
0.1526395082473755,
-0.150322824716568,
0.2186867594718933,
0.35755452513694763,
0.054748568683862686,
0.23012283444404602,
0.1911984086036682,
0.31224650144577026,
-0.20272251963615417,
0.4371161460876465,
0.2170461118221283,
0.3125962018966675,
0.45868751406669617,
-0.07028362900018692,
0.49929025769233704,
0.10524245351552963,
0.30283230543136597,
-0.12995973229408264,
0.2632194757461548,
0.21913288533687592,
0.3468329608440399,
-0.3923860788345337,
-0.458741158246994,
0.3937756419181824,
0.004316641017794609,
0.20219282805919647,
0.6175047159194946,
0.12552914023399353,
-0.07383781671524048,
-0.1385607123374939,
-0.16125336289405823,
0.6028099060058594,
-0.06719326972961426,
0.3586098551750183,
0.20923885703086853,
-0.22055551409721375,
0.5054243206977844,
-0.5937470197677612,
0.19814899563789368,
-0.1506689190864563,
-0.41321611404418945,
0.018765492364764214,
-0.2010648548603058,
0.43172067403793335,
-0.12246599793434143,
-0.08273948729038239,
0.1873295158147812,
0.06535287201404572,
0.3014884293079376,
-0.1806645393371582,
0.3034682273864746,
-0.34839895367622375,
-0.41509413719177246,
-0.45341211557388306,
0.04850274324417114,
-0.12633726000785828,
0.13370546698570251,
0.09538030624389648,
-0.09765797853469849,
0.08964815735816956,
-0.02583513781428337,
-0.33737561106681824,
0.009162712842226028,
-0.6102495193481445,
0.00030599720776081085,
-0.04006807133555412,
-0.41945672035217285,
0.3332884609699249,
0.14806488156318665,
-0.09767547249794006,
-0.06345473229885101,
-0.062499530613422394,
0.1720711886882782,
-0.14119413495063782,
0.08674008399248123,
-0.10608958452939987,
-0.3329578936100006,
0.09485097229480743,
-0.009610209614038467,
-0.1025252491235733,
0.19989141821861267,
0.09746816009283066,
-0.13958975672721863,
0.36389291286468506,
0.1336819976568222,
-0.15619789063930511,
0.058961160480976105,
-0.06450261175632477,
0.08951372653245926,
0.08699853718280792,
-0.274768590927124,
0.019831059500575066,
0.06901092082262039,
-0.17514300346374512,
-0.20943623781204224,
0.018488068133592606,
0.02346118539571762,
-0.20378780364990234,
0.7961738109588623,
-0.06900791078805923,
-0.22404277324676514,
0.346279114484787,
0.4273766875267029,
-0.10663463920354843,
-0.23933950066566467,
-0.02573203667998314,
0.3107742965221405,
-0.23372137546539307,
0.14335303008556366,
-0.3001023232936859,
-0.16458454728126526,
0.17259564995765686,
-0.0007974468171596527,
-0.017555326223373413,
-0.09870066493749619,
0.014036621898412704,
-0.3685116767883301,
-0.41476279497146606,
-0.05516313016414642,
-0.1779431700706482,
0.08709278702735901,
0.1761348843574524,
0.26979830861091614,
-0.0006913729012012482,
0.3773987293243408,
-0.2025117576122284,
-0.019583584740757942,
-0.1402473747730255,
-0.12250952422618866,
0.20925326645374298,
-0.1959984004497528,
0.3830168843269348,
-0.02707037702202797,
0.057350680232048035,
0.36506521701812744,
-0.05137687176465988,
-0.11634066700935364,
-0.1765683889389038,
0.11344491690397263,
-0.05546925961971283,
-0.08208806067705154,
0.028041504323482513,
-0.10280346870422363,
-0.12126904726028442,
-0.09933386743068695,
0.6700537800788879,
0.13897347450256348,
0.006425827741622925,
-0.20907703042030334,
0.19417019188404083,
0.010862313210964203,
-0.3726525902748108,
0.018590690568089485,
-0.19535791873931885,
-0.15798620879650116,
0.3542337119579315,
0.03664272651076317,
0.04119914397597313,
-0.0052753835916519165,
-0.4814819395542145,
-0.0036610066890716553,
0.34902793169021606,
0.08964759111404419,
0.21850088238716125,
-0.23463983833789825,
-0.14610576629638672,
-0.12128204107284546,
0.3502779006958008,
0.360932320356369,
-0.14266851544380188,
-0.1517164260149002,
0.0793684720993042,
0.05996345728635788,
-0.0272354893386364,
-0.00409953435882926,
-0.19534257054328918,
0.018120858818292618,
0.08164803683757782,
0.2565746009349823,
0.3063749670982361,
0.1292659491300583,
-0.06028912961483002,
0.2432013750076294,
0.10289052873849869,
0.1693509817123413,
0.2773444354534149,
-0.2257394790649414,
0.10426411032676697,
0.15127182006835938,
0.09524668753147125,
0.10445536673069,
-0.0252470001578331,
0.20106996595859528,
-0.13846591114997864,
0.27362290024757385,
0.1747645139694214,
0.1947527378797531,
0.14683261513710022,
-0.5698386430740356,
-0.39714014530181885,
0.09334786236286163,
-0.5674176216125488,
0.2225762903690338,
-0.1508185863494873,
0.43626347184181213,
-0.37798917293548584,
-0.21522557735443115,
-0.2594103515148163,
0.2358933687210083,
-0.23646557331085205,
0.037227656692266464,
0.19985072314739227,
-0.19495229423046112,
-0.23551325500011444,
0.17674444615840912,
-0.008310437202453613,
0.11880853772163391,
0.3892444372177124,
0.27836593985557556,
0.06494555622339249,
-0.3253641128540039,
-0.2908581495285034,
0.2944503128528595,
0.19019469618797302,
-0.12471812963485718,
0.39426568150520325,
0.4062999486923218,
-0.1472921222448349,
-0.012048386037349701,
-0.023800252005457878,
0.32988008856773376,
0.0258270725607872,
0.14542289078235626,
0.15760761499404907,
0.11603793501853943,
0.004418214783072472,
0.18759657442569733,
0.11953715234994888,
0.31844618916511536,
0.16899079084396362,
0.2034032940864563,
0.06254585087299347,
-0.1343478560447693,
-0.23187832534313202,
0.013515152037143707,
0.10823354125022888,
-0.590876042842865,
0.2150617092847824,
-0.35296428203582764,
0.04865726828575134,
-0.2588043808937073,
-0.12347038835287094,
-0.4918266534805298,
0.09293932467699051,
0.3377533257007599,
-0.18807686865329742,
0.0020675640553236008,
-0.10834556818008423,
0.029926974326372147,
0.33757779002189636,
0.7586604356765747,
0.01931166648864746,
-0.11100371927022934,
-0.22932112216949463,
-0.478585422039032,
-0.5296587944030762,
0.13045765459537506,
-0.04465487226843834,
0.19258005917072296,
-0.1350322663784027,
0.27857139706611633,
0.11657805740833282,
0.037997134029865265,
0.17734764516353607,
0.11425752937793732,
0.2575359344482422,
0.19555732607841492,
-0.5474047660827637,
0.0003874190151691437,
-0.28104811906814575,
-0.06977588683366776,
0.049724288284778595,
-0.08641490340232849,
0.3129313588142395,
0.23635233938694,
-0.0038938522338867188,
-0.12754181027412415,
0.19530734419822693,
-0.061308834701776505,
-0.16843582689762115,
0.07537266612052917,
0.022778604179620743,
0.3318895697593689,
0.11260268837213516,
-0.21790336072444916,
-0.20115309953689575,
0.13193413615226746,
-0.07558852434158325,
-0.15963539481163025,
-0.016645856201648712,
0.42679429054260254,
-0.0568099170923233,
-0.26696422696113586,
-0.4690762460231781,
0.5127025842666626,
0.12184463441371918,
-0.17341481149196625,
-0.20301532745361328,
0.2121679037809372,
-0.10536829382181168,
0.23657311499118805,
0.397504597902298,
0.7369195222854614,
0.0757630318403244,
-0.07086829841136932,
-0.34009864926338196,
-0.24795030057430267,
0.29750362038612366,
-0.5315229296684265,
-0.2666740119457245,
-0.20205818116664886,
0.28316405415534973,
0.29716551303863525,
0.09927716851234436,
-0.5282416343688965,
0.1667773425579071,
0.10719551146030426,
-0.1955672800540924,
-0.216616690158844,
0.14678995311260223,
-0.11242125928401947,
-0.07235011458396912,
-0.09623309969902039,
0.17933863401412964,
0.3893272578716278,
-0.20760643482208252,
0.24392300844192505,
-0.09752305597066879
] |
https://github.com/huggingface/datasets/issues/5117 | Progress bars have color red and never completed to 100% | Hi @echatzikyriakidis, thanks for submitting the issue.
Which shell are you using exactly? I tried to run the command you sent, but I don't see colors at all 🧐
I tried from bash and zsh as well. | ## Describe the bug
Progress bars after transformative operations turn in red and never be completed to 100%
## Steps to reproduce the bug
```python
from datasets import load_dataset
load_dataset('rotten_tomatoes', split='test').filter(lambda o: True)
```
## Expected results
Progress bar should be 100% and green
## Actual results
Progress bar turn in red and never completed to 100%
## Environment info
- `datasets` version: 2.6.1
- Platform: Linux-5.10.133+-x86_64-with-Ubuntu-18.04-bionic
- Python version: 3.7.14
- PyArrow version: 6.0.1
- Pandas version: 1.3.5 | 37 | Progress bars have color red and never completed to 100%
## Describe the bug
Progress bars after transformative operations turn in red and never be completed to 100%
## Steps to reproduce the bug
```python
from datasets import load_dataset
load_dataset('rotten_tomatoes', split='test').filter(lambda o: True)
```
## Expected results
Progress bar should be 100% and green
## Actual results
Progress bar turn in red and never completed to 100%
## Environment info
- `datasets` version: 2.6.1
- Platform: Linux-5.10.133+-x86_64-with-Ubuntu-18.04-bionic
- Python version: 3.7.14
- PyArrow version: 6.0.1
- Pandas version: 1.3.5
Hi @echatzikyriakidis, thanks for submitting the issue.
Which shell are you using exactly? I tried to run the command you sent, but I don't see colors at all 🧐
I tried from bash and zsh as well. | [
-0.39734846353530884,
0.043209508061409,
-0.10254928469657898,
-0.029496580362319946,
0.3089589476585388,
-0.11117610335350037,
0.13297230005264282,
0.38976994156837463,
-0.28815367817878723,
0.09463697671890259,
0.04255276173353195,
0.5570790767669678,
0.1608472466468811,
0.19700902700424194,
-0.16744504868984222,
0.10379050672054291,
0.1462431102991104,
0.3946817219257355,
-0.2369968295097351,
-0.23185954988002777,
-0.3105844259262085,
-0.04299348592758179,
-0.21072247624397278,
-0.009622812271118164,
-0.13319534063339233,
0.10419272631406784,
0.036809056997299194,
-0.15617284178733826,
0.1635749787092209,
-0.1139363944530487,
0.32121679186820984,
0.08196534216403961,
-0.06298786401748657,
0.6998752951622009,
-0.00012562777556013316,
-0.11954726278781891,
0.5439431071281433,
-0.05457010865211487,
0.08095365762710571,
-0.4189264178276062,
0.026397958397865295,
-0.43833044171333313,
0.2248648703098297,
-0.25398099422454834,
-0.041834574192762375,
-0.18906117975711823,
-0.31910595297813416,
-0.17861928045749664,
0.5863473415374756,
0.24947258830070496,
0.10573466867208481,
0.2659204602241516,
0.07351577281951904,
0.37023496627807617,
0.356293261051178,
0.15762127935886383,
-0.0474594309926033,
-0.03843570500612259,
0.6653670072555542,
-0.1261037290096283,
-0.08142591267824173,
0.277825266122818,
0.1362890750169754,
0.1552559733390808,
-0.16595584154129028,
-0.16868498921394348,
0.4979154169559479,
-0.3012867867946625,
0.12762849032878876,
0.11267222464084625,
0.050516847521066666,
-0.08478664606809616,
-0.2687157988548279,
-0.02059759572148323,
-0.3217802047729492,
-0.280668169260025,
0.02699679508805275,
0.24536384642124176,
-0.030734499916434288,
0.03838527202606201,
-0.7459017634391785,
0.3554685115814209,
-0.1708022952079773,
0.07664601504802704,
0.044824182987213135,
0.2778593897819519,
-0.1455393135547638,
0.10299752652645111,
-0.2603376507759094,
0.17712964117527008,
0.15607738494873047,
-0.1330079436302185,
0.0813385546207428,
0.03617987781763077,
-0.4206354320049286,
0.18104536831378937,
-0.011039771139621735,
0.2681937515735626,
-0.10365369915962219,
0.2629756033420563,
-0.4233516454696655,
0.15990278124809265,
-0.014047203585505486,
0.10533435642719269,
-0.05197562649846077,
0.3243354260921478,
-0.06386547535657883,
0.04356992989778519,
0.2894464135169983,
-0.2723771035671234,
-0.3278018534183502,
0.16688799858093262,
0.2799387276172638,
-0.19274522364139557,
0.3620654344558716,
0.3383316397666931,
0.27617669105529785,
-0.30865925550460815,
-0.27506452798843384,
0.24103409051895142,
-0.011867295950651169,
-0.15658335387706757,
0.03060990199446678,
0.13613438606262207,
0.032478369772434235,
-0.07844987511634827,
0.25751203298568726,
0.24322396516799927,
0.03234490752220154,
-0.07398352026939392,
-0.0834171250462532,
-0.16591022908687592,
-0.6171138882637024,
-0.251400351524353,
0.1312321573495865,
0.1300901621580124,
0.0632229894399643,
0.011129994876682758,
-0.18417136371135712,
-0.4060410261154175,
0.06978806108236313,
-0.11321133375167847,
0.23113888502120972,
0.39355403184890747,
-0.00032591819763183594,
0.23375774919986725,
0.3317633867263794,
-0.02274303138256073,
0.15040889382362366,
0.43801364302635193,
0.03851983696222305,
-0.051778391003608704,
-0.11413329839706421,
0.04062917083501816,
-0.45397210121154785,
0.18913131952285767,
-0.4049127399921417,
0.1951630562543869,
0.5805585384368896,
0.2512719929218292,
-0.13149493932724,
-0.29789453744888306,
-0.05293497443199158,
-0.032388102263212204,
0.21445848047733307,
0.47433024644851685,
-0.4861565828323364,
-0.25215965509414673,
-0.09629932045936584,
-0.0415986143052578,
0.5445831418037415,
0.06035897880792618,
0.14952267706394196,
-0.04056709259748459,
-0.008193905465304852,
-0.18367233872413635,
0.18636676669120789,
-0.17305712401866913,
-0.42338499426841736,
-0.08284018188714981,
0.12180720269680023,
-0.018543211743235588,
0.166718989610672,
-0.18691852688789368,
0.20123806595802307,
-0.09462224692106247,
-0.4839724600315094,
0.24589134752750397,
0.06570680439472198,
0.16689756512641907,
-0.30527186393737793,
-0.19375619292259216,
0.31853485107421875,
0.16024644672870636,
0.5247516632080078,
0.4107727110385895,
0.07288756966590881,
-0.5993902087211609,
0.3581540286540985,
0.10979495942592621,
0.2760777771472931,
-0.1654292345046997,
0.22994567453861237,
0.3212762475013733,
0.11447712033987045,
-0.25860685110092163,
0.3504863381385803,
0.023668423295021057,
-0.15643960237503052,
-0.16223447024822235,
-0.19072838127613068,
-0.05522339418530464,
-0.5111557841300964,
-0.15111199021339417,
-0.3437502980232239,
-0.03820119425654411,
0.06481611728668213,
0.1949358582496643,
0.30041271448135376,
0.08637966215610504,
-0.08716361224651337,
0.13348396122455597,
-0.3125469386577606,
-0.025885550305247307,
0.0973965972661972,
0.6101465821266174,
0.11110501736402512,
-0.6363301277160645,
0.05057467520236969,
0.022147059440612793,
0.22052258253097534,
0.002955400152131915,
-0.39130398631095886,
0.14669986069202423,
-0.41580313444137573,
0.21824078261852264,
0.08827431499958038,
0.03234976530075073,
0.04881390184164047,
-0.18169701099395752,
-0.21602143347263336,
0.4294608533382416,
0.08755917847156525,
0.2676922380924225,
0.23233798146247864,
-0.047744885087013245,
-0.08193092048168182,
0.4405835270881653,
-0.05233373865485191,
0.15427947044372559,
0.24707472324371338,
-0.11702187359333038,
-0.13975705206394196,
-0.06155062094330788,
0.22411729395389557,
-0.16204887628555298,
0.2950546443462372,
-0.3283829987049103,
0.1428373157978058,
0.15450583398342133,
0.43801772594451904,
0.05314042046666145,
0.2685949504375458,
0.17554524540901184,
-0.0780600979924202,
0.046330392360687256,
0.0534965917468071,
0.20393042266368866,
0.33075764775276184,
0.15867455303668976,
-0.14470070600509644,
0.028042975813150406,
-0.04836539179086685,
0.04262230917811394,
-0.025435008108615875,
0.3742043972015381,
0.3829494118690491,
0.39489009976387024,
0.04274033382534981,
-0.11666923016309738,
-0.2442379593849182,
-0.51512211561203,
-0.09754927456378937,
0.1405734419822693,
-0.2352568358182907,
0.20122721791267395,
-0.2638709545135498,
-0.03984678164124489,
0.019424546509981155,
-0.3682684004306793,
0.2786646783351898,
-0.08624132722616196,
-0.25689321756362915,
0.03894418850541115,
-0.037523481994867325,
0.3397205173969269,
0.24463629722595215,
-0.09040676057338715,
0.19540634751319885,
0.19601421058177948,
-0.6649671792984009,
-0.2969375550746918,
-0.0253869891166687,
-0.11446936428546906,
0.0018622493371367455,
-0.4678841829299927,
0.19456373155117035,
-0.42613649368286133,
0.35069340467453003,
0.0670565664768219,
-0.02075342833995819,
-0.14184023439884186,
-0.2329903095960617,
0.2622721493244171,
-0.2797233462333679,
0.1822969913482666,
-0.02137688919901848,
0.26164042949676514,
0.458631694316864,
-0.21682047843933105,
-0.16448146104812622,
0.1021835133433342,
-0.005273699760437012,
-0.09008363634347916,
0.09595836699008942,
-0.08360780030488968,
-0.5255460739135742,
-0.23441380262374878,
0.0410921573638916,
-0.09121973812580109,
0.13588707149028778,
-0.11787966638803482,
0.06517426669597626,
0.05333728343248367,
0.17954440414905548,
-0.022296590730547905,
-0.05987769365310669,
-0.14378288388252258,
0.23550888895988464,
0.03037310019135475,
-0.03089529648423195,
0.03921414539217949,
-0.039726030081510544,
-0.18922553956508636,
-0.03281034156680107,
-0.3211187720298767,
-0.0011025583371520042,
-0.481411337852478,
-0.013900060206651688,
-0.017491713166236877,
0.2709096372127533,
0.1768842339515686,
-0.06791691482067108,
-0.09054819494485855,
-0.16058778762817383,
-0.3153054416179657,
-0.20004382729530334,
-0.17585346102714539,
0.1310848593711853,
-0.12277913838624954,
0.3355676233768463,
-0.09140655398368835,
0.14582166075706482,
0.4249986410140991,
-0.29565462470054626,
0.2895914912223816,
0.29723966121673584,
-0.03548545762896538,
-0.08218663185834885,
-0.7083032727241516,
-0.16059757769107819,
-0.24294829368591309,
-0.0038099773228168488,
-0.14103688299655914,
0.06220588460564613,
0.07645758241415024,
-0.11849121749401093,
-0.28374600410461426,
-0.7260776162147522,
-0.07477560639381409,
-0.3242453336715698,
-0.04822953790426254,
0.21048054099082947,
0.1680879145860672,
-0.015965603291988373,
0.18305866420269012,
-0.1224767416715622,
-0.3234665095806122,
0.4797263741493225,
0.09063314646482468,
0.08609939366579056,
0.04182242974638939,
-0.17142653465270996,
0.22824174165725708,
0.3817892074584961,
-0.05492905154824257,
0.18498742580413818,
-0.13560061156749725,
0.24580880999565125,
0.1552729457616806,
0.13456152379512787,
0.6406797170639038,
-0.09836310893297195,
0.47742336988449097,
0.27430272102355957,
-0.3283803462982178,
-0.20270785689353943,
-0.44162338972091675,
-0.10781849175691605,
0.2553894519805908,
0.40768641233444214,
0.17204628884792328,
0.1505497395992279,
0.09895354509353638,
0.056814372539520264,
0.14507204294204712,
-0.13078580796718597,
-0.37591230869293213,
-0.5269041657447815,
-0.17393961548805237,
-0.25445836782455444,
0.5208958387374878,
0.08213988691568375,
0.05319925397634506,
-0.44725072383880615,
-0.5176915526390076,
0.010909982956945896,
-0.42554771900177,
-0.02067536860704422,
0.09436222910881042,
0.0918956845998764,
-0.1166490986943245,
0.02001071348786354,
-0.18669651448726654,
-0.021966151893138885,
-0.009558157995343208,
0.2037617564201355,
0.0731458067893982,
-0.20414257049560547,
0.15301084518432617,
-0.327204167842865,
0.11170485615730286,
0.18300487101078033,
-0.2126806229352951,
-0.09000752121210098,
-0.09085757285356522,
0.16329306364059448,
-0.0027875658124685287,
-0.08997722715139389,
-0.12277102470397949,
0.2391652911901474,
-0.07846036553382874,
-0.0007831193506717682,
0.3675920367240906,
-0.059767190366983414,
-0.1237964779138565,
-0.00639672577381134,
0.04082396253943443,
-0.1771390587091446,
0.20005595684051514,
0.08630402386188507,
1.0596438646316528,
-0.285261332988739,
-0.24407091736793518,
-0.35542118549346924,
-0.3116956353187561,
0.155982106924057,
0.08993783593177795,
-0.06143787503242493,
-0.42388394474983215,
-0.07812909781932831,
0.1015997976064682,
-0.3543589115142822,
0.22266897559165955,
0.18181008100509644,
-0.4149421751499176,
0.2678055763244629,
-0.5503315329551697,
0.06913920491933823,
0.4261811673641205,
-0.19242167472839355,
0.260780930519104,
-0.032156869769096375,
-0.4994630217552185,
0.09111721068620682,
-0.16220225393772125,
0.4293631911277771,
-0.008848011493682861,
0.02088797464966774,
-0.28993192315101624,
0.3310340642929077,
-0.3044135272502899,
0.25391173362731934,
0.007537213619798422,
0.08565860241651535,
-0.049784597009420395,
-0.602789580821991,
-0.02559642307460308,
0.2614070773124695,
0.20190782845020294,
0.23549821972846985,
-0.022661643102765083,
0.11419671773910522,
0.11438494920730591,
0.3453751802444458,
0.08709738403558731,
0.03519260883331299,
0.33683374524116516,
-0.0967785194516182,
-0.42112526297569275,
0.19485238194465637,
0.019367791712284088,
-0.15889793634414673,
-0.18200579285621643,
0.3407912254333496,
0.35841304063796997,
-0.09335808455944061,
0.15740825235843658,
-0.07105448842048645,
-0.0260918028652668,
-0.34955906867980957,
0.08469857275485992,
0.2550826072692871,
-0.20789918303489685,
0.8391274809837341,
-0.06473426520824432,
-0.22029107809066772,
-0.05818972364068031,
-0.043444640934467316,
-0.011324364691972733,
0.22187256813049316,
0.15587197244167328,
0.0885428786277771,
-0.10012947767972946,
-0.163818821310997,
0.11729294806718826,
0.09959030896425247,
-0.5751619935035706,
0.48050588369369507,
-0.2053452730178833,
0.25192904472351074,
-0.15118183195590973,
-0.020454976707696915,
0.060609012842178345,
0.260501503944397,
-0.21315643191337585,
-0.5812908411026001,
-0.20455557107925415,
-0.36331260204315186,
0.1467048078775406,
0.034150559455156326,
-0.011851394549012184,
0.36267897486686707,
0.1914273053407669,
0.09747084975242615,
-0.1756637692451477,
-0.0856897234916687,
-0.45950847864151,
0.267830491065979,
0.05157007277011871,
-0.1385098099708557,
0.10317053645849228,
-0.06667910516262054,
-0.08921627700328827,
0.14190903306007385,
-0.002594330348074436,
-0.18845799565315247,
-0.21268482506275177,
0.1541467308998108,
0.08476217091083527,
-0.17908218502998352,
-0.00905134528875351,
0.051411136984825134,
0.12364737689495087,
0.012334119528532028,
-0.24403385818004608,
0.16544470191001892,
0.13350605964660645,
0.2773258090019226,
-0.03398031368851662,
-0.1569327414035797,
-0.12021099776029587,
-0.32598474621772766,
-0.07032863795757294,
0.04731137678027153,
-0.05217718333005905,
0.24200604856014252,
0.5237810015678406,
0.15089641511440277,
-0.5174373984336853,
-0.45929038524627686,
0.05169615522027016,
0.30708345770835876,
0.1490461230278015,
-0.2661646604537964,
0.27212056517601013,
-0.1471407562494278,
0.4453596770763397,
0.2905135154724121,
-0.23452863097190857,
-0.041912488639354706,
0.07010270655155182,
0.12306655943393707,
-0.18992659449577332,
0.1263960897922516,
0.250896155834198,
0.16176754236221313,
-0.032536581158638,
0.1376417726278305,
-0.17269471287727356,
-0.09255930781364441,
0.029394496232271194,
0.07245631515979767,
0.4834819436073303,
0.00920419953763485,
0.019618136808276176,
0.10112655162811279,
0.05482996627688408,
0.36957859992980957,
0.43939292430877686,
-0.004686381667852402,
-0.3241719901561737,
0.3086908459663391,
0.1806746870279312,
0.196629598736763,
0.1101115494966507,
0.042075902223587036,
-0.29481568932533264,
0.05916919931769371,
-0.14511528611183167,
-0.1640309989452362,
-0.21205228567123413,
-0.004710346460342407,
-0.17784026265144348,
0.29887059330940247,
-0.17152781784534454,
-0.2704267203807831,
-0.04934052750468254,
0.08005982637405396,
0.03299998119473457,
-0.234255850315094,
-0.021038897335529327,
0.013101041316986084,
-0.09481464326381683,
-0.10136811435222626,
0.09270782023668289,
0.16523002088069916,
-0.10357668995857239,
0.22002141177654266,
0.18617591261863708,
-0.1692742109298706,
0.01786537654697895,
-0.0059969015419483185,
0.30517858266830444,
-0.04465335234999657,
0.007564982399344444,
0.38979774713516235,
0.2921212613582611,
-0.16613072156906128,
0.09454409778118134,
0.5389214158058167,
0.378016859292984,
-0.21215946972370148,
0.023383384570479393,
0.05856256186962128,
-0.12891635298728943,
-0.0006567928940057755,
0.5768651962280273,
0.08226894587278366,
-0.06398867070674896,
0.030562717467546463,
0.09217442572116852,
-0.1384822279214859,
0.4692847430706024,
0.05016806349158287,
0.3052332103252411,
-0.057860273867845535,
0.558404803276062,
0.009683508425951004,
-0.2540586292743683,
-0.17904232442378998,
-0.16386127471923828,
-0.29150062799453735,
0.10035308450460434,
0.2817135453224182,
-0.2310977280139923,
0.0006705187261104584,
-0.20535218715667725,
0.02802088111639023,
-0.08696280419826508,
0.05270858481526375,
0.18363085389137268,
0.5224458575248718,
-0.30843955278396606,
0.002301543951034546,
-0.1636735498905182,
-0.05176498740911484,
0.3278828263282776,
-0.09554781019687653,
-0.19457873702049255,
0.2325940877199173,
-0.5302539467811584,
0.3655092716217041,
0.7365785837173462,
-0.25626304745674133,
-0.05687311291694641,
0.2437177151441574,
-0.10432672500610352,
-0.07717619836330414,
-0.03560806065797806,
0.1391691118478775,
0.11232826113700867,
-0.10175444185733795,
0.04388120025396347,
-0.0526408888399601,
0.09231018275022507,
-0.02724062278866768,
-0.3898979127407074,
0.3374447822570801,
-0.03230392932891846,
0.3902144730091095,
0.13905812799930573,
0.5216212868690491,
0.03656574338674545,
0.0750684142112732,
0.11930851638317108,
-0.09738873690366745,
-0.05055387690663338,
0.29108187556266785,
-0.05264255031943321,
0.39237168431282043,
-0.07971631735563278,
-0.00224921852350235,
-0.18007510900497437,
0.16793419420719147,
0.09409128129482269,
0.03502300754189491,
-0.06420748680830002,
-0.16613468527793884,
0.12746065855026245,
-0.13100989162921906,
-0.0649447813630104,
0.09398630261421204,
-0.035873688757419586,
0.614131510257721,
-0.6432936787605286,
-0.25503984093666077,
0.40355759859085083,
-0.23545445501804352,
-0.560284435749054,
-0.22426220774650574,
0.17986780405044556,
0.29728448390960693,
0.0005248468369245529,
-0.12645883858203888,
-0.19686610996723175,
0.22406582534313202,
-0.1113293394446373,
-0.2563885450363159,
0.3339841663837433,
-0.3140406906604767,
0.1395552009344101,
0.07948675751686096,
-0.11646996438503265,
0.23359936475753784,
0.1594102531671524,
0.06859622895717621,
-0.24511852860450745
] |
https://github.com/huggingface/datasets/issues/5117 | Progress bars have color red and never completed to 100% | Got it. I [created a PR](https://github.com/huggingface/datasets/pull/5120) that fixes this issue. Turns out that the wrapping logic for the inner loop was slightly incorrect. | ## Describe the bug
Progress bars after transformative operations turn in red and never be completed to 100%
## Steps to reproduce the bug
```python
from datasets import load_dataset
load_dataset('rotten_tomatoes', split='test').filter(lambda o: True)
```
## Expected results
Progress bar should be 100% and green
## Actual results
Progress bar turn in red and never completed to 100%
## Environment info
- `datasets` version: 2.6.1
- Platform: Linux-5.10.133+-x86_64-with-Ubuntu-18.04-bionic
- Python version: 3.7.14
- PyArrow version: 6.0.1
- Pandas version: 1.3.5 | 23 | Progress bars have color red and never completed to 100%
## Describe the bug
Progress bars after transformative operations turn in red and never be completed to 100%
## Steps to reproduce the bug
```python
from datasets import load_dataset
load_dataset('rotten_tomatoes', split='test').filter(lambda o: True)
```
## Expected results
Progress bar should be 100% and green
## Actual results
Progress bar turn in red and never completed to 100%
## Environment info
- `datasets` version: 2.6.1
- Platform: Linux-5.10.133+-x86_64-with-Ubuntu-18.04-bionic
- Python version: 3.7.14
- PyArrow version: 6.0.1
- Pandas version: 1.3.5
Got it. I [created a PR](https://github.com/huggingface/datasets/pull/5120) that fixes this issue. Turns out that the wrapping logic for the inner loop was slightly incorrect. | [
-0.3259928524494171,
0.1697705090045929,
-0.08464694768190384,
-0.1609392762184143,
0.3235743045806885,
-0.1941778063774109,
0.12783411145210266,
0.3235280513763428,
-0.17735134065151215,
0.05086398124694824,
-0.04770611226558685,
0.6858978867530823,
0.3134889006614685,
0.3177017271518707,
-0.17500895261764526,
0.09816676378250122,
0.1372297704219818,
0.3600846529006958,
-0.35829928517341614,
-0.2361186444759369,
-0.2490982711315155,
-0.03406978398561478,
-0.20952756702899933,
-0.08363683521747589,
-0.22193026542663574,
0.1197456419467926,
0.07469900697469711,
-0.12426795810461044,
0.1527986079454422,
-0.21726234257221222,
0.2502306401729584,
0.17330464720726013,
-0.1086730882525444,
0.7035323977470398,
-0.00011796934268204495,
-0.07124171406030655,
0.5332723259925842,
0.013105785474181175,
-0.008803514763712883,
-0.29420173168182373,
0.15221518278121948,
-0.4213208854198456,
0.19283483922481537,
-0.25357240438461304,
0.04395134001970291,
-0.2528022527694702,
-0.348439484834671,
-0.10548794269561768,
0.588219165802002,
0.09649309515953064,
0.14998690783977509,
0.39249756932258606,
-0.030532268807291985,
0.24722157418727875,
0.2287563979625702,
0.11402605473995209,
-0.12265367060899734,
0.04688598960638046,
0.613170862197876,
-0.26735347509384155,
-0.3647611737251282,
0.3807286024093628,
0.1441800594329834,
0.1259865164756775,
-0.09743251651525497,
-0.16373039782047272,
0.2754373252391815,
-0.3369007706642151,
0.06349895149469376,
0.060301270335912704,
0.014993719756603241,
-0.24805599451065063,
-0.4290371537208557,
-0.16434860229492188,
-0.21123959124088287,
-0.2142123281955719,
0.04644232243299484,
0.059023916721343994,
-0.037973176687955856,
0.04460842162370682,
-0.7685168385505676,
0.39405083656311035,
-0.10629312694072723,
0.023708656430244446,
-0.06531725078821182,
0.08034593611955643,
-0.10223857313394547,
0.02095337212085724,
-0.22630630433559418,
0.25161153078079224,
0.19152036309242249,
-0.09277185797691345,
0.15427392721176147,
0.06720935553312302,
-0.3910318613052368,
0.1117466539144516,
0.050235822796821594,
0.29568761587142944,
0.01581580936908722,
0.18865588307380676,
-0.3473452031612396,
0.09047888964414597,
0.061308372765779495,
0.050889015197753906,
0.03616371378302574,
0.38668984174728394,
-0.14888373017311096,
0.024556711316108704,
0.35188716650009155,
-0.2710670828819275,
-0.22359339892864227,
0.18244001269340515,
0.37078338861465454,
-0.1282975971698761,
0.3068133294582367,
0.2771855294704437,
0.18230637907981873,
-0.21305520832538605,
-0.3419007658958435,
0.21190257370471954,
0.04487266391515732,
-0.0963507816195488,
0.07355566322803497,
0.0656638965010643,
0.003237382508814335,
0.1109166294336319,
0.2267865389585495,
0.27751487493515015,
0.01648874022066593,
-0.019288336858153343,
-0.16299593448638916,
-0.15014714002609253,
-0.5900096297264099,
-0.14652980864048004,
0.15753240883350372,
0.0791311264038086,
0.1510608196258545,
0.04500184580683708,
-0.07081857323646545,
-0.25173863768577576,
0.028802713379263878,
0.013502122834324837,
0.2775983512401581,
0.45446163415908813,
0.09091268479824066,
0.25154298543930054,
0.18657156825065613,
0.023616574704647064,
0.24580484628677368,
0.21879714727401733,
0.05624939501285553,
-0.060508355498313904,
-0.0770033746957779,
0.10937980562448502,
-0.5102291703224182,
0.1871301680803299,
-0.37743282318115234,
0.16107115149497986,
0.5863104462623596,
0.29060062766075134,
-0.001796044409275055,
-0.2544981837272644,
-0.05867629498243332,
0.0011502265697345138,
0.19900305569171906,
0.380583792924881,
-0.3576813042163849,
-0.1915062516927719,
-0.03440631926059723,
-0.006551075726747513,
0.2696535587310791,
0.13904869556427002,
0.16582582890987396,
0.07071992754936218,
-0.037427715957164764,
-0.03580609709024429,
0.1275056004524231,
-0.08237490057945251,
-0.4911540448665619,
0.08328016847372055,
0.03268388658761978,
0.13810203969478607,
0.019467629492282867,
-0.1875379979610443,
0.37674635648727417,
-0.15068888664245605,
-0.47836264967918396,
0.38260340690612793,
0.06254420429468155,
0.2624305784702301,
-0.3383525013923645,
-0.022362828254699707,
0.3063398599624634,
0.11678384244441986,
0.3624764382839203,
0.4926411211490631,
0.006810367107391357,
-0.5230540037155151,
0.34806767106056213,
0.0561298243701458,
0.3158073127269745,
-0.20663447678089142,
0.13652175664901733,
0.12151351571083069,
0.15269829332828522,
-0.20759212970733643,
0.11155615746974945,
0.04861820489168167,
-0.3048977851867676,
-0.13444796204566956,
-0.17353455722332,
-0.0901719182729721,
-0.558234453201294,
-0.06817709654569626,
-0.23767508566379547,
-0.0031353607773780823,
0.12481501698493958,
0.14616818726062775,
0.224551260471344,
0.09787313640117645,
-0.11905144155025482,
0.18640939891338348,
-0.2546270489692688,
-0.006693460047245026,
-0.0000024978071451187134,
0.6304140090942383,
0.15569037199020386,
-0.5735864043235779,
-0.00313664972782135,
0.08592039346694946,
0.23191863298416138,
-0.1133524477481842,
-0.34996387362480164,
0.19864675402641296,
-0.4980461299419403,
0.2670150399208069,
0.08864802122116089,
0.07474339753389359,
0.08933451026678085,
-0.14340077340602875,
-0.32143324613571167,
0.33882832527160645,
0.1528281271457672,
0.16441747546195984,
0.07144936919212341,
0.20580434799194336,
-0.08257949352264404,
0.4359978437423706,
-0.10357573628425598,
0.16842778027057648,
0.20872953534126282,
-0.13311119377613068,
-0.27605140209198,
-0.004236847162246704,
0.24618634581565857,
-0.07461771368980408,
0.27585890889167786,
-0.2370806485414505,
0.16203662753105164,
0.2671371102333069,
0.4704233705997467,
0.04418131336569786,
0.1494794487953186,
0.1454598605632782,
-0.017901919782161713,
0.007647767663002014,
0.0005267728120088577,
0.05242789909243584,
0.3809143900871277,
0.15236766636371613,
-0.0980973094701767,
0.0267289150506258,
-0.16964200139045715,
-0.07872113585472107,
0.0116829052567482,
0.3191183805465698,
0.2504301369190216,
0.41586247086524963,
0.1452646255493164,
-0.11906758695840836,
-0.3568040430545807,
-0.40600937604904175,
-0.039627231657505035,
0.10304033011198044,
-0.2615089416503906,
0.27471742033958435,
-0.08542272448539734,
-0.034036487340927124,
-0.014678536914288998,
-0.4063783288002014,
0.24330167472362518,
-0.25432759523391724,
-0.16541102528572083,
0.2614074647426605,
-0.2546170949935913,
0.4474005103111267,
0.2245781421661377,
-0.08391563594341278,
0.17564807832241058,
0.18244518339633942,
-0.5646634697914124,
-0.30469122529029846,
0.08348993211984634,
-0.055822111666202545,
0.018521592020988464,
-0.43681007623672485,
0.10529761016368866,
-0.31761330366134644,
0.29878437519073486,
-0.04741869866847992,
-0.11002519726753235,
-0.122322678565979,
-0.22458313405513763,
0.1981584131717682,
-0.19318953156471252,
0.21009774506092072,
0.04257545620203018,
0.24451424181461334,
0.3368280231952667,
-0.20699861645698547,
-0.1859203428030014,
0.09597433358430862,
-0.008258303627371788,
-0.10980585217475891,
-0.05301723629236221,
-0.13108396530151367,
-0.3501066565513611,
-0.2898104786872864,
0.08723427355289459,
-0.171169251203537,
0.019718952476978302,
-0.14410535991191864,
0.11123562604188919,
-0.07543642073869705,
0.19530293345451355,
-0.08883485198020935,
-0.13026227056980133,
-0.13269935548305511,
0.30989959836006165,
0.01763417199254036,
-0.12037800252437592,
-0.09772741794586182,
-0.14151668548583984,
-0.18837560713291168,
0.11445846408605576,
-0.33611488342285156,
-0.054810523986816406,
-0.4240029454231262,
0.10257725417613983,
-0.012132033705711365,
0.2569965422153473,
0.18050600588321686,
-0.15408548712730408,
-0.158807173371315,
-0.1968904435634613,
-0.24517382681369781,
-0.18695378303527832,
-0.27271854877471924,
0.033925317227840424,
-0.2081385850906372,
0.27280569076538086,
0.012238074094057083,
0.12314188480377197,
0.38483574986457825,
-0.2568591833114624,
0.2557271718978882,
0.2797728478908539,
-0.00013392046093940735,
-0.14557531476020813,
-0.6513985991477966,
-0.08082200586795807,
-0.30345943570137024,
0.09430292248725891,
-0.19097177684307098,
0.061484675854444504,
-0.047180816531181335,
-0.12416080385446548,
-0.27038562297821045,
-0.5333869457244873,
-0.19030357897281647,
-0.09661795198917389,
-0.010493040084838867,
0.10518651455640793,
0.3497019410133362,
0.12118522077798843,
0.09152267873287201,
-0.08246071636676788,
-0.2704886794090271,
0.26155808568000793,
0.22408363223075867,
-0.11066601425409317,
0.06602032482624054,
-0.14509016275405884,
0.0886826142668724,
0.31984132528305054,
0.005385654978454113,
0.13573837280273438,
-0.01950744166970253,
0.1517159640789032,
0.14230823516845703,
0.03530079871416092,
0.7412742376327515,
0.020109158009290695,
0.29372596740722656,
0.20838801562786102,
-0.30952075123786926,
-0.2939501106739044,
-0.3245919644832611,
-0.033082377165555954,
0.3249139189720154,
0.41969242691993713,
0.15992841124534607,
0.04555734246969223,
0.12553121149539948,
0.11220667511224747,
0.1896621584892273,
-0.09422863274812698,
-0.34692731499671936,
-0.47966858744621277,
-0.27295494079589844,
-0.22477808594703674,
0.48840028047561646,
0.17024365067481995,
-0.01996288262307644,
-0.5158300399780273,
-0.432048499584198,
0.02862870693206787,
-0.5241290330886841,
-0.0940743237733841,
0.23852749168872833,
0.08762140572071075,
-0.02340349741280079,
0.15291664004325867,
-0.121443971991539,
0.07425660640001297,
-0.1470494121313095,
0.19002416729927063,
0.01776815950870514,
-0.06778383255004883,
0.18642625212669373,
-0.29738694429397583,
0.08995586633682251,
0.2836494743824005,
-0.14500543475151062,
-0.0975891724228859,
-0.01804910972714424,
0.10945668816566467,
-0.13128753006458282,
-0.09790239483118057,
-0.10967501997947693,
0.10481937229633331,
0.025402160361409187,
0.01126769743859768,
0.5660411715507507,
-0.08909487724304199,
-0.14345683157444,
0.08281609416007996,
0.057483308017253876,
-0.19447362422943115,
0.2277757078409195,
-0.01485203206539154,
0.9262485504150391,
-0.1027529239654541,
-0.21175429224967957,
-0.16396665573120117,
-0.2767852544784546,
0.18138575553894043,
0.0740974023938179,
-0.09837791323661804,
-0.39615321159362793,
-0.07195037603378296,
0.11546897888183594,
-0.26097801327705383,
0.010157875716686249,
0.015123959630727768,
-0.3047449588775635,
0.23666468262672424,
-0.5090726613998413,
0.1685791164636612,
0.36260849237442017,
-0.013872340321540833,
0.16539476811885834,
-0.18602418899536133,
-0.4681016504764557,
0.11813998222351074,
-0.012253299355506897,
0.41037505865097046,
0.021687481552362442,
-0.09557308256626129,
-0.20470532774925232,
0.20849217474460602,
-0.27372217178344727,
0.3013952970504761,
0.06468159705400467,
0.0035203471779823303,
0.10978199541568756,
-0.515411376953125,
-0.04470151662826538,
0.0733838677406311,
0.2785446345806122,
0.08466629683971405,
-0.02111746184527874,
0.1403171569108963,
0.14690041542053223,
0.4900292158126831,
0.09019844233989716,
-0.023764148354530334,
0.3541963994503021,
-0.07519534230232239,
-0.32087764143943787,
0.1634213626384735,
-0.006133573595434427,
-0.06275727599859238,
-0.16682085394859314,
0.31587550044059753,
0.27240318059921265,
-0.3265237510204315,
0.3697209656238556,
-0.07135049998760223,
0.013059236109256744,
-0.5195792317390442,
0.14690053462982178,
0.37004029750823975,
-0.23024789988994598,
0.8466818332672119,
-0.021827515214681625,
-0.174250066280365,
-0.16671381890773773,
0.0601813942193985,
-0.007630959153175354,
0.09422659873962402,
0.18543174862861633,
0.07836326956748962,
-0.15650415420532227,
-0.15819379687309265,
-0.03760489076375961,
0.23847191035747528,
-0.6908990144729614,
0.568808376789093,
-0.2492348700761795,
0.12110216915607452,
-0.3370725214481354,
-0.0054509080946445465,
-0.05946085602045059,
0.30085277557373047,
-0.20116828382015228,
-0.5766512751579285,
-0.25933775305747986,
-0.2422051578760147,
0.1915670782327652,
0.06167704612016678,
-0.19378215074539185,
0.58502197265625,
0.18616776168346405,
0.04559032618999481,
-0.27462655305862427,
-0.12091196328401566,
-0.3416730463504791,
0.2760988771915436,
-0.0626901313662529,
-0.20454105734825134,
0.10694534331560135,
-0.008500711992383003,
0.01056729070842266,
0.33915215730667114,
-0.050972044467926025,
-0.259460985660553,
-0.26684555411338806,
0.12671074271202087,
0.020858852192759514,
-0.24429042637348175,
0.04741142317652702,
0.17549726366996765,
0.036766134202480316,
-0.024196110665798187,
-0.17416317760944366,
0.09911923855543137,
0.1223042905330658,
0.2446826547384262,
-0.002867531031370163,
-0.09350960701704025,
-0.03671015053987503,
-0.3105924129486084,
-0.028921596705913544,
0.0033281445503234863,
-0.16677433252334595,
0.2821178436279297,
0.3061990737915039,
0.15365482866764069,
-0.47089844942092896,
-0.3896188735961914,
0.008916348218917847,
0.32933950424194336,
0.16373279690742493,
-0.24917005002498627,
0.165129616856575,
-0.07381855696439743,
0.5952454805374146,
0.3643968999385834,
-0.2840745747089386,
-0.0692819207906723,
0.017114989459514618,
0.19801780581474304,
-0.18998394906520844,
0.18976598978042603,
0.22767220437526703,
0.21518206596374512,
0.04231813922524452,
0.14118856191635132,
-0.06022341549396515,
-0.07168875634670258,
0.058758482336997986,
0.0827597975730896,
0.49052709341049194,
0.004389442503452301,
-0.01753147691488266,
0.0026811733841896057,
0.07078441977500916,
0.36474376916885376,
0.33853062987327576,
-0.027835000306367874,
-0.3137662708759308,
0.36660581827163696,
0.07569023221731186,
0.21844206750392914,
-0.0600876659154892,
0.045829709619283676,
-0.25526201725006104,
0.08465930819511414,
-0.09319059550762177,
-0.031613096594810486,
-0.1357189118862152,
0.08869592100381851,
-0.04368811845779419,
0.25277820229530334,
-0.17946811020374298,
-0.3459542393684387,
-0.1332191377878189,
0.1816752552986145,
-0.08544672280550003,
-0.23546838760375977,
-0.20514164865016937,
-0.1027543768286705,
-0.07458014041185379,
-0.08020663261413574,
-0.006526060402393341,
0.150887131690979,
0.24066153168678284,
0.07332422584295273,
0.13161176443099976,
-0.22800825536251068,
0.033211201429367065,
-0.06061561405658722,
0.3952113389968872,
-0.0658353716135025,
0.002298269420862198,
0.4944666028022766,
0.19283336400985718,
-0.13440728187561035,
0.2019297033548355,
0.5193222761154175,
0.29495638608932495,
-0.20635071396827698,
0.006892479956150055,
-0.029427137225866318,
-0.15380802750587463,
-0.02495092712342739,
0.5563697218894958,
-0.06556068360805511,
-0.10672026872634888,
0.03676076605916023,
0.1537708342075348,
-0.21059328317642212,
0.477428138256073,
0.07468347996473312,
0.45846647024154663,
-0.07060989737510681,
0.5707221031188965,
0.013147899881005287,
-0.16823789477348328,
-0.20973271131515503,
-0.21523156762123108,
-0.13065782189369202,
0.03306465595960617,
0.17253166437149048,
-0.2609681487083435,
0.006975743919610977,
-0.2757590711116791,
0.07651728391647339,
-0.08340942859649658,
0.16033302247524261,
0.20195125043392181,
0.5126239061355591,
-0.2988395690917969,
0.08144843578338623,
-0.11428795754909515,
-0.019894592463970184,
0.36139240860939026,
0.04245621711015701,
-0.15784400701522827,
0.3310318887233734,
-0.5455858111381531,
0.44404715299606323,
0.5975043773651123,
-0.18810366094112396,
-0.06324202567338943,
0.13830062747001648,
-0.255536288022995,
-0.16079719364643097,
-0.1087837815284729,
0.032842300832271576,
0.19378143548965454,
-0.12824857234954834,
0.05330934748053551,
-0.12235162407159805,
0.19810253381729126,
0.014851164072751999,
-0.3733205497264862,
0.35874825716018677,
0.008545942604541779,
0.3061898946762085,
0.22926217317581177,
0.3017321825027466,
-0.01009465754032135,
0.038853637874126434,
-0.07372397184371948,
-0.1722753494977951,
-0.15220694243907928,
0.16878092288970947,
0.06528331339359283,
0.4785062372684479,
-0.05125371366739273,
-0.03896423801779747,
-0.2033592015504837,
0.20782074332237244,
0.1505541056394577,
0.029206715524196625,
-0.13235081732273102,
-0.0328676663339138,
0.07611856609582901,
-0.08252321183681488,
-0.15127122402191162,
0.1990583837032318,
-0.08598315715789795,
0.6486538052558899,
-0.550585150718689,
-0.41574692726135254,
0.5245225429534912,
-0.40903806686401367,
-0.5023499131202698,
-0.09266344457864761,
0.11948569864034653,
0.29940611124038696,
-0.10792643576860428,
-0.28974610567092896,
-0.10007936507463455,
0.175031378865242,
-0.13662788271903992,
-0.3320578634738922,
0.267006516456604,
-0.3548707962036133,
0.0526595301926136,
-0.009991327300667763,
0.07519280165433884,
0.24173787236213684,
0.000011447817087173462,
0.12428644299507141,
-0.19598455727100372
] |
https://github.com/huggingface/datasets/issues/5117 | Progress bars have color red and never completed to 100% | Hello @mariosasko
I am still facing this issue. Was this problem fixed?

I cleared the hugging face cache before running, and no error message was given. Let me know if you need a minimal repro of my code. | ## Describe the bug
Progress bars after transformative operations turn in red and never be completed to 100%
## Steps to reproduce the bug
```python
from datasets import load_dataset
load_dataset('rotten_tomatoes', split='test').filter(lambda o: True)
```
## Expected results
Progress bar should be 100% and green
## Actual results
Progress bar turn in red and never completed to 100%
## Environment info
- `datasets` version: 2.6.1
- Platform: Linux-5.10.133+-x86_64-with-Ubuntu-18.04-bionic
- Python version: 3.7.14
- PyArrow version: 6.0.1
- Pandas version: 1.3.5 | 46 | Progress bars have color red and never completed to 100%
## Describe the bug
Progress bars after transformative operations turn in red and never be completed to 100%
## Steps to reproduce the bug
```python
from datasets import load_dataset
load_dataset('rotten_tomatoes', split='test').filter(lambda o: True)
```
## Expected results
Progress bar should be 100% and green
## Actual results
Progress bar turn in red and never completed to 100%
## Environment info
- `datasets` version: 2.6.1
- Platform: Linux-5.10.133+-x86_64-with-Ubuntu-18.04-bionic
- Python version: 3.7.14
- PyArrow version: 6.0.1
- Pandas version: 1.3.5
Hello @mariosasko
I am still facing this issue. Was this problem fixed?

I cleared the hugging face cache before running, and no error message was given. Let me know if you need a minimal repro of my code. | [
-0.23909001052379608,
-0.04158295691013336,
-0.05195482447743416,
-0.052215225994586945,
0.4029645323753357,
-0.15426728129386902,
0.1198558658361435,
0.35057806968688965,
-0.1880609393119812,
-0.008815169334411621,
-0.013552581891417503,
0.43634656071662903,
0.25479012727737427,
0.3528019189834595,
-0.14065508544445038,
0.13738778233528137,
0.1295931339263916,
0.4179728031158447,
-0.29743048548698425,
-0.23294295370578766,
-0.2522495985031128,
0.06799671798944473,
-0.19778534770011902,
-0.0385834276676178,
-0.34157559275627136,
0.13652178645133972,
0.09412813186645508,
-0.14069843292236328,
0.14209096133708954,
-0.16257590055465698,
0.35015058517456055,
0.11664243042469025,
-0.16700080037117004,
0.7497730851173401,
-0.000129144755192101,
-0.12993349134922028,
0.5837595462799072,
-0.004055239260196686,
0.005200766026973724,
-0.3322063088417053,
0.11407626420259476,
-0.4021189212799072,
0.2751222550868988,
-0.11376653611660004,
-0.08584319800138474,
-0.14021791517734528,
-0.33686545491218567,
-0.2303677201271057,
0.6918247938156128,
0.17635145783424377,
0.07806003093719482,
0.41146987676620483,
0.06529860198497772,
0.3027750849723816,
0.21962079405784607,
0.21724680066108704,
-0.08890321850776672,
0.13445797562599182,
0.516664981842041,
-0.2248104363679886,
-0.22975683212280273,
0.3966901898384094,
0.2336905300617218,
0.09771065413951874,
0.009821709245443344,
-0.18833567202091217,
0.2839507758617401,
-0.34818699955940247,
0.12022228538990021,
0.04532628506422043,
-0.057804085314273834,
-0.19675207138061523,
-0.4573718309402466,
-0.24893060326576233,
-0.2737700045108795,
-0.1471557766199112,
0.15568172931671143,
0.07946036010980606,
0.018989037722349167,
-0.02724776789546013,
-0.8752479553222656,
0.25157442688941956,
-0.12673211097717285,
-0.019237712025642395,
0.009774245321750641,
-0.02271246910095215,
-0.200159952044487,
0.06779388338327408,
-0.09176275134086609,
0.1729990541934967,
0.0020547937601804733,
-0.024386946111917496,
0.06723737716674805,
0.044635504484176636,
-0.41337698698043823,
0.10378214716911316,
-0.012552618980407715,
0.3499392867088318,
0.01516629010438919,
0.24217651784420013,
-0.41681957244873047,
0.07263854146003723,
-0.00944900419563055,
0.0049934908747673035,
-0.0075019896030426025,
0.45683547854423523,
-0.007656894624233246,
-0.09790968894958496,
0.36663496494293213,
-0.15172609686851501,
-0.18805290758609772,
0.17596587538719177,
0.2873542606830597,
-0.18393725156784058,
0.18595071136951447,
0.2377309501171112,
0.22860319912433624,
-0.29363858699798584,
-0.258955717086792,
0.1958230882883072,
0.17012476921081543,
-0.098849356174469,
0.045125965029001236,
0.12007439136505127,
-0.02893201634287834,
-0.02134755253791809,
0.3136183023452759,
0.28125572204589844,
0.012839196249842644,
-0.11483795195817947,
-0.0541166290640831,
-0.11808441579341888,
-0.5963175296783447,
-0.08067257702350616,
0.1307278275489807,
-0.07148528099060059,
0.1732161045074463,
-0.02893809974193573,
0.06605713814496994,
-0.33105963468551636,
-0.0845090001821518,
-0.08017119765281677,
0.23285505175590515,
0.42314231395721436,
-0.037532635033130646,
0.3351028859615326,
0.17419804632663727,
-0.059668220579624176,
0.22254666686058044,
0.12331658601760864,
0.052302177995443344,
-0.06547680497169495,
-0.058948054909706116,
-0.019618239253759384,
-0.5076994895935059,
0.21737009286880493,
-0.4352806508541107,
0.18594208359718323,
0.6517978310585022,
0.3205166161060333,
-0.0034517869353294373,
-0.2465628832578659,
-0.13573898375034332,
0.07055717706680298,
0.25010865926742554,
0.5534541010856628,
-0.23928184807300568,
-0.3871208131313324,
0.07127869874238968,
-0.05862494185566902,
0.27515703439712524,
0.20024839043617249,
0.19223034381866455,
-0.1425062119960785,
-0.14320288598537445,
-0.1507340371608734,
0.0028533712029457092,
-0.07110185921192169,
-0.4866712987422943,
0.025625526905059814,
0.06629036366939545,
0.12090586870908737,
0.006484650075435638,
-0.21986961364746094,
0.23847514390945435,
-0.06318745017051697,
-0.4524177014827728,
0.28222888708114624,
0.061824411153793335,
0.23955458402633667,
-0.31916409730911255,
-0.16332438588142395,
0.2420341819524765,
0.13811856508255005,
0.35740241408348083,
0.5045276284217834,
-0.005318194627761841,
-0.5038930773735046,
0.3284434378147125,
0.09718556702136993,
0.3386784493923187,
-0.0944959819316864,
0.19129016995429993,
0.20443043112754822,
0.17751991748809814,
-0.20070499181747437,
0.15842929482460022,
0.07075083255767822,
-0.28240275382995605,
-0.0813383162021637,
-0.18627683818340302,
-0.08694030344486237,
-0.48062172532081604,
-0.09840650856494904,
-0.261783242225647,
-0.07814842462539673,
-0.031217237934470177,
0.10106415301561356,
0.2680579721927643,
0.19700418412685394,
-0.13915979862213135,
0.3235478103160858,
-0.32302480936050415,
0.11375825852155685,
-0.13904829323291779,
0.5829874873161316,
0.18085578083992004,
-0.5789839625358582,
0.010785788297653198,
0.11932423710823059,
0.24576833844184875,
-0.12936726212501526,
-0.32772958278656006,
0.1386885643005371,
-0.43947935104370117,
0.33686715364456177,
0.13820967078208923,
0.050481364130973816,
0.2305355966091156,
-0.19549894332885742,
-0.397943913936615,
0.3537217676639557,
0.05072138458490372,
0.23300939798355103,
0.18023818731307983,
0.12884002923965454,
-0.11516372859477997,
0.4779309332370758,
-0.029966188594698906,
0.17473790049552917,
0.19496886432170868,
-0.09947213530540466,
-0.3350326716899872,
-0.03140660747885704,
0.2971760034561157,
-0.16010154783725739,
0.24760891497135162,
-0.24970056116580963,
0.22863465547561646,
0.10547920316457748,
0.47106271982192993,
0.10307006537914276,
0.09526689350605011,
0.19655969738960266,
-0.07269879430532455,
0.026784200221300125,
0.04109171777963638,
0.0501825176179409,
0.3448876440525055,
0.03421967476606369,
-0.20189768075942993,
0.07931321859359741,
-0.04372505098581314,
0.00039656832814216614,
-0.023267574608325958,
0.2696457803249359,
0.3371548652648926,
0.41222885251045227,
0.06777383387088776,
-0.07779037952423096,
-0.3248645067214966,
-0.39540013670921326,
-0.13112905621528625,
0.04467654228210449,
-0.3250913619995117,
0.16426005959510803,
-0.13599133491516113,
-0.08820052444934845,
-0.03958941996097565,
-0.3164761960506439,
0.0008431468158960342,
-0.07814711332321167,
-0.31583112478256226,
0.16505463421344757,
-0.06667901575565338,
0.3624649941921234,
0.24645128846168518,
-0.00978320837020874,
0.13417254388332367,
0.21503424644470215,
-0.6332443952560425,
-0.2442709058523178,
0.13892170786857605,
-0.17812326550483704,
-0.05616651475429535,
-0.5703454613685608,
0.11743465811014175,
-0.44940412044525146,
0.28796684741973877,
-0.03245329111814499,
-0.15426120162010193,
-0.11406031250953674,
-0.11342014372348785,
0.25618019700050354,
-0.26886117458343506,
0.1566997766494751,
-0.029584243893623352,
0.26985639333724976,
0.38862261176109314,
-0.29085877537727356,
-0.22446300089359283,
-0.012675467878580093,
0.012854112312197685,
-0.06700783967971802,
0.01171724870800972,
0.05982198566198349,
-0.34464380145072937,
-0.18154701590538025,
0.35578471422195435,
-0.22902949154376984,
-0.026078812777996063,
-0.10144927352666855,
0.03160287067294121,
-0.04484362527728081,
-0.030782507732510567,
-0.10390645265579224,
-0.1676202267408371,
-0.2118457406759262,
0.22555485367774963,
0.037233561277389526,
-0.1409701555967331,
-0.04728882014751434,
-0.09547470510005951,
-0.18767614662647247,
0.055514730513095856,
-0.339072048664093,
-0.08898590505123138,
-0.4943429231643677,
0.04935463145375252,
-0.01774369180202484,
0.17419974505901337,
0.17592132091522217,
-0.18654897809028625,
-0.027163567021489143,
-0.13983863592147827,
-0.39781078696250916,
-0.07123955339193344,
-0.0991862341761589,
0.10422637313604355,
-0.048805445432662964,
0.31763818860054016,
-0.03277280181646347,
0.16563282907009125,
0.5167709589004517,
-0.25557127594947815,
0.3245657682418823,
0.29278045892715454,
-0.031572822481393814,
-0.09406197816133499,
-0.758885383605957,
-0.06529130041599274,
-0.316521555185318,
0.09383664280176163,
-0.30411773920059204,
0.06076378375291824,
0.23987607657909393,
-0.18708087503910065,
-0.29309868812561035,
-0.6170578002929688,
-0.1255112737417221,
-0.2801211178302765,
-0.09556366503238678,
0.18109768629074097,
0.29628315567970276,
0.008610136806964874,
0.2109534591436386,
-0.04265615716576576,
-0.2046607881784439,
0.42584723234176636,
0.2934144139289856,
-0.027176322415471077,
0.04210418090224266,
-0.16419817507266998,
0.09670913219451904,
0.31909316778182983,
0.03942112624645233,
0.15516984462738037,
-0.14561353623867035,
0.25334662199020386,
0.15430709719657898,
0.146201491355896,
0.8203844428062439,
0.06575330346822739,
0.3811107277870178,
0.014357361942529678,
-0.511101245880127,
-0.3548339605331421,
-0.25637197494506836,
0.11336293816566467,
0.20528821647167206,
0.4586745798587799,
0.3343423008918762,
0.051624082028865814,
0.14627139270305634,
0.08020496368408203,
0.13149404525756836,
-0.18814121186733246,
-0.27308139204978943,
-0.552089273929596,
-0.17174747586250305,
-0.19252856075763702,
0.5030328035354614,
0.0740470439195633,
-0.012704543769359589,
-0.4706045687198639,
-0.45279598236083984,
-0.014403251931071281,
-0.5204294323921204,
-0.000950254499912262,
0.10715599358081818,
0.1321844756603241,
-0.09017480909824371,
0.1609078198671341,
0.06886529922485352,
0.07835321128368378,
-0.047214917838573456,
0.2887893617153168,
0.01817481964826584,
-0.25592219829559326,
0.13393092155456543,
-0.233210489153862,
0.13668498396873474,
0.3220579922199249,
-0.2207433581352234,
-0.011121504008769989,
0.016700392588973045,
0.1560516059398651,
-0.12052970379590988,
-0.08844326436519623,
-0.06656146794557571,
0.27987727522850037,
-0.05478057637810707,
0.027628013864159584,
0.44150128960609436,
-0.08792506158351898,
-0.022776998579502106,
0.0022164545953273773,
0.2687670588493347,
-0.16080830991268158,
0.06423325836658478,
0.0074135661125183105,
1.0876327753067017,
-0.20534174144268036,
-0.18305176496505737,
-0.3215843141078949,
-0.3477747440338135,
0.2836858928203583,
0.15835103392601013,
-0.06292774528265,
-0.4182666838169098,
-0.14286284148693085,
0.09362731873989105,
-0.264102578163147,
0.14641162753105164,
-0.040705397725105286,
-0.2841178774833679,
0.16876478493213654,
-0.4681338667869568,
0.11875785887241364,
0.32556116580963135,
-0.019913360476493835,
0.18307702243328094,
-0.16361117362976074,
-0.46557268500328064,
0.008624657988548279,
-0.04504728317260742,
0.6437622308731079,
0.08847934007644653,
-0.10880665481090546,
-0.28053560853004456,
0.25114452838897705,
-0.3365705609321594,
0.23406395316123962,
0.016211673617362976,
-0.007307378575205803,
0.12299422919750214,
-0.58155357837677,
0.08810222148895264,
0.14513148367404938,
0.38225364685058594,
0.10925626754760742,
-0.13984975218772888,
0.0642394945025444,
0.019804373383522034,
0.37221160531044006,
0.019293468445539474,
0.10415644943714142,
0.26630592346191406,
-0.10847581177949905,
-0.3085494935512543,
0.09295712411403656,
-0.03175557404756546,
-0.1274014711380005,
-0.24155867099761963,
0.314558207988739,
0.15252304077148438,
-0.24147485196590424,
0.25664857029914856,
-0.08864438533782959,
0.03979847952723503,
-0.47175389528274536,
0.05543378368020058,
0.40185290575027466,
-0.138419970870018,
0.67010897397995,
0.09538343548774719,
-0.22526222467422485,
-0.13877062499523163,
0.17050963640213013,
-0.16621190309524536,
0.028925955295562744,
0.212272509932518,
0.002288125455379486,
-0.16076317429542542,
-0.0743335708975792,
-0.011713176965713501,
0.2806546092033386,
-0.7937511801719666,
0.5551242828369141,
-0.2162577509880066,
0.19964589178562164,
-0.36896973848342896,
0.004630390554666519,
0.07713132351636887,
0.261642187833786,
-0.10263248533010483,
-0.5113166570663452,
-0.3306547999382019,
-0.28803592920303345,
0.07071785628795624,
-0.005635574460029602,
-0.09105323255062103,
0.4813523292541504,
0.28153195977211,
0.1127239242196083,
-0.14474870264530182,
-0.03774307668209076,
-0.3928958773612976,
0.17905652523040771,
0.15341179072856903,
-0.19689229130744934,
0.17722663283348083,
-0.07967491447925568,
-0.10180816054344177,
0.38739722967147827,
-0.025277473032474518,
-0.1103072389960289,
-0.3250370919704437,
0.16477635502815247,
0.060137588530778885,
-0.24037544429302216,
0.04741315171122551,
0.1965547800064087,
0.011946609243750572,
-0.022217614576220512,
-0.2000529021024704,
0.18337780237197876,
0.15240216255187988,
0.29265734553337097,
-0.040145594626665115,
-0.16748473048210144,
-0.06329374015331268,
-0.26773232221603394,
-0.001144997775554657,
0.03831537067890167,
-0.04919291287660599,
0.21956108510494232,
0.27805042266845703,
0.20281559228897095,
-0.4532676637172699,
-0.40172335505485535,
0.029174648225307465,
0.22369390726089478,
0.11995885521173477,
-0.2689325213432312,
0.21826183795928955,
-0.10023174434900284,
0.5841025114059448,
0.36880171298980713,
-0.3056553304195404,
0.004619477316737175,
0.02919320948421955,
0.07670608907938004,
-0.17580151557922363,
0.17829540371894836,
0.2654707431793213,
0.18742066621780396,
-0.06235431507229805,
0.12322265654802322,
-0.0035869739949703217,
-0.011949494481086731,
0.16127967834472656,
0.09098818153142929,
0.4563007950782776,
0.03900444507598877,
0.06175287067890167,
-0.031327273696660995,
0.10598838329315186,
0.3896789848804474,
0.48859962821006775,
0.07049785554409027,
-0.2994704246520996,
0.22190268337726593,
-0.008513286709785461,
0.19579607248306274,
-0.18573680520057678,
0.19275449216365814,
-0.1836748719215393,
-0.03869103267788887,
-0.1451142430305481,
-0.06332233548164368,
-0.22872686386108398,
0.06036679819226265,
-0.1492065191268921,
0.484388530254364,
-0.22798103094100952,
-0.3981029689311981,
-0.08401871472597122,
0.15022887289524078,
-0.022534877061843872,
-0.2739240527153015,
0.0657690018415451,
-0.10887621343135834,
-0.15124967694282532,
-0.01766541227698326,
0.0547727569937706,
0.09984573721885681,
0.25201672315597534,
0.09380548447370529,
0.10875692218542099,
-0.23289628326892853,
-0.023258861154317856,
-0.02158035710453987,
0.4569604992866516,
-0.011750183999538422,
0.0018863491714000702,
0.40461134910583496,
0.2377845197916031,
-0.1244671642780304,
0.17105494439601898,
0.49743708968162537,
0.3196782171726227,
-0.10305194556713104,
0.12198986858129501,
0.02985183522105217,
-0.028461290523409843,
0.03391590714454651,
0.6584529280662537,
0.01702404022216797,
-0.07238174974918365,
0.012588227167725563,
0.05118840932846069,
-0.09058430045843124,
0.3654811978340149,
-0.04571003094315529,
0.5375539064407349,
-0.16242998838424683,
0.662376880645752,
-0.10857942700386047,
-0.18940332531929016,
-0.22017112374305725,
-0.15586301684379578,
-0.15033692121505737,
0.0952657088637352,
0.2009914219379425,
-0.2549281418323517,
-0.01443913672119379,
-0.2562691271305084,
0.016527187079191208,
-0.06368616223335266,
0.11367300152778625,
0.2433396428823471,
0.4445021450519562,
-0.2650618255138397,
-0.07770548015832901,
-0.1910126805305481,
-0.02961067110300064,
0.570887565612793,
0.12510696053504944,
-0.12495027482509613,
0.2480292171239853,
-0.6135861873626709,
0.33620643615722656,
0.6660044193267822,
-0.19870221614837646,
0.014043980278074741,
0.049213215708732605,
-0.12878355383872986,
-0.029974523931741714,
-0.1513902097940445,
0.08106673508882523,
0.23171958327293396,
-0.04714716598391533,
0.14064888656139374,
-0.0028723753057420254,
0.016456231474876404,
-0.040777772665023804,
-0.24274425208568573,
0.15655149519443512,
-0.17794378101825714,
0.3881942927837372,
0.19779595732688904,
0.32833439111709595,
0.026704009622335434,
-0.021396657451987267,
0.053468070924282074,
-0.1259898990392685,
-0.07287002354860306,
0.2999846935272217,
0.050840310752391815,
0.42929133772850037,
-0.093814916908741,
-0.04684105142951012,
-0.24778449535369873,
0.2883661389350891,
0.16728679835796356,
-0.020238252356648445,
-0.14629656076431274,
-0.0869026854634285,
0.1647202968597412,
-0.14152631163597107,
-0.07627199590206146,
0.23027721047401428,
-0.08520609140396118,
0.5885161757469177,
-0.5526562333106995,
-0.26831546425819397,
0.508169412612915,
-0.32118576765060425,
-0.429256796836853,
-0.05649757385253906,
0.227489173412323,
0.3217855393886566,
-0.2721247673034668,
-0.3344433009624481,
-0.21212360262870789,
0.18352848291397095,
-0.07039371877908707,
-0.263022780418396,
0.30770358443260193,
-0.4399941563606262,
0.08754396438598633,
-0.002808827906847,
0.10185787081718445,
0.3212697505950928,
0.13978976011276245,
0.24416309595108032,
-0.1500508338212967
] |
https://github.com/huggingface/datasets/issues/5114 | load_from_disk with remote filesystem fails due to a wrong temporary local folder path | Hi Hubert! Could you please probably create a publicly available `gs://` dataset link? I think this would be easier for others to directly start to debug. | ## Describe the bug
The function load_from_disk fails when using a remote filesystem because of a wrong temporary path generation in the load_from_disk method of arrow_dataset.py:
```python
if is_remote_filesystem(fs):
src_dataset_path = extract_path_from_uri(dataset_path)
dataset_path = Dataset._build_local_temp_path(src_dataset_path)
fs.download(src_dataset_path, dataset_path.as_posix(), recursive=True)
```
If _dataset_path_ is `gs://speech/mydataset/train`, then _src_dataset_path_ will be `speech/mydataset/train` and _dataset_path_ will be something like `/var/folders/9s/gf0b/T/tmp6t/speech/mydataset/train`
Then, after downloading the **folder** _src_dataset_path_, you will get a path like `/var/folders/9s/gf0b/T/tmp6t/speech/mydataset/train/train/state.json` (notice we have train twice)
Instead of downloading the remote folder we should be downloading all the files in the folder for the path to be right:
```python
fs.download(os.path.join(src_dataset_path,*), dataset_path.as_posix(), recursive=True)
```
## Steps to reproduce the bug
```python
fs = gcsfs.GCSFileSystem(**storage_options)
dataset = load_from_disk("common_voice_processed") # loading local dataset previously saved locally, works fine
dataset.save_to_disk(output_dir, fs=fs) #works fine
dataset = load_from_disk(output_dir, fs=fs) # crashes
```
## Expected results
The dataset is loaded
## Actual results
FileNotFoundError: [Errno 2] No such file or directory: '/var/folders/9s/gf0b9jz15d517yrf7m3nvlxr0000gn/T/tmp6t5e221_/speech/datasets/tests/common_voice_processed/train/state.json'
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: datasets-2.6.1.dev0
- Platform: mac os monterey 12.5.1
- Python version: 3.8.13
- PyArrow version:pyarrow==9.0.0
| 26 | load_from_disk with remote filesystem fails due to a wrong temporary local folder path
## Describe the bug
The function load_from_disk fails when using a remote filesystem because of a wrong temporary path generation in the load_from_disk method of arrow_dataset.py:
```python
if is_remote_filesystem(fs):
src_dataset_path = extract_path_from_uri(dataset_path)
dataset_path = Dataset._build_local_temp_path(src_dataset_path)
fs.download(src_dataset_path, dataset_path.as_posix(), recursive=True)
```
If _dataset_path_ is `gs://speech/mydataset/train`, then _src_dataset_path_ will be `speech/mydataset/train` and _dataset_path_ will be something like `/var/folders/9s/gf0b/T/tmp6t/speech/mydataset/train`
Then, after downloading the **folder** _src_dataset_path_, you will get a path like `/var/folders/9s/gf0b/T/tmp6t/speech/mydataset/train/train/state.json` (notice we have train twice)
Instead of downloading the remote folder we should be downloading all the files in the folder for the path to be right:
```python
fs.download(os.path.join(src_dataset_path,*), dataset_path.as_posix(), recursive=True)
```
## Steps to reproduce the bug
```python
fs = gcsfs.GCSFileSystem(**storage_options)
dataset = load_from_disk("common_voice_processed") # loading local dataset previously saved locally, works fine
dataset.save_to_disk(output_dir, fs=fs) #works fine
dataset = load_from_disk(output_dir, fs=fs) # crashes
```
## Expected results
The dataset is loaded
## Actual results
FileNotFoundError: [Errno 2] No such file or directory: '/var/folders/9s/gf0b9jz15d517yrf7m3nvlxr0000gn/T/tmp6t5e221_/speech/datasets/tests/common_voice_processed/train/state.json'
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: datasets-2.6.1.dev0
- Platform: mac os monterey 12.5.1
- Python version: 3.8.13
- PyArrow version:pyarrow==9.0.0
Hi Hubert! Could you please probably create a publicly available `gs://` dataset link? I think this would be easier for others to directly start to debug. | [
-0.1440090388059616,
-0.26802510023117065,
0.03857989236712456,
0.34252285957336426,
0.25744205713272095,
-0.2235642671585083,
0.27048778533935547,
0.08593133091926575,
0.2562037408351898,
0.10422718524932861,
0.25353866815567017,
0.41236525774002075,
-0.27618831396102905,
-0.38797643780708313,
-0.10191985964775085,
-0.21051955223083496,
0.20678797364234924,
0.1104341447353363,
-0.17406082153320312,
-0.27353647351264954,
-0.25563424825668335,
0.3220471739768982,
-0.08876630663871765,
0.1559235006570816,
-0.11886487901210785,
-0.2563925087451935,
-0.07774560898542404,
0.5118741989135742,
0.09094516187906265,
-0.23856185376644135,
0.13719214498996735,
-0.25577935576438904,
0.15715867280960083,
0.5696402788162231,
-0.00011419779912102968,
0.04971051216125488,
0.035875242203474045,
-0.13099569082260132,
-0.52277010679245,
-0.3112637996673584,
0.2357226312160492,
0.09607727080583572,
0.11800506711006165,
-0.22459521889686584,
0.06438909471035004,
-0.10046466439962387,
-0.13734528422355652,
-0.5575197339057922,
0.3762090802192688,
0.3214482367038727,
0.17478419840335846,
0.3102143704891205,
-0.3028344213962555,
-0.1313738077878952,
0.09112346917390823,
0.22176603972911835,
-0.11482225358486176,
0.646551787853241,
0.1908997893333435,
-0.02044539526104927,
0.06891630589962006,
0.08261427283287048,
-0.13356159627437592,
-0.14910495281219482,
0.22936522960662842,
0.08632379025220871,
0.22656100988388062,
-0.14964759349822998,
0.05681344121694565,
-0.0661298930644989,
0.46989691257476807,
-0.23532891273498535,
-0.16279035806655884,
-0.0700255036354065,
-0.15578283369541168,
-0.05643352121114731,
0.3763093054294586,
0.15737804770469666,
-0.4244479835033417,
0.1012413278222084,
0.11015324294567108,
-0.15633869171142578,
-0.0601128451526165,
0.14707347750663757,
0.3023277521133423,
0.05555630847811699,
-0.09080030769109726,
0.1352783739566803,
0.21268881857395172,
0.14785602688789368,
0.22225697338581085,
-0.18535742163658142,
-0.11026649177074432,
0.3589460551738739,
-0.14485107362270355,
0.1277332305908203,
0.1611480712890625,
-0.16484713554382324,
0.00784236192703247,
0.09236253798007965,
0.21803532540798187,
-0.03272891044616699,
0.015173417516052723,
0.23908156156539917,
0.04045401141047478,
0.3776804804801941,
-0.11948695033788681,
0.288990318775177,
0.04438798874616623,
0.1863001585006714,
-0.13207733631134033,
-0.08239111304283142,
-0.2270454466342926,
-0.3055405914783478,
0.19627170264720917,
0.20441606640815735,
0.10191819071769714,
-0.043460194021463394,
-0.1654164344072342,
-0.07758530974388123,
0.1958710253238678,
0.3755832612514496,
0.09707416594028473,
0.38395553827285767,
0.2575776278972626,
0.3393951952457428,
0.00912468135356903,
0.2287268042564392,
0.04729669541120529,
0.3307625949382782,
-0.09975782781839371,
-0.14855703711509705,
-0.2080467939376831,
0.07220984250307083,
-0.006235476583242416,
-0.0618431530892849,
0.3625459372997284,
-0.04663507640361786,
-0.18401776254177094,
-0.24936819076538086,
-0.2247207760810852,
-0.2597142457962036,
0.12004303932189941,
0.05212598666548729,
-0.2846807539463043,
0.17140088975429535,
0.19584088027477264,
0.09827955067157745,
-0.14240366220474243,
0.15311691164970398,
-0.32359468936920166,
-0.6081497073173523,
-0.1991005688905716,
0.17126919329166412,
0.09220569580793381,
0.08161373436450958,
-0.42171725630760193,
-0.12007187306880951,
0.03243421018123627,
-0.11288870871067047,
0.16708695888519287,
-0.05020993947982788,
-0.4140814244747162,
-0.19608014822006226,
0.05790344625711441,
0.468242347240448,
-0.39466455578804016,
0.024081028997898102,
-0.08918299525976181,
-0.09990590810775757,
0.193692147731781,
0.47115594148635864,
-0.31161725521087646,
0.3089964687824249,
-0.43716925382614136,
0.21757425367832184,
0.2981312870979309,
-0.37862685322761536,
-0.318278044462204,
0.5568473935127258,
-0.3216032385826111,
-0.0043020304292440414,
0.13551674783229828,
-0.016142094507813454,
-0.06709267199039459,
-0.0013122216332703829,
0.11095410585403442,
0.6487426161766052,
0.13666148483753204,
0.2840607464313507,
-0.47294431924819946,
-0.2770293354988098,
0.09188298135995865,
0.11004069447517395,
-0.11603933572769165,
0.08496228605508804,
0.25042858719825745,
-0.39665234088897705,
0.5744764804840088,
-0.23211464285850525,
-0.13038767874240875,
0.35609275102615356,
0.4568157196044922,
-0.21435503661632538,
-0.15285569429397583,
0.05780932307243347,
-0.6095117926597595,
0.28807488083839417,
-0.02580566704273224,
-0.06333004683256149,
-0.2871057391166687,
0.018961098045110703,
-0.26907408237457275,
0.04889097809791565,
-0.2974061965942383,
0.09256462752819061,
0.04865728318691254,
0.39342713356018066,
0.14039753377437592,
0.01985173299908638,
-0.1805153489112854,
0.01849721372127533,
-0.25802353024482727,
0.011339958757162094,
-0.05768628045916557,
0.432822048664093,
-0.0412076935172081,
-0.20914271473884583,
-0.16414611041545868,
-0.046729668974876404,
0.31005990505218506,
-0.2147972732782364,
-0.2972533106803894,
0.6773297786712646,
-0.00506528140977025,
0.5278353691101074,
-0.23865407705307007,
-0.31095534563064575,
0.04269177094101906,
0.02561446651816368,
0.021052734926342964,
0.3001876473426819,
0.32528170943260193,
0.218462735414505,
0.14035996794700623,
0.22313235700130463,
-0.024747993797063828,
0.04819146543741226,
0.05904269218444824,
-0.12912797927856445,
0.09475256502628326,
0.08766594529151917,
0.23020103573799133,
-0.033821139484643936,
0.17793677747249603,
0.3175070881843567,
0.22888915240764618,
-0.11328677833080292,
-0.41051581501960754,
-0.022655844688415527,
0.3194143772125244,
0.02454124391078949,
0.18559890985488892,
-0.07134287059307098,
-0.18728667497634888,
-0.1272810995578766,
0.2834681570529938,
0.3196522295475006,
0.4681098461151123,
0.0924449935555458,
-0.07178130745887756,
0.07390348613262177,
0.08499069511890411,
-0.12662599980831146,
0.4244522452354431,
-0.23550008237361908,
0.15824554860591888,
0.4161943793296814,
0.013216881081461906,
-0.09350468963384628,
-0.4487092196941376,
-0.17786100506782532,
0.06482391059398651,
0.14198866486549377,
-0.2956952750682831,
0.1880764365196228,
-0.07255498319864273,
-0.07908552885055542,
-0.41563528776168823,
0.09185083210468292,
0.15433260798454285,
0.0023069996386766434,
-0.144575297832489,
0.2457907795906067,
-0.39271870255470276,
0.09120863676071167,
0.013673990964889526,
-0.0033909231424331665,
0.05452989786863327,
-0.5738199353218079,
-0.12785300612449646,
0.020999377593398094,
-0.21467089653015137,
-0.03487054631114006,
0.22084565460681915,
0.03358124569058418,
-0.07280445098876953,
-0.09278444945812225,
-0.2227790802717209,
-0.35926735401153564,
0.30832791328430176,
0.19248820841312408,
0.12175707519054413,
0.2523804008960724,
-0.08710287511348724,
0.11601777374744415,
-0.22560454905033112,
-0.29352834820747375,
0.08466282486915588,
-0.4424059987068176,
0.0014343559741973877,
0.1514028012752533,
0.1095893532037735,
-0.041093021631240845,
-0.39263027906417847,
-0.35084593296051025,
-0.4958183765411377,
-0.24839472770690918,
0.15386754274368286,
-0.16003620624542236,
0.29372644424438477,
0.34272462129592896,
0.37663963437080383,
-0.03993207961320877,
-0.1250820904970169,
-0.017560917884111404,
-0.11082752794027328,
-0.5016026496887207,
0.2046869844198227,
-0.09402944147586823,
-0.23679398000240326,
-0.26283127069473267,
-0.1300962269306183,
-0.12898938357830048,
0.14187316596508026,
-0.4127551317214966,
-0.16134314239025116,
-0.04579727351665497,
0.4279930293560028,
-0.11391256749629974,
-0.02641412429511547,
0.31265807151794434,
0.013756442815065384,
-0.08323711901903152,
0.07217933982610703,
0.02674228325486183,
0.117660291492939,
0.41597607731819153,
0.03657615929841995,
-0.03939682990312576,
0.3425750732421875,
-0.09305478632450104,
0.6176543235778809,
-0.36193251609802246,
-0.019176635891199112,
0.3910098373889923,
-0.20609095692634583,
0.27206477522850037,
-0.35136890411376953,
-0.08280342072248459,
-0.035552773624658585,
-0.2097727358341217,
-0.5947930812835693,
0.07012797892093658,
0.0352078452706337,
-0.3945297300815582,
-0.05838499963283539,
-0.06875460594892502,
-0.2675001919269562,
-0.2721233069896698,
0.17529743909835815,
-0.0824332982301712,
0.1912611424922943,
-0.04956890642642975,
0.20533356070518494,
-0.06213388219475746,
0.1035175621509552,
0.21477851271629333,
0.06612975150346756,
0.29294735193252563,
-0.015825126320123672,
0.04383603855967522,
0.005084873177111149,
-0.09407486766576767,
0.07788504660129547,
0.25305813550949097,
0.34221407771110535,
0.03021031990647316,
-0.17084765434265137,
-0.14656323194503784,
-0.039415180683135986,
0.09701493382453918,
0.20960137248039246,
0.3340153098106384,
0.1821773797273636,
0.1706976741552353,
-0.5454102158546448,
-0.08094564080238342,
0.1539222002029419,
-0.13372790813446045,
-0.2582927644252777,
0.692827582359314,
0.06491800397634506,
-0.026490189135074615,
-0.4106360375881195,
0.5763275027275085,
-0.1365502029657364,
-0.047679271548986435,
-0.27553102374076843,
-0.22039800882339478,
-0.21196502447128296,
-0.05745219439268112,
-0.010582159273326397,
0.1641048789024353,
0.057199627161026,
0.1271902620792389,
0.16001252830028534,
-0.05065429210662842,
-0.2291029542684555,
-0.02354181557893753,
0.4824986457824707,
-0.39160996675491333,
-0.015216587111353874,
0.07099008560180664,
0.24258823692798615,
0.05783741921186447,
0.7442770004272461,
-0.06538130342960358,
0.29634949564933777,
0.005731858313083649,
0.04680511727929115,
0.03303353488445282,
0.4515240788459778,
-0.19107595086097717,
0.0339193120598793,
-0.10037802904844284,
0.1731606274843216,
0.009250426664948463,
0.09612086415290833,
0.08772701025009155,
-0.06721804291009903,
0.2330995798110962,
-0.1780109852552414,
0.3837739825248718,
-0.1827060729265213,
-0.17245957255363464,
0.16003911197185516,
0.228328138589859,
-0.4007589519023895,
0.5380300283432007,
-0.27159664034843445,
0.6861495971679688,
0.30396103858947754,
0.1254846453666687,
0.592020571231842,
-0.15524211525917053,
-0.041737984865903854,
-0.07939360290765762,
0.11351333558559418,
-0.29121533036231995,
0.11093440651893616,
0.011941513046622276,
-0.1539197564125061,
0.08701802790164948,
0.15910808742046356,
-0.1443808674812317,
0.3401321470737457,
-0.2390577495098114,
0.16123199462890625,
-0.13409093022346497,
0.08588917553424835,
-0.211924210190773,
-0.2145463526248932,
-0.3609374463558197,
0.0653076171875,
0.19271446764469147,
0.095427006483078,
-0.0798487737774849,
-0.036335840821266174,
-0.05022548511624336,
-0.34455567598342896,
0.01603730022907257,
0.3237594962120056,
-0.5395184755325317,
0.16689355671405792,
-0.0797351747751236,
-0.3823317289352417,
-0.12810897827148438,
0.12985137104988098,
0.01580546796321869,
-0.04959166422486305,
0.027142658829689026,
0.01895149052143097,
0.10131942480802536,
0.2085370421409607,
-0.22166064381599426,
-0.1572837382555008,
0.2194882482290268,
-0.08135901391506195,
-0.14396148920059204,
-0.05306272208690643,
-0.479940801858902,
-0.18637147545814514,
0.008883729577064514,
-0.136660635471344,
-0.14377611875534058,
0.18358157575130463,
-0.35138192772865295,
0.08526800572872162,
-0.031050322577357292,
-0.20505082607269287,
0.07592994719743729,
-0.15502041578292847,
-0.18006426095962524,
-0.090602345764637,
-0.17805910110473633,
-0.15538175404071808,
-0.06049006059765816,
0.2974587380886078,
-0.11639396101236343,
0.12820035219192505,
0.4582652449607849,
-0.11040326952934265,
0.057276658713817596,
-0.32927319407463074,
0.09090184420347214,
0.32057857513427734,
-0.7001239657402039,
0.17486824095249176,
-0.16644258797168732,
-0.0803724080324173,
-0.13359065353870392,
0.2947739362716675,
0.37004929780960083,
-0.05039858818054199,
-0.0982837975025177,
-0.08913970738649368,
-0.49488621950149536,
0.12205878645181656,
0.1798151731491089,
0.12382011115550995,
-0.017105499282479286,
-0.07879501581192017,
-0.04379842430353165,
-0.3032248914241791,
-0.275920033454895,
0.30959901213645935,
-0.07619248330593109,
0.13995137810707092,
0.07197314500808716,
0.03628155216574669,
0.3866335451602936,
-0.09683823585510254,
0.22524394094944,
0.11225711554288864,
0.02674539014697075,
-0.1681390404701233,
-0.062235452234745026,
0.10114052891731262,
0.16634944081306458,
-0.14146307110786438,
-0.1602405607700348,
-0.32291507720947266,
-0.05231965705752373,
0.10359019041061401,
0.19526943564414978,
0.24072164297103882,
-0.08079688251018524,
0.10957416892051697,
-0.1305241882801056,
0.3259298503398895,
-0.15950649976730347,
0.2177513986825943,
-0.2851983606815338,
0.35990971326828003,
-0.0038626710884273052,
0.0693807452917099,
-0.1426514834165573,
-0.2192244678735733,
-0.3682345747947693,
0.03497226908802986,
0.09363310784101486,
0.2938595414161682,
0.258754700422287,
-0.27639758586883545,
-0.2198733687400818,
-0.25418201088905334,
0.358291357755661,
0.22737297415733337,
-0.2657235264778137,
-0.1771131455898285,
0.32876792550086975,
0.28085628151893616,
0.028685923665761948,
-0.19518789649009705,
-0.2966575026512146,
-0.18654175102710724,
0.1301622986793518,
0.1677979677915573,
0.2433585226535797,
-0.2885131239891052,
-0.2418517917394638,
-0.03327954187989235,
0.2844506800174713,
0.21865351498126984,
-0.07981765270233154,
0.28119733929634094,
0.0074494369328022,
0.10537164658308029,
-0.13695557415485382,
0.08675810694694519,
0.43233630061149597,
0.5460828542709351,
-0.43559151887893677,
0.11016999185085297,
0.19422277808189392,
0.03589840233325958,
0.0688793882727623,
-0.22407689690589905,
-0.03677857294678688,
-0.0845348984003067,
-0.21071696281433105,
0.005254760384559631,
-0.08297769725322723,
0.3435617983341217,
-0.41968870162963867,
-0.22055469453334808,
-0.12288793921470642,
0.15044328570365906,
-0.18444913625717163,
-0.11799505352973938,
-0.14421814680099487,
-0.2425328493118286,
-0.08946725726127625,
0.1299329400062561,
-0.1498194932937622,
0.01656535267829895,
0.14572960138320923,
0.27857667207717896,
-0.03476038575172424,
0.17469467222690582,
-0.07294107973575592,
0.4824007749557495,
0.08208291232585907,
-0.3052435517311096,
0.2991374135017395,
0.3419037461280823,
-0.03916569799184799,
-0.023964744061231613,
-0.20367206633090973,
0.34032905101776123,
0.3567124307155609,
-0.2582063674926758,
-0.07660829275846481,
0.1813679337501526,
0.025674136355519295,
0.09186152368783951,
0.017244361340999603,
-0.10425272583961487,
0.33849480748176575,
0.4442248046398163,
0.16879190504550934,
-0.18300552666187286,
0.3198850452899933,
0.061099059879779816,
0.5825652480125427,
-0.1054745614528656,
0.23790410161018372,
-0.22381141781806946,
-0.0744234025478363,
-0.16671915352344513,
0.07766694575548172,
-0.1970345675945282,
0.11979252845048904,
0.4691569209098816,
0.15208907425403595,
0.31490978598594666,
-0.006193855311721563,
0.07874815911054611,
0.027331223711371422,
0.41809192299842834,
0.22884847223758698,
0.06825284659862518,
-0.33992433547973633,
-0.19711662828922272,
-0.46268826723098755,
0.16007894277572632,
0.23060742020606995,
0.01302650012075901,
-0.21948857605457306,
0.07575555145740509,
0.14515724778175354,
0.17713014781475067,
-0.0365590900182724,
0.2420741617679596,
-0.1253104954957962,
0.25762540102005005,
-0.07192149758338928,
-0.12642598152160645,
-0.34217679500579834,
0.011395184323191643,
0.13153699040412903,
-0.8919220566749573,
-0.12132754921913147,
-0.33485889434814453,
0.13827502727508545,
0.019897736608982086,
-0.1380995661020279,
-0.2366856187582016,
0.09056441485881805,
0.5722198486328125,
-0.005992898717522621,
-0.032462865114212036,
-0.09593120217323303,
-0.2374693751335144,
-0.1815461814403534,
-0.25533953309059143,
-0.12913678586483002,
-0.25842374563217163,
0.04118090495467186,
0.565825343132019,
-0.029836291447281837,
0.5001399517059326,
-0.5802854299545288,
-0.14875338971614838,
0.15183989703655243,
0.28964340686798096,
-0.2496778517961502,
0.09164044260978699,
-0.11921915411949158,
-0.05394663289189339,
0.2507202625274658,
0.20770719647407532,
-0.0328483060002327,
0.20202302932739258,
-0.2698644995689392,
-0.240616574883461,
0.5300155878067017,
-0.07069116830825806,
-0.21343030035495758,
0.11765964329242706,
0.4413379728794098,
0.2234053909778595,
0.015288027003407478,
-0.48708251118659973,
0.1503693163394928,
0.20217278599739075,
0.04511666297912598,
-0.009922083467245102,
-0.12933413684368134,
-0.05936693027615547,
0.030930954962968826,
0.09330835938453674,
0.4220995306968689,
0.005452511832118034,
-0.0813448578119278,
-0.058741696178913116,
-0.4037622809410095
] |
https://github.com/huggingface/datasets/issues/5112 | Bug with filtered indices | Thanks a lot for the swift response! For a brief moment yesterday I thought I had gone insane 🤣On 14 Oct 2022, at 15:44, Albert Villanova del Moral ***@***.***> wrote:
@PartiallyTyped, @Muennighoff: the issue is fixed.
We are planning to make a patch release today.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***> | ## Describe the bug
As reported by @PartiallyTyped (and by @Muennighoff):
- https://github.com/huggingface/datasets/issues/5111#issuecomment-1278652524
There is an issue with the indices of a filtered dataset.
## Steps to reproduce the bug
```python
ds = Dataset.from_dict({"num": [0, 1, 2, 3]})
ds = ds.filter(lambda num: num % 2 == 0, input_columns="num", batch_size=2)
assert all(item["num"] % 2 == 0 for item in ds)
```
## Expected results
The indices of the filtered dataset should correspond to the examples with "language" equals to "english".
## Actual results
Indices to items with other languages are included in the filtered dataset indices
## Preliminar investigation
It seems a bug introduced by:
- #5030
| 65 | Bug with filtered indices
## Describe the bug
As reported by @PartiallyTyped (and by @Muennighoff):
- https://github.com/huggingface/datasets/issues/5111#issuecomment-1278652524
There is an issue with the indices of a filtered dataset.
## Steps to reproduce the bug
```python
ds = Dataset.from_dict({"num": [0, 1, 2, 3]})
ds = ds.filter(lambda num: num % 2 == 0, input_columns="num", batch_size=2)
assert all(item["num"] % 2 == 0 for item in ds)
```
## Expected results
The indices of the filtered dataset should correspond to the examples with "language" equals to "english".
## Actual results
Indices to items with other languages are included in the filtered dataset indices
## Preliminar investigation
It seems a bug introduced by:
- #5030
Thanks a lot for the swift response! For a brief moment yesterday I thought I had gone insane 🤣On 14 Oct 2022, at 15:44, Albert Villanova del Moral ***@***.***> wrote:
@PartiallyTyped, @Muennighoff: the issue is fixed.
We are planning to make a patch release today.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***> | [
0.03610451892018318,
-0.20418207347393036,
-0.15221655368804932,
0.2889057993888855,
0.22757285833358765,
-0.043692272156476974,
0.42200204730033875,
0.23539286851882935,
0.16573308408260345,
0.4011458158493042,
0.012838178314268589,
0.29628217220306396,
0.02044648490846157,
0.33652904629707336,
-0.15897655487060547,
0.019280780106782913,
0.14721903204917908,
0.09204481542110443,
-0.05311916768550873,
-0.246123269200325,
-0.21595343947410583,
0.17273229360580444,
-0.27533406019210815,
-0.060568347573280334,
-0.07661378383636475,
-0.025417113676667213,
0.18202176690101624,
-0.035888634622097015,
0.02261987328529358,
-0.3678748905658722,
0.20187705755233765,
-0.06553514301776886,
-0.29241710901260376,
0.3655826151371002,
-0.00010482674406375736,
0.05828608572483063,
0.43597161769866943,
-0.08863969892263412,
-0.3357868790626526,
-0.2669416666030884,
-0.1901826560497284,
-0.08654285967350006,
0.08979400992393494,
-0.013602331280708313,
-0.2274663746356964,
-0.26544317603111267,
-0.3629905879497528,
-0.49102967977523804,
0.024825595319271088,
0.1836007982492447,
0.3303692638874054,
0.19532324373722076,
-0.24485604465007782,
0.17530573904514313,
0.1939307302236557,
0.13640356063842773,
-0.020591802895069122,
-0.2185463011264801,
0.22502407431602478,
0.07023880630731583,
0.020907722413539886,
0.3722606897354126,
0.019304649904370308,
0.013601714745163918,
-0.31052324175834656,
-0.05594304949045181,
-0.06968381255865097,
-0.40780287981033325,
0.05494561046361923,
0.24251589179039001,
0.266282856464386,
-0.04000215232372284,
-0.5103544592857361,
-0.33889737725257874,
-0.25237205624580383,
-0.39040470123291016,
0.11660876870155334,
-0.04125484824180603,
0.011891672387719154,
0.04066728428006172,
-0.15187065303325653,
0.4295407831668854,
-0.03686895594000816,
0.20658481121063232,
-0.07473933696746826,
0.6214032173156738,
-0.2318318635225296,
0.050557948648929596,
-0.21423430740833282,
-0.27253657579421997,
-0.10458806902170181,
-0.11452656984329224,
-0.03754807636141777,
0.19500477612018585,
0.018864188343286514,
-0.06741218268871307,
0.22330418229103088,
-0.12353486567735672,
0.12643200159072876,
-0.2719510793685913,
-0.1363651156425476,
0.27743440866470337,
-0.04816499352455139,
-0.057838670909404755,
0.15774519741535187,
0.1990947276353836,
0.44251418113708496,
0.0957404151558876,
0.1842913031578064,
-0.03072989545762539,
0.007671914994716644,
-0.05002573877573013,
0.3123133182525635,
-0.03653864562511444,
-0.13929660618305206,
0.11020688712596893,
0.049374379217624664,
-0.3567807078361511,
-0.5486550331115723,
0.12279557436704636,
-0.46816280484199524,
-0.021522777155041695,
0.1502312272787094,
0.10115273296833038,
0.22426371276378632,
0.17269593477249146,
-0.2778571546077728,
0.13758519291877747,
-0.3537702262401581,
-0.12538458406925201,
-0.3286472260951996,
-0.20129302144050598,
-0.09029069542884827,
-0.145888090133667,
0.0043056420981884,
-0.282213419675827,
0.22573739290237427,
0.22982466220855713,
0.1135682761669159,
-0.04812512919306755,
-0.0005457233637571335,
-0.11091002821922302,
0.42635342478752136,
0.4313375949859619,
-0.13519008457660675,
0.23967410624027252,
0.421732097864151,
-0.42161548137664795,
-0.07098735123872757,
0.259003221988678,
-0.2317417562007904,
-0.06275615841150284,
0.0640861764550209,
0.2767152488231659,
-0.17233777046203613,
-0.023560643196105957,
-0.08831895142793655,
0.5060018301010132,
0.11052805185317993,
-0.036104556173086166,
0.1511145830154419,
-0.14033906161785126,
-0.5272965431213379,
-0.06246085464954376,
0.009658679366111755,
0.09387025982141495,
-0.552385687828064,
-0.16727542877197266,
-0.15162256360054016,
-0.07776744663715363,
0.224893257021904,
0.2817304730415344,
-0.21683916449546814,
-0.12415697425603867,
-0.2313295602798462,
0.37474340200424194,
0.027483046054840088,
-0.1080726832151413,
-0.5414363145828247,
-0.09990210086107254,
-0.023744065314531326,
0.35877564549446106,
-0.08867240697145462,
-0.15255656838417053,
0.28121721744537354,
-0.15433576703071594,
0.2023889124393463,
0.13957974314689636,
-0.10658788681030273,
0.09184364974498749,
-0.28773677349090576,
0.011034833267331123,
0.30118364095687866,
0.08779574930667877,
-0.14920197427272797,
-0.16494178771972656,
0.19426438212394714,
-0.45426836609840393,
0.3770892024040222,
-0.12093891203403473,
-0.026795683428645134,
0.32090693712234497,
0.2979685068130493,
0.1281922608613968,
0.3278670310974121,
-0.2449187934398651,
0.07303546369075775,
0.2054401934146881,
0.07659793645143509,
0.14274908602237701,
-0.17614032328128815,
-0.1357574760913849,
-0.2188098132610321,
0.12245199829339981,
-0.13758546113967896,
-0.21578654646873474,
0.20365093648433685,
-0.03685960918664932,
-0.15830352902412415,
0.11915354430675507,
-0.1877107471227646,
0.330909788608551,
-0.29386866092681885,
-0.18228213489055634,
-0.18942877650260925,
0.14610764384269714,
0.212457075715065,
-0.04783545807003975,
-0.19701994955539703,
0.2397761046886444,
0.275539755821228,
-0.0048760538920760155,
-0.3236359655857086,
0.04065514728426933,
0.37957414984703064,
-0.09383726119995117,
-0.01655532419681549,
0.06483449041843414,
0.21326099336147308,
-0.3030543029308319,
0.0035605579614639282,
0.5199897885322571,
0.3676493763923645,
0.15290674567222595,
-0.23488739132881165,
0.7173120379447937,
-0.36738789081573486,
0.18106117844581604,
-0.1622866988182068,
-0.06034734845161438,
0.516685962677002,
0.028956416994333267,
-0.2547716498374939,
-0.5335546135902405,
0.3277799189090729,
-0.14621350169181824,
-0.18931666016578674,
0.15212713181972504,
-0.024387460201978683,
0.2749651074409485,
0.3348420262336731,
0.09644138813018799,
-0.032777659595012665,
0.3148067593574524,
-0.06355202943086624,
0.048771798610687256,
0.10359806567430496,
0.01367451623082161,
0.11705395579338074,
0.3181636929512024,
-0.05587271228432655,
-0.16944648325443268,
0.15676702558994293,
-0.23699592053890228,
0.283808171749115,
0.09176135063171387,
0.011178177781403065,
0.3479030430316925,
0.4317721724510193,
-0.08016815781593323,
-0.551688015460968,
0.17907261848449707,
-0.06661524623632431,
-0.05828719586133957,
-0.393286794424057,
0.3087698519229889,
-0.3734135627746582,
-0.42718634009361267,
-0.12595310807228088,
-0.427194207906723,
-0.11304500699043274,
-0.3035855293273926,
0.23590771853923798,
0.14350175857543945,
-0.40017008781433105,
0.23774166405200958,
0.03733646497130394,
0.11628265678882599,
0.1330225020647049,
0.014461644925177097,
-0.1397295445203781,
-0.19724462926387787,
-0.3290163576602936,
0.16087739169597626,
-0.013232302851974964,
0.18077406287193298,
0.3475979268550873,
0.006913790479302406,
-0.292411744594574,
-0.11016730219125748,
-0.7026342749595642,
0.07426604628562927,
-0.2449292689561844,
0.34126561880111694,
-0.17279359698295593,
-0.10986733436584473,
-0.2212534248828888,
-0.014231761917471886,
0.13196364045143127,
-0.00913227815181017,
-0.38586437702178955,
0.17924557626247406,
0.03517615422606468,
0.1784559041261673,
-0.10640014708042145,
-0.2732412815093994,
-0.3158981502056122,
-0.1590164303779602,
-0.07801920175552368,
-0.07944085448980331,
0.16614139080047607,
0.25856149196624756,
-0.027540478855371475,
-0.05537593737244606,
0.0053167990408837795,
-0.01654312014579773,
-0.3878720700740814,
-0.0615212544798851,
0.06626169383525848,
-0.09224481135606766,
-0.3125455379486084,
-0.21155565977096558,
-0.22937697172164917,
-0.38425925374031067,
0.16280487179756165,
-0.27814263105392456,
-0.09864380955696106,
-0.2727011442184448,
0.06991863250732422,
0.18411554396152496,
0.07105258852243423,
0.4004618525505066,
-0.08358675241470337,
-0.13081184029579163,
-0.3426753580570221,
-0.35235318541526794,
0.0788557380437851,
0.10876945406198502,
0.1152685359120369,
-0.13032826781272888,
0.6004784107208252,
0.039511788636446,
0.3052517771720886,
0.3379162549972534,
0.2407103180885315,
0.5023014545440674,
0.1763722151517868,
0.27030956745147705,
-0.2503892779350281,
-0.1766252964735031,
-0.0027411142364144325,
0.22720205783843994,
-0.18575969338417053,
0.3184362053871155,
0.004381970502436161,
-0.2587117850780487,
0.13576586544513702,
-0.17913778126239777,
-0.27283453941345215,
-0.22080698609352112,
0.11869385838508606,
-0.10642862319946289,
0.018936268985271454,
0.20653767883777618,
0.019660115242004395,
-0.05342870205640793,
-0.27559545636177063,
-0.23983341455459595,
-0.2108989804983139,
-0.015530809760093689,
-0.14559254050254822,
0.004241615533828735,
-0.14987091720104218,
-0.16570743918418884,
0.23562213778495789,
0.5187787413597107,
0.5741345882415771,
-0.13834016025066376,
-0.23201203346252441,
0.11413449048995972,
0.0522526390850544,
0.5068851113319397,
-0.19764594733715057,
-0.07942710816860199,
0.31460970640182495,
-0.2431451380252838,
-0.4138457775115967,
-0.09072250127792358,
-0.3487679362297058,
0.3939664959907532,
0.07256390154361725,
0.35736578702926636,
-0.10158548504114151,
0.02199038676917553,
-0.1344943344593048,
0.3163200616836548,
-0.06045842915773392,
0.06219774857163429,
-0.3733821511268616,
-0.27245357632637024,
-0.08259530365467072,
0.3717823624610901,
0.1711582988500595,
0.29038259387016296,
-0.14670541882514954,
-0.1445063203573227,
-0.14425420761108398,
-0.14759822189807892,
-0.10792185366153717,
0.18946295976638794,
0.3580206632614136,
0.21698713302612305,
0.17036236822605133,
-0.03913898766040802,
0.08414588123559952,
0.07741377502679825,
0.49663275480270386,
0.029296651482582092,
-0.20414048433303833,
-0.22710475325584412,
-0.2197905331850052,
0.1686720997095108,
0.5190017223358154,
0.07218500971794128,
0.1326310634613037,
0.05181730538606644,
0.06569669395685196,
-0.10708492249250412,
-0.09745366126298904,
0.09505173563957214,
0.43718016147613525,
-0.3268321752548218,
-0.039944492280483246,
0.29434680938720703,
-0.08910441398620605,
-0.04887949675321579,
0.7570818662643433,
0.35288453102111816,
-0.2262607216835022,
0.5858309864997864,
0.18595178425312042,
0.718434751033783,
0.13656914234161377,
0.05382583662867546,
0.13994362950325012,
0.0010924972593784332,
0.2092503160238266,
0.22238074243068695,
0.4021803140640259,
-0.2461327314376831,
-0.5242490768432617,
0.06449173390865326,
0.0004433058202266693,
-0.044938765466213226,
0.013755101710557938,
-0.046939916908741,
0.16002878546714783,
-0.2777896523475647,
-0.10666632652282715,
-0.011693567037582397,
-0.31468692421913147,
-0.017985546961426735,
-0.12372952699661255,
-0.3644018769264221,
0.23929131031036377,
0.21282489597797394,
0.1256968230009079,
0.05291689932346344,
0.02557014673948288,
-0.14707274734973907,
-0.2850922644138336,
-0.2583901882171631,
0.0068567246198654175,
-0.025539569556713104,
0.17652200162410736,
0.14354373514652252,
-0.2555522918701172,
-0.08565275371074677,
-0.18748334050178528,
0.326857328414917,
0.03105122596025467,
0.02456449531018734,
0.13770920038223267,
0.4198431670665741,
0.3220479190349579,
0.24277769029140472,
0.057490743696689606,
0.42164847254753113,
0.050739727914333344,
-0.22537003457546234,
-0.21158894896507263,
0.05670526623725891,
-0.22320283949375153,
-0.11261661350727081,
0.10707882046699524,
-0.06507793068885803,
-0.21637463569641113,
0.07115286588668823,
-0.028979599475860596,
0.1448947936296463,
-0.3248429000377655,
0.23635418713092804,
-0.04046257585287094,
-0.12230857461690903,
0.369061678647995,
0.08957405388355255,
-0.39918258786201477,
-0.1447056382894516,
0.40543854236602783,
0.22118380665779114,
0.12087085843086243,
0.32411548495292664,
0.1832590103149414,
-0.36726003885269165,
-0.20693758130073547,
0.03887791186571121,
0.04926087334752083,
0.06756284087896347,
0.3571537435054779,
-0.062415312975645065,
-0.049850866198539734,
-0.06758839637041092,
0.4176756739616394,
-0.12414553761482239,
0.08206942677497864,
-0.36084142327308655,
-0.3641681373119354,
-0.034107983112335205,
0.13699370622634888,
0.07519296556711197,
0.15729476511478424,
-0.049988072365522385,
-0.1308967024087906,
-0.15595130622386932,
-0.16690094769001007,
-0.4002116024494171,
-0.06343451142311096,
-0.08783967047929764,
0.16006846725940704,
0.044344980269670486,
0.18143415451049805,
0.2194998562335968,
-0.04994799569249153,
0.23053619265556335,
0.04279004782438278,
-0.014643270522356033,
-0.3466763198375702,
-0.22735713422298431,
0.07605959475040436,
0.068513423204422,
-0.14621658623218536,
0.002531173173338175,
-0.18544115126132965,
-0.1867005079984665,
-0.18700212240219116,
0.16341906785964966,
0.3363005816936493,
0.01821247860789299,
0.10360386967658997,
0.1855059415102005,
-0.015351057052612305,
0.27801185846328735,
0.019599564373493195,
-0.12271782755851746,
-0.04520244896411896,
-0.07322476804256439,
0.00341009721159935,
-0.01799836941063404,
0.0891541838645935,
-0.006162561010569334,
-0.08485854417085648,
-0.1471419334411621,
-0.1209278479218483,
-0.06160479784011841,
-0.2534025311470032,
0.1927264928817749,
0.46768718957901,
0.3730911314487457,
0.20235371589660645,
-0.19806772470474243,
-0.19152629375457764,
0.27539128065109253,
0.3385404646396637,
-0.38641557097435,
-0.08949677646160126,
0.08886156976222992,
0.2605282962322235,
-0.006036259233951569,
0.11316362023353577,
0.07180920243263245,
-0.040867891162633896,
0.3867998719215393,
-0.017432937398552895,
0.06691008061170578,
-0.13272856175899506,
0.16924257576465607,
0.18733450770378113,
0.0886707454919815,
0.005387004464864731,
0.18564476072788239,
-0.14013394713401794,
0.18438111245632172,
0.6539340019226074,
0.055979713797569275,
0.24845744669437408,
-0.010973036289215088,
0.11844232678413391,
-0.3297789990901947,
-0.10994106531143188,
0.26853853464126587,
0.13433800637722015,
-0.03612685203552246,
0.010422233492136002,
0.39915749430656433,
0.1757678985595703,
-0.04668281972408295,
-0.12674373388290405,
-0.2415173202753067,
0.09602290391921997,
-0.3401387929916382,
-0.05378895252943039,
-0.06532321125268936,
-0.09890550374984741,
0.011429853737354279,
0.017176009714603424,
-0.16820867359638214,
0.2437921017408371,
0.14030319452285767,
0.22737492620944977,
-0.1950187236070633,
-0.6894845962524414,
-0.15150287747383118,
0.00005161389708518982,
0.4557308256626129,
-0.030040008947253227,
0.1584145724773407,
0.21606026589870453,
0.14568838477134705,
0.05685446411371231,
0.12121459096670151,
0.1690625250339508,
0.10959748923778534,
-0.0019490979611873627,
-0.11039534956216812,
-0.09994235634803772,
-0.11458206921815872,
-0.059130314737558365,
0.42321622371673584,
-0.018607795238494873,
0.14261971414089203,
0.06182878091931343,
0.22488100826740265,
-0.20486432313919067,
0.0708155408501625,
0.29354289174079895,
0.190384641289711,
-0.1779271364212036,
-0.0011636987328529358,
-0.09902627766132355,
0.3863690197467804,
-0.315284788608551,
-0.2410140335559845,
-0.11896991729736328,
0.11875024437904358,
0.31373482942581177,
0.10505533963441849,
0.23427698016166687,
0.07564693689346313,
0.130414679646492,
-0.011168509721755981,
0.07045507431030273,
0.009758293628692627,
-0.018455542623996735,
-0.038596026599407196,
0.02939566969871521,
-0.5316910147666931,
0.11385537683963776,
-0.07886816561222076,
-0.06541368365287781,
0.05124732479453087,
0.16251260042190552,
0.19026826322078705,
0.13569974899291992,
0.04497451335191727,
0.00417671725153923,
0.005403873510658741,
-0.08818456530570984,
-0.3237248659133911,
-0.10441902279853821,
-0.2746116518974304,
-0.11361123621463776,
-0.08459442108869553,
-0.17904454469680786,
0.010487891733646393,
-0.24706082046031952,
0.17254385352134705,
-0.11608296632766724,
-0.05693269520998001,
-0.14963772892951965,
0.21369586884975433,
-0.010914087295532227,
0.2586618959903717,
0.20935523509979248,
-0.06616545468568802,
0.21594180166721344,
-0.10043781995773315,
-0.23464201390743256,
-0.42940765619277954,
0.3597227931022644,
-0.05688424035906792,
0.3466907739639282,
-0.11632443964481354,
-0.15034745633602142,
0.14400902390480042,
0.07140132784843445,
0.09466460347175598,
-0.0444968119263649,
-0.2107972651720047,
0.2547376751899719,
-0.02013106271624565,
-0.06583354622125626,
-0.2142183929681778,
0.38316139578819275,
0.2005239725112915,
0.11299735307693481,
-0.013659492135047913,
-0.5235053300857544,
0.3522988557815552,
-0.610717236995697,
-0.29286491870880127,
0.0026900512166321278,
0.09335602819919586,
0.34499138593673706,
-0.4455471336841583,
-0.041889630258083344,
0.035983361303806305,
0.28277549147605896,
-0.11030236631631851,
-0.08820735663175583,
0.19266065955162048,
0.11836057901382446,
0.06140916422009468,
-0.20385326445102692,
-0.030303955078125,
0.4483107626438141,
0.030539749190211296,
0.20481480658054352,
-0.030535075813531876
] |
https://github.com/huggingface/datasets/issues/5111 | map and filter not working properly in multiprocessing with the new release 2.6.0 | Thanks for reporting, @loubnabnl and for the additional information, @PartiallyTyped.
However, I'm not able to reproduce this issue, neither locally nor on Colab:
```
Dataset({
features: ['repo_name', 'path', 'copies', 'size', 'content', 'license', 'hash', 'line_mean', 'line_max', 'alpha_frac', 'autogenerated'],
num_rows: 10
})
Dataset({
features: ['repo_name', 'path', 'copies', 'size', 'content', 'license', 'hash', 'line_mean', 'line_max', 'alpha_frac', 'autogenerated'],
num_rows: 10
})
```
CC: @huggingface/datasets can anybody reproduce this? | ## Describe the bug
When mapping is used on a dataset with more than one process, there is a weird behavior when trying to use `filter` , it's like only the samples from one worker are retrieved, one needs to specify the same `num_proc` in filter for it to work properly. This doesn't happen with `datasets` version 2.5.2
In the code below the data is filtered differently when we increase `num_proc` used in `map` although the datsets before and after mapping have identical elements.
## Steps to reproduce the bug
```python
import datasets
from datasets import load_dataset
def preprocess(example):
return example
ds = load_dataset("codeparrot/codeparrot-clean-valid", split="train").select([i for i in range(10)])
ds1 = ds.map(preprocess, num_proc=2)
ds2 = ds.map(preprocess)
# the datasets elements are the same
for i in range(len(ds1)):
assert ds1[i]==ds2[i]
print(f'Target column before filtering {ds1["autogenerated"]}')
print(f'Target column before filtering {ds2["autogenerated"]}')
print(f"datasets version {datasets.__version__}")
ds_filtered_1 = ds1.filter(lambda x: not x["autogenerated"])
ds_filtered_2 = ds2.filter(lambda x: not x["autogenerated"])
# all elements in Target column are false so they should all be kept, but for ds2 only the first 5=num_samples/num_proc are kept
print(ds_filtered_1)
print(ds_filtered_2)
```
```
Target column before filtering [False, False, False, False, False, False, False, False, False, False]
Target column before filtering [False, False, False, False, False, False, False, False, False, False]
Dataset({
features: ['repo_name', 'path', 'copies', 'size', 'content', 'license', 'hash', 'line_mean', 'line_max', 'alpha_frac', 'autogenerated'],
num_rows: 5
})
Dataset({
features: ['repo_name', 'path', 'copies', 'size', 'content', 'license', 'hash', 'line_mean', 'line_max', 'alpha_frac', 'autogenerated'],
num_rows: 10
})
```
## Expected results
Increasing `num_proc` in mapping shouldn't alter filtering. With the previous version 2.5.2 this doesn't happen
## Actual results
Filtering doesn't work properly when we increase `num_proc` in mapping but not when calling `filter`
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.6.0
- Platform: Linux-4.19.0-22-cloud-amd64-x86_64-with-glibc2.28
- Python version: 3.9.13
- PyArrow version: 8.0.0
- Pandas version: 1.4.2 | 63 | map and filter not working properly in multiprocessing with the new release 2.6.0
## Describe the bug
When mapping is used on a dataset with more than one process, there is a weird behavior when trying to use `filter` , it's like only the samples from one worker are retrieved, one needs to specify the same `num_proc` in filter for it to work properly. This doesn't happen with `datasets` version 2.5.2
In the code below the data is filtered differently when we increase `num_proc` used in `map` although the datsets before and after mapping have identical elements.
## Steps to reproduce the bug
```python
import datasets
from datasets import load_dataset
def preprocess(example):
return example
ds = load_dataset("codeparrot/codeparrot-clean-valid", split="train").select([i for i in range(10)])
ds1 = ds.map(preprocess, num_proc=2)
ds2 = ds.map(preprocess)
# the datasets elements are the same
for i in range(len(ds1)):
assert ds1[i]==ds2[i]
print(f'Target column before filtering {ds1["autogenerated"]}')
print(f'Target column before filtering {ds2["autogenerated"]}')
print(f"datasets version {datasets.__version__}")
ds_filtered_1 = ds1.filter(lambda x: not x["autogenerated"])
ds_filtered_2 = ds2.filter(lambda x: not x["autogenerated"])
# all elements in Target column are false so they should all be kept, but for ds2 only the first 5=num_samples/num_proc are kept
print(ds_filtered_1)
print(ds_filtered_2)
```
```
Target column before filtering [False, False, False, False, False, False, False, False, False, False]
Target column before filtering [False, False, False, False, False, False, False, False, False, False]
Dataset({
features: ['repo_name', 'path', 'copies', 'size', 'content', 'license', 'hash', 'line_mean', 'line_max', 'alpha_frac', 'autogenerated'],
num_rows: 5
})
Dataset({
features: ['repo_name', 'path', 'copies', 'size', 'content', 'license', 'hash', 'line_mean', 'line_max', 'alpha_frac', 'autogenerated'],
num_rows: 10
})
```
## Expected results
Increasing `num_proc` in mapping shouldn't alter filtering. With the previous version 2.5.2 this doesn't happen
## Actual results
Filtering doesn't work properly when we increase `num_proc` in mapping but not when calling `filter`
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.6.0
- Platform: Linux-4.19.0-22-cloud-amd64-x86_64-with-glibc2.28
- Python version: 3.9.13
- PyArrow version: 8.0.0
- Pandas version: 1.4.2
Thanks for reporting, @loubnabnl and for the additional information, @PartiallyTyped.
However, I'm not able to reproduce this issue, neither locally nor on Colab:
```
Dataset({
features: ['repo_name', 'path', 'copies', 'size', 'content', 'license', 'hash', 'line_mean', 'line_max', 'alpha_frac', 'autogenerated'],
num_rows: 10
})
Dataset({
features: ['repo_name', 'path', 'copies', 'size', 'content', 'license', 'hash', 'line_mean', 'line_max', 'alpha_frac', 'autogenerated'],
num_rows: 10
})
```
CC: @huggingface/datasets can anybody reproduce this? | [
-0.29330000281333923,
-0.09082433581352234,
-0.12948650121688843,
0.18801119923591614,
-0.08888343721628189,
-0.49709072709083557,
0.2094753533601761,
0.24282652139663696,
0.20070987939834595,
0.06659423559904099,
0.037694431841373444,
0.41527029871940613,
-0.10309305042028427,
0.17575977742671967,
-0.33484193682670593,
0.17066451907157898,
0.01924905925989151,
0.04662138223648071,
-0.26182040572166443,
0.08813558518886566,
-0.2880106568336487,
0.39572685956954956,
-0.3823106288909912,
0.045943260192871094,
-0.33826330304145813,
0.1625450700521469,
0.19779814779758453,
0.09180504828691483,
0.2091354876756668,
-0.20342755317687988,
0.2112935483455658,
0.2983053922653198,
0.06303725391626358,
0.7592065930366516,
-0.0001269663916900754,
0.06948408484458923,
0.23120948672294617,
-0.022200480103492737,
0.0789756327867508,
-0.4687232971191406,
-0.08233633637428284,
0.029404865577816963,
0.09244014322757721,
0.030937500298023224,
-0.06648020446300507,
0.1427362859249115,
-0.2592627704143524,
-0.6424863934516907,
0.4067149758338928,
0.21644635498523712,
0.10199318826198578,
0.15390315651893616,
-0.11435239017009735,
0.12546952068805695,
-0.2606405019760132,
0.1484658420085907,
0.038797833025455475,
-0.00682024285197258,
0.7416775226593018,
-0.25356531143188477,
0.17842133343219757,
0.38244590163230896,
-0.2503816485404968,
0.173201322555542,
-0.2696720361709595,
0.07378194481134415,
0.5208023190498352,
-0.6612710952758789,
0.4278782308101654,
0.10720311105251312,
-0.047210074961185455,
0.02041572518646717,
-0.18435636162757874,
-0.24831464886665344,
-0.3961794674396515,
-0.11604371666908264,
0.22262120246887207,
0.0594792515039444,
-0.21166856586933136,
0.12220114469528198,
-0.5084875226020813,
0.17624104022979736,
0.18885502219200134,
0.08266344666481018,
-0.0885237380862236,
0.2542015314102173,
-0.07152561098337173,
0.3040280044078827,
-0.007399480789899826,
0.21780985593795776,
0.16620071232318878,
-0.15932625532150269,
0.25666555762290955,
0.24718314409255981,
-0.03839705511927605,
0.08888264000415802,
0.29969483613967896,
-0.1430395543575287,
-0.27249881625175476,
-0.3648928999900818,
-0.1097741574048996,
0.2961053252220154,
-0.017965756356716156,
0.1715323030948639,
0.3068402409553528,
-0.47919100522994995,
0.3218745291233063,
0.3186163604259491,
0.24818271398544312,
-0.2033604383468628,
-0.514742910861969,
-0.0704706683754921,
0.4113386869430542,
-0.19189786911010742,
-0.07459723204374313,
0.1254083514213562,
0.32717669010162354,
-0.26724788546562195,
-0.169813334941864,
0.0184952300041914,
-0.27567100524902344,
-0.31243476271629333,
0.2018006294965744,
0.22115445137023926,
0.2087784707546234,
0.6228923201560974,
-0.05846262350678444,
0.16593162715435028,
-0.351974755525589,
-0.012018446810543537,
-0.10044236481189728,
-0.37129688262939453,
-0.25151339173316956,
0.15629443526268005,
0.10991592705249786,
-0.2728536128997803,
0.279865562915802,
0.3981877863407135,
-0.055497825145721436,
-0.29441118240356445,
0.22392472624778748,
-0.25673437118530273,
0.35709571838378906,
0.1904037743806839,
-0.05813446640968323,
0.2328825443983078,
0.02300960011780262,
-0.09958062320947647,
-0.10774462670087814,
0.26458337903022766,
-0.4973070025444031,
-0.1074250340461731,
0.05681660771369934,
0.034349095076322556,
0.06926009058952332,
0.24802595376968384,
0.04287860915064812,
0.32835549116134644,
0.6108881235122681,
-0.39663514494895935,
-0.27638909220695496,
-0.3413005471229553,
-0.4653482735157013,
-0.23210300505161285,
-0.038794733583927155,
0.20024889707565308,
-0.2890167832374573,
-0.10459297895431519,
0.05818246677517891,
-0.018942244350910187,
0.6297788619995117,
-0.07468017935752869,
-0.11019276827573776,
-0.2724522650241852,
-0.005811117589473724,
-0.09897317737340927,
0.24358315765857697,
-0.10085807740688324,
-0.36809268593788147,
0.22778308391571045,
0.09226378798484802,
0.2381083220243454,
-0.015457086265087128,
-0.17798586189746857,
0.2820262014865875,
-0.14359313249588013,
0.08092084527015686,
0.12978923320770264,
-0.21999534964561462,
0.2618851959705353,
-0.2816871106624603,
0.10263209044933319,
-0.021647773683071136,
-0.09908124804496765,
0.3185559809207916,
0.07670461386442184,
0.19000399112701416,
-0.4946543872356415,
0.42285388708114624,
0.012326851487159729,
0.2451002597808838,
0.05789545923471451,
0.09481640160083771,
0.11728011071681976,
0.0697653740644455,
-0.4995799958705902,
0.061898887157440186,
0.1506207287311554,
-0.10442350059747696,
-0.24823293089866638,
0.007990039885044098,
0.10610291361808777,
-0.021643653512001038,
0.04692942649126053,
-0.2115831822156906,
-0.35896891355514526,
-0.07225553691387177,
0.08139743655920029,
-0.07828473299741745,
-0.3184509873390198,
-0.008610811084508896,
0.42232200503349304,
0.2914106845855713,
-0.08435061573982239,
0.18898111581802368,
0.5267427563667297,
0.0481908954679966,
-0.3409818112850189,
-0.318581759929657,
0.1975015103816986,
0.3211732804775238,
0.02721579186618328,
-0.07423471659421921,
0.14900460839271545,
0.33900588750839233,
-0.1978043168783188,
-0.26592668890953064,
0.0501268208026886,
0.31675127148628235,
0.24411749839782715,
0.03396248444914818,
0.09170643985271454,
0.18513010442256927,
-0.05841681733727455,
0.11265210807323456,
0.3561334013938904,
-0.06648160517215729,
0.4627922773361206,
0.0090770423412323,
0.1746581345796585,
0.2771829068660736,
-0.057890523225069046,
0.08511108160018921,
-0.32774618268013,
-0.037753332406282425,
0.005694970488548279,
0.06218474730849266,
0.09558441489934921,
-0.17757990956306458,
0.2616659700870514,
0.3140527904033661,
0.31337791681289673,
-0.22933834791183472,
-0.1404857337474823,
0.019453078508377075,
0.05376803129911423,
-0.02815312333405018,
0.29782915115356445,
0.5410075783729553,
0.09870943427085876,
-0.04120580479502678,
-0.18894295394420624,
0.08036623150110245,
-0.09926869720220566,
0.10174830257892609,
0.10036995261907578,
0.35603073239326477,
0.1692349910736084,
0.12932278215885162,
0.028460389003157616,
0.06470096856355667,
-0.013418929651379585,
0.15351690351963043,
-0.03525763005018234,
-0.3263186812400818,
0.1654461920261383,
-0.2587908208370209,
0.2324906587600708,
-0.23520848155021667,
-0.04217617213726044,
-0.01501888781785965,
-0.141118586063385,
-0.1792117804288864,
0.48724621534347534,
-0.03379586338996887,
0.09249023348093033,
-0.1022196114063263,
-0.030107811093330383,
-0.30479899048805237,
-0.026138922199606895,
0.060113467276096344,
-0.038345497101545334,
-0.22356635332107544,
-0.051791995763778687,
0.14295627176761627,
-0.07985244691371918,
0.25990554690361023,
0.3348364233970642,
-0.5039550065994263,
-0.12378305941820145,
-0.3422248065471649,
-0.0007059648633003235,
0.1637781411409378,
0.2607001066207886,
-0.17304128408432007,
-0.21212391555309296,
0.28377658128738403,
-0.19424913823604584,
0.14332129061222076,
-0.31832602620124817,
-0.1176157221198082,
0.07286487519741058,
-0.04885868355631828,
-0.0456385537981987,
-0.2349294275045395,
-0.2822719216346741,
-0.3273325264453888,
-0.09714153409004211,
-0.18640108406543732,
-0.11143743991851807,
0.38807111978530884,
-0.29472434520721436,
0.0493491031229496,
-0.3356305658817291,
-0.1941615790128708,
-0.06613010168075562,
-0.3016759753227234,
-0.14705851674079895,
-0.05486389622092247,
-0.07194019109010696,
-0.16081325709819794,
-0.2360139638185501,
-0.017919862642884254,
0.02851620502769947,
0.5443401336669922,
-0.0171675868332386,
-0.5309401154518127,
-0.1317264586687088,
0.11986887454986572,
0.4592250883579254,
0.17490911483764648,
0.452831506729126,
0.16859066486358643,
0.026205549016594887,
-0.20455357432365417,
-0.42293262481689453,
0.11532937735319138,
0.14473868906497955,
0.09815630316734314,
0.24285703897476196,
0.33960649371147156,
0.017777275294065475,
0.6487994194030762,
0.5561539530754089,
-0.023226294666528702,
0.2636876702308655,
0.07403194159269333,
0.04566236957907677,
-0.022459812462329865,
-0.45582547783851624,
-0.024404259398579597,
-0.12521806359291077,
0.09832961857318878,
-0.008867837488651276,
-0.006637651473283768,
-0.33512017130851746,
-0.15906734764575958,
0.23264598846435547,
-0.7345539927482605,
-0.168930783867836,
-0.049281761050224304,
-0.13580107688903809,
0.3975372016429901,
0.14422814548015594,
0.03133980929851532,
-0.21261078119277954,
-0.09736577421426773,
-0.42600056529045105,
-0.14386261999607086,
0.1674983650445938,
-0.1667073369026184,
-0.29815876483917236,
0.12233658134937286,
-0.21677619218826294,
0.47312575578689575,
0.18235604465007782,
0.260477751493454,
-0.07431178539991379,
-0.081533282995224,
0.07893959432840347,
0.049552153795957565,
0.6764702200889587,
-0.37624335289001465,
-0.05158403515815735,
0.09987929463386536,
-0.39059141278266907,
-0.3388819992542267,
-0.15165822207927704,
0.025204215198755264,
0.5367099642753601,
0.6272286772727966,
0.10354174673557281,
0.06888823956251144,
-0.3663700222969055,
0.07769343256950378,
-0.38767534494400024,
-0.0683491975069046,
-0.16902056336402893,
-0.14657586812973022,
-0.07196789979934692,
-0.08967112004756927,
-0.03853733092546463,
0.01237749494612217,
0.33877408504486084,
-0.20582759380340576,
-0.39030298590660095,
0.11860175430774689,
-0.1078229770064354,
0.15982484817504883,
0.17691126465797424,
0.10346754640340805,
0.14915046095848083,
0.23646330833435059,
0.31176450848579407,
0.2674891948699951,
0.06380219012498856,
0.31592243909835815,
-0.38804635405540466,
-0.09684792160987854,
0.07335789501667023,
-0.2518492341041565,
0.33245185017585754,
0.32175931334495544,
0.08921739459037781,
0.06345341354608536,
-0.004755774512887001,
0.13639548420906067,
-0.05870078131556511,
0.012148527428507805,
0.06466039270162582,
0.2950471043586731,
-0.2899467945098877,
-0.4733572006225586,
0.15254418551921844,
0.3358713686466217,
-0.28106141090393066,
0.5572060942649841,
-0.4284759759902954,
-0.16121147572994232,
0.07431559264659882,
-0.07126977294683456,
0.6074885129928589,
-0.0032458677887916565,
-0.16051466763019562,
-0.15250703692436218,
-0.37802886962890625,
0.0320822112262249,
0.23906894028186798,
0.06523102521896362,
-0.23793630301952362,
-0.0189516544342041,
0.02283773012459278,
-0.16766339540481567,
0.12181078642606735,
0.14047271013259888,
-0.10900367796421051,
0.3879282772541046,
0.02125634253025055,
-0.2947583794593811,
-0.0011739758774638176,
-0.22856983542442322,
0.3797951340675354,
-0.0722542405128479,
0.23857086896896362,
0.0036154240369796753,
0.11349207162857056,
0.1495513916015625,
0.007726617157459259,
-0.11262161284685135,
0.16928139328956604,
-0.28532150387763977,
-0.34286990761756897,
0.025011368095874786,
-0.4184448719024658,
-0.04409029334783554,
0.4491518437862396,
-0.13170750439167023,
0.24372747540473938,
0.2775619924068451,
0.0486757829785347,
-0.332288533449173,
0.07883575558662415,
-0.054437894374132156,
0.11154352873563766,
0.4038606882095337,
0.12708978354930878,
-0.10675829648971558,
0.16759328544139862,
0.05051247030496597,
-0.38213932514190674,
-0.08912055939435959,
-0.010308324359357357,
-0.23484806716442108,
-0.17547909915447235,
0.4308587908744812,
0.302776575088501,
0.05664815381169319,
0.03260426223278046,
0.15958821773529053,
-0.03011108748614788,
-0.18425610661506653,
0.03501790016889572,
-0.04145655781030655,
-0.14211252331733704,
0.6241980195045471,
-0.3774673342704773,
-0.31871283054351807,
0.07014575600624084,
0.339997261762619,
0.33298587799072266,
-0.1036776751279831,
0.19172188639640808,
-0.13891378045082092,
-0.12366493791341782,
-0.034551363438367844,
-0.267680823802948,
0.007367858663201332,
-0.0277802012860775,
0.2534829378128052,
-0.17337502539157867,
-0.3788645267486572,
0.4051230549812317,
-0.20755735039710999,
-0.25728005170822144,
0.317949116230011,
-0.15065999329090118,
-0.4836181700229645,
-0.12183155119419098,
-0.15917019546031952,
-0.23664651811122894,
-0.15482787787914276,
-0.10627136379480362,
0.16384558379650116,
0.05159156769514084,
0.4303973913192749,
-0.1796063333749771,
0.11310765147209167,
0.2626270651817322,
0.3647848963737488,
0.22181501984596252,
-0.015519112348556519,
-0.2014387995004654,
-0.2010839879512787,
-0.0687255933880806,
0.06579111516475677,
-0.2165195792913437,
-0.08146081864833832,
-0.08489552140235901,
0.09003937989473343,
-0.05832947790622711,
-0.2730425298213959,
0.0024563889019191265,
-0.04115894436836243,
0.01184034626930952,
-0.2515135407447815,
0.25182896852493286,
0.19209390878677368,
-0.06698295474052429,
0.0760158821940422,
0.20264121890068054,
-0.1186470165848732,
0.05928793549537659,
0.269453763961792,
-0.29660189151763916,
0.05499431490898132,
0.17329180240631104,
0.5987299680709839,
0.19550834596157074,
-0.02535618469119072,
0.04093628376722336,
-0.3076389729976654,
-0.06192608177661896,
0.121331125497818,
0.21667394042015076,
-0.18755263090133667,
0.0512472428381443,
0.531578540802002,
0.2188348025083542,
0.137033149600029,
-0.08766784518957138,
0.1483955979347229,
0.05707092955708504,
0.14746113121509552,
-0.1897727996110916,
-0.15652813017368317,
0.5084590315818787,
0.35377171635627747,
0.12066170573234558,
0.23555845022201538,
0.09609408676624298,
-0.09738358110189438,
0.17497669160366058,
0.2224646806716919,
0.019147653132677078,
-0.4077450633049011,
0.34704023599624634,
0.12751322984695435,
0.2782144844532013,
0.3257119059562683,
0.4312991797924042,
-0.035789113491773605,
-0.3683529198169708,
0.41820234060287476,
0.11490130424499512,
0.3778512179851532,
0.10091858357191086,
0.022568698972463608,
0.15115663409233093,
-0.41511109471321106,
-0.11396494507789612,
0.058930978178977966,
-0.48957186937332153,
0.327009379863739,
0.08807460963726044,
-0.11331027001142502,
-0.205936461687088,
-0.27521926164627075,
-0.1264815330505371,
0.195593923330307,
-0.1536855697631836,
-0.30733004212379456,
-0.26856860518455505,
-0.22756579518318176,
0.10151761770248413,
-0.007408887147903442,
0.1308376044034958,
0.11352286487817764,
0.7485291957855225,
0.05090804398059845,
-0.26260536909103394,
-0.25671055912971497,
-0.5739127993583679,
-0.07554341107606888,
0.18073998391628265,
-0.17118239402770996,
0.20633520185947418,
-0.05953186750411987,
0.026829395443201065,
0.1472737193107605,
0.3225654065608978,
0.4239923655986786,
0.5518093109130859,
-0.3131810128688812,
-0.09604928642511368,
0.23548179864883423,
-0.009899172931909561,
-0.2895185947418213,
0.3817238509654999,
-0.002429567277431488,
0.23729325830936432,
-0.044592469930648804,
0.008887602016329765,
-0.011223109439015388,
-0.07071597874164581,
0.19948385655879974,
0.49296826124191284,
-0.018722455948591232,
0.5340995788574219,
0.0046153683215379715,
-0.037080466747283936,
0.19774141907691956,
0.011101558804512024,
-0.07733827829360962,
0.049736034125089645,
0.4786456227302551,
-0.34554973244667053,
0.37568891048431396,
0.1107141375541687,
0.01807255670428276,
0.16870330274105072,
-0.02500591054558754,
0.01444828137755394,
0.10648949444293976,
-0.21124383807182312,
-0.028922080993652344,
-0.4640720784664154,
-0.0518023744225502,
-0.15382163226604462,
0.2807559669017792,
-0.23196206986904144,
0.18630364537239075,
0.015014752745628357,
-0.01699862629175186,
0.21604350209236145,
-0.27532345056533813,
0.3044924736022949,
0.40299075841903687,
-0.4384748041629791,
0.04903726652264595,
0.04048900306224823,
-0.04924848675727844,
0.25534817576408386,
-0.40911588072776794,
0.20205335319042206,
-0.29184582829475403,
0.00019259750843048096,
-0.07730960845947266,
0.08744102716445923,
0.10853748023509979,
0.06673829257488251,
0.10918456315994263,
0.41538915038108826,
0.3302745819091797,
-0.15716120600700378,
0.2230183482170105,
-0.31907814741134644,
-0.01185528188943863,
-0.24054796993732452,
-0.029871851205825806,
-0.07082416117191315,
0.23773887753486633,
-0.403891921043396,
-0.02166667953133583,
-0.1479683816432953,
-0.028127171099185944,
-0.13762971758842468,
0.1710902601480484,
-0.13200853765010834,
-0.23497521877288818,
0.246354877948761,
0.07408693432807922,
-0.09791026264429092,
0.4094310700893402,
-0.000013537704944610596,
0.0932784453034401,
-0.2792413830757141,
-0.08772265911102295,
0.19823984801769257,
-0.46000605821609497,
-0.3866002559661865,
-0.6783804297447205,
0.40124741196632385,
-0.2589479982852936,
0.1490485668182373,
-0.06818075478076935,
-0.22367051243782043,
0.37565770745277405,
-0.29909685254096985,
-0.2412685602903366,
0.10056452453136444,
-0.11570513248443604,
-0.12945514917373657,
-0.13955014944076538,
-0.2513405978679657,
0.334596186876297,
-0.3961808979511261,
0.2359340488910675,
-0.10211296379566193
] |
https://github.com/huggingface/datasets/issues/5111 | map and filter not working properly in multiprocessing with the new release 2.6.0 | This is the minimum reproducible example. I ran this on the premium instances of colab.
```
# !pip install datasets
import datasets
from datasets import load_dataset
ds = load_dataset("copenlu/answerable_tydiqa").filter("english".__eq__, input_columns="language")
assert all(map("english".__eq__, ds["train"]["language"]))
```
In my case, the number of samples is correct, however, the samples selected when indexing are wrong.
```python
DatasetDict({
validation: Dataset({
features: ['question_text', 'document_title', 'language', 'annotations', 'document_plaintext', 'document_url'],
num_rows: 990
})
train: Dataset({
features: ['question_text', 'document_title', 'language', 'annotations', 'document_plaintext', 'document_url'],
num_rows: 7389
})
})
```
The number of rows is indeed correct, and i have checked it with a version that works. | ## Describe the bug
When mapping is used on a dataset with more than one process, there is a weird behavior when trying to use `filter` , it's like only the samples from one worker are retrieved, one needs to specify the same `num_proc` in filter for it to work properly. This doesn't happen with `datasets` version 2.5.2
In the code below the data is filtered differently when we increase `num_proc` used in `map` although the datsets before and after mapping have identical elements.
## Steps to reproduce the bug
```python
import datasets
from datasets import load_dataset
def preprocess(example):
return example
ds = load_dataset("codeparrot/codeparrot-clean-valid", split="train").select([i for i in range(10)])
ds1 = ds.map(preprocess, num_proc=2)
ds2 = ds.map(preprocess)
# the datasets elements are the same
for i in range(len(ds1)):
assert ds1[i]==ds2[i]
print(f'Target column before filtering {ds1["autogenerated"]}')
print(f'Target column before filtering {ds2["autogenerated"]}')
print(f"datasets version {datasets.__version__}")
ds_filtered_1 = ds1.filter(lambda x: not x["autogenerated"])
ds_filtered_2 = ds2.filter(lambda x: not x["autogenerated"])
# all elements in Target column are false so they should all be kept, but for ds2 only the first 5=num_samples/num_proc are kept
print(ds_filtered_1)
print(ds_filtered_2)
```
```
Target column before filtering [False, False, False, False, False, False, False, False, False, False]
Target column before filtering [False, False, False, False, False, False, False, False, False, False]
Dataset({
features: ['repo_name', 'path', 'copies', 'size', 'content', 'license', 'hash', 'line_mean', 'line_max', 'alpha_frac', 'autogenerated'],
num_rows: 5
})
Dataset({
features: ['repo_name', 'path', 'copies', 'size', 'content', 'license', 'hash', 'line_mean', 'line_max', 'alpha_frac', 'autogenerated'],
num_rows: 10
})
```
## Expected results
Increasing `num_proc` in mapping shouldn't alter filtering. With the previous version 2.5.2 this doesn't happen
## Actual results
Filtering doesn't work properly when we increase `num_proc` in mapping but not when calling `filter`
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.6.0
- Platform: Linux-4.19.0-22-cloud-amd64-x86_64-with-glibc2.28
- Python version: 3.9.13
- PyArrow version: 8.0.0
- Pandas version: 1.4.2 | 96 | map and filter not working properly in multiprocessing with the new release 2.6.0
## Describe the bug
When mapping is used on a dataset with more than one process, there is a weird behavior when trying to use `filter` , it's like only the samples from one worker are retrieved, one needs to specify the same `num_proc` in filter for it to work properly. This doesn't happen with `datasets` version 2.5.2
In the code below the data is filtered differently when we increase `num_proc` used in `map` although the datsets before and after mapping have identical elements.
## Steps to reproduce the bug
```python
import datasets
from datasets import load_dataset
def preprocess(example):
return example
ds = load_dataset("codeparrot/codeparrot-clean-valid", split="train").select([i for i in range(10)])
ds1 = ds.map(preprocess, num_proc=2)
ds2 = ds.map(preprocess)
# the datasets elements are the same
for i in range(len(ds1)):
assert ds1[i]==ds2[i]
print(f'Target column before filtering {ds1["autogenerated"]}')
print(f'Target column before filtering {ds2["autogenerated"]}')
print(f"datasets version {datasets.__version__}")
ds_filtered_1 = ds1.filter(lambda x: not x["autogenerated"])
ds_filtered_2 = ds2.filter(lambda x: not x["autogenerated"])
# all elements in Target column are false so they should all be kept, but for ds2 only the first 5=num_samples/num_proc are kept
print(ds_filtered_1)
print(ds_filtered_2)
```
```
Target column before filtering [False, False, False, False, False, False, False, False, False, False]
Target column before filtering [False, False, False, False, False, False, False, False, False, False]
Dataset({
features: ['repo_name', 'path', 'copies', 'size', 'content', 'license', 'hash', 'line_mean', 'line_max', 'alpha_frac', 'autogenerated'],
num_rows: 5
})
Dataset({
features: ['repo_name', 'path', 'copies', 'size', 'content', 'license', 'hash', 'line_mean', 'line_max', 'alpha_frac', 'autogenerated'],
num_rows: 10
})
```
## Expected results
Increasing `num_proc` in mapping shouldn't alter filtering. With the previous version 2.5.2 this doesn't happen
## Actual results
Filtering doesn't work properly when we increase `num_proc` in mapping but not when calling `filter`
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.6.0
- Platform: Linux-4.19.0-22-cloud-amd64-x86_64-with-glibc2.28
- Python version: 3.9.13
- PyArrow version: 8.0.0
- Pandas version: 1.4.2
This is the minimum reproducible example. I ran this on the premium instances of colab.
```
# !pip install datasets
import datasets
from datasets import load_dataset
ds = load_dataset("copenlu/answerable_tydiqa").filter("english".__eq__, input_columns="language")
assert all(map("english".__eq__, ds["train"]["language"]))
```
In my case, the number of samples is correct, however, the samples selected when indexing are wrong.
```python
DatasetDict({
validation: Dataset({
features: ['question_text', 'document_title', 'language', 'annotations', 'document_plaintext', 'document_url'],
num_rows: 990
})
train: Dataset({
features: ['question_text', 'document_title', 'language', 'annotations', 'document_plaintext', 'document_url'],
num_rows: 7389
})
})
```
The number of rows is indeed correct, and i have checked it with a version that works. | [
-0.29330000281333923,
-0.09082433581352234,
-0.12948650121688843,
0.18801119923591614,
-0.08888343721628189,
-0.49709072709083557,
0.2094753533601761,
0.24282652139663696,
0.20070987939834595,
0.06659423559904099,
0.037694431841373444,
0.41527029871940613,
-0.10309305042028427,
0.17575977742671967,
-0.33484193682670593,
0.17066451907157898,
0.01924905925989151,
0.04662138223648071,
-0.26182040572166443,
0.08813558518886566,
-0.2880106568336487,
0.39572685956954956,
-0.3823106288909912,
0.045943260192871094,
-0.33826330304145813,
0.1625450700521469,
0.19779814779758453,
0.09180504828691483,
0.2091354876756668,
-0.20342755317687988,
0.2112935483455658,
0.2983053922653198,
0.06303725391626358,
0.7592065930366516,
-0.0001269663916900754,
0.06948408484458923,
0.23120948672294617,
-0.022200480103492737,
0.0789756327867508,
-0.4687232971191406,
-0.08233633637428284,
0.029404865577816963,
0.09244014322757721,
0.030937500298023224,
-0.06648020446300507,
0.1427362859249115,
-0.2592627704143524,
-0.6424863934516907,
0.4067149758338928,
0.21644635498523712,
0.10199318826198578,
0.15390315651893616,
-0.11435239017009735,
0.12546952068805695,
-0.2606405019760132,
0.1484658420085907,
0.038797833025455475,
-0.00682024285197258,
0.7416775226593018,
-0.25356531143188477,
0.17842133343219757,
0.38244590163230896,
-0.2503816485404968,
0.173201322555542,
-0.2696720361709595,
0.07378194481134415,
0.5208023190498352,
-0.6612710952758789,
0.4278782308101654,
0.10720311105251312,
-0.047210074961185455,
0.02041572518646717,
-0.18435636162757874,
-0.24831464886665344,
-0.3961794674396515,
-0.11604371666908264,
0.22262120246887207,
0.0594792515039444,
-0.21166856586933136,
0.12220114469528198,
-0.5084875226020813,
0.17624104022979736,
0.18885502219200134,
0.08266344666481018,
-0.0885237380862236,
0.2542015314102173,
-0.07152561098337173,
0.3040280044078827,
-0.007399480789899826,
0.21780985593795776,
0.16620071232318878,
-0.15932625532150269,
0.25666555762290955,
0.24718314409255981,
-0.03839705511927605,
0.08888264000415802,
0.29969483613967896,
-0.1430395543575287,
-0.27249881625175476,
-0.3648928999900818,
-0.1097741574048996,
0.2961053252220154,
-0.017965756356716156,
0.1715323030948639,
0.3068402409553528,
-0.47919100522994995,
0.3218745291233063,
0.3186163604259491,
0.24818271398544312,
-0.2033604383468628,
-0.514742910861969,
-0.0704706683754921,
0.4113386869430542,
-0.19189786911010742,
-0.07459723204374313,
0.1254083514213562,
0.32717669010162354,
-0.26724788546562195,
-0.169813334941864,
0.0184952300041914,
-0.27567100524902344,
-0.31243476271629333,
0.2018006294965744,
0.22115445137023926,
0.2087784707546234,
0.6228923201560974,
-0.05846262350678444,
0.16593162715435028,
-0.351974755525589,
-0.012018446810543537,
-0.10044236481189728,
-0.37129688262939453,
-0.25151339173316956,
0.15629443526268005,
0.10991592705249786,
-0.2728536128997803,
0.279865562915802,
0.3981877863407135,
-0.055497825145721436,
-0.29441118240356445,
0.22392472624778748,
-0.25673437118530273,
0.35709571838378906,
0.1904037743806839,
-0.05813446640968323,
0.2328825443983078,
0.02300960011780262,
-0.09958062320947647,
-0.10774462670087814,
0.26458337903022766,
-0.4973070025444031,
-0.1074250340461731,
0.05681660771369934,
0.034349095076322556,
0.06926009058952332,
0.24802595376968384,
0.04287860915064812,
0.32835549116134644,
0.6108881235122681,
-0.39663514494895935,
-0.27638909220695496,
-0.3413005471229553,
-0.4653482735157013,
-0.23210300505161285,
-0.038794733583927155,
0.20024889707565308,
-0.2890167832374573,
-0.10459297895431519,
0.05818246677517891,
-0.018942244350910187,
0.6297788619995117,
-0.07468017935752869,
-0.11019276827573776,
-0.2724522650241852,
-0.005811117589473724,
-0.09897317737340927,
0.24358315765857697,
-0.10085807740688324,
-0.36809268593788147,
0.22778308391571045,
0.09226378798484802,
0.2381083220243454,
-0.015457086265087128,
-0.17798586189746857,
0.2820262014865875,
-0.14359313249588013,
0.08092084527015686,
0.12978923320770264,
-0.21999534964561462,
0.2618851959705353,
-0.2816871106624603,
0.10263209044933319,
-0.021647773683071136,
-0.09908124804496765,
0.3185559809207916,
0.07670461386442184,
0.19000399112701416,
-0.4946543872356415,
0.42285388708114624,
0.012326851487159729,
0.2451002597808838,
0.05789545923471451,
0.09481640160083771,
0.11728011071681976,
0.0697653740644455,
-0.4995799958705902,
0.061898887157440186,
0.1506207287311554,
-0.10442350059747696,
-0.24823293089866638,
0.007990039885044098,
0.10610291361808777,
-0.021643653512001038,
0.04692942649126053,
-0.2115831822156906,
-0.35896891355514526,
-0.07225553691387177,
0.08139743655920029,
-0.07828473299741745,
-0.3184509873390198,
-0.008610811084508896,
0.42232200503349304,
0.2914106845855713,
-0.08435061573982239,
0.18898111581802368,
0.5267427563667297,
0.0481908954679966,
-0.3409818112850189,
-0.318581759929657,
0.1975015103816986,
0.3211732804775238,
0.02721579186618328,
-0.07423471659421921,
0.14900460839271545,
0.33900588750839233,
-0.1978043168783188,
-0.26592668890953064,
0.0501268208026886,
0.31675127148628235,
0.24411749839782715,
0.03396248444914818,
0.09170643985271454,
0.18513010442256927,
-0.05841681733727455,
0.11265210807323456,
0.3561334013938904,
-0.06648160517215729,
0.4627922773361206,
0.0090770423412323,
0.1746581345796585,
0.2771829068660736,
-0.057890523225069046,
0.08511108160018921,
-0.32774618268013,
-0.037753332406282425,
0.005694970488548279,
0.06218474730849266,
0.09558441489934921,
-0.17757990956306458,
0.2616659700870514,
0.3140527904033661,
0.31337791681289673,
-0.22933834791183472,
-0.1404857337474823,
0.019453078508377075,
0.05376803129911423,
-0.02815312333405018,
0.29782915115356445,
0.5410075783729553,
0.09870943427085876,
-0.04120580479502678,
-0.18894295394420624,
0.08036623150110245,
-0.09926869720220566,
0.10174830257892609,
0.10036995261907578,
0.35603073239326477,
0.1692349910736084,
0.12932278215885162,
0.028460389003157616,
0.06470096856355667,
-0.013418929651379585,
0.15351690351963043,
-0.03525763005018234,
-0.3263186812400818,
0.1654461920261383,
-0.2587908208370209,
0.2324906587600708,
-0.23520848155021667,
-0.04217617213726044,
-0.01501888781785965,
-0.141118586063385,
-0.1792117804288864,
0.48724621534347534,
-0.03379586338996887,
0.09249023348093033,
-0.1022196114063263,
-0.030107811093330383,
-0.30479899048805237,
-0.026138922199606895,
0.060113467276096344,
-0.038345497101545334,
-0.22356635332107544,
-0.051791995763778687,
0.14295627176761627,
-0.07985244691371918,
0.25990554690361023,
0.3348364233970642,
-0.5039550065994263,
-0.12378305941820145,
-0.3422248065471649,
-0.0007059648633003235,
0.1637781411409378,
0.2607001066207886,
-0.17304128408432007,
-0.21212391555309296,
0.28377658128738403,
-0.19424913823604584,
0.14332129061222076,
-0.31832602620124817,
-0.1176157221198082,
0.07286487519741058,
-0.04885868355631828,
-0.0456385537981987,
-0.2349294275045395,
-0.2822719216346741,
-0.3273325264453888,
-0.09714153409004211,
-0.18640108406543732,
-0.11143743991851807,
0.38807111978530884,
-0.29472434520721436,
0.0493491031229496,
-0.3356305658817291,
-0.1941615790128708,
-0.06613010168075562,
-0.3016759753227234,
-0.14705851674079895,
-0.05486389622092247,
-0.07194019109010696,
-0.16081325709819794,
-0.2360139638185501,
-0.017919862642884254,
0.02851620502769947,
0.5443401336669922,
-0.0171675868332386,
-0.5309401154518127,
-0.1317264586687088,
0.11986887454986572,
0.4592250883579254,
0.17490911483764648,
0.452831506729126,
0.16859066486358643,
0.026205549016594887,
-0.20455357432365417,
-0.42293262481689453,
0.11532937735319138,
0.14473868906497955,
0.09815630316734314,
0.24285703897476196,
0.33960649371147156,
0.017777275294065475,
0.6487994194030762,
0.5561539530754089,
-0.023226294666528702,
0.2636876702308655,
0.07403194159269333,
0.04566236957907677,
-0.022459812462329865,
-0.45582547783851624,
-0.024404259398579597,
-0.12521806359291077,
0.09832961857318878,
-0.008867837488651276,
-0.006637651473283768,
-0.33512017130851746,
-0.15906734764575958,
0.23264598846435547,
-0.7345539927482605,
-0.168930783867836,
-0.049281761050224304,
-0.13580107688903809,
0.3975372016429901,
0.14422814548015594,
0.03133980929851532,
-0.21261078119277954,
-0.09736577421426773,
-0.42600056529045105,
-0.14386261999607086,
0.1674983650445938,
-0.1667073369026184,
-0.29815876483917236,
0.12233658134937286,
-0.21677619218826294,
0.47312575578689575,
0.18235604465007782,
0.260477751493454,
-0.07431178539991379,
-0.081533282995224,
0.07893959432840347,
0.049552153795957565,
0.6764702200889587,
-0.37624335289001465,
-0.05158403515815735,
0.09987929463386536,
-0.39059141278266907,
-0.3388819992542267,
-0.15165822207927704,
0.025204215198755264,
0.5367099642753601,
0.6272286772727966,
0.10354174673557281,
0.06888823956251144,
-0.3663700222969055,
0.07769343256950378,
-0.38767534494400024,
-0.0683491975069046,
-0.16902056336402893,
-0.14657586812973022,
-0.07196789979934692,
-0.08967112004756927,
-0.03853733092546463,
0.01237749494612217,
0.33877408504486084,
-0.20582759380340576,
-0.39030298590660095,
0.11860175430774689,
-0.1078229770064354,
0.15982484817504883,
0.17691126465797424,
0.10346754640340805,
0.14915046095848083,
0.23646330833435059,
0.31176450848579407,
0.2674891948699951,
0.06380219012498856,
0.31592243909835815,
-0.38804635405540466,
-0.09684792160987854,
0.07335789501667023,
-0.2518492341041565,
0.33245185017585754,
0.32175931334495544,
0.08921739459037781,
0.06345341354608536,
-0.004755774512887001,
0.13639548420906067,
-0.05870078131556511,
0.012148527428507805,
0.06466039270162582,
0.2950471043586731,
-0.2899467945098877,
-0.4733572006225586,
0.15254418551921844,
0.3358713686466217,
-0.28106141090393066,
0.5572060942649841,
-0.4284759759902954,
-0.16121147572994232,
0.07431559264659882,
-0.07126977294683456,
0.6074885129928589,
-0.0032458677887916565,
-0.16051466763019562,
-0.15250703692436218,
-0.37802886962890625,
0.0320822112262249,
0.23906894028186798,
0.06523102521896362,
-0.23793630301952362,
-0.0189516544342041,
0.02283773012459278,
-0.16766339540481567,
0.12181078642606735,
0.14047271013259888,
-0.10900367796421051,
0.3879282772541046,
0.02125634253025055,
-0.2947583794593811,
-0.0011739758774638176,
-0.22856983542442322,
0.3797951340675354,
-0.0722542405128479,
0.23857086896896362,
0.0036154240369796753,
0.11349207162857056,
0.1495513916015625,
0.007726617157459259,
-0.11262161284685135,
0.16928139328956604,
-0.28532150387763977,
-0.34286990761756897,
0.025011368095874786,
-0.4184448719024658,
-0.04409029334783554,
0.4491518437862396,
-0.13170750439167023,
0.24372747540473938,
0.2775619924068451,
0.0486757829785347,
-0.332288533449173,
0.07883575558662415,
-0.054437894374132156,
0.11154352873563766,
0.4038606882095337,
0.12708978354930878,
-0.10675829648971558,
0.16759328544139862,
0.05051247030496597,
-0.38213932514190674,
-0.08912055939435959,
-0.010308324359357357,
-0.23484806716442108,
-0.17547909915447235,
0.4308587908744812,
0.302776575088501,
0.05664815381169319,
0.03260426223278046,
0.15958821773529053,
-0.03011108748614788,
-0.18425610661506653,
0.03501790016889572,
-0.04145655781030655,
-0.14211252331733704,
0.6241980195045471,
-0.3774673342704773,
-0.31871283054351807,
0.07014575600624084,
0.339997261762619,
0.33298587799072266,
-0.1036776751279831,
0.19172188639640808,
-0.13891378045082092,
-0.12366493791341782,
-0.034551363438367844,
-0.267680823802948,
0.007367858663201332,
-0.0277802012860775,
0.2534829378128052,
-0.17337502539157867,
-0.3788645267486572,
0.4051230549812317,
-0.20755735039710999,
-0.25728005170822144,
0.317949116230011,
-0.15065999329090118,
-0.4836181700229645,
-0.12183155119419098,
-0.15917019546031952,
-0.23664651811122894,
-0.15482787787914276,
-0.10627136379480362,
0.16384558379650116,
0.05159156769514084,
0.4303973913192749,
-0.1796063333749771,
0.11310765147209167,
0.2626270651817322,
0.3647848963737488,
0.22181501984596252,
-0.015519112348556519,
-0.2014387995004654,
-0.2010839879512787,
-0.0687255933880806,
0.06579111516475677,
-0.2165195792913437,
-0.08146081864833832,
-0.08489552140235901,
0.09003937989473343,
-0.05832947790622711,
-0.2730425298213959,
0.0024563889019191265,
-0.04115894436836243,
0.01184034626930952,
-0.2515135407447815,
0.25182896852493286,
0.19209390878677368,
-0.06698295474052429,
0.0760158821940422,
0.20264121890068054,
-0.1186470165848732,
0.05928793549537659,
0.269453763961792,
-0.29660189151763916,
0.05499431490898132,
0.17329180240631104,
0.5987299680709839,
0.19550834596157074,
-0.02535618469119072,
0.04093628376722336,
-0.3076389729976654,
-0.06192608177661896,
0.121331125497818,
0.21667394042015076,
-0.18755263090133667,
0.0512472428381443,
0.531578540802002,
0.2188348025083542,
0.137033149600029,
-0.08766784518957138,
0.1483955979347229,
0.05707092955708504,
0.14746113121509552,
-0.1897727996110916,
-0.15652813017368317,
0.5084590315818787,
0.35377171635627747,
0.12066170573234558,
0.23555845022201538,
0.09609408676624298,
-0.09738358110189438,
0.17497669160366058,
0.2224646806716919,
0.019147653132677078,
-0.4077450633049011,
0.34704023599624634,
0.12751322984695435,
0.2782144844532013,
0.3257119059562683,
0.4312991797924042,
-0.035789113491773605,
-0.3683529198169708,
0.41820234060287476,
0.11490130424499512,
0.3778512179851532,
0.10091858357191086,
0.022568698972463608,
0.15115663409233093,
-0.41511109471321106,
-0.11396494507789612,
0.058930978178977966,
-0.48957186937332153,
0.327009379863739,
0.08807460963726044,
-0.11331027001142502,
-0.205936461687088,
-0.27521926164627075,
-0.1264815330505371,
0.195593923330307,
-0.1536855697631836,
-0.30733004212379456,
-0.26856860518455505,
-0.22756579518318176,
0.10151761770248413,
-0.007408887147903442,
0.1308376044034958,
0.11352286487817764,
0.7485291957855225,
0.05090804398059845,
-0.26260536909103394,
-0.25671055912971497,
-0.5739127993583679,
-0.07554341107606888,
0.18073998391628265,
-0.17118239402770996,
0.20633520185947418,
-0.05953186750411987,
0.026829395443201065,
0.1472737193107605,
0.3225654065608978,
0.4239923655986786,
0.5518093109130859,
-0.3131810128688812,
-0.09604928642511368,
0.23548179864883423,
-0.009899172931909561,
-0.2895185947418213,
0.3817238509654999,
-0.002429567277431488,
0.23729325830936432,
-0.044592469930648804,
0.008887602016329765,
-0.011223109439015388,
-0.07071597874164581,
0.19948385655879974,
0.49296826124191284,
-0.018722455948591232,
0.5340995788574219,
0.0046153683215379715,
-0.037080466747283936,
0.19774141907691956,
0.011101558804512024,
-0.07733827829360962,
0.049736034125089645,
0.4786456227302551,
-0.34554973244667053,
0.37568891048431396,
0.1107141375541687,
0.01807255670428276,
0.16870330274105072,
-0.02500591054558754,
0.01444828137755394,
0.10648949444293976,
-0.21124383807182312,
-0.028922080993652344,
-0.4640720784664154,
-0.0518023744225502,
-0.15382163226604462,
0.2807559669017792,
-0.23196206986904144,
0.18630364537239075,
0.015014752745628357,
-0.01699862629175186,
0.21604350209236145,
-0.27532345056533813,
0.3044924736022949,
0.40299075841903687,
-0.4384748041629791,
0.04903726652264595,
0.04048900306224823,
-0.04924848675727844,
0.25534817576408386,
-0.40911588072776794,
0.20205335319042206,
-0.29184582829475403,
0.00019259750843048096,
-0.07730960845947266,
0.08744102716445923,
0.10853748023509979,
0.06673829257488251,
0.10918456315994263,
0.41538915038108826,
0.3302745819091797,
-0.15716120600700378,
0.2230183482170105,
-0.31907814741134644,
-0.01185528188943863,
-0.24054796993732452,
-0.029871851205825806,
-0.07082416117191315,
0.23773887753486633,
-0.403891921043396,
-0.02166667953133583,
-0.1479683816432953,
-0.028127171099185944,
-0.13762971758842468,
0.1710902601480484,
-0.13200853765010834,
-0.23497521877288818,
0.246354877948761,
0.07408693432807922,
-0.09791026264429092,
0.4094310700893402,
-0.000013537704944610596,
0.0932784453034401,
-0.2792413830757141,
-0.08772265911102295,
0.19823984801769257,
-0.46000605821609497,
-0.3866002559661865,
-0.6783804297447205,
0.40124741196632385,
-0.2589479982852936,
0.1490485668182373,
-0.06818075478076935,
-0.22367051243782043,
0.37565770745277405,
-0.29909685254096985,
-0.2412685602903366,
0.10056452453136444,
-0.11570513248443604,
-0.12945514917373657,
-0.13955014944076538,
-0.2513405978679657,
0.334596186876297,
-0.3961808979511261,
0.2359340488910675,
-0.10211296379566193
] |
https://github.com/huggingface/datasets/issues/5111 | map and filter not working properly in multiprocessing with the new release 2.6.0 | I can reproduce the issue on my mac too
```
- `datasets` version: 2.6.0
- Platform: macOS-12.2.1-arm64-arm-64bit
- Python version: 3.9.13
- PyArrow version: 9.0.0
- Pandas version: 1.4.3
```
But not on Colab with python 3.7, maybe related to python version? (didn't manage to install python 3.9)
```
- `datasets` version: 2.6.0
- Platform: Linux-5.10.133+-x86_64-with-Ubuntu-18.04-bionic
- Python version: 3.7.14
- PyArrow version: 9.0.0
- Pandas version: 1.3.5
``` | ## Describe the bug
When mapping is used on a dataset with more than one process, there is a weird behavior when trying to use `filter` , it's like only the samples from one worker are retrieved, one needs to specify the same `num_proc` in filter for it to work properly. This doesn't happen with `datasets` version 2.5.2
In the code below the data is filtered differently when we increase `num_proc` used in `map` although the datsets before and after mapping have identical elements.
## Steps to reproduce the bug
```python
import datasets
from datasets import load_dataset
def preprocess(example):
return example
ds = load_dataset("codeparrot/codeparrot-clean-valid", split="train").select([i for i in range(10)])
ds1 = ds.map(preprocess, num_proc=2)
ds2 = ds.map(preprocess)
# the datasets elements are the same
for i in range(len(ds1)):
assert ds1[i]==ds2[i]
print(f'Target column before filtering {ds1["autogenerated"]}')
print(f'Target column before filtering {ds2["autogenerated"]}')
print(f"datasets version {datasets.__version__}")
ds_filtered_1 = ds1.filter(lambda x: not x["autogenerated"])
ds_filtered_2 = ds2.filter(lambda x: not x["autogenerated"])
# all elements in Target column are false so they should all be kept, but for ds2 only the first 5=num_samples/num_proc are kept
print(ds_filtered_1)
print(ds_filtered_2)
```
```
Target column before filtering [False, False, False, False, False, False, False, False, False, False]
Target column before filtering [False, False, False, False, False, False, False, False, False, False]
Dataset({
features: ['repo_name', 'path', 'copies', 'size', 'content', 'license', 'hash', 'line_mean', 'line_max', 'alpha_frac', 'autogenerated'],
num_rows: 5
})
Dataset({
features: ['repo_name', 'path', 'copies', 'size', 'content', 'license', 'hash', 'line_mean', 'line_max', 'alpha_frac', 'autogenerated'],
num_rows: 10
})
```
## Expected results
Increasing `num_proc` in mapping shouldn't alter filtering. With the previous version 2.5.2 this doesn't happen
## Actual results
Filtering doesn't work properly when we increase `num_proc` in mapping but not when calling `filter`
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.6.0
- Platform: Linux-4.19.0-22-cloud-amd64-x86_64-with-glibc2.28
- Python version: 3.9.13
- PyArrow version: 8.0.0
- Pandas version: 1.4.2 | 69 | map and filter not working properly in multiprocessing with the new release 2.6.0
## Describe the bug
When mapping is used on a dataset with more than one process, there is a weird behavior when trying to use `filter` , it's like only the samples from one worker are retrieved, one needs to specify the same `num_proc` in filter for it to work properly. This doesn't happen with `datasets` version 2.5.2
In the code below the data is filtered differently when we increase `num_proc` used in `map` although the datsets before and after mapping have identical elements.
## Steps to reproduce the bug
```python
import datasets
from datasets import load_dataset
def preprocess(example):
return example
ds = load_dataset("codeparrot/codeparrot-clean-valid", split="train").select([i for i in range(10)])
ds1 = ds.map(preprocess, num_proc=2)
ds2 = ds.map(preprocess)
# the datasets elements are the same
for i in range(len(ds1)):
assert ds1[i]==ds2[i]
print(f'Target column before filtering {ds1["autogenerated"]}')
print(f'Target column before filtering {ds2["autogenerated"]}')
print(f"datasets version {datasets.__version__}")
ds_filtered_1 = ds1.filter(lambda x: not x["autogenerated"])
ds_filtered_2 = ds2.filter(lambda x: not x["autogenerated"])
# all elements in Target column are false so they should all be kept, but for ds2 only the first 5=num_samples/num_proc are kept
print(ds_filtered_1)
print(ds_filtered_2)
```
```
Target column before filtering [False, False, False, False, False, False, False, False, False, False]
Target column before filtering [False, False, False, False, False, False, False, False, False, False]
Dataset({
features: ['repo_name', 'path', 'copies', 'size', 'content', 'license', 'hash', 'line_mean', 'line_max', 'alpha_frac', 'autogenerated'],
num_rows: 5
})
Dataset({
features: ['repo_name', 'path', 'copies', 'size', 'content', 'license', 'hash', 'line_mean', 'line_max', 'alpha_frac', 'autogenerated'],
num_rows: 10
})
```
## Expected results
Increasing `num_proc` in mapping shouldn't alter filtering. With the previous version 2.5.2 this doesn't happen
## Actual results
Filtering doesn't work properly when we increase `num_proc` in mapping but not when calling `filter`
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.6.0
- Platform: Linux-4.19.0-22-cloud-amd64-x86_64-with-glibc2.28
- Python version: 3.9.13
- PyArrow version: 8.0.0
- Pandas version: 1.4.2
I can reproduce the issue on my mac too
```
- `datasets` version: 2.6.0
- Platform: macOS-12.2.1-arm64-arm-64bit
- Python version: 3.9.13
- PyArrow version: 9.0.0
- Pandas version: 1.4.3
```
But not on Colab with python 3.7, maybe related to python version? (didn't manage to install python 3.9)
```
- `datasets` version: 2.6.0
- Platform: Linux-5.10.133+-x86_64-with-Ubuntu-18.04-bionic
- Python version: 3.7.14
- PyArrow version: 9.0.0
- Pandas version: 1.3.5
``` | [
-0.29330000281333923,
-0.09082433581352234,
-0.12948650121688843,
0.18801119923591614,
-0.08888343721628189,
-0.49709072709083557,
0.2094753533601761,
0.24282652139663696,
0.20070987939834595,
0.06659423559904099,
0.037694431841373444,
0.41527029871940613,
-0.10309305042028427,
0.17575977742671967,
-0.33484193682670593,
0.17066451907157898,
0.01924905925989151,
0.04662138223648071,
-0.26182040572166443,
0.08813558518886566,
-0.2880106568336487,
0.39572685956954956,
-0.3823106288909912,
0.045943260192871094,
-0.33826330304145813,
0.1625450700521469,
0.19779814779758453,
0.09180504828691483,
0.2091354876756668,
-0.20342755317687988,
0.2112935483455658,
0.2983053922653198,
0.06303725391626358,
0.7592065930366516,
-0.0001269663916900754,
0.06948408484458923,
0.23120948672294617,
-0.022200480103492737,
0.0789756327867508,
-0.4687232971191406,
-0.08233633637428284,
0.029404865577816963,
0.09244014322757721,
0.030937500298023224,
-0.06648020446300507,
0.1427362859249115,
-0.2592627704143524,
-0.6424863934516907,
0.4067149758338928,
0.21644635498523712,
0.10199318826198578,
0.15390315651893616,
-0.11435239017009735,
0.12546952068805695,
-0.2606405019760132,
0.1484658420085907,
0.038797833025455475,
-0.00682024285197258,
0.7416775226593018,
-0.25356531143188477,
0.17842133343219757,
0.38244590163230896,
-0.2503816485404968,
0.173201322555542,
-0.2696720361709595,
0.07378194481134415,
0.5208023190498352,
-0.6612710952758789,
0.4278782308101654,
0.10720311105251312,
-0.047210074961185455,
0.02041572518646717,
-0.18435636162757874,
-0.24831464886665344,
-0.3961794674396515,
-0.11604371666908264,
0.22262120246887207,
0.0594792515039444,
-0.21166856586933136,
0.12220114469528198,
-0.5084875226020813,
0.17624104022979736,
0.18885502219200134,
0.08266344666481018,
-0.0885237380862236,
0.2542015314102173,
-0.07152561098337173,
0.3040280044078827,
-0.007399480789899826,
0.21780985593795776,
0.16620071232318878,
-0.15932625532150269,
0.25666555762290955,
0.24718314409255981,
-0.03839705511927605,
0.08888264000415802,
0.29969483613967896,
-0.1430395543575287,
-0.27249881625175476,
-0.3648928999900818,
-0.1097741574048996,
0.2961053252220154,
-0.017965756356716156,
0.1715323030948639,
0.3068402409553528,
-0.47919100522994995,
0.3218745291233063,
0.3186163604259491,
0.24818271398544312,
-0.2033604383468628,
-0.514742910861969,
-0.0704706683754921,
0.4113386869430542,
-0.19189786911010742,
-0.07459723204374313,
0.1254083514213562,
0.32717669010162354,
-0.26724788546562195,
-0.169813334941864,
0.0184952300041914,
-0.27567100524902344,
-0.31243476271629333,
0.2018006294965744,
0.22115445137023926,
0.2087784707546234,
0.6228923201560974,
-0.05846262350678444,
0.16593162715435028,
-0.351974755525589,
-0.012018446810543537,
-0.10044236481189728,
-0.37129688262939453,
-0.25151339173316956,
0.15629443526268005,
0.10991592705249786,
-0.2728536128997803,
0.279865562915802,
0.3981877863407135,
-0.055497825145721436,
-0.29441118240356445,
0.22392472624778748,
-0.25673437118530273,
0.35709571838378906,
0.1904037743806839,
-0.05813446640968323,
0.2328825443983078,
0.02300960011780262,
-0.09958062320947647,
-0.10774462670087814,
0.26458337903022766,
-0.4973070025444031,
-0.1074250340461731,
0.05681660771369934,
0.034349095076322556,
0.06926009058952332,
0.24802595376968384,
0.04287860915064812,
0.32835549116134644,
0.6108881235122681,
-0.39663514494895935,
-0.27638909220695496,
-0.3413005471229553,
-0.4653482735157013,
-0.23210300505161285,
-0.038794733583927155,
0.20024889707565308,
-0.2890167832374573,
-0.10459297895431519,
0.05818246677517891,
-0.018942244350910187,
0.6297788619995117,
-0.07468017935752869,
-0.11019276827573776,
-0.2724522650241852,
-0.005811117589473724,
-0.09897317737340927,
0.24358315765857697,
-0.10085807740688324,
-0.36809268593788147,
0.22778308391571045,
0.09226378798484802,
0.2381083220243454,
-0.015457086265087128,
-0.17798586189746857,
0.2820262014865875,
-0.14359313249588013,
0.08092084527015686,
0.12978923320770264,
-0.21999534964561462,
0.2618851959705353,
-0.2816871106624603,
0.10263209044933319,
-0.021647773683071136,
-0.09908124804496765,
0.3185559809207916,
0.07670461386442184,
0.19000399112701416,
-0.4946543872356415,
0.42285388708114624,
0.012326851487159729,
0.2451002597808838,
0.05789545923471451,
0.09481640160083771,
0.11728011071681976,
0.0697653740644455,
-0.4995799958705902,
0.061898887157440186,
0.1506207287311554,
-0.10442350059747696,
-0.24823293089866638,
0.007990039885044098,
0.10610291361808777,
-0.021643653512001038,
0.04692942649126053,
-0.2115831822156906,
-0.35896891355514526,
-0.07225553691387177,
0.08139743655920029,
-0.07828473299741745,
-0.3184509873390198,
-0.008610811084508896,
0.42232200503349304,
0.2914106845855713,
-0.08435061573982239,
0.18898111581802368,
0.5267427563667297,
0.0481908954679966,
-0.3409818112850189,
-0.318581759929657,
0.1975015103816986,
0.3211732804775238,
0.02721579186618328,
-0.07423471659421921,
0.14900460839271545,
0.33900588750839233,
-0.1978043168783188,
-0.26592668890953064,
0.0501268208026886,
0.31675127148628235,
0.24411749839782715,
0.03396248444914818,
0.09170643985271454,
0.18513010442256927,
-0.05841681733727455,
0.11265210807323456,
0.3561334013938904,
-0.06648160517215729,
0.4627922773361206,
0.0090770423412323,
0.1746581345796585,
0.2771829068660736,
-0.057890523225069046,
0.08511108160018921,
-0.32774618268013,
-0.037753332406282425,
0.005694970488548279,
0.06218474730849266,
0.09558441489934921,
-0.17757990956306458,
0.2616659700870514,
0.3140527904033661,
0.31337791681289673,
-0.22933834791183472,
-0.1404857337474823,
0.019453078508377075,
0.05376803129911423,
-0.02815312333405018,
0.29782915115356445,
0.5410075783729553,
0.09870943427085876,
-0.04120580479502678,
-0.18894295394420624,
0.08036623150110245,
-0.09926869720220566,
0.10174830257892609,
0.10036995261907578,
0.35603073239326477,
0.1692349910736084,
0.12932278215885162,
0.028460389003157616,
0.06470096856355667,
-0.013418929651379585,
0.15351690351963043,
-0.03525763005018234,
-0.3263186812400818,
0.1654461920261383,
-0.2587908208370209,
0.2324906587600708,
-0.23520848155021667,
-0.04217617213726044,
-0.01501888781785965,
-0.141118586063385,
-0.1792117804288864,
0.48724621534347534,
-0.03379586338996887,
0.09249023348093033,
-0.1022196114063263,
-0.030107811093330383,
-0.30479899048805237,
-0.026138922199606895,
0.060113467276096344,
-0.038345497101545334,
-0.22356635332107544,
-0.051791995763778687,
0.14295627176761627,
-0.07985244691371918,
0.25990554690361023,
0.3348364233970642,
-0.5039550065994263,
-0.12378305941820145,
-0.3422248065471649,
-0.0007059648633003235,
0.1637781411409378,
0.2607001066207886,
-0.17304128408432007,
-0.21212391555309296,
0.28377658128738403,
-0.19424913823604584,
0.14332129061222076,
-0.31832602620124817,
-0.1176157221198082,
0.07286487519741058,
-0.04885868355631828,
-0.0456385537981987,
-0.2349294275045395,
-0.2822719216346741,
-0.3273325264453888,
-0.09714153409004211,
-0.18640108406543732,
-0.11143743991851807,
0.38807111978530884,
-0.29472434520721436,
0.0493491031229496,
-0.3356305658817291,
-0.1941615790128708,
-0.06613010168075562,
-0.3016759753227234,
-0.14705851674079895,
-0.05486389622092247,
-0.07194019109010696,
-0.16081325709819794,
-0.2360139638185501,
-0.017919862642884254,
0.02851620502769947,
0.5443401336669922,
-0.0171675868332386,
-0.5309401154518127,
-0.1317264586687088,
0.11986887454986572,
0.4592250883579254,
0.17490911483764648,
0.452831506729126,
0.16859066486358643,
0.026205549016594887,
-0.20455357432365417,
-0.42293262481689453,
0.11532937735319138,
0.14473868906497955,
0.09815630316734314,
0.24285703897476196,
0.33960649371147156,
0.017777275294065475,
0.6487994194030762,
0.5561539530754089,
-0.023226294666528702,
0.2636876702308655,
0.07403194159269333,
0.04566236957907677,
-0.022459812462329865,
-0.45582547783851624,
-0.024404259398579597,
-0.12521806359291077,
0.09832961857318878,
-0.008867837488651276,
-0.006637651473283768,
-0.33512017130851746,
-0.15906734764575958,
0.23264598846435547,
-0.7345539927482605,
-0.168930783867836,
-0.049281761050224304,
-0.13580107688903809,
0.3975372016429901,
0.14422814548015594,
0.03133980929851532,
-0.21261078119277954,
-0.09736577421426773,
-0.42600056529045105,
-0.14386261999607086,
0.1674983650445938,
-0.1667073369026184,
-0.29815876483917236,
0.12233658134937286,
-0.21677619218826294,
0.47312575578689575,
0.18235604465007782,
0.260477751493454,
-0.07431178539991379,
-0.081533282995224,
0.07893959432840347,
0.049552153795957565,
0.6764702200889587,
-0.37624335289001465,
-0.05158403515815735,
0.09987929463386536,
-0.39059141278266907,
-0.3388819992542267,
-0.15165822207927704,
0.025204215198755264,
0.5367099642753601,
0.6272286772727966,
0.10354174673557281,
0.06888823956251144,
-0.3663700222969055,
0.07769343256950378,
-0.38767534494400024,
-0.0683491975069046,
-0.16902056336402893,
-0.14657586812973022,
-0.07196789979934692,
-0.08967112004756927,
-0.03853733092546463,
0.01237749494612217,
0.33877408504486084,
-0.20582759380340576,
-0.39030298590660095,
0.11860175430774689,
-0.1078229770064354,
0.15982484817504883,
0.17691126465797424,
0.10346754640340805,
0.14915046095848083,
0.23646330833435059,
0.31176450848579407,
0.2674891948699951,
0.06380219012498856,
0.31592243909835815,
-0.38804635405540466,
-0.09684792160987854,
0.07335789501667023,
-0.2518492341041565,
0.33245185017585754,
0.32175931334495544,
0.08921739459037781,
0.06345341354608536,
-0.004755774512887001,
0.13639548420906067,
-0.05870078131556511,
0.012148527428507805,
0.06466039270162582,
0.2950471043586731,
-0.2899467945098877,
-0.4733572006225586,
0.15254418551921844,
0.3358713686466217,
-0.28106141090393066,
0.5572060942649841,
-0.4284759759902954,
-0.16121147572994232,
0.07431559264659882,
-0.07126977294683456,
0.6074885129928589,
-0.0032458677887916565,
-0.16051466763019562,
-0.15250703692436218,
-0.37802886962890625,
0.0320822112262249,
0.23906894028186798,
0.06523102521896362,
-0.23793630301952362,
-0.0189516544342041,
0.02283773012459278,
-0.16766339540481567,
0.12181078642606735,
0.14047271013259888,
-0.10900367796421051,
0.3879282772541046,
0.02125634253025055,
-0.2947583794593811,
-0.0011739758774638176,
-0.22856983542442322,
0.3797951340675354,
-0.0722542405128479,
0.23857086896896362,
0.0036154240369796753,
0.11349207162857056,
0.1495513916015625,
0.007726617157459259,
-0.11262161284685135,
0.16928139328956604,
-0.28532150387763977,
-0.34286990761756897,
0.025011368095874786,
-0.4184448719024658,
-0.04409029334783554,
0.4491518437862396,
-0.13170750439167023,
0.24372747540473938,
0.2775619924068451,
0.0486757829785347,
-0.332288533449173,
0.07883575558662415,
-0.054437894374132156,
0.11154352873563766,
0.4038606882095337,
0.12708978354930878,
-0.10675829648971558,
0.16759328544139862,
0.05051247030496597,
-0.38213932514190674,
-0.08912055939435959,
-0.010308324359357357,
-0.23484806716442108,
-0.17547909915447235,
0.4308587908744812,
0.302776575088501,
0.05664815381169319,
0.03260426223278046,
0.15958821773529053,
-0.03011108748614788,
-0.18425610661506653,
0.03501790016889572,
-0.04145655781030655,
-0.14211252331733704,
0.6241980195045471,
-0.3774673342704773,
-0.31871283054351807,
0.07014575600624084,
0.339997261762619,
0.33298587799072266,
-0.1036776751279831,
0.19172188639640808,
-0.13891378045082092,
-0.12366493791341782,
-0.034551363438367844,
-0.267680823802948,
0.007367858663201332,
-0.0277802012860775,
0.2534829378128052,
-0.17337502539157867,
-0.3788645267486572,
0.4051230549812317,
-0.20755735039710999,
-0.25728005170822144,
0.317949116230011,
-0.15065999329090118,
-0.4836181700229645,
-0.12183155119419098,
-0.15917019546031952,
-0.23664651811122894,
-0.15482787787914276,
-0.10627136379480362,
0.16384558379650116,
0.05159156769514084,
0.4303973913192749,
-0.1796063333749771,
0.11310765147209167,
0.2626270651817322,
0.3647848963737488,
0.22181501984596252,
-0.015519112348556519,
-0.2014387995004654,
-0.2010839879512787,
-0.0687255933880806,
0.06579111516475677,
-0.2165195792913437,
-0.08146081864833832,
-0.08489552140235901,
0.09003937989473343,
-0.05832947790622711,
-0.2730425298213959,
0.0024563889019191265,
-0.04115894436836243,
0.01184034626930952,
-0.2515135407447815,
0.25182896852493286,
0.19209390878677368,
-0.06698295474052429,
0.0760158821940422,
0.20264121890068054,
-0.1186470165848732,
0.05928793549537659,
0.269453763961792,
-0.29660189151763916,
0.05499431490898132,
0.17329180240631104,
0.5987299680709839,
0.19550834596157074,
-0.02535618469119072,
0.04093628376722336,
-0.3076389729976654,
-0.06192608177661896,
0.121331125497818,
0.21667394042015076,
-0.18755263090133667,
0.0512472428381443,
0.531578540802002,
0.2188348025083542,
0.137033149600029,
-0.08766784518957138,
0.1483955979347229,
0.05707092955708504,
0.14746113121509552,
-0.1897727996110916,
-0.15652813017368317,
0.5084590315818787,
0.35377171635627747,
0.12066170573234558,
0.23555845022201538,
0.09609408676624298,
-0.09738358110189438,
0.17497669160366058,
0.2224646806716919,
0.019147653132677078,
-0.4077450633049011,
0.34704023599624634,
0.12751322984695435,
0.2782144844532013,
0.3257119059562683,
0.4312991797924042,
-0.035789113491773605,
-0.3683529198169708,
0.41820234060287476,
0.11490130424499512,
0.3778512179851532,
0.10091858357191086,
0.022568698972463608,
0.15115663409233093,
-0.41511109471321106,
-0.11396494507789612,
0.058930978178977966,
-0.48957186937332153,
0.327009379863739,
0.08807460963726044,
-0.11331027001142502,
-0.205936461687088,
-0.27521926164627075,
-0.1264815330505371,
0.195593923330307,
-0.1536855697631836,
-0.30733004212379456,
-0.26856860518455505,
-0.22756579518318176,
0.10151761770248413,
-0.007408887147903442,
0.1308376044034958,
0.11352286487817764,
0.7485291957855225,
0.05090804398059845,
-0.26260536909103394,
-0.25671055912971497,
-0.5739127993583679,
-0.07554341107606888,
0.18073998391628265,
-0.17118239402770996,
0.20633520185947418,
-0.05953186750411987,
0.026829395443201065,
0.1472737193107605,
0.3225654065608978,
0.4239923655986786,
0.5518093109130859,
-0.3131810128688812,
-0.09604928642511368,
0.23548179864883423,
-0.009899172931909561,
-0.2895185947418213,
0.3817238509654999,
-0.002429567277431488,
0.23729325830936432,
-0.044592469930648804,
0.008887602016329765,
-0.011223109439015388,
-0.07071597874164581,
0.19948385655879974,
0.49296826124191284,
-0.018722455948591232,
0.5340995788574219,
0.0046153683215379715,
-0.037080466747283936,
0.19774141907691956,
0.011101558804512024,
-0.07733827829360962,
0.049736034125089645,
0.4786456227302551,
-0.34554973244667053,
0.37568891048431396,
0.1107141375541687,
0.01807255670428276,
0.16870330274105072,
-0.02500591054558754,
0.01444828137755394,
0.10648949444293976,
-0.21124383807182312,
-0.028922080993652344,
-0.4640720784664154,
-0.0518023744225502,
-0.15382163226604462,
0.2807559669017792,
-0.23196206986904144,
0.18630364537239075,
0.015014752745628357,
-0.01699862629175186,
0.21604350209236145,
-0.27532345056533813,
0.3044924736022949,
0.40299075841903687,
-0.4384748041629791,
0.04903726652264595,
0.04048900306224823,
-0.04924848675727844,
0.25534817576408386,
-0.40911588072776794,
0.20205335319042206,
-0.29184582829475403,
0.00019259750843048096,
-0.07730960845947266,
0.08744102716445923,
0.10853748023509979,
0.06673829257488251,
0.10918456315994263,
0.41538915038108826,
0.3302745819091797,
-0.15716120600700378,
0.2230183482170105,
-0.31907814741134644,
-0.01185528188943863,
-0.24054796993732452,
-0.029871851205825806,
-0.07082416117191315,
0.23773887753486633,
-0.403891921043396,
-0.02166667953133583,
-0.1479683816432953,
-0.028127171099185944,
-0.13762971758842468,
0.1710902601480484,
-0.13200853765010834,
-0.23497521877288818,
0.246354877948761,
0.07408693432807922,
-0.09791026264429092,
0.4094310700893402,
-0.000013537704944610596,
0.0932784453034401,
-0.2792413830757141,
-0.08772265911102295,
0.19823984801769257,
-0.46000605821609497,
-0.3866002559661865,
-0.6783804297447205,
0.40124741196632385,
-0.2589479982852936,
0.1490485668182373,
-0.06818075478076935,
-0.22367051243782043,
0.37565770745277405,
-0.29909685254096985,
-0.2412685602903366,
0.10056452453136444,
-0.11570513248443604,
-0.12945514917373657,
-0.13955014944076538,
-0.2513405978679657,
0.334596186876297,
-0.3961808979511261,
0.2359340488910675,
-0.10211296379566193
] |
https://github.com/huggingface/datasets/issues/5111 | map and filter not working properly in multiprocessing with the new release 2.6.0 | I think there are 2 different issues here:
- the one reported by @loubnabnl is related to multiprocessing in map and then filter; we should reproduce it first: I have tried with Python version 3.9.7 and I can't reproduce it either; maybe it is related to the version of PyArrow? To be checked.
- the issue reported by @PartiallyTyped is related just to "filter" (without multiprocessing) and I can reproduce it. | ## Describe the bug
When mapping is used on a dataset with more than one process, there is a weird behavior when trying to use `filter` , it's like only the samples from one worker are retrieved, one needs to specify the same `num_proc` in filter for it to work properly. This doesn't happen with `datasets` version 2.5.2
In the code below the data is filtered differently when we increase `num_proc` used in `map` although the datsets before and after mapping have identical elements.
## Steps to reproduce the bug
```python
import datasets
from datasets import load_dataset
def preprocess(example):
return example
ds = load_dataset("codeparrot/codeparrot-clean-valid", split="train").select([i for i in range(10)])
ds1 = ds.map(preprocess, num_proc=2)
ds2 = ds.map(preprocess)
# the datasets elements are the same
for i in range(len(ds1)):
assert ds1[i]==ds2[i]
print(f'Target column before filtering {ds1["autogenerated"]}')
print(f'Target column before filtering {ds2["autogenerated"]}')
print(f"datasets version {datasets.__version__}")
ds_filtered_1 = ds1.filter(lambda x: not x["autogenerated"])
ds_filtered_2 = ds2.filter(lambda x: not x["autogenerated"])
# all elements in Target column are false so they should all be kept, but for ds2 only the first 5=num_samples/num_proc are kept
print(ds_filtered_1)
print(ds_filtered_2)
```
```
Target column before filtering [False, False, False, False, False, False, False, False, False, False]
Target column before filtering [False, False, False, False, False, False, False, False, False, False]
Dataset({
features: ['repo_name', 'path', 'copies', 'size', 'content', 'license', 'hash', 'line_mean', 'line_max', 'alpha_frac', 'autogenerated'],
num_rows: 5
})
Dataset({
features: ['repo_name', 'path', 'copies', 'size', 'content', 'license', 'hash', 'line_mean', 'line_max', 'alpha_frac', 'autogenerated'],
num_rows: 10
})
```
## Expected results
Increasing `num_proc` in mapping shouldn't alter filtering. With the previous version 2.5.2 this doesn't happen
## Actual results
Filtering doesn't work properly when we increase `num_proc` in mapping but not when calling `filter`
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.6.0
- Platform: Linux-4.19.0-22-cloud-amd64-x86_64-with-glibc2.28
- Python version: 3.9.13
- PyArrow version: 8.0.0
- Pandas version: 1.4.2 | 71 | map and filter not working properly in multiprocessing with the new release 2.6.0
## Describe the bug
When mapping is used on a dataset with more than one process, there is a weird behavior when trying to use `filter` , it's like only the samples from one worker are retrieved, one needs to specify the same `num_proc` in filter for it to work properly. This doesn't happen with `datasets` version 2.5.2
In the code below the data is filtered differently when we increase `num_proc` used in `map` although the datsets before and after mapping have identical elements.
## Steps to reproduce the bug
```python
import datasets
from datasets import load_dataset
def preprocess(example):
return example
ds = load_dataset("codeparrot/codeparrot-clean-valid", split="train").select([i for i in range(10)])
ds1 = ds.map(preprocess, num_proc=2)
ds2 = ds.map(preprocess)
# the datasets elements are the same
for i in range(len(ds1)):
assert ds1[i]==ds2[i]
print(f'Target column before filtering {ds1["autogenerated"]}')
print(f'Target column before filtering {ds2["autogenerated"]}')
print(f"datasets version {datasets.__version__}")
ds_filtered_1 = ds1.filter(lambda x: not x["autogenerated"])
ds_filtered_2 = ds2.filter(lambda x: not x["autogenerated"])
# all elements in Target column are false so they should all be kept, but for ds2 only the first 5=num_samples/num_proc are kept
print(ds_filtered_1)
print(ds_filtered_2)
```
```
Target column before filtering [False, False, False, False, False, False, False, False, False, False]
Target column before filtering [False, False, False, False, False, False, False, False, False, False]
Dataset({
features: ['repo_name', 'path', 'copies', 'size', 'content', 'license', 'hash', 'line_mean', 'line_max', 'alpha_frac', 'autogenerated'],
num_rows: 5
})
Dataset({
features: ['repo_name', 'path', 'copies', 'size', 'content', 'license', 'hash', 'line_mean', 'line_max', 'alpha_frac', 'autogenerated'],
num_rows: 10
})
```
## Expected results
Increasing `num_proc` in mapping shouldn't alter filtering. With the previous version 2.5.2 this doesn't happen
## Actual results
Filtering doesn't work properly when we increase `num_proc` in mapping but not when calling `filter`
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.6.0
- Platform: Linux-4.19.0-22-cloud-amd64-x86_64-with-glibc2.28
- Python version: 3.9.13
- PyArrow version: 8.0.0
- Pandas version: 1.4.2
I think there are 2 different issues here:
- the one reported by @loubnabnl is related to multiprocessing in map and then filter; we should reproduce it first: I have tried with Python version 3.9.7 and I can't reproduce it either; maybe it is related to the version of PyArrow? To be checked.
- the issue reported by @PartiallyTyped is related just to "filter" (without multiprocessing) and I can reproduce it. | [
-0.29330000281333923,
-0.09082433581352234,
-0.12948650121688843,
0.18801119923591614,
-0.08888343721628189,
-0.49709072709083557,
0.2094753533601761,
0.24282652139663696,
0.20070987939834595,
0.06659423559904099,
0.037694431841373444,
0.41527029871940613,
-0.10309305042028427,
0.17575977742671967,
-0.33484193682670593,
0.17066451907157898,
0.01924905925989151,
0.04662138223648071,
-0.26182040572166443,
0.08813558518886566,
-0.2880106568336487,
0.39572685956954956,
-0.3823106288909912,
0.045943260192871094,
-0.33826330304145813,
0.1625450700521469,
0.19779814779758453,
0.09180504828691483,
0.2091354876756668,
-0.20342755317687988,
0.2112935483455658,
0.2983053922653198,
0.06303725391626358,
0.7592065930366516,
-0.0001269663916900754,
0.06948408484458923,
0.23120948672294617,
-0.022200480103492737,
0.0789756327867508,
-0.4687232971191406,
-0.08233633637428284,
0.029404865577816963,
0.09244014322757721,
0.030937500298023224,
-0.06648020446300507,
0.1427362859249115,
-0.2592627704143524,
-0.6424863934516907,
0.4067149758338928,
0.21644635498523712,
0.10199318826198578,
0.15390315651893616,
-0.11435239017009735,
0.12546952068805695,
-0.2606405019760132,
0.1484658420085907,
0.038797833025455475,
-0.00682024285197258,
0.7416775226593018,
-0.25356531143188477,
0.17842133343219757,
0.38244590163230896,
-0.2503816485404968,
0.173201322555542,
-0.2696720361709595,
0.07378194481134415,
0.5208023190498352,
-0.6612710952758789,
0.4278782308101654,
0.10720311105251312,
-0.047210074961185455,
0.02041572518646717,
-0.18435636162757874,
-0.24831464886665344,
-0.3961794674396515,
-0.11604371666908264,
0.22262120246887207,
0.0594792515039444,
-0.21166856586933136,
0.12220114469528198,
-0.5084875226020813,
0.17624104022979736,
0.18885502219200134,
0.08266344666481018,
-0.0885237380862236,
0.2542015314102173,
-0.07152561098337173,
0.3040280044078827,
-0.007399480789899826,
0.21780985593795776,
0.16620071232318878,
-0.15932625532150269,
0.25666555762290955,
0.24718314409255981,
-0.03839705511927605,
0.08888264000415802,
0.29969483613967896,
-0.1430395543575287,
-0.27249881625175476,
-0.3648928999900818,
-0.1097741574048996,
0.2961053252220154,
-0.017965756356716156,
0.1715323030948639,
0.3068402409553528,
-0.47919100522994995,
0.3218745291233063,
0.3186163604259491,
0.24818271398544312,
-0.2033604383468628,
-0.514742910861969,
-0.0704706683754921,
0.4113386869430542,
-0.19189786911010742,
-0.07459723204374313,
0.1254083514213562,
0.32717669010162354,
-0.26724788546562195,
-0.169813334941864,
0.0184952300041914,
-0.27567100524902344,
-0.31243476271629333,
0.2018006294965744,
0.22115445137023926,
0.2087784707546234,
0.6228923201560974,
-0.05846262350678444,
0.16593162715435028,
-0.351974755525589,
-0.012018446810543537,
-0.10044236481189728,
-0.37129688262939453,
-0.25151339173316956,
0.15629443526268005,
0.10991592705249786,
-0.2728536128997803,
0.279865562915802,
0.3981877863407135,
-0.055497825145721436,
-0.29441118240356445,
0.22392472624778748,
-0.25673437118530273,
0.35709571838378906,
0.1904037743806839,
-0.05813446640968323,
0.2328825443983078,
0.02300960011780262,
-0.09958062320947647,
-0.10774462670087814,
0.26458337903022766,
-0.4973070025444031,
-0.1074250340461731,
0.05681660771369934,
0.034349095076322556,
0.06926009058952332,
0.24802595376968384,
0.04287860915064812,
0.32835549116134644,
0.6108881235122681,
-0.39663514494895935,
-0.27638909220695496,
-0.3413005471229553,
-0.4653482735157013,
-0.23210300505161285,
-0.038794733583927155,
0.20024889707565308,
-0.2890167832374573,
-0.10459297895431519,
0.05818246677517891,
-0.018942244350910187,
0.6297788619995117,
-0.07468017935752869,
-0.11019276827573776,
-0.2724522650241852,
-0.005811117589473724,
-0.09897317737340927,
0.24358315765857697,
-0.10085807740688324,
-0.36809268593788147,
0.22778308391571045,
0.09226378798484802,
0.2381083220243454,
-0.015457086265087128,
-0.17798586189746857,
0.2820262014865875,
-0.14359313249588013,
0.08092084527015686,
0.12978923320770264,
-0.21999534964561462,
0.2618851959705353,
-0.2816871106624603,
0.10263209044933319,
-0.021647773683071136,
-0.09908124804496765,
0.3185559809207916,
0.07670461386442184,
0.19000399112701416,
-0.4946543872356415,
0.42285388708114624,
0.012326851487159729,
0.2451002597808838,
0.05789545923471451,
0.09481640160083771,
0.11728011071681976,
0.0697653740644455,
-0.4995799958705902,
0.061898887157440186,
0.1506207287311554,
-0.10442350059747696,
-0.24823293089866638,
0.007990039885044098,
0.10610291361808777,
-0.021643653512001038,
0.04692942649126053,
-0.2115831822156906,
-0.35896891355514526,
-0.07225553691387177,
0.08139743655920029,
-0.07828473299741745,
-0.3184509873390198,
-0.008610811084508896,
0.42232200503349304,
0.2914106845855713,
-0.08435061573982239,
0.18898111581802368,
0.5267427563667297,
0.0481908954679966,
-0.3409818112850189,
-0.318581759929657,
0.1975015103816986,
0.3211732804775238,
0.02721579186618328,
-0.07423471659421921,
0.14900460839271545,
0.33900588750839233,
-0.1978043168783188,
-0.26592668890953064,
0.0501268208026886,
0.31675127148628235,
0.24411749839782715,
0.03396248444914818,
0.09170643985271454,
0.18513010442256927,
-0.05841681733727455,
0.11265210807323456,
0.3561334013938904,
-0.06648160517215729,
0.4627922773361206,
0.0090770423412323,
0.1746581345796585,
0.2771829068660736,
-0.057890523225069046,
0.08511108160018921,
-0.32774618268013,
-0.037753332406282425,
0.005694970488548279,
0.06218474730849266,
0.09558441489934921,
-0.17757990956306458,
0.2616659700870514,
0.3140527904033661,
0.31337791681289673,
-0.22933834791183472,
-0.1404857337474823,
0.019453078508377075,
0.05376803129911423,
-0.02815312333405018,
0.29782915115356445,
0.5410075783729553,
0.09870943427085876,
-0.04120580479502678,
-0.18894295394420624,
0.08036623150110245,
-0.09926869720220566,
0.10174830257892609,
0.10036995261907578,
0.35603073239326477,
0.1692349910736084,
0.12932278215885162,
0.028460389003157616,
0.06470096856355667,
-0.013418929651379585,
0.15351690351963043,
-0.03525763005018234,
-0.3263186812400818,
0.1654461920261383,
-0.2587908208370209,
0.2324906587600708,
-0.23520848155021667,
-0.04217617213726044,
-0.01501888781785965,
-0.141118586063385,
-0.1792117804288864,
0.48724621534347534,
-0.03379586338996887,
0.09249023348093033,
-0.1022196114063263,
-0.030107811093330383,
-0.30479899048805237,
-0.026138922199606895,
0.060113467276096344,
-0.038345497101545334,
-0.22356635332107544,
-0.051791995763778687,
0.14295627176761627,
-0.07985244691371918,
0.25990554690361023,
0.3348364233970642,
-0.5039550065994263,
-0.12378305941820145,
-0.3422248065471649,
-0.0007059648633003235,
0.1637781411409378,
0.2607001066207886,
-0.17304128408432007,
-0.21212391555309296,
0.28377658128738403,
-0.19424913823604584,
0.14332129061222076,
-0.31832602620124817,
-0.1176157221198082,
0.07286487519741058,
-0.04885868355631828,
-0.0456385537981987,
-0.2349294275045395,
-0.2822719216346741,
-0.3273325264453888,
-0.09714153409004211,
-0.18640108406543732,
-0.11143743991851807,
0.38807111978530884,
-0.29472434520721436,
0.0493491031229496,
-0.3356305658817291,
-0.1941615790128708,
-0.06613010168075562,
-0.3016759753227234,
-0.14705851674079895,
-0.05486389622092247,
-0.07194019109010696,
-0.16081325709819794,
-0.2360139638185501,
-0.017919862642884254,
0.02851620502769947,
0.5443401336669922,
-0.0171675868332386,
-0.5309401154518127,
-0.1317264586687088,
0.11986887454986572,
0.4592250883579254,
0.17490911483764648,
0.452831506729126,
0.16859066486358643,
0.026205549016594887,
-0.20455357432365417,
-0.42293262481689453,
0.11532937735319138,
0.14473868906497955,
0.09815630316734314,
0.24285703897476196,
0.33960649371147156,
0.017777275294065475,
0.6487994194030762,
0.5561539530754089,
-0.023226294666528702,
0.2636876702308655,
0.07403194159269333,
0.04566236957907677,
-0.022459812462329865,
-0.45582547783851624,
-0.024404259398579597,
-0.12521806359291077,
0.09832961857318878,
-0.008867837488651276,
-0.006637651473283768,
-0.33512017130851746,
-0.15906734764575958,
0.23264598846435547,
-0.7345539927482605,
-0.168930783867836,
-0.049281761050224304,
-0.13580107688903809,
0.3975372016429901,
0.14422814548015594,
0.03133980929851532,
-0.21261078119277954,
-0.09736577421426773,
-0.42600056529045105,
-0.14386261999607086,
0.1674983650445938,
-0.1667073369026184,
-0.29815876483917236,
0.12233658134937286,
-0.21677619218826294,
0.47312575578689575,
0.18235604465007782,
0.260477751493454,
-0.07431178539991379,
-0.081533282995224,
0.07893959432840347,
0.049552153795957565,
0.6764702200889587,
-0.37624335289001465,
-0.05158403515815735,
0.09987929463386536,
-0.39059141278266907,
-0.3388819992542267,
-0.15165822207927704,
0.025204215198755264,
0.5367099642753601,
0.6272286772727966,
0.10354174673557281,
0.06888823956251144,
-0.3663700222969055,
0.07769343256950378,
-0.38767534494400024,
-0.0683491975069046,
-0.16902056336402893,
-0.14657586812973022,
-0.07196789979934692,
-0.08967112004756927,
-0.03853733092546463,
0.01237749494612217,
0.33877408504486084,
-0.20582759380340576,
-0.39030298590660095,
0.11860175430774689,
-0.1078229770064354,
0.15982484817504883,
0.17691126465797424,
0.10346754640340805,
0.14915046095848083,
0.23646330833435059,
0.31176450848579407,
0.2674891948699951,
0.06380219012498856,
0.31592243909835815,
-0.38804635405540466,
-0.09684792160987854,
0.07335789501667023,
-0.2518492341041565,
0.33245185017585754,
0.32175931334495544,
0.08921739459037781,
0.06345341354608536,
-0.004755774512887001,
0.13639548420906067,
-0.05870078131556511,
0.012148527428507805,
0.06466039270162582,
0.2950471043586731,
-0.2899467945098877,
-0.4733572006225586,
0.15254418551921844,
0.3358713686466217,
-0.28106141090393066,
0.5572060942649841,
-0.4284759759902954,
-0.16121147572994232,
0.07431559264659882,
-0.07126977294683456,
0.6074885129928589,
-0.0032458677887916565,
-0.16051466763019562,
-0.15250703692436218,
-0.37802886962890625,
0.0320822112262249,
0.23906894028186798,
0.06523102521896362,
-0.23793630301952362,
-0.0189516544342041,
0.02283773012459278,
-0.16766339540481567,
0.12181078642606735,
0.14047271013259888,
-0.10900367796421051,
0.3879282772541046,
0.02125634253025055,
-0.2947583794593811,
-0.0011739758774638176,
-0.22856983542442322,
0.3797951340675354,
-0.0722542405128479,
0.23857086896896362,
0.0036154240369796753,
0.11349207162857056,
0.1495513916015625,
0.007726617157459259,
-0.11262161284685135,
0.16928139328956604,
-0.28532150387763977,
-0.34286990761756897,
0.025011368095874786,
-0.4184448719024658,
-0.04409029334783554,
0.4491518437862396,
-0.13170750439167023,
0.24372747540473938,
0.2775619924068451,
0.0486757829785347,
-0.332288533449173,
0.07883575558662415,
-0.054437894374132156,
0.11154352873563766,
0.4038606882095337,
0.12708978354930878,
-0.10675829648971558,
0.16759328544139862,
0.05051247030496597,
-0.38213932514190674,
-0.08912055939435959,
-0.010308324359357357,
-0.23484806716442108,
-0.17547909915447235,
0.4308587908744812,
0.302776575088501,
0.05664815381169319,
0.03260426223278046,
0.15958821773529053,
-0.03011108748614788,
-0.18425610661506653,
0.03501790016889572,
-0.04145655781030655,
-0.14211252331733704,
0.6241980195045471,
-0.3774673342704773,
-0.31871283054351807,
0.07014575600624084,
0.339997261762619,
0.33298587799072266,
-0.1036776751279831,
0.19172188639640808,
-0.13891378045082092,
-0.12366493791341782,
-0.034551363438367844,
-0.267680823802948,
0.007367858663201332,
-0.0277802012860775,
0.2534829378128052,
-0.17337502539157867,
-0.3788645267486572,
0.4051230549812317,
-0.20755735039710999,
-0.25728005170822144,
0.317949116230011,
-0.15065999329090118,
-0.4836181700229645,
-0.12183155119419098,
-0.15917019546031952,
-0.23664651811122894,
-0.15482787787914276,
-0.10627136379480362,
0.16384558379650116,
0.05159156769514084,
0.4303973913192749,
-0.1796063333749771,
0.11310765147209167,
0.2626270651817322,
0.3647848963737488,
0.22181501984596252,
-0.015519112348556519,
-0.2014387995004654,
-0.2010839879512787,
-0.0687255933880806,
0.06579111516475677,
-0.2165195792913437,
-0.08146081864833832,
-0.08489552140235901,
0.09003937989473343,
-0.05832947790622711,
-0.2730425298213959,
0.0024563889019191265,
-0.04115894436836243,
0.01184034626930952,
-0.2515135407447815,
0.25182896852493286,
0.19209390878677368,
-0.06698295474052429,
0.0760158821940422,
0.20264121890068054,
-0.1186470165848732,
0.05928793549537659,
0.269453763961792,
-0.29660189151763916,
0.05499431490898132,
0.17329180240631104,
0.5987299680709839,
0.19550834596157074,
-0.02535618469119072,
0.04093628376722336,
-0.3076389729976654,
-0.06192608177661896,
0.121331125497818,
0.21667394042015076,
-0.18755263090133667,
0.0512472428381443,
0.531578540802002,
0.2188348025083542,
0.137033149600029,
-0.08766784518957138,
0.1483955979347229,
0.05707092955708504,
0.14746113121509552,
-0.1897727996110916,
-0.15652813017368317,
0.5084590315818787,
0.35377171635627747,
0.12066170573234558,
0.23555845022201538,
0.09609408676624298,
-0.09738358110189438,
0.17497669160366058,
0.2224646806716919,
0.019147653132677078,
-0.4077450633049011,
0.34704023599624634,
0.12751322984695435,
0.2782144844532013,
0.3257119059562683,
0.4312991797924042,
-0.035789113491773605,
-0.3683529198169708,
0.41820234060287476,
0.11490130424499512,
0.3778512179851532,
0.10091858357191086,
0.022568698972463608,
0.15115663409233093,
-0.41511109471321106,
-0.11396494507789612,
0.058930978178977966,
-0.48957186937332153,
0.327009379863739,
0.08807460963726044,
-0.11331027001142502,
-0.205936461687088,
-0.27521926164627075,
-0.1264815330505371,
0.195593923330307,
-0.1536855697631836,
-0.30733004212379456,
-0.26856860518455505,
-0.22756579518318176,
0.10151761770248413,
-0.007408887147903442,
0.1308376044034958,
0.11352286487817764,
0.7485291957855225,
0.05090804398059845,
-0.26260536909103394,
-0.25671055912971497,
-0.5739127993583679,
-0.07554341107606888,
0.18073998391628265,
-0.17118239402770996,
0.20633520185947418,
-0.05953186750411987,
0.026829395443201065,
0.1472737193107605,
0.3225654065608978,
0.4239923655986786,
0.5518093109130859,
-0.3131810128688812,
-0.09604928642511368,
0.23548179864883423,
-0.009899172931909561,
-0.2895185947418213,
0.3817238509654999,
-0.002429567277431488,
0.23729325830936432,
-0.044592469930648804,
0.008887602016329765,
-0.011223109439015388,
-0.07071597874164581,
0.19948385655879974,
0.49296826124191284,
-0.018722455948591232,
0.5340995788574219,
0.0046153683215379715,
-0.037080466747283936,
0.19774141907691956,
0.011101558804512024,
-0.07733827829360962,
0.049736034125089645,
0.4786456227302551,
-0.34554973244667053,
0.37568891048431396,
0.1107141375541687,
0.01807255670428276,
0.16870330274105072,
-0.02500591054558754,
0.01444828137755394,
0.10648949444293976,
-0.21124383807182312,
-0.028922080993652344,
-0.4640720784664154,
-0.0518023744225502,
-0.15382163226604462,
0.2807559669017792,
-0.23196206986904144,
0.18630364537239075,
0.015014752745628357,
-0.01699862629175186,
0.21604350209236145,
-0.27532345056533813,
0.3044924736022949,
0.40299075841903687,
-0.4384748041629791,
0.04903726652264595,
0.04048900306224823,
-0.04924848675727844,
0.25534817576408386,
-0.40911588072776794,
0.20205335319042206,
-0.29184582829475403,
0.00019259750843048096,
-0.07730960845947266,
0.08744102716445923,
0.10853748023509979,
0.06673829257488251,
0.10918456315994263,
0.41538915038108826,
0.3302745819091797,
-0.15716120600700378,
0.2230183482170105,
-0.31907814741134644,
-0.01185528188943863,
-0.24054796993732452,
-0.029871851205825806,
-0.07082416117191315,
0.23773887753486633,
-0.403891921043396,
-0.02166667953133583,
-0.1479683816432953,
-0.028127171099185944,
-0.13762971758842468,
0.1710902601480484,
-0.13200853765010834,
-0.23497521877288818,
0.246354877948761,
0.07408693432807922,
-0.09791026264429092,
0.4094310700893402,
-0.000013537704944610596,
0.0932784453034401,
-0.2792413830757141,
-0.08772265911102295,
0.19823984801769257,
-0.46000605821609497,
-0.3866002559661865,
-0.6783804297447205,
0.40124741196632385,
-0.2589479982852936,
0.1490485668182373,
-0.06818075478076935,
-0.22367051243782043,
0.37565770745277405,
-0.29909685254096985,
-0.2412685602903366,
0.10056452453136444,
-0.11570513248443604,
-0.12945514917373657,
-0.13955014944076538,
-0.2513405978679657,
0.334596186876297,
-0.3961808979511261,
0.2359340488910675,
-0.10211296379566193
] |
https://github.com/huggingface/datasets/issues/5111 | map and filter not working properly in multiprocessing with the new release 2.6.0 | Could you create another issue for the @PartiallyTyped one please ?
Regarding the OP issue, I also tried on colab or locally on py3.7 or py3.10 but didn't reproduce | ## Describe the bug
When mapping is used on a dataset with more than one process, there is a weird behavior when trying to use `filter` , it's like only the samples from one worker are retrieved, one needs to specify the same `num_proc` in filter for it to work properly. This doesn't happen with `datasets` version 2.5.2
In the code below the data is filtered differently when we increase `num_proc` used in `map` although the datsets before and after mapping have identical elements.
## Steps to reproduce the bug
```python
import datasets
from datasets import load_dataset
def preprocess(example):
return example
ds = load_dataset("codeparrot/codeparrot-clean-valid", split="train").select([i for i in range(10)])
ds1 = ds.map(preprocess, num_proc=2)
ds2 = ds.map(preprocess)
# the datasets elements are the same
for i in range(len(ds1)):
assert ds1[i]==ds2[i]
print(f'Target column before filtering {ds1["autogenerated"]}')
print(f'Target column before filtering {ds2["autogenerated"]}')
print(f"datasets version {datasets.__version__}")
ds_filtered_1 = ds1.filter(lambda x: not x["autogenerated"])
ds_filtered_2 = ds2.filter(lambda x: not x["autogenerated"])
# all elements in Target column are false so they should all be kept, but for ds2 only the first 5=num_samples/num_proc are kept
print(ds_filtered_1)
print(ds_filtered_2)
```
```
Target column before filtering [False, False, False, False, False, False, False, False, False, False]
Target column before filtering [False, False, False, False, False, False, False, False, False, False]
Dataset({
features: ['repo_name', 'path', 'copies', 'size', 'content', 'license', 'hash', 'line_mean', 'line_max', 'alpha_frac', 'autogenerated'],
num_rows: 5
})
Dataset({
features: ['repo_name', 'path', 'copies', 'size', 'content', 'license', 'hash', 'line_mean', 'line_max', 'alpha_frac', 'autogenerated'],
num_rows: 10
})
```
## Expected results
Increasing `num_proc` in mapping shouldn't alter filtering. With the previous version 2.5.2 this doesn't happen
## Actual results
Filtering doesn't work properly when we increase `num_proc` in mapping but not when calling `filter`
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.6.0
- Platform: Linux-4.19.0-22-cloud-amd64-x86_64-with-glibc2.28
- Python version: 3.9.13
- PyArrow version: 8.0.0
- Pandas version: 1.4.2 | 29 | map and filter not working properly in multiprocessing with the new release 2.6.0
## Describe the bug
When mapping is used on a dataset with more than one process, there is a weird behavior when trying to use `filter` , it's like only the samples from one worker are retrieved, one needs to specify the same `num_proc` in filter for it to work properly. This doesn't happen with `datasets` version 2.5.2
In the code below the data is filtered differently when we increase `num_proc` used in `map` although the datsets before and after mapping have identical elements.
## Steps to reproduce the bug
```python
import datasets
from datasets import load_dataset
def preprocess(example):
return example
ds = load_dataset("codeparrot/codeparrot-clean-valid", split="train").select([i for i in range(10)])
ds1 = ds.map(preprocess, num_proc=2)
ds2 = ds.map(preprocess)
# the datasets elements are the same
for i in range(len(ds1)):
assert ds1[i]==ds2[i]
print(f'Target column before filtering {ds1["autogenerated"]}')
print(f'Target column before filtering {ds2["autogenerated"]}')
print(f"datasets version {datasets.__version__}")
ds_filtered_1 = ds1.filter(lambda x: not x["autogenerated"])
ds_filtered_2 = ds2.filter(lambda x: not x["autogenerated"])
# all elements in Target column are false so they should all be kept, but for ds2 only the first 5=num_samples/num_proc are kept
print(ds_filtered_1)
print(ds_filtered_2)
```
```
Target column before filtering [False, False, False, False, False, False, False, False, False, False]
Target column before filtering [False, False, False, False, False, False, False, False, False, False]
Dataset({
features: ['repo_name', 'path', 'copies', 'size', 'content', 'license', 'hash', 'line_mean', 'line_max', 'alpha_frac', 'autogenerated'],
num_rows: 5
})
Dataset({
features: ['repo_name', 'path', 'copies', 'size', 'content', 'license', 'hash', 'line_mean', 'line_max', 'alpha_frac', 'autogenerated'],
num_rows: 10
})
```
## Expected results
Increasing `num_proc` in mapping shouldn't alter filtering. With the previous version 2.5.2 this doesn't happen
## Actual results
Filtering doesn't work properly when we increase `num_proc` in mapping but not when calling `filter`
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.6.0
- Platform: Linux-4.19.0-22-cloud-amd64-x86_64-with-glibc2.28
- Python version: 3.9.13
- PyArrow version: 8.0.0
- Pandas version: 1.4.2
Could you create another issue for the @PartiallyTyped one please ?
Regarding the OP issue, I also tried on colab or locally on py3.7 or py3.10 but didn't reproduce | [
-0.29330000281333923,
-0.09082433581352234,
-0.12948650121688843,
0.18801119923591614,
-0.08888343721628189,
-0.49709072709083557,
0.2094753533601761,
0.24282652139663696,
0.20070987939834595,
0.06659423559904099,
0.037694431841373444,
0.41527029871940613,
-0.10309305042028427,
0.17575977742671967,
-0.33484193682670593,
0.17066451907157898,
0.01924905925989151,
0.04662138223648071,
-0.26182040572166443,
0.08813558518886566,
-0.2880106568336487,
0.39572685956954956,
-0.3823106288909912,
0.045943260192871094,
-0.33826330304145813,
0.1625450700521469,
0.19779814779758453,
0.09180504828691483,
0.2091354876756668,
-0.20342755317687988,
0.2112935483455658,
0.2983053922653198,
0.06303725391626358,
0.7592065930366516,
-0.0001269663916900754,
0.06948408484458923,
0.23120948672294617,
-0.022200480103492737,
0.0789756327867508,
-0.4687232971191406,
-0.08233633637428284,
0.029404865577816963,
0.09244014322757721,
0.030937500298023224,
-0.06648020446300507,
0.1427362859249115,
-0.2592627704143524,
-0.6424863934516907,
0.4067149758338928,
0.21644635498523712,
0.10199318826198578,
0.15390315651893616,
-0.11435239017009735,
0.12546952068805695,
-0.2606405019760132,
0.1484658420085907,
0.038797833025455475,
-0.00682024285197258,
0.7416775226593018,
-0.25356531143188477,
0.17842133343219757,
0.38244590163230896,
-0.2503816485404968,
0.173201322555542,
-0.2696720361709595,
0.07378194481134415,
0.5208023190498352,
-0.6612710952758789,
0.4278782308101654,
0.10720311105251312,
-0.047210074961185455,
0.02041572518646717,
-0.18435636162757874,
-0.24831464886665344,
-0.3961794674396515,
-0.11604371666908264,
0.22262120246887207,
0.0594792515039444,
-0.21166856586933136,
0.12220114469528198,
-0.5084875226020813,
0.17624104022979736,
0.18885502219200134,
0.08266344666481018,
-0.0885237380862236,
0.2542015314102173,
-0.07152561098337173,
0.3040280044078827,
-0.007399480789899826,
0.21780985593795776,
0.16620071232318878,
-0.15932625532150269,
0.25666555762290955,
0.24718314409255981,
-0.03839705511927605,
0.08888264000415802,
0.29969483613967896,
-0.1430395543575287,
-0.27249881625175476,
-0.3648928999900818,
-0.1097741574048996,
0.2961053252220154,
-0.017965756356716156,
0.1715323030948639,
0.3068402409553528,
-0.47919100522994995,
0.3218745291233063,
0.3186163604259491,
0.24818271398544312,
-0.2033604383468628,
-0.514742910861969,
-0.0704706683754921,
0.4113386869430542,
-0.19189786911010742,
-0.07459723204374313,
0.1254083514213562,
0.32717669010162354,
-0.26724788546562195,
-0.169813334941864,
0.0184952300041914,
-0.27567100524902344,
-0.31243476271629333,
0.2018006294965744,
0.22115445137023926,
0.2087784707546234,
0.6228923201560974,
-0.05846262350678444,
0.16593162715435028,
-0.351974755525589,
-0.012018446810543537,
-0.10044236481189728,
-0.37129688262939453,
-0.25151339173316956,
0.15629443526268005,
0.10991592705249786,
-0.2728536128997803,
0.279865562915802,
0.3981877863407135,
-0.055497825145721436,
-0.29441118240356445,
0.22392472624778748,
-0.25673437118530273,
0.35709571838378906,
0.1904037743806839,
-0.05813446640968323,
0.2328825443983078,
0.02300960011780262,
-0.09958062320947647,
-0.10774462670087814,
0.26458337903022766,
-0.4973070025444031,
-0.1074250340461731,
0.05681660771369934,
0.034349095076322556,
0.06926009058952332,
0.24802595376968384,
0.04287860915064812,
0.32835549116134644,
0.6108881235122681,
-0.39663514494895935,
-0.27638909220695496,
-0.3413005471229553,
-0.4653482735157013,
-0.23210300505161285,
-0.038794733583927155,
0.20024889707565308,
-0.2890167832374573,
-0.10459297895431519,
0.05818246677517891,
-0.018942244350910187,
0.6297788619995117,
-0.07468017935752869,
-0.11019276827573776,
-0.2724522650241852,
-0.005811117589473724,
-0.09897317737340927,
0.24358315765857697,
-0.10085807740688324,
-0.36809268593788147,
0.22778308391571045,
0.09226378798484802,
0.2381083220243454,
-0.015457086265087128,
-0.17798586189746857,
0.2820262014865875,
-0.14359313249588013,
0.08092084527015686,
0.12978923320770264,
-0.21999534964561462,
0.2618851959705353,
-0.2816871106624603,
0.10263209044933319,
-0.021647773683071136,
-0.09908124804496765,
0.3185559809207916,
0.07670461386442184,
0.19000399112701416,
-0.4946543872356415,
0.42285388708114624,
0.012326851487159729,
0.2451002597808838,
0.05789545923471451,
0.09481640160083771,
0.11728011071681976,
0.0697653740644455,
-0.4995799958705902,
0.061898887157440186,
0.1506207287311554,
-0.10442350059747696,
-0.24823293089866638,
0.007990039885044098,
0.10610291361808777,
-0.021643653512001038,
0.04692942649126053,
-0.2115831822156906,
-0.35896891355514526,
-0.07225553691387177,
0.08139743655920029,
-0.07828473299741745,
-0.3184509873390198,
-0.008610811084508896,
0.42232200503349304,
0.2914106845855713,
-0.08435061573982239,
0.18898111581802368,
0.5267427563667297,
0.0481908954679966,
-0.3409818112850189,
-0.318581759929657,
0.1975015103816986,
0.3211732804775238,
0.02721579186618328,
-0.07423471659421921,
0.14900460839271545,
0.33900588750839233,
-0.1978043168783188,
-0.26592668890953064,
0.0501268208026886,
0.31675127148628235,
0.24411749839782715,
0.03396248444914818,
0.09170643985271454,
0.18513010442256927,
-0.05841681733727455,
0.11265210807323456,
0.3561334013938904,
-0.06648160517215729,
0.4627922773361206,
0.0090770423412323,
0.1746581345796585,
0.2771829068660736,
-0.057890523225069046,
0.08511108160018921,
-0.32774618268013,
-0.037753332406282425,
0.005694970488548279,
0.06218474730849266,
0.09558441489934921,
-0.17757990956306458,
0.2616659700870514,
0.3140527904033661,
0.31337791681289673,
-0.22933834791183472,
-0.1404857337474823,
0.019453078508377075,
0.05376803129911423,
-0.02815312333405018,
0.29782915115356445,
0.5410075783729553,
0.09870943427085876,
-0.04120580479502678,
-0.18894295394420624,
0.08036623150110245,
-0.09926869720220566,
0.10174830257892609,
0.10036995261907578,
0.35603073239326477,
0.1692349910736084,
0.12932278215885162,
0.028460389003157616,
0.06470096856355667,
-0.013418929651379585,
0.15351690351963043,
-0.03525763005018234,
-0.3263186812400818,
0.1654461920261383,
-0.2587908208370209,
0.2324906587600708,
-0.23520848155021667,
-0.04217617213726044,
-0.01501888781785965,
-0.141118586063385,
-0.1792117804288864,
0.48724621534347534,
-0.03379586338996887,
0.09249023348093033,
-0.1022196114063263,
-0.030107811093330383,
-0.30479899048805237,
-0.026138922199606895,
0.060113467276096344,
-0.038345497101545334,
-0.22356635332107544,
-0.051791995763778687,
0.14295627176761627,
-0.07985244691371918,
0.25990554690361023,
0.3348364233970642,
-0.5039550065994263,
-0.12378305941820145,
-0.3422248065471649,
-0.0007059648633003235,
0.1637781411409378,
0.2607001066207886,
-0.17304128408432007,
-0.21212391555309296,
0.28377658128738403,
-0.19424913823604584,
0.14332129061222076,
-0.31832602620124817,
-0.1176157221198082,
0.07286487519741058,
-0.04885868355631828,
-0.0456385537981987,
-0.2349294275045395,
-0.2822719216346741,
-0.3273325264453888,
-0.09714153409004211,
-0.18640108406543732,
-0.11143743991851807,
0.38807111978530884,
-0.29472434520721436,
0.0493491031229496,
-0.3356305658817291,
-0.1941615790128708,
-0.06613010168075562,
-0.3016759753227234,
-0.14705851674079895,
-0.05486389622092247,
-0.07194019109010696,
-0.16081325709819794,
-0.2360139638185501,
-0.017919862642884254,
0.02851620502769947,
0.5443401336669922,
-0.0171675868332386,
-0.5309401154518127,
-0.1317264586687088,
0.11986887454986572,
0.4592250883579254,
0.17490911483764648,
0.452831506729126,
0.16859066486358643,
0.026205549016594887,
-0.20455357432365417,
-0.42293262481689453,
0.11532937735319138,
0.14473868906497955,
0.09815630316734314,
0.24285703897476196,
0.33960649371147156,
0.017777275294065475,
0.6487994194030762,
0.5561539530754089,
-0.023226294666528702,
0.2636876702308655,
0.07403194159269333,
0.04566236957907677,
-0.022459812462329865,
-0.45582547783851624,
-0.024404259398579597,
-0.12521806359291077,
0.09832961857318878,
-0.008867837488651276,
-0.006637651473283768,
-0.33512017130851746,
-0.15906734764575958,
0.23264598846435547,
-0.7345539927482605,
-0.168930783867836,
-0.049281761050224304,
-0.13580107688903809,
0.3975372016429901,
0.14422814548015594,
0.03133980929851532,
-0.21261078119277954,
-0.09736577421426773,
-0.42600056529045105,
-0.14386261999607086,
0.1674983650445938,
-0.1667073369026184,
-0.29815876483917236,
0.12233658134937286,
-0.21677619218826294,
0.47312575578689575,
0.18235604465007782,
0.260477751493454,
-0.07431178539991379,
-0.081533282995224,
0.07893959432840347,
0.049552153795957565,
0.6764702200889587,
-0.37624335289001465,
-0.05158403515815735,
0.09987929463386536,
-0.39059141278266907,
-0.3388819992542267,
-0.15165822207927704,
0.025204215198755264,
0.5367099642753601,
0.6272286772727966,
0.10354174673557281,
0.06888823956251144,
-0.3663700222969055,
0.07769343256950378,
-0.38767534494400024,
-0.0683491975069046,
-0.16902056336402893,
-0.14657586812973022,
-0.07196789979934692,
-0.08967112004756927,
-0.03853733092546463,
0.01237749494612217,
0.33877408504486084,
-0.20582759380340576,
-0.39030298590660095,
0.11860175430774689,
-0.1078229770064354,
0.15982484817504883,
0.17691126465797424,
0.10346754640340805,
0.14915046095848083,
0.23646330833435059,
0.31176450848579407,
0.2674891948699951,
0.06380219012498856,
0.31592243909835815,
-0.38804635405540466,
-0.09684792160987854,
0.07335789501667023,
-0.2518492341041565,
0.33245185017585754,
0.32175931334495544,
0.08921739459037781,
0.06345341354608536,
-0.004755774512887001,
0.13639548420906067,
-0.05870078131556511,
0.012148527428507805,
0.06466039270162582,
0.2950471043586731,
-0.2899467945098877,
-0.4733572006225586,
0.15254418551921844,
0.3358713686466217,
-0.28106141090393066,
0.5572060942649841,
-0.4284759759902954,
-0.16121147572994232,
0.07431559264659882,
-0.07126977294683456,
0.6074885129928589,
-0.0032458677887916565,
-0.16051466763019562,
-0.15250703692436218,
-0.37802886962890625,
0.0320822112262249,
0.23906894028186798,
0.06523102521896362,
-0.23793630301952362,
-0.0189516544342041,
0.02283773012459278,
-0.16766339540481567,
0.12181078642606735,
0.14047271013259888,
-0.10900367796421051,
0.3879282772541046,
0.02125634253025055,
-0.2947583794593811,
-0.0011739758774638176,
-0.22856983542442322,
0.3797951340675354,
-0.0722542405128479,
0.23857086896896362,
0.0036154240369796753,
0.11349207162857056,
0.1495513916015625,
0.007726617157459259,
-0.11262161284685135,
0.16928139328956604,
-0.28532150387763977,
-0.34286990761756897,
0.025011368095874786,
-0.4184448719024658,
-0.04409029334783554,
0.4491518437862396,
-0.13170750439167023,
0.24372747540473938,
0.2775619924068451,
0.0486757829785347,
-0.332288533449173,
0.07883575558662415,
-0.054437894374132156,
0.11154352873563766,
0.4038606882095337,
0.12708978354930878,
-0.10675829648971558,
0.16759328544139862,
0.05051247030496597,
-0.38213932514190674,
-0.08912055939435959,
-0.010308324359357357,
-0.23484806716442108,
-0.17547909915447235,
0.4308587908744812,
0.302776575088501,
0.05664815381169319,
0.03260426223278046,
0.15958821773529053,
-0.03011108748614788,
-0.18425610661506653,
0.03501790016889572,
-0.04145655781030655,
-0.14211252331733704,
0.6241980195045471,
-0.3774673342704773,
-0.31871283054351807,
0.07014575600624084,
0.339997261762619,
0.33298587799072266,
-0.1036776751279831,
0.19172188639640808,
-0.13891378045082092,
-0.12366493791341782,
-0.034551363438367844,
-0.267680823802948,
0.007367858663201332,
-0.0277802012860775,
0.2534829378128052,
-0.17337502539157867,
-0.3788645267486572,
0.4051230549812317,
-0.20755735039710999,
-0.25728005170822144,
0.317949116230011,
-0.15065999329090118,
-0.4836181700229645,
-0.12183155119419098,
-0.15917019546031952,
-0.23664651811122894,
-0.15482787787914276,
-0.10627136379480362,
0.16384558379650116,
0.05159156769514084,
0.4303973913192749,
-0.1796063333749771,
0.11310765147209167,
0.2626270651817322,
0.3647848963737488,
0.22181501984596252,
-0.015519112348556519,
-0.2014387995004654,
-0.2010839879512787,
-0.0687255933880806,
0.06579111516475677,
-0.2165195792913437,
-0.08146081864833832,
-0.08489552140235901,
0.09003937989473343,
-0.05832947790622711,
-0.2730425298213959,
0.0024563889019191265,
-0.04115894436836243,
0.01184034626930952,
-0.2515135407447815,
0.25182896852493286,
0.19209390878677368,
-0.06698295474052429,
0.0760158821940422,
0.20264121890068054,
-0.1186470165848732,
0.05928793549537659,
0.269453763961792,
-0.29660189151763916,
0.05499431490898132,
0.17329180240631104,
0.5987299680709839,
0.19550834596157074,
-0.02535618469119072,
0.04093628376722336,
-0.3076389729976654,
-0.06192608177661896,
0.121331125497818,
0.21667394042015076,
-0.18755263090133667,
0.0512472428381443,
0.531578540802002,
0.2188348025083542,
0.137033149600029,
-0.08766784518957138,
0.1483955979347229,
0.05707092955708504,
0.14746113121509552,
-0.1897727996110916,
-0.15652813017368317,
0.5084590315818787,
0.35377171635627747,
0.12066170573234558,
0.23555845022201538,
0.09609408676624298,
-0.09738358110189438,
0.17497669160366058,
0.2224646806716919,
0.019147653132677078,
-0.4077450633049011,
0.34704023599624634,
0.12751322984695435,
0.2782144844532013,
0.3257119059562683,
0.4312991797924042,
-0.035789113491773605,
-0.3683529198169708,
0.41820234060287476,
0.11490130424499512,
0.3778512179851532,
0.10091858357191086,
0.022568698972463608,
0.15115663409233093,
-0.41511109471321106,
-0.11396494507789612,
0.058930978178977966,
-0.48957186937332153,
0.327009379863739,
0.08807460963726044,
-0.11331027001142502,
-0.205936461687088,
-0.27521926164627075,
-0.1264815330505371,
0.195593923330307,
-0.1536855697631836,
-0.30733004212379456,
-0.26856860518455505,
-0.22756579518318176,
0.10151761770248413,
-0.007408887147903442,
0.1308376044034958,
0.11352286487817764,
0.7485291957855225,
0.05090804398059845,
-0.26260536909103394,
-0.25671055912971497,
-0.5739127993583679,
-0.07554341107606888,
0.18073998391628265,
-0.17118239402770996,
0.20633520185947418,
-0.05953186750411987,
0.026829395443201065,
0.1472737193107605,
0.3225654065608978,
0.4239923655986786,
0.5518093109130859,
-0.3131810128688812,
-0.09604928642511368,
0.23548179864883423,
-0.009899172931909561,
-0.2895185947418213,
0.3817238509654999,
-0.002429567277431488,
0.23729325830936432,
-0.044592469930648804,
0.008887602016329765,
-0.011223109439015388,
-0.07071597874164581,
0.19948385655879974,
0.49296826124191284,
-0.018722455948591232,
0.5340995788574219,
0.0046153683215379715,
-0.037080466747283936,
0.19774141907691956,
0.011101558804512024,
-0.07733827829360962,
0.049736034125089645,
0.4786456227302551,
-0.34554973244667053,
0.37568891048431396,
0.1107141375541687,
0.01807255670428276,
0.16870330274105072,
-0.02500591054558754,
0.01444828137755394,
0.10648949444293976,
-0.21124383807182312,
-0.028922080993652344,
-0.4640720784664154,
-0.0518023744225502,
-0.15382163226604462,
0.2807559669017792,
-0.23196206986904144,
0.18630364537239075,
0.015014752745628357,
-0.01699862629175186,
0.21604350209236145,
-0.27532345056533813,
0.3044924736022949,
0.40299075841903687,
-0.4384748041629791,
0.04903726652264595,
0.04048900306224823,
-0.04924848675727844,
0.25534817576408386,
-0.40911588072776794,
0.20205335319042206,
-0.29184582829475403,
0.00019259750843048096,
-0.07730960845947266,
0.08744102716445923,
0.10853748023509979,
0.06673829257488251,
0.10918456315994263,
0.41538915038108826,
0.3302745819091797,
-0.15716120600700378,
0.2230183482170105,
-0.31907814741134644,
-0.01185528188943863,
-0.24054796993732452,
-0.029871851205825806,
-0.07082416117191315,
0.23773887753486633,
-0.403891921043396,
-0.02166667953133583,
-0.1479683816432953,
-0.028127171099185944,
-0.13762971758842468,
0.1710902601480484,
-0.13200853765010834,
-0.23497521877288818,
0.246354877948761,
0.07408693432807922,
-0.09791026264429092,
0.4094310700893402,
-0.000013537704944610596,
0.0932784453034401,
-0.2792413830757141,
-0.08772265911102295,
0.19823984801769257,
-0.46000605821609497,
-0.3866002559661865,
-0.6783804297447205,
0.40124741196632385,
-0.2589479982852936,
0.1490485668182373,
-0.06818075478076935,
-0.22367051243782043,
0.37565770745277405,
-0.29909685254096985,
-0.2412685602903366,
0.10056452453136444,
-0.11570513248443604,
-0.12945514917373657,
-0.13955014944076538,
-0.2513405978679657,
0.334596186876297,
-0.3961808979511261,
0.2359340488910675,
-0.10211296379566193
] |
https://github.com/huggingface/datasets/issues/5111 | map and filter not working properly in multiprocessing with the new release 2.6.0 | I managed to reproduce your issue @loubnabnl on colab by upgrading pyarrow to 9.0.0 instead of 6.0.1 | ## Describe the bug
When mapping is used on a dataset with more than one process, there is a weird behavior when trying to use `filter` , it's like only the samples from one worker are retrieved, one needs to specify the same `num_proc` in filter for it to work properly. This doesn't happen with `datasets` version 2.5.2
In the code below the data is filtered differently when we increase `num_proc` used in `map` although the datsets before and after mapping have identical elements.
## Steps to reproduce the bug
```python
import datasets
from datasets import load_dataset
def preprocess(example):
return example
ds = load_dataset("codeparrot/codeparrot-clean-valid", split="train").select([i for i in range(10)])
ds1 = ds.map(preprocess, num_proc=2)
ds2 = ds.map(preprocess)
# the datasets elements are the same
for i in range(len(ds1)):
assert ds1[i]==ds2[i]
print(f'Target column before filtering {ds1["autogenerated"]}')
print(f'Target column before filtering {ds2["autogenerated"]}')
print(f"datasets version {datasets.__version__}")
ds_filtered_1 = ds1.filter(lambda x: not x["autogenerated"])
ds_filtered_2 = ds2.filter(lambda x: not x["autogenerated"])
# all elements in Target column are false so they should all be kept, but for ds2 only the first 5=num_samples/num_proc are kept
print(ds_filtered_1)
print(ds_filtered_2)
```
```
Target column before filtering [False, False, False, False, False, False, False, False, False, False]
Target column before filtering [False, False, False, False, False, False, False, False, False, False]
Dataset({
features: ['repo_name', 'path', 'copies', 'size', 'content', 'license', 'hash', 'line_mean', 'line_max', 'alpha_frac', 'autogenerated'],
num_rows: 5
})
Dataset({
features: ['repo_name', 'path', 'copies', 'size', 'content', 'license', 'hash', 'line_mean', 'line_max', 'alpha_frac', 'autogenerated'],
num_rows: 10
})
```
## Expected results
Increasing `num_proc` in mapping shouldn't alter filtering. With the previous version 2.5.2 this doesn't happen
## Actual results
Filtering doesn't work properly when we increase `num_proc` in mapping but not when calling `filter`
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.6.0
- Platform: Linux-4.19.0-22-cloud-amd64-x86_64-with-glibc2.28
- Python version: 3.9.13
- PyArrow version: 8.0.0
- Pandas version: 1.4.2 | 17 | map and filter not working properly in multiprocessing with the new release 2.6.0
## Describe the bug
When mapping is used on a dataset with more than one process, there is a weird behavior when trying to use `filter` , it's like only the samples from one worker are retrieved, one needs to specify the same `num_proc` in filter for it to work properly. This doesn't happen with `datasets` version 2.5.2
In the code below the data is filtered differently when we increase `num_proc` used in `map` although the datsets before and after mapping have identical elements.
## Steps to reproduce the bug
```python
import datasets
from datasets import load_dataset
def preprocess(example):
return example
ds = load_dataset("codeparrot/codeparrot-clean-valid", split="train").select([i for i in range(10)])
ds1 = ds.map(preprocess, num_proc=2)
ds2 = ds.map(preprocess)
# the datasets elements are the same
for i in range(len(ds1)):
assert ds1[i]==ds2[i]
print(f'Target column before filtering {ds1["autogenerated"]}')
print(f'Target column before filtering {ds2["autogenerated"]}')
print(f"datasets version {datasets.__version__}")
ds_filtered_1 = ds1.filter(lambda x: not x["autogenerated"])
ds_filtered_2 = ds2.filter(lambda x: not x["autogenerated"])
# all elements in Target column are false so they should all be kept, but for ds2 only the first 5=num_samples/num_proc are kept
print(ds_filtered_1)
print(ds_filtered_2)
```
```
Target column before filtering [False, False, False, False, False, False, False, False, False, False]
Target column before filtering [False, False, False, False, False, False, False, False, False, False]
Dataset({
features: ['repo_name', 'path', 'copies', 'size', 'content', 'license', 'hash', 'line_mean', 'line_max', 'alpha_frac', 'autogenerated'],
num_rows: 5
})
Dataset({
features: ['repo_name', 'path', 'copies', 'size', 'content', 'license', 'hash', 'line_mean', 'line_max', 'alpha_frac', 'autogenerated'],
num_rows: 10
})
```
## Expected results
Increasing `num_proc` in mapping shouldn't alter filtering. With the previous version 2.5.2 this doesn't happen
## Actual results
Filtering doesn't work properly when we increase `num_proc` in mapping but not when calling `filter`
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.6.0
- Platform: Linux-4.19.0-22-cloud-amd64-x86_64-with-glibc2.28
- Python version: 3.9.13
- PyArrow version: 8.0.0
- Pandas version: 1.4.2
I managed to reproduce your issue @loubnabnl on colab by upgrading pyarrow to 9.0.0 instead of 6.0.1 | [
-0.29330000281333923,
-0.09082433581352234,
-0.12948650121688843,
0.18801119923591614,
-0.08888343721628189,
-0.49709072709083557,
0.2094753533601761,
0.24282652139663696,
0.20070987939834595,
0.06659423559904099,
0.037694431841373444,
0.41527029871940613,
-0.10309305042028427,
0.17575977742671967,
-0.33484193682670593,
0.17066451907157898,
0.01924905925989151,
0.04662138223648071,
-0.26182040572166443,
0.08813558518886566,
-0.2880106568336487,
0.39572685956954956,
-0.3823106288909912,
0.045943260192871094,
-0.33826330304145813,
0.1625450700521469,
0.19779814779758453,
0.09180504828691483,
0.2091354876756668,
-0.20342755317687988,
0.2112935483455658,
0.2983053922653198,
0.06303725391626358,
0.7592065930366516,
-0.0001269663916900754,
0.06948408484458923,
0.23120948672294617,
-0.022200480103492737,
0.0789756327867508,
-0.4687232971191406,
-0.08233633637428284,
0.029404865577816963,
0.09244014322757721,
0.030937500298023224,
-0.06648020446300507,
0.1427362859249115,
-0.2592627704143524,
-0.6424863934516907,
0.4067149758338928,
0.21644635498523712,
0.10199318826198578,
0.15390315651893616,
-0.11435239017009735,
0.12546952068805695,
-0.2606405019760132,
0.1484658420085907,
0.038797833025455475,
-0.00682024285197258,
0.7416775226593018,
-0.25356531143188477,
0.17842133343219757,
0.38244590163230896,
-0.2503816485404968,
0.173201322555542,
-0.2696720361709595,
0.07378194481134415,
0.5208023190498352,
-0.6612710952758789,
0.4278782308101654,
0.10720311105251312,
-0.047210074961185455,
0.02041572518646717,
-0.18435636162757874,
-0.24831464886665344,
-0.3961794674396515,
-0.11604371666908264,
0.22262120246887207,
0.0594792515039444,
-0.21166856586933136,
0.12220114469528198,
-0.5084875226020813,
0.17624104022979736,
0.18885502219200134,
0.08266344666481018,
-0.0885237380862236,
0.2542015314102173,
-0.07152561098337173,
0.3040280044078827,
-0.007399480789899826,
0.21780985593795776,
0.16620071232318878,
-0.15932625532150269,
0.25666555762290955,
0.24718314409255981,
-0.03839705511927605,
0.08888264000415802,
0.29969483613967896,
-0.1430395543575287,
-0.27249881625175476,
-0.3648928999900818,
-0.1097741574048996,
0.2961053252220154,
-0.017965756356716156,
0.1715323030948639,
0.3068402409553528,
-0.47919100522994995,
0.3218745291233063,
0.3186163604259491,
0.24818271398544312,
-0.2033604383468628,
-0.514742910861969,
-0.0704706683754921,
0.4113386869430542,
-0.19189786911010742,
-0.07459723204374313,
0.1254083514213562,
0.32717669010162354,
-0.26724788546562195,
-0.169813334941864,
0.0184952300041914,
-0.27567100524902344,
-0.31243476271629333,
0.2018006294965744,
0.22115445137023926,
0.2087784707546234,
0.6228923201560974,
-0.05846262350678444,
0.16593162715435028,
-0.351974755525589,
-0.012018446810543537,
-0.10044236481189728,
-0.37129688262939453,
-0.25151339173316956,
0.15629443526268005,
0.10991592705249786,
-0.2728536128997803,
0.279865562915802,
0.3981877863407135,
-0.055497825145721436,
-0.29441118240356445,
0.22392472624778748,
-0.25673437118530273,
0.35709571838378906,
0.1904037743806839,
-0.05813446640968323,
0.2328825443983078,
0.02300960011780262,
-0.09958062320947647,
-0.10774462670087814,
0.26458337903022766,
-0.4973070025444031,
-0.1074250340461731,
0.05681660771369934,
0.034349095076322556,
0.06926009058952332,
0.24802595376968384,
0.04287860915064812,
0.32835549116134644,
0.6108881235122681,
-0.39663514494895935,
-0.27638909220695496,
-0.3413005471229553,
-0.4653482735157013,
-0.23210300505161285,
-0.038794733583927155,
0.20024889707565308,
-0.2890167832374573,
-0.10459297895431519,
0.05818246677517891,
-0.018942244350910187,
0.6297788619995117,
-0.07468017935752869,
-0.11019276827573776,
-0.2724522650241852,
-0.005811117589473724,
-0.09897317737340927,
0.24358315765857697,
-0.10085807740688324,
-0.36809268593788147,
0.22778308391571045,
0.09226378798484802,
0.2381083220243454,
-0.015457086265087128,
-0.17798586189746857,
0.2820262014865875,
-0.14359313249588013,
0.08092084527015686,
0.12978923320770264,
-0.21999534964561462,
0.2618851959705353,
-0.2816871106624603,
0.10263209044933319,
-0.021647773683071136,
-0.09908124804496765,
0.3185559809207916,
0.07670461386442184,
0.19000399112701416,
-0.4946543872356415,
0.42285388708114624,
0.012326851487159729,
0.2451002597808838,
0.05789545923471451,
0.09481640160083771,
0.11728011071681976,
0.0697653740644455,
-0.4995799958705902,
0.061898887157440186,
0.1506207287311554,
-0.10442350059747696,
-0.24823293089866638,
0.007990039885044098,
0.10610291361808777,
-0.021643653512001038,
0.04692942649126053,
-0.2115831822156906,
-0.35896891355514526,
-0.07225553691387177,
0.08139743655920029,
-0.07828473299741745,
-0.3184509873390198,
-0.008610811084508896,
0.42232200503349304,
0.2914106845855713,
-0.08435061573982239,
0.18898111581802368,
0.5267427563667297,
0.0481908954679966,
-0.3409818112850189,
-0.318581759929657,
0.1975015103816986,
0.3211732804775238,
0.02721579186618328,
-0.07423471659421921,
0.14900460839271545,
0.33900588750839233,
-0.1978043168783188,
-0.26592668890953064,
0.0501268208026886,
0.31675127148628235,
0.24411749839782715,
0.03396248444914818,
0.09170643985271454,
0.18513010442256927,
-0.05841681733727455,
0.11265210807323456,
0.3561334013938904,
-0.06648160517215729,
0.4627922773361206,
0.0090770423412323,
0.1746581345796585,
0.2771829068660736,
-0.057890523225069046,
0.08511108160018921,
-0.32774618268013,
-0.037753332406282425,
0.005694970488548279,
0.06218474730849266,
0.09558441489934921,
-0.17757990956306458,
0.2616659700870514,
0.3140527904033661,
0.31337791681289673,
-0.22933834791183472,
-0.1404857337474823,
0.019453078508377075,
0.05376803129911423,
-0.02815312333405018,
0.29782915115356445,
0.5410075783729553,
0.09870943427085876,
-0.04120580479502678,
-0.18894295394420624,
0.08036623150110245,
-0.09926869720220566,
0.10174830257892609,
0.10036995261907578,
0.35603073239326477,
0.1692349910736084,
0.12932278215885162,
0.028460389003157616,
0.06470096856355667,
-0.013418929651379585,
0.15351690351963043,
-0.03525763005018234,
-0.3263186812400818,
0.1654461920261383,
-0.2587908208370209,
0.2324906587600708,
-0.23520848155021667,
-0.04217617213726044,
-0.01501888781785965,
-0.141118586063385,
-0.1792117804288864,
0.48724621534347534,
-0.03379586338996887,
0.09249023348093033,
-0.1022196114063263,
-0.030107811093330383,
-0.30479899048805237,
-0.026138922199606895,
0.060113467276096344,
-0.038345497101545334,
-0.22356635332107544,
-0.051791995763778687,
0.14295627176761627,
-0.07985244691371918,
0.25990554690361023,
0.3348364233970642,
-0.5039550065994263,
-0.12378305941820145,
-0.3422248065471649,
-0.0007059648633003235,
0.1637781411409378,
0.2607001066207886,
-0.17304128408432007,
-0.21212391555309296,
0.28377658128738403,
-0.19424913823604584,
0.14332129061222076,
-0.31832602620124817,
-0.1176157221198082,
0.07286487519741058,
-0.04885868355631828,
-0.0456385537981987,
-0.2349294275045395,
-0.2822719216346741,
-0.3273325264453888,
-0.09714153409004211,
-0.18640108406543732,
-0.11143743991851807,
0.38807111978530884,
-0.29472434520721436,
0.0493491031229496,
-0.3356305658817291,
-0.1941615790128708,
-0.06613010168075562,
-0.3016759753227234,
-0.14705851674079895,
-0.05486389622092247,
-0.07194019109010696,
-0.16081325709819794,
-0.2360139638185501,
-0.017919862642884254,
0.02851620502769947,
0.5443401336669922,
-0.0171675868332386,
-0.5309401154518127,
-0.1317264586687088,
0.11986887454986572,
0.4592250883579254,
0.17490911483764648,
0.452831506729126,
0.16859066486358643,
0.026205549016594887,
-0.20455357432365417,
-0.42293262481689453,
0.11532937735319138,
0.14473868906497955,
0.09815630316734314,
0.24285703897476196,
0.33960649371147156,
0.017777275294065475,
0.6487994194030762,
0.5561539530754089,
-0.023226294666528702,
0.2636876702308655,
0.07403194159269333,
0.04566236957907677,
-0.022459812462329865,
-0.45582547783851624,
-0.024404259398579597,
-0.12521806359291077,
0.09832961857318878,
-0.008867837488651276,
-0.006637651473283768,
-0.33512017130851746,
-0.15906734764575958,
0.23264598846435547,
-0.7345539927482605,
-0.168930783867836,
-0.049281761050224304,
-0.13580107688903809,
0.3975372016429901,
0.14422814548015594,
0.03133980929851532,
-0.21261078119277954,
-0.09736577421426773,
-0.42600056529045105,
-0.14386261999607086,
0.1674983650445938,
-0.1667073369026184,
-0.29815876483917236,
0.12233658134937286,
-0.21677619218826294,
0.47312575578689575,
0.18235604465007782,
0.260477751493454,
-0.07431178539991379,
-0.081533282995224,
0.07893959432840347,
0.049552153795957565,
0.6764702200889587,
-0.37624335289001465,
-0.05158403515815735,
0.09987929463386536,
-0.39059141278266907,
-0.3388819992542267,
-0.15165822207927704,
0.025204215198755264,
0.5367099642753601,
0.6272286772727966,
0.10354174673557281,
0.06888823956251144,
-0.3663700222969055,
0.07769343256950378,
-0.38767534494400024,
-0.0683491975069046,
-0.16902056336402893,
-0.14657586812973022,
-0.07196789979934692,
-0.08967112004756927,
-0.03853733092546463,
0.01237749494612217,
0.33877408504486084,
-0.20582759380340576,
-0.39030298590660095,
0.11860175430774689,
-0.1078229770064354,
0.15982484817504883,
0.17691126465797424,
0.10346754640340805,
0.14915046095848083,
0.23646330833435059,
0.31176450848579407,
0.2674891948699951,
0.06380219012498856,
0.31592243909835815,
-0.38804635405540466,
-0.09684792160987854,
0.07335789501667023,
-0.2518492341041565,
0.33245185017585754,
0.32175931334495544,
0.08921739459037781,
0.06345341354608536,
-0.004755774512887001,
0.13639548420906067,
-0.05870078131556511,
0.012148527428507805,
0.06466039270162582,
0.2950471043586731,
-0.2899467945098877,
-0.4733572006225586,
0.15254418551921844,
0.3358713686466217,
-0.28106141090393066,
0.5572060942649841,
-0.4284759759902954,
-0.16121147572994232,
0.07431559264659882,
-0.07126977294683456,
0.6074885129928589,
-0.0032458677887916565,
-0.16051466763019562,
-0.15250703692436218,
-0.37802886962890625,
0.0320822112262249,
0.23906894028186798,
0.06523102521896362,
-0.23793630301952362,
-0.0189516544342041,
0.02283773012459278,
-0.16766339540481567,
0.12181078642606735,
0.14047271013259888,
-0.10900367796421051,
0.3879282772541046,
0.02125634253025055,
-0.2947583794593811,
-0.0011739758774638176,
-0.22856983542442322,
0.3797951340675354,
-0.0722542405128479,
0.23857086896896362,
0.0036154240369796753,
0.11349207162857056,
0.1495513916015625,
0.007726617157459259,
-0.11262161284685135,
0.16928139328956604,
-0.28532150387763977,
-0.34286990761756897,
0.025011368095874786,
-0.4184448719024658,
-0.04409029334783554,
0.4491518437862396,
-0.13170750439167023,
0.24372747540473938,
0.2775619924068451,
0.0486757829785347,
-0.332288533449173,
0.07883575558662415,
-0.054437894374132156,
0.11154352873563766,
0.4038606882095337,
0.12708978354930878,
-0.10675829648971558,
0.16759328544139862,
0.05051247030496597,
-0.38213932514190674,
-0.08912055939435959,
-0.010308324359357357,
-0.23484806716442108,
-0.17547909915447235,
0.4308587908744812,
0.302776575088501,
0.05664815381169319,
0.03260426223278046,
0.15958821773529053,
-0.03011108748614788,
-0.18425610661506653,
0.03501790016889572,
-0.04145655781030655,
-0.14211252331733704,
0.6241980195045471,
-0.3774673342704773,
-0.31871283054351807,
0.07014575600624084,
0.339997261762619,
0.33298587799072266,
-0.1036776751279831,
0.19172188639640808,
-0.13891378045082092,
-0.12366493791341782,
-0.034551363438367844,
-0.267680823802948,
0.007367858663201332,
-0.0277802012860775,
0.2534829378128052,
-0.17337502539157867,
-0.3788645267486572,
0.4051230549812317,
-0.20755735039710999,
-0.25728005170822144,
0.317949116230011,
-0.15065999329090118,
-0.4836181700229645,
-0.12183155119419098,
-0.15917019546031952,
-0.23664651811122894,
-0.15482787787914276,
-0.10627136379480362,
0.16384558379650116,
0.05159156769514084,
0.4303973913192749,
-0.1796063333749771,
0.11310765147209167,
0.2626270651817322,
0.3647848963737488,
0.22181501984596252,
-0.015519112348556519,
-0.2014387995004654,
-0.2010839879512787,
-0.0687255933880806,
0.06579111516475677,
-0.2165195792913437,
-0.08146081864833832,
-0.08489552140235901,
0.09003937989473343,
-0.05832947790622711,
-0.2730425298213959,
0.0024563889019191265,
-0.04115894436836243,
0.01184034626930952,
-0.2515135407447815,
0.25182896852493286,
0.19209390878677368,
-0.06698295474052429,
0.0760158821940422,
0.20264121890068054,
-0.1186470165848732,
0.05928793549537659,
0.269453763961792,
-0.29660189151763916,
0.05499431490898132,
0.17329180240631104,
0.5987299680709839,
0.19550834596157074,
-0.02535618469119072,
0.04093628376722336,
-0.3076389729976654,
-0.06192608177661896,
0.121331125497818,
0.21667394042015076,
-0.18755263090133667,
0.0512472428381443,
0.531578540802002,
0.2188348025083542,
0.137033149600029,
-0.08766784518957138,
0.1483955979347229,
0.05707092955708504,
0.14746113121509552,
-0.1897727996110916,
-0.15652813017368317,
0.5084590315818787,
0.35377171635627747,
0.12066170573234558,
0.23555845022201538,
0.09609408676624298,
-0.09738358110189438,
0.17497669160366058,
0.2224646806716919,
0.019147653132677078,
-0.4077450633049011,
0.34704023599624634,
0.12751322984695435,
0.2782144844532013,
0.3257119059562683,
0.4312991797924042,
-0.035789113491773605,
-0.3683529198169708,
0.41820234060287476,
0.11490130424499512,
0.3778512179851532,
0.10091858357191086,
0.022568698972463608,
0.15115663409233093,
-0.41511109471321106,
-0.11396494507789612,
0.058930978178977966,
-0.48957186937332153,
0.327009379863739,
0.08807460963726044,
-0.11331027001142502,
-0.205936461687088,
-0.27521926164627075,
-0.1264815330505371,
0.195593923330307,
-0.1536855697631836,
-0.30733004212379456,
-0.26856860518455505,
-0.22756579518318176,
0.10151761770248413,
-0.007408887147903442,
0.1308376044034958,
0.11352286487817764,
0.7485291957855225,
0.05090804398059845,
-0.26260536909103394,
-0.25671055912971497,
-0.5739127993583679,
-0.07554341107606888,
0.18073998391628265,
-0.17118239402770996,
0.20633520185947418,
-0.05953186750411987,
0.026829395443201065,
0.1472737193107605,
0.3225654065608978,
0.4239923655986786,
0.5518093109130859,
-0.3131810128688812,
-0.09604928642511368,
0.23548179864883423,
-0.009899172931909561,
-0.2895185947418213,
0.3817238509654999,
-0.002429567277431488,
0.23729325830936432,
-0.044592469930648804,
0.008887602016329765,
-0.011223109439015388,
-0.07071597874164581,
0.19948385655879974,
0.49296826124191284,
-0.018722455948591232,
0.5340995788574219,
0.0046153683215379715,
-0.037080466747283936,
0.19774141907691956,
0.011101558804512024,
-0.07733827829360962,
0.049736034125089645,
0.4786456227302551,
-0.34554973244667053,
0.37568891048431396,
0.1107141375541687,
0.01807255670428276,
0.16870330274105072,
-0.02500591054558754,
0.01444828137755394,
0.10648949444293976,
-0.21124383807182312,
-0.028922080993652344,
-0.4640720784664154,
-0.0518023744225502,
-0.15382163226604462,
0.2807559669017792,
-0.23196206986904144,
0.18630364537239075,
0.015014752745628357,
-0.01699862629175186,
0.21604350209236145,
-0.27532345056533813,
0.3044924736022949,
0.40299075841903687,
-0.4384748041629791,
0.04903726652264595,
0.04048900306224823,
-0.04924848675727844,
0.25534817576408386,
-0.40911588072776794,
0.20205335319042206,
-0.29184582829475403,
0.00019259750843048096,
-0.07730960845947266,
0.08744102716445923,
0.10853748023509979,
0.06673829257488251,
0.10918456315994263,
0.41538915038108826,
0.3302745819091797,
-0.15716120600700378,
0.2230183482170105,
-0.31907814741134644,
-0.01185528188943863,
-0.24054796993732452,
-0.029871851205825806,
-0.07082416117191315,
0.23773887753486633,
-0.403891921043396,
-0.02166667953133583,
-0.1479683816432953,
-0.028127171099185944,
-0.13762971758842468,
0.1710902601480484,
-0.13200853765010834,
-0.23497521877288818,
0.246354877948761,
0.07408693432807922,
-0.09791026264429092,
0.4094310700893402,
-0.000013537704944610596,
0.0932784453034401,
-0.2792413830757141,
-0.08772265911102295,
0.19823984801769257,
-0.46000605821609497,
-0.3866002559661865,
-0.6783804297447205,
0.40124741196632385,
-0.2589479982852936,
0.1490485668182373,
-0.06818075478076935,
-0.22367051243782043,
0.37565770745277405,
-0.29909685254096985,
-0.2412685602903366,
0.10056452453136444,
-0.11570513248443604,
-0.12945514917373657,
-0.13955014944076538,
-0.2513405978679657,
0.334596186876297,
-0.3961808979511261,
0.2359340488910675,
-0.10211296379566193
] |
https://github.com/huggingface/datasets/issues/5111 | map and filter not working properly in multiprocessing with the new release 2.6.0 | I managed to have a _super_ minimal reproducible example:
```python
from datasets import Dataset, concatenate_datasets
ds = concatenate_datasets([Dataset.from_dict({"a": [i]}) for i in range(10)])
ds2 = ds.map(lambda _: {}, batched=True)
assert list(ds2) == list(ds)
```
(filter uses a batched `map` under the hood) | ## Describe the bug
When mapping is used on a dataset with more than one process, there is a weird behavior when trying to use `filter` , it's like only the samples from one worker are retrieved, one needs to specify the same `num_proc` in filter for it to work properly. This doesn't happen with `datasets` version 2.5.2
In the code below the data is filtered differently when we increase `num_proc` used in `map` although the datsets before and after mapping have identical elements.
## Steps to reproduce the bug
```python
import datasets
from datasets import load_dataset
def preprocess(example):
return example
ds = load_dataset("codeparrot/codeparrot-clean-valid", split="train").select([i for i in range(10)])
ds1 = ds.map(preprocess, num_proc=2)
ds2 = ds.map(preprocess)
# the datasets elements are the same
for i in range(len(ds1)):
assert ds1[i]==ds2[i]
print(f'Target column before filtering {ds1["autogenerated"]}')
print(f'Target column before filtering {ds2["autogenerated"]}')
print(f"datasets version {datasets.__version__}")
ds_filtered_1 = ds1.filter(lambda x: not x["autogenerated"])
ds_filtered_2 = ds2.filter(lambda x: not x["autogenerated"])
# all elements in Target column are false so they should all be kept, but for ds2 only the first 5=num_samples/num_proc are kept
print(ds_filtered_1)
print(ds_filtered_2)
```
```
Target column before filtering [False, False, False, False, False, False, False, False, False, False]
Target column before filtering [False, False, False, False, False, False, False, False, False, False]
Dataset({
features: ['repo_name', 'path', 'copies', 'size', 'content', 'license', 'hash', 'line_mean', 'line_max', 'alpha_frac', 'autogenerated'],
num_rows: 5
})
Dataset({
features: ['repo_name', 'path', 'copies', 'size', 'content', 'license', 'hash', 'line_mean', 'line_max', 'alpha_frac', 'autogenerated'],
num_rows: 10
})
```
## Expected results
Increasing `num_proc` in mapping shouldn't alter filtering. With the previous version 2.5.2 this doesn't happen
## Actual results
Filtering doesn't work properly when we increase `num_proc` in mapping but not when calling `filter`
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.6.0
- Platform: Linux-4.19.0-22-cloud-amd64-x86_64-with-glibc2.28
- Python version: 3.9.13
- PyArrow version: 8.0.0
- Pandas version: 1.4.2 | 42 | map and filter not working properly in multiprocessing with the new release 2.6.0
## Describe the bug
When mapping is used on a dataset with more than one process, there is a weird behavior when trying to use `filter` , it's like only the samples from one worker are retrieved, one needs to specify the same `num_proc` in filter for it to work properly. This doesn't happen with `datasets` version 2.5.2
In the code below the data is filtered differently when we increase `num_proc` used in `map` although the datsets before and after mapping have identical elements.
## Steps to reproduce the bug
```python
import datasets
from datasets import load_dataset
def preprocess(example):
return example
ds = load_dataset("codeparrot/codeparrot-clean-valid", split="train").select([i for i in range(10)])
ds1 = ds.map(preprocess, num_proc=2)
ds2 = ds.map(preprocess)
# the datasets elements are the same
for i in range(len(ds1)):
assert ds1[i]==ds2[i]
print(f'Target column before filtering {ds1["autogenerated"]}')
print(f'Target column before filtering {ds2["autogenerated"]}')
print(f"datasets version {datasets.__version__}")
ds_filtered_1 = ds1.filter(lambda x: not x["autogenerated"])
ds_filtered_2 = ds2.filter(lambda x: not x["autogenerated"])
# all elements in Target column are false so they should all be kept, but for ds2 only the first 5=num_samples/num_proc are kept
print(ds_filtered_1)
print(ds_filtered_2)
```
```
Target column before filtering [False, False, False, False, False, False, False, False, False, False]
Target column before filtering [False, False, False, False, False, False, False, False, False, False]
Dataset({
features: ['repo_name', 'path', 'copies', 'size', 'content', 'license', 'hash', 'line_mean', 'line_max', 'alpha_frac', 'autogenerated'],
num_rows: 5
})
Dataset({
features: ['repo_name', 'path', 'copies', 'size', 'content', 'license', 'hash', 'line_mean', 'line_max', 'alpha_frac', 'autogenerated'],
num_rows: 10
})
```
## Expected results
Increasing `num_proc` in mapping shouldn't alter filtering. With the previous version 2.5.2 this doesn't happen
## Actual results
Filtering doesn't work properly when we increase `num_proc` in mapping but not when calling `filter`
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.6.0
- Platform: Linux-4.19.0-22-cloud-amd64-x86_64-with-glibc2.28
- Python version: 3.9.13
- PyArrow version: 8.0.0
- Pandas version: 1.4.2
I managed to have a _super_ minimal reproducible example:
```python
from datasets import Dataset, concatenate_datasets
ds = concatenate_datasets([Dataset.from_dict({"a": [i]}) for i in range(10)])
ds2 = ds.map(lambda _: {}, batched=True)
assert list(ds2) == list(ds)
```
(filter uses a batched `map` under the hood) | [
-0.29330000281333923,
-0.09082433581352234,
-0.12948650121688843,
0.18801119923591614,
-0.08888343721628189,
-0.49709072709083557,
0.2094753533601761,
0.24282652139663696,
0.20070987939834595,
0.06659423559904099,
0.037694431841373444,
0.41527029871940613,
-0.10309305042028427,
0.17575977742671967,
-0.33484193682670593,
0.17066451907157898,
0.01924905925989151,
0.04662138223648071,
-0.26182040572166443,
0.08813558518886566,
-0.2880106568336487,
0.39572685956954956,
-0.3823106288909912,
0.045943260192871094,
-0.33826330304145813,
0.1625450700521469,
0.19779814779758453,
0.09180504828691483,
0.2091354876756668,
-0.20342755317687988,
0.2112935483455658,
0.2983053922653198,
0.06303725391626358,
0.7592065930366516,
-0.0001269663916900754,
0.06948408484458923,
0.23120948672294617,
-0.022200480103492737,
0.0789756327867508,
-0.4687232971191406,
-0.08233633637428284,
0.029404865577816963,
0.09244014322757721,
0.030937500298023224,
-0.06648020446300507,
0.1427362859249115,
-0.2592627704143524,
-0.6424863934516907,
0.4067149758338928,
0.21644635498523712,
0.10199318826198578,
0.15390315651893616,
-0.11435239017009735,
0.12546952068805695,
-0.2606405019760132,
0.1484658420085907,
0.038797833025455475,
-0.00682024285197258,
0.7416775226593018,
-0.25356531143188477,
0.17842133343219757,
0.38244590163230896,
-0.2503816485404968,
0.173201322555542,
-0.2696720361709595,
0.07378194481134415,
0.5208023190498352,
-0.6612710952758789,
0.4278782308101654,
0.10720311105251312,
-0.047210074961185455,
0.02041572518646717,
-0.18435636162757874,
-0.24831464886665344,
-0.3961794674396515,
-0.11604371666908264,
0.22262120246887207,
0.0594792515039444,
-0.21166856586933136,
0.12220114469528198,
-0.5084875226020813,
0.17624104022979736,
0.18885502219200134,
0.08266344666481018,
-0.0885237380862236,
0.2542015314102173,
-0.07152561098337173,
0.3040280044078827,
-0.007399480789899826,
0.21780985593795776,
0.16620071232318878,
-0.15932625532150269,
0.25666555762290955,
0.24718314409255981,
-0.03839705511927605,
0.08888264000415802,
0.29969483613967896,
-0.1430395543575287,
-0.27249881625175476,
-0.3648928999900818,
-0.1097741574048996,
0.2961053252220154,
-0.017965756356716156,
0.1715323030948639,
0.3068402409553528,
-0.47919100522994995,
0.3218745291233063,
0.3186163604259491,
0.24818271398544312,
-0.2033604383468628,
-0.514742910861969,
-0.0704706683754921,
0.4113386869430542,
-0.19189786911010742,
-0.07459723204374313,
0.1254083514213562,
0.32717669010162354,
-0.26724788546562195,
-0.169813334941864,
0.0184952300041914,
-0.27567100524902344,
-0.31243476271629333,
0.2018006294965744,
0.22115445137023926,
0.2087784707546234,
0.6228923201560974,
-0.05846262350678444,
0.16593162715435028,
-0.351974755525589,
-0.012018446810543537,
-0.10044236481189728,
-0.37129688262939453,
-0.25151339173316956,
0.15629443526268005,
0.10991592705249786,
-0.2728536128997803,
0.279865562915802,
0.3981877863407135,
-0.055497825145721436,
-0.29441118240356445,
0.22392472624778748,
-0.25673437118530273,
0.35709571838378906,
0.1904037743806839,
-0.05813446640968323,
0.2328825443983078,
0.02300960011780262,
-0.09958062320947647,
-0.10774462670087814,
0.26458337903022766,
-0.4973070025444031,
-0.1074250340461731,
0.05681660771369934,
0.034349095076322556,
0.06926009058952332,
0.24802595376968384,
0.04287860915064812,
0.32835549116134644,
0.6108881235122681,
-0.39663514494895935,
-0.27638909220695496,
-0.3413005471229553,
-0.4653482735157013,
-0.23210300505161285,
-0.038794733583927155,
0.20024889707565308,
-0.2890167832374573,
-0.10459297895431519,
0.05818246677517891,
-0.018942244350910187,
0.6297788619995117,
-0.07468017935752869,
-0.11019276827573776,
-0.2724522650241852,
-0.005811117589473724,
-0.09897317737340927,
0.24358315765857697,
-0.10085807740688324,
-0.36809268593788147,
0.22778308391571045,
0.09226378798484802,
0.2381083220243454,
-0.015457086265087128,
-0.17798586189746857,
0.2820262014865875,
-0.14359313249588013,
0.08092084527015686,
0.12978923320770264,
-0.21999534964561462,
0.2618851959705353,
-0.2816871106624603,
0.10263209044933319,
-0.021647773683071136,
-0.09908124804496765,
0.3185559809207916,
0.07670461386442184,
0.19000399112701416,
-0.4946543872356415,
0.42285388708114624,
0.012326851487159729,
0.2451002597808838,
0.05789545923471451,
0.09481640160083771,
0.11728011071681976,
0.0697653740644455,
-0.4995799958705902,
0.061898887157440186,
0.1506207287311554,
-0.10442350059747696,
-0.24823293089866638,
0.007990039885044098,
0.10610291361808777,
-0.021643653512001038,
0.04692942649126053,
-0.2115831822156906,
-0.35896891355514526,
-0.07225553691387177,
0.08139743655920029,
-0.07828473299741745,
-0.3184509873390198,
-0.008610811084508896,
0.42232200503349304,
0.2914106845855713,
-0.08435061573982239,
0.18898111581802368,
0.5267427563667297,
0.0481908954679966,
-0.3409818112850189,
-0.318581759929657,
0.1975015103816986,
0.3211732804775238,
0.02721579186618328,
-0.07423471659421921,
0.14900460839271545,
0.33900588750839233,
-0.1978043168783188,
-0.26592668890953064,
0.0501268208026886,
0.31675127148628235,
0.24411749839782715,
0.03396248444914818,
0.09170643985271454,
0.18513010442256927,
-0.05841681733727455,
0.11265210807323456,
0.3561334013938904,
-0.06648160517215729,
0.4627922773361206,
0.0090770423412323,
0.1746581345796585,
0.2771829068660736,
-0.057890523225069046,
0.08511108160018921,
-0.32774618268013,
-0.037753332406282425,
0.005694970488548279,
0.06218474730849266,
0.09558441489934921,
-0.17757990956306458,
0.2616659700870514,
0.3140527904033661,
0.31337791681289673,
-0.22933834791183472,
-0.1404857337474823,
0.019453078508377075,
0.05376803129911423,
-0.02815312333405018,
0.29782915115356445,
0.5410075783729553,
0.09870943427085876,
-0.04120580479502678,
-0.18894295394420624,
0.08036623150110245,
-0.09926869720220566,
0.10174830257892609,
0.10036995261907578,
0.35603073239326477,
0.1692349910736084,
0.12932278215885162,
0.028460389003157616,
0.06470096856355667,
-0.013418929651379585,
0.15351690351963043,
-0.03525763005018234,
-0.3263186812400818,
0.1654461920261383,
-0.2587908208370209,
0.2324906587600708,
-0.23520848155021667,
-0.04217617213726044,
-0.01501888781785965,
-0.141118586063385,
-0.1792117804288864,
0.48724621534347534,
-0.03379586338996887,
0.09249023348093033,
-0.1022196114063263,
-0.030107811093330383,
-0.30479899048805237,
-0.026138922199606895,
0.060113467276096344,
-0.038345497101545334,
-0.22356635332107544,
-0.051791995763778687,
0.14295627176761627,
-0.07985244691371918,
0.25990554690361023,
0.3348364233970642,
-0.5039550065994263,
-0.12378305941820145,
-0.3422248065471649,
-0.0007059648633003235,
0.1637781411409378,
0.2607001066207886,
-0.17304128408432007,
-0.21212391555309296,
0.28377658128738403,
-0.19424913823604584,
0.14332129061222076,
-0.31832602620124817,
-0.1176157221198082,
0.07286487519741058,
-0.04885868355631828,
-0.0456385537981987,
-0.2349294275045395,
-0.2822719216346741,
-0.3273325264453888,
-0.09714153409004211,
-0.18640108406543732,
-0.11143743991851807,
0.38807111978530884,
-0.29472434520721436,
0.0493491031229496,
-0.3356305658817291,
-0.1941615790128708,
-0.06613010168075562,
-0.3016759753227234,
-0.14705851674079895,
-0.05486389622092247,
-0.07194019109010696,
-0.16081325709819794,
-0.2360139638185501,
-0.017919862642884254,
0.02851620502769947,
0.5443401336669922,
-0.0171675868332386,
-0.5309401154518127,
-0.1317264586687088,
0.11986887454986572,
0.4592250883579254,
0.17490911483764648,
0.452831506729126,
0.16859066486358643,
0.026205549016594887,
-0.20455357432365417,
-0.42293262481689453,
0.11532937735319138,
0.14473868906497955,
0.09815630316734314,
0.24285703897476196,
0.33960649371147156,
0.017777275294065475,
0.6487994194030762,
0.5561539530754089,
-0.023226294666528702,
0.2636876702308655,
0.07403194159269333,
0.04566236957907677,
-0.022459812462329865,
-0.45582547783851624,
-0.024404259398579597,
-0.12521806359291077,
0.09832961857318878,
-0.008867837488651276,
-0.006637651473283768,
-0.33512017130851746,
-0.15906734764575958,
0.23264598846435547,
-0.7345539927482605,
-0.168930783867836,
-0.049281761050224304,
-0.13580107688903809,
0.3975372016429901,
0.14422814548015594,
0.03133980929851532,
-0.21261078119277954,
-0.09736577421426773,
-0.42600056529045105,
-0.14386261999607086,
0.1674983650445938,
-0.1667073369026184,
-0.29815876483917236,
0.12233658134937286,
-0.21677619218826294,
0.47312575578689575,
0.18235604465007782,
0.260477751493454,
-0.07431178539991379,
-0.081533282995224,
0.07893959432840347,
0.049552153795957565,
0.6764702200889587,
-0.37624335289001465,
-0.05158403515815735,
0.09987929463386536,
-0.39059141278266907,
-0.3388819992542267,
-0.15165822207927704,
0.025204215198755264,
0.5367099642753601,
0.6272286772727966,
0.10354174673557281,
0.06888823956251144,
-0.3663700222969055,
0.07769343256950378,
-0.38767534494400024,
-0.0683491975069046,
-0.16902056336402893,
-0.14657586812973022,
-0.07196789979934692,
-0.08967112004756927,
-0.03853733092546463,
0.01237749494612217,
0.33877408504486084,
-0.20582759380340576,
-0.39030298590660095,
0.11860175430774689,
-0.1078229770064354,
0.15982484817504883,
0.17691126465797424,
0.10346754640340805,
0.14915046095848083,
0.23646330833435059,
0.31176450848579407,
0.2674891948699951,
0.06380219012498856,
0.31592243909835815,
-0.38804635405540466,
-0.09684792160987854,
0.07335789501667023,
-0.2518492341041565,
0.33245185017585754,
0.32175931334495544,
0.08921739459037781,
0.06345341354608536,
-0.004755774512887001,
0.13639548420906067,
-0.05870078131556511,
0.012148527428507805,
0.06466039270162582,
0.2950471043586731,
-0.2899467945098877,
-0.4733572006225586,
0.15254418551921844,
0.3358713686466217,
-0.28106141090393066,
0.5572060942649841,
-0.4284759759902954,
-0.16121147572994232,
0.07431559264659882,
-0.07126977294683456,
0.6074885129928589,
-0.0032458677887916565,
-0.16051466763019562,
-0.15250703692436218,
-0.37802886962890625,
0.0320822112262249,
0.23906894028186798,
0.06523102521896362,
-0.23793630301952362,
-0.0189516544342041,
0.02283773012459278,
-0.16766339540481567,
0.12181078642606735,
0.14047271013259888,
-0.10900367796421051,
0.3879282772541046,
0.02125634253025055,
-0.2947583794593811,
-0.0011739758774638176,
-0.22856983542442322,
0.3797951340675354,
-0.0722542405128479,
0.23857086896896362,
0.0036154240369796753,
0.11349207162857056,
0.1495513916015625,
0.007726617157459259,
-0.11262161284685135,
0.16928139328956604,
-0.28532150387763977,
-0.34286990761756897,
0.025011368095874786,
-0.4184448719024658,
-0.04409029334783554,
0.4491518437862396,
-0.13170750439167023,
0.24372747540473938,
0.2775619924068451,
0.0486757829785347,
-0.332288533449173,
0.07883575558662415,
-0.054437894374132156,
0.11154352873563766,
0.4038606882095337,
0.12708978354930878,
-0.10675829648971558,
0.16759328544139862,
0.05051247030496597,
-0.38213932514190674,
-0.08912055939435959,
-0.010308324359357357,
-0.23484806716442108,
-0.17547909915447235,
0.4308587908744812,
0.302776575088501,
0.05664815381169319,
0.03260426223278046,
0.15958821773529053,
-0.03011108748614788,
-0.18425610661506653,
0.03501790016889572,
-0.04145655781030655,
-0.14211252331733704,
0.6241980195045471,
-0.3774673342704773,
-0.31871283054351807,
0.07014575600624084,
0.339997261762619,
0.33298587799072266,
-0.1036776751279831,
0.19172188639640808,
-0.13891378045082092,
-0.12366493791341782,
-0.034551363438367844,
-0.267680823802948,
0.007367858663201332,
-0.0277802012860775,
0.2534829378128052,
-0.17337502539157867,
-0.3788645267486572,
0.4051230549812317,
-0.20755735039710999,
-0.25728005170822144,
0.317949116230011,
-0.15065999329090118,
-0.4836181700229645,
-0.12183155119419098,
-0.15917019546031952,
-0.23664651811122894,
-0.15482787787914276,
-0.10627136379480362,
0.16384558379650116,
0.05159156769514084,
0.4303973913192749,
-0.1796063333749771,
0.11310765147209167,
0.2626270651817322,
0.3647848963737488,
0.22181501984596252,
-0.015519112348556519,
-0.2014387995004654,
-0.2010839879512787,
-0.0687255933880806,
0.06579111516475677,
-0.2165195792913437,
-0.08146081864833832,
-0.08489552140235901,
0.09003937989473343,
-0.05832947790622711,
-0.2730425298213959,
0.0024563889019191265,
-0.04115894436836243,
0.01184034626930952,
-0.2515135407447815,
0.25182896852493286,
0.19209390878677368,
-0.06698295474052429,
0.0760158821940422,
0.20264121890068054,
-0.1186470165848732,
0.05928793549537659,
0.269453763961792,
-0.29660189151763916,
0.05499431490898132,
0.17329180240631104,
0.5987299680709839,
0.19550834596157074,
-0.02535618469119072,
0.04093628376722336,
-0.3076389729976654,
-0.06192608177661896,
0.121331125497818,
0.21667394042015076,
-0.18755263090133667,
0.0512472428381443,
0.531578540802002,
0.2188348025083542,
0.137033149600029,
-0.08766784518957138,
0.1483955979347229,
0.05707092955708504,
0.14746113121509552,
-0.1897727996110916,
-0.15652813017368317,
0.5084590315818787,
0.35377171635627747,
0.12066170573234558,
0.23555845022201538,
0.09609408676624298,
-0.09738358110189438,
0.17497669160366058,
0.2224646806716919,
0.019147653132677078,
-0.4077450633049011,
0.34704023599624634,
0.12751322984695435,
0.2782144844532013,
0.3257119059562683,
0.4312991797924042,
-0.035789113491773605,
-0.3683529198169708,
0.41820234060287476,
0.11490130424499512,
0.3778512179851532,
0.10091858357191086,
0.022568698972463608,
0.15115663409233093,
-0.41511109471321106,
-0.11396494507789612,
0.058930978178977966,
-0.48957186937332153,
0.327009379863739,
0.08807460963726044,
-0.11331027001142502,
-0.205936461687088,
-0.27521926164627075,
-0.1264815330505371,
0.195593923330307,
-0.1536855697631836,
-0.30733004212379456,
-0.26856860518455505,
-0.22756579518318176,
0.10151761770248413,
-0.007408887147903442,
0.1308376044034958,
0.11352286487817764,
0.7485291957855225,
0.05090804398059845,
-0.26260536909103394,
-0.25671055912971497,
-0.5739127993583679,
-0.07554341107606888,
0.18073998391628265,
-0.17118239402770996,
0.20633520185947418,
-0.05953186750411987,
0.026829395443201065,
0.1472737193107605,
0.3225654065608978,
0.4239923655986786,
0.5518093109130859,
-0.3131810128688812,
-0.09604928642511368,
0.23548179864883423,
-0.009899172931909561,
-0.2895185947418213,
0.3817238509654999,
-0.002429567277431488,
0.23729325830936432,
-0.044592469930648804,
0.008887602016329765,
-0.011223109439015388,
-0.07071597874164581,
0.19948385655879974,
0.49296826124191284,
-0.018722455948591232,
0.5340995788574219,
0.0046153683215379715,
-0.037080466747283936,
0.19774141907691956,
0.011101558804512024,
-0.07733827829360962,
0.049736034125089645,
0.4786456227302551,
-0.34554973244667053,
0.37568891048431396,
0.1107141375541687,
0.01807255670428276,
0.16870330274105072,
-0.02500591054558754,
0.01444828137755394,
0.10648949444293976,
-0.21124383807182312,
-0.028922080993652344,
-0.4640720784664154,
-0.0518023744225502,
-0.15382163226604462,
0.2807559669017792,
-0.23196206986904144,
0.18630364537239075,
0.015014752745628357,
-0.01699862629175186,
0.21604350209236145,
-0.27532345056533813,
0.3044924736022949,
0.40299075841903687,
-0.4384748041629791,
0.04903726652264595,
0.04048900306224823,
-0.04924848675727844,
0.25534817576408386,
-0.40911588072776794,
0.20205335319042206,
-0.29184582829475403,
0.00019259750843048096,
-0.07730960845947266,
0.08744102716445923,
0.10853748023509979,
0.06673829257488251,
0.10918456315994263,
0.41538915038108826,
0.3302745819091797,
-0.15716120600700378,
0.2230183482170105,
-0.31907814741134644,
-0.01185528188943863,
-0.24054796993732452,
-0.029871851205825806,
-0.07082416117191315,
0.23773887753486633,
-0.403891921043396,
-0.02166667953133583,
-0.1479683816432953,
-0.028127171099185944,
-0.13762971758842468,
0.1710902601480484,
-0.13200853765010834,
-0.23497521877288818,
0.246354877948761,
0.07408693432807922,
-0.09791026264429092,
0.4094310700893402,
-0.000013537704944610596,
0.0932784453034401,
-0.2792413830757141,
-0.08772265911102295,
0.19823984801769257,
-0.46000605821609497,
-0.3866002559661865,
-0.6783804297447205,
0.40124741196632385,
-0.2589479982852936,
0.1490485668182373,
-0.06818075478076935,
-0.22367051243782043,
0.37565770745277405,
-0.29909685254096985,
-0.2412685602903366,
0.10056452453136444,
-0.11570513248443604,
-0.12945514917373657,
-0.13955014944076538,
-0.2513405978679657,
0.334596186876297,
-0.3961808979511261,
0.2359340488910675,
-0.10211296379566193
] |
https://github.com/huggingface/datasets/issues/5111 | map and filter not working properly in multiprocessing with the new release 2.6.0 | > the one reported by @loubnabnl is related to multiprocessing in map and then filter; we should reproduce it first: I have tried with Python version 3.9.7 and I can't reproduce it either; maybe it is related to the version of PyArrow? To be checked.
So finally it was related to PyArrow version! :+1: | ## Describe the bug
When mapping is used on a dataset with more than one process, there is a weird behavior when trying to use `filter` , it's like only the samples from one worker are retrieved, one needs to specify the same `num_proc` in filter for it to work properly. This doesn't happen with `datasets` version 2.5.2
In the code below the data is filtered differently when we increase `num_proc` used in `map` although the datsets before and after mapping have identical elements.
## Steps to reproduce the bug
```python
import datasets
from datasets import load_dataset
def preprocess(example):
return example
ds = load_dataset("codeparrot/codeparrot-clean-valid", split="train").select([i for i in range(10)])
ds1 = ds.map(preprocess, num_proc=2)
ds2 = ds.map(preprocess)
# the datasets elements are the same
for i in range(len(ds1)):
assert ds1[i]==ds2[i]
print(f'Target column before filtering {ds1["autogenerated"]}')
print(f'Target column before filtering {ds2["autogenerated"]}')
print(f"datasets version {datasets.__version__}")
ds_filtered_1 = ds1.filter(lambda x: not x["autogenerated"])
ds_filtered_2 = ds2.filter(lambda x: not x["autogenerated"])
# all elements in Target column are false so they should all be kept, but for ds2 only the first 5=num_samples/num_proc are kept
print(ds_filtered_1)
print(ds_filtered_2)
```
```
Target column before filtering [False, False, False, False, False, False, False, False, False, False]
Target column before filtering [False, False, False, False, False, False, False, False, False, False]
Dataset({
features: ['repo_name', 'path', 'copies', 'size', 'content', 'license', 'hash', 'line_mean', 'line_max', 'alpha_frac', 'autogenerated'],
num_rows: 5
})
Dataset({
features: ['repo_name', 'path', 'copies', 'size', 'content', 'license', 'hash', 'line_mean', 'line_max', 'alpha_frac', 'autogenerated'],
num_rows: 10
})
```
## Expected results
Increasing `num_proc` in mapping shouldn't alter filtering. With the previous version 2.5.2 this doesn't happen
## Actual results
Filtering doesn't work properly when we increase `num_proc` in mapping but not when calling `filter`
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.6.0
- Platform: Linux-4.19.0-22-cloud-amd64-x86_64-with-glibc2.28
- Python version: 3.9.13
- PyArrow version: 8.0.0
- Pandas version: 1.4.2 | 54 | map and filter not working properly in multiprocessing with the new release 2.6.0
## Describe the bug
When mapping is used on a dataset with more than one process, there is a weird behavior when trying to use `filter` , it's like only the samples from one worker are retrieved, one needs to specify the same `num_proc` in filter for it to work properly. This doesn't happen with `datasets` version 2.5.2
In the code below the data is filtered differently when we increase `num_proc` used in `map` although the datsets before and after mapping have identical elements.
## Steps to reproduce the bug
```python
import datasets
from datasets import load_dataset
def preprocess(example):
return example
ds = load_dataset("codeparrot/codeparrot-clean-valid", split="train").select([i for i in range(10)])
ds1 = ds.map(preprocess, num_proc=2)
ds2 = ds.map(preprocess)
# the datasets elements are the same
for i in range(len(ds1)):
assert ds1[i]==ds2[i]
print(f'Target column before filtering {ds1["autogenerated"]}')
print(f'Target column before filtering {ds2["autogenerated"]}')
print(f"datasets version {datasets.__version__}")
ds_filtered_1 = ds1.filter(lambda x: not x["autogenerated"])
ds_filtered_2 = ds2.filter(lambda x: not x["autogenerated"])
# all elements in Target column are false so they should all be kept, but for ds2 only the first 5=num_samples/num_proc are kept
print(ds_filtered_1)
print(ds_filtered_2)
```
```
Target column before filtering [False, False, False, False, False, False, False, False, False, False]
Target column before filtering [False, False, False, False, False, False, False, False, False, False]
Dataset({
features: ['repo_name', 'path', 'copies', 'size', 'content', 'license', 'hash', 'line_mean', 'line_max', 'alpha_frac', 'autogenerated'],
num_rows: 5
})
Dataset({
features: ['repo_name', 'path', 'copies', 'size', 'content', 'license', 'hash', 'line_mean', 'line_max', 'alpha_frac', 'autogenerated'],
num_rows: 10
})
```
## Expected results
Increasing `num_proc` in mapping shouldn't alter filtering. With the previous version 2.5.2 this doesn't happen
## Actual results
Filtering doesn't work properly when we increase `num_proc` in mapping but not when calling `filter`
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.6.0
- Platform: Linux-4.19.0-22-cloud-amd64-x86_64-with-glibc2.28
- Python version: 3.9.13
- PyArrow version: 8.0.0
- Pandas version: 1.4.2
> the one reported by @loubnabnl is related to multiprocessing in map and then filter; we should reproduce it first: I have tried with Python version 3.9.7 and I can't reproduce it either; maybe it is related to the version of PyArrow? To be checked.
So finally it was related to PyArrow version! :+1: | [
-0.29330000281333923,
-0.09082433581352234,
-0.12948650121688843,
0.18801119923591614,
-0.08888343721628189,
-0.49709072709083557,
0.2094753533601761,
0.24282652139663696,
0.20070987939834595,
0.06659423559904099,
0.037694431841373444,
0.41527029871940613,
-0.10309305042028427,
0.17575977742671967,
-0.33484193682670593,
0.17066451907157898,
0.01924905925989151,
0.04662138223648071,
-0.26182040572166443,
0.08813558518886566,
-0.2880106568336487,
0.39572685956954956,
-0.3823106288909912,
0.045943260192871094,
-0.33826330304145813,
0.1625450700521469,
0.19779814779758453,
0.09180504828691483,
0.2091354876756668,
-0.20342755317687988,
0.2112935483455658,
0.2983053922653198,
0.06303725391626358,
0.7592065930366516,
-0.0001269663916900754,
0.06948408484458923,
0.23120948672294617,
-0.022200480103492737,
0.0789756327867508,
-0.4687232971191406,
-0.08233633637428284,
0.029404865577816963,
0.09244014322757721,
0.030937500298023224,
-0.06648020446300507,
0.1427362859249115,
-0.2592627704143524,
-0.6424863934516907,
0.4067149758338928,
0.21644635498523712,
0.10199318826198578,
0.15390315651893616,
-0.11435239017009735,
0.12546952068805695,
-0.2606405019760132,
0.1484658420085907,
0.038797833025455475,
-0.00682024285197258,
0.7416775226593018,
-0.25356531143188477,
0.17842133343219757,
0.38244590163230896,
-0.2503816485404968,
0.173201322555542,
-0.2696720361709595,
0.07378194481134415,
0.5208023190498352,
-0.6612710952758789,
0.4278782308101654,
0.10720311105251312,
-0.047210074961185455,
0.02041572518646717,
-0.18435636162757874,
-0.24831464886665344,
-0.3961794674396515,
-0.11604371666908264,
0.22262120246887207,
0.0594792515039444,
-0.21166856586933136,
0.12220114469528198,
-0.5084875226020813,
0.17624104022979736,
0.18885502219200134,
0.08266344666481018,
-0.0885237380862236,
0.2542015314102173,
-0.07152561098337173,
0.3040280044078827,
-0.007399480789899826,
0.21780985593795776,
0.16620071232318878,
-0.15932625532150269,
0.25666555762290955,
0.24718314409255981,
-0.03839705511927605,
0.08888264000415802,
0.29969483613967896,
-0.1430395543575287,
-0.27249881625175476,
-0.3648928999900818,
-0.1097741574048996,
0.2961053252220154,
-0.017965756356716156,
0.1715323030948639,
0.3068402409553528,
-0.47919100522994995,
0.3218745291233063,
0.3186163604259491,
0.24818271398544312,
-0.2033604383468628,
-0.514742910861969,
-0.0704706683754921,
0.4113386869430542,
-0.19189786911010742,
-0.07459723204374313,
0.1254083514213562,
0.32717669010162354,
-0.26724788546562195,
-0.169813334941864,
0.0184952300041914,
-0.27567100524902344,
-0.31243476271629333,
0.2018006294965744,
0.22115445137023926,
0.2087784707546234,
0.6228923201560974,
-0.05846262350678444,
0.16593162715435028,
-0.351974755525589,
-0.012018446810543537,
-0.10044236481189728,
-0.37129688262939453,
-0.25151339173316956,
0.15629443526268005,
0.10991592705249786,
-0.2728536128997803,
0.279865562915802,
0.3981877863407135,
-0.055497825145721436,
-0.29441118240356445,
0.22392472624778748,
-0.25673437118530273,
0.35709571838378906,
0.1904037743806839,
-0.05813446640968323,
0.2328825443983078,
0.02300960011780262,
-0.09958062320947647,
-0.10774462670087814,
0.26458337903022766,
-0.4973070025444031,
-0.1074250340461731,
0.05681660771369934,
0.034349095076322556,
0.06926009058952332,
0.24802595376968384,
0.04287860915064812,
0.32835549116134644,
0.6108881235122681,
-0.39663514494895935,
-0.27638909220695496,
-0.3413005471229553,
-0.4653482735157013,
-0.23210300505161285,
-0.038794733583927155,
0.20024889707565308,
-0.2890167832374573,
-0.10459297895431519,
0.05818246677517891,
-0.018942244350910187,
0.6297788619995117,
-0.07468017935752869,
-0.11019276827573776,
-0.2724522650241852,
-0.005811117589473724,
-0.09897317737340927,
0.24358315765857697,
-0.10085807740688324,
-0.36809268593788147,
0.22778308391571045,
0.09226378798484802,
0.2381083220243454,
-0.015457086265087128,
-0.17798586189746857,
0.2820262014865875,
-0.14359313249588013,
0.08092084527015686,
0.12978923320770264,
-0.21999534964561462,
0.2618851959705353,
-0.2816871106624603,
0.10263209044933319,
-0.021647773683071136,
-0.09908124804496765,
0.3185559809207916,
0.07670461386442184,
0.19000399112701416,
-0.4946543872356415,
0.42285388708114624,
0.012326851487159729,
0.2451002597808838,
0.05789545923471451,
0.09481640160083771,
0.11728011071681976,
0.0697653740644455,
-0.4995799958705902,
0.061898887157440186,
0.1506207287311554,
-0.10442350059747696,
-0.24823293089866638,
0.007990039885044098,
0.10610291361808777,
-0.021643653512001038,
0.04692942649126053,
-0.2115831822156906,
-0.35896891355514526,
-0.07225553691387177,
0.08139743655920029,
-0.07828473299741745,
-0.3184509873390198,
-0.008610811084508896,
0.42232200503349304,
0.2914106845855713,
-0.08435061573982239,
0.18898111581802368,
0.5267427563667297,
0.0481908954679966,
-0.3409818112850189,
-0.318581759929657,
0.1975015103816986,
0.3211732804775238,
0.02721579186618328,
-0.07423471659421921,
0.14900460839271545,
0.33900588750839233,
-0.1978043168783188,
-0.26592668890953064,
0.0501268208026886,
0.31675127148628235,
0.24411749839782715,
0.03396248444914818,
0.09170643985271454,
0.18513010442256927,
-0.05841681733727455,
0.11265210807323456,
0.3561334013938904,
-0.06648160517215729,
0.4627922773361206,
0.0090770423412323,
0.1746581345796585,
0.2771829068660736,
-0.057890523225069046,
0.08511108160018921,
-0.32774618268013,
-0.037753332406282425,
0.005694970488548279,
0.06218474730849266,
0.09558441489934921,
-0.17757990956306458,
0.2616659700870514,
0.3140527904033661,
0.31337791681289673,
-0.22933834791183472,
-0.1404857337474823,
0.019453078508377075,
0.05376803129911423,
-0.02815312333405018,
0.29782915115356445,
0.5410075783729553,
0.09870943427085876,
-0.04120580479502678,
-0.18894295394420624,
0.08036623150110245,
-0.09926869720220566,
0.10174830257892609,
0.10036995261907578,
0.35603073239326477,
0.1692349910736084,
0.12932278215885162,
0.028460389003157616,
0.06470096856355667,
-0.013418929651379585,
0.15351690351963043,
-0.03525763005018234,
-0.3263186812400818,
0.1654461920261383,
-0.2587908208370209,
0.2324906587600708,
-0.23520848155021667,
-0.04217617213726044,
-0.01501888781785965,
-0.141118586063385,
-0.1792117804288864,
0.48724621534347534,
-0.03379586338996887,
0.09249023348093033,
-0.1022196114063263,
-0.030107811093330383,
-0.30479899048805237,
-0.026138922199606895,
0.060113467276096344,
-0.038345497101545334,
-0.22356635332107544,
-0.051791995763778687,
0.14295627176761627,
-0.07985244691371918,
0.25990554690361023,
0.3348364233970642,
-0.5039550065994263,
-0.12378305941820145,
-0.3422248065471649,
-0.0007059648633003235,
0.1637781411409378,
0.2607001066207886,
-0.17304128408432007,
-0.21212391555309296,
0.28377658128738403,
-0.19424913823604584,
0.14332129061222076,
-0.31832602620124817,
-0.1176157221198082,
0.07286487519741058,
-0.04885868355631828,
-0.0456385537981987,
-0.2349294275045395,
-0.2822719216346741,
-0.3273325264453888,
-0.09714153409004211,
-0.18640108406543732,
-0.11143743991851807,
0.38807111978530884,
-0.29472434520721436,
0.0493491031229496,
-0.3356305658817291,
-0.1941615790128708,
-0.06613010168075562,
-0.3016759753227234,
-0.14705851674079895,
-0.05486389622092247,
-0.07194019109010696,
-0.16081325709819794,
-0.2360139638185501,
-0.017919862642884254,
0.02851620502769947,
0.5443401336669922,
-0.0171675868332386,
-0.5309401154518127,
-0.1317264586687088,
0.11986887454986572,
0.4592250883579254,
0.17490911483764648,
0.452831506729126,
0.16859066486358643,
0.026205549016594887,
-0.20455357432365417,
-0.42293262481689453,
0.11532937735319138,
0.14473868906497955,
0.09815630316734314,
0.24285703897476196,
0.33960649371147156,
0.017777275294065475,
0.6487994194030762,
0.5561539530754089,
-0.023226294666528702,
0.2636876702308655,
0.07403194159269333,
0.04566236957907677,
-0.022459812462329865,
-0.45582547783851624,
-0.024404259398579597,
-0.12521806359291077,
0.09832961857318878,
-0.008867837488651276,
-0.006637651473283768,
-0.33512017130851746,
-0.15906734764575958,
0.23264598846435547,
-0.7345539927482605,
-0.168930783867836,
-0.049281761050224304,
-0.13580107688903809,
0.3975372016429901,
0.14422814548015594,
0.03133980929851532,
-0.21261078119277954,
-0.09736577421426773,
-0.42600056529045105,
-0.14386261999607086,
0.1674983650445938,
-0.1667073369026184,
-0.29815876483917236,
0.12233658134937286,
-0.21677619218826294,
0.47312575578689575,
0.18235604465007782,
0.260477751493454,
-0.07431178539991379,
-0.081533282995224,
0.07893959432840347,
0.049552153795957565,
0.6764702200889587,
-0.37624335289001465,
-0.05158403515815735,
0.09987929463386536,
-0.39059141278266907,
-0.3388819992542267,
-0.15165822207927704,
0.025204215198755264,
0.5367099642753601,
0.6272286772727966,
0.10354174673557281,
0.06888823956251144,
-0.3663700222969055,
0.07769343256950378,
-0.38767534494400024,
-0.0683491975069046,
-0.16902056336402893,
-0.14657586812973022,
-0.07196789979934692,
-0.08967112004756927,
-0.03853733092546463,
0.01237749494612217,
0.33877408504486084,
-0.20582759380340576,
-0.39030298590660095,
0.11860175430774689,
-0.1078229770064354,
0.15982484817504883,
0.17691126465797424,
0.10346754640340805,
0.14915046095848083,
0.23646330833435059,
0.31176450848579407,
0.2674891948699951,
0.06380219012498856,
0.31592243909835815,
-0.38804635405540466,
-0.09684792160987854,
0.07335789501667023,
-0.2518492341041565,
0.33245185017585754,
0.32175931334495544,
0.08921739459037781,
0.06345341354608536,
-0.004755774512887001,
0.13639548420906067,
-0.05870078131556511,
0.012148527428507805,
0.06466039270162582,
0.2950471043586731,
-0.2899467945098877,
-0.4733572006225586,
0.15254418551921844,
0.3358713686466217,
-0.28106141090393066,
0.5572060942649841,
-0.4284759759902954,
-0.16121147572994232,
0.07431559264659882,
-0.07126977294683456,
0.6074885129928589,
-0.0032458677887916565,
-0.16051466763019562,
-0.15250703692436218,
-0.37802886962890625,
0.0320822112262249,
0.23906894028186798,
0.06523102521896362,
-0.23793630301952362,
-0.0189516544342041,
0.02283773012459278,
-0.16766339540481567,
0.12181078642606735,
0.14047271013259888,
-0.10900367796421051,
0.3879282772541046,
0.02125634253025055,
-0.2947583794593811,
-0.0011739758774638176,
-0.22856983542442322,
0.3797951340675354,
-0.0722542405128479,
0.23857086896896362,
0.0036154240369796753,
0.11349207162857056,
0.1495513916015625,
0.007726617157459259,
-0.11262161284685135,
0.16928139328956604,
-0.28532150387763977,
-0.34286990761756897,
0.025011368095874786,
-0.4184448719024658,
-0.04409029334783554,
0.4491518437862396,
-0.13170750439167023,
0.24372747540473938,
0.2775619924068451,
0.0486757829785347,
-0.332288533449173,
0.07883575558662415,
-0.054437894374132156,
0.11154352873563766,
0.4038606882095337,
0.12708978354930878,
-0.10675829648971558,
0.16759328544139862,
0.05051247030496597,
-0.38213932514190674,
-0.08912055939435959,
-0.010308324359357357,
-0.23484806716442108,
-0.17547909915447235,
0.4308587908744812,
0.302776575088501,
0.05664815381169319,
0.03260426223278046,
0.15958821773529053,
-0.03011108748614788,
-0.18425610661506653,
0.03501790016889572,
-0.04145655781030655,
-0.14211252331733704,
0.6241980195045471,
-0.3774673342704773,
-0.31871283054351807,
0.07014575600624084,
0.339997261762619,
0.33298587799072266,
-0.1036776751279831,
0.19172188639640808,
-0.13891378045082092,
-0.12366493791341782,
-0.034551363438367844,
-0.267680823802948,
0.007367858663201332,
-0.0277802012860775,
0.2534829378128052,
-0.17337502539157867,
-0.3788645267486572,
0.4051230549812317,
-0.20755735039710999,
-0.25728005170822144,
0.317949116230011,
-0.15065999329090118,
-0.4836181700229645,
-0.12183155119419098,
-0.15917019546031952,
-0.23664651811122894,
-0.15482787787914276,
-0.10627136379480362,
0.16384558379650116,
0.05159156769514084,
0.4303973913192749,
-0.1796063333749771,
0.11310765147209167,
0.2626270651817322,
0.3647848963737488,
0.22181501984596252,
-0.015519112348556519,
-0.2014387995004654,
-0.2010839879512787,
-0.0687255933880806,
0.06579111516475677,
-0.2165195792913437,
-0.08146081864833832,
-0.08489552140235901,
0.09003937989473343,
-0.05832947790622711,
-0.2730425298213959,
0.0024563889019191265,
-0.04115894436836243,
0.01184034626930952,
-0.2515135407447815,
0.25182896852493286,
0.19209390878677368,
-0.06698295474052429,
0.0760158821940422,
0.20264121890068054,
-0.1186470165848732,
0.05928793549537659,
0.269453763961792,
-0.29660189151763916,
0.05499431490898132,
0.17329180240631104,
0.5987299680709839,
0.19550834596157074,
-0.02535618469119072,
0.04093628376722336,
-0.3076389729976654,
-0.06192608177661896,
0.121331125497818,
0.21667394042015076,
-0.18755263090133667,
0.0512472428381443,
0.531578540802002,
0.2188348025083542,
0.137033149600029,
-0.08766784518957138,
0.1483955979347229,
0.05707092955708504,
0.14746113121509552,
-0.1897727996110916,
-0.15652813017368317,
0.5084590315818787,
0.35377171635627747,
0.12066170573234558,
0.23555845022201538,
0.09609408676624298,
-0.09738358110189438,
0.17497669160366058,
0.2224646806716919,
0.019147653132677078,
-0.4077450633049011,
0.34704023599624634,
0.12751322984695435,
0.2782144844532013,
0.3257119059562683,
0.4312991797924042,
-0.035789113491773605,
-0.3683529198169708,
0.41820234060287476,
0.11490130424499512,
0.3778512179851532,
0.10091858357191086,
0.022568698972463608,
0.15115663409233093,
-0.41511109471321106,
-0.11396494507789612,
0.058930978178977966,
-0.48957186937332153,
0.327009379863739,
0.08807460963726044,
-0.11331027001142502,
-0.205936461687088,
-0.27521926164627075,
-0.1264815330505371,
0.195593923330307,
-0.1536855697631836,
-0.30733004212379456,
-0.26856860518455505,
-0.22756579518318176,
0.10151761770248413,
-0.007408887147903442,
0.1308376044034958,
0.11352286487817764,
0.7485291957855225,
0.05090804398059845,
-0.26260536909103394,
-0.25671055912971497,
-0.5739127993583679,
-0.07554341107606888,
0.18073998391628265,
-0.17118239402770996,
0.20633520185947418,
-0.05953186750411987,
0.026829395443201065,
0.1472737193107605,
0.3225654065608978,
0.4239923655986786,
0.5518093109130859,
-0.3131810128688812,
-0.09604928642511368,
0.23548179864883423,
-0.009899172931909561,
-0.2895185947418213,
0.3817238509654999,
-0.002429567277431488,
0.23729325830936432,
-0.044592469930648804,
0.008887602016329765,
-0.011223109439015388,
-0.07071597874164581,
0.19948385655879974,
0.49296826124191284,
-0.018722455948591232,
0.5340995788574219,
0.0046153683215379715,
-0.037080466747283936,
0.19774141907691956,
0.011101558804512024,
-0.07733827829360962,
0.049736034125089645,
0.4786456227302551,
-0.34554973244667053,
0.37568891048431396,
0.1107141375541687,
0.01807255670428276,
0.16870330274105072,
-0.02500591054558754,
0.01444828137755394,
0.10648949444293976,
-0.21124383807182312,
-0.028922080993652344,
-0.4640720784664154,
-0.0518023744225502,
-0.15382163226604462,
0.2807559669017792,
-0.23196206986904144,
0.18630364537239075,
0.015014752745628357,
-0.01699862629175186,
0.21604350209236145,
-0.27532345056533813,
0.3044924736022949,
0.40299075841903687,
-0.4384748041629791,
0.04903726652264595,
0.04048900306224823,
-0.04924848675727844,
0.25534817576408386,
-0.40911588072776794,
0.20205335319042206,
-0.29184582829475403,
0.00019259750843048096,
-0.07730960845947266,
0.08744102716445923,
0.10853748023509979,
0.06673829257488251,
0.10918456315994263,
0.41538915038108826,
0.3302745819091797,
-0.15716120600700378,
0.2230183482170105,
-0.31907814741134644,
-0.01185528188943863,
-0.24054796993732452,
-0.029871851205825806,
-0.07082416117191315,
0.23773887753486633,
-0.403891921043396,
-0.02166667953133583,
-0.1479683816432953,
-0.028127171099185944,
-0.13762971758842468,
0.1710902601480484,
-0.13200853765010834,
-0.23497521877288818,
0.246354877948761,
0.07408693432807922,
-0.09791026264429092,
0.4094310700893402,
-0.000013537704944610596,
0.0932784453034401,
-0.2792413830757141,
-0.08772265911102295,
0.19823984801769257,
-0.46000605821609497,
-0.3866002559661865,
-0.6783804297447205,
0.40124741196632385,
-0.2589479982852936,
0.1490485668182373,
-0.06818075478076935,
-0.22367051243782043,
0.37565770745277405,
-0.29909685254096985,
-0.2412685602903366,
0.10056452453136444,
-0.11570513248443604,
-0.12945514917373657,
-0.13955014944076538,
-0.2513405978679657,
0.334596186876297,
-0.3961808979511261,
0.2359340488910675,
-0.10211296379566193
] |
https://github.com/huggingface/datasets/issues/5109 | Map caching not working for some class methods | The hash used for caching is computed by pickling recursively the function passed to `map`. Maybe some objects don't have the same hash across sessions. In particular you can check the hash of your model using
```python
from datasets.fingerprint import Hasher
obj = AutoModel.from_config(config=config, add_pooling_layer=False)
print(Hasher.hash(obj))
```
You can find mode info here: https://huggingface.co/docs/datasets/about_cache
You can also provide your own unique hash in `map` if you want, with the `new_fingerprint` argument | ## Describe the bug
The cache loading is not working as expected for some class methods with a model stored in an attribute.
The new fingerprint for `_map_single` is not the same at each run. The hasher generate a different hash for the class method.
This comes from `dumps` function in `datasets.utils.py_utils` which generates a different dump at each run.
## Steps to reproduce the bug
```python
from datasets import load_dataset
from transformers import AutoConfig, AutoModel, AutoTokenizer
dataset = load_dataset("ethos", "binary")
BASE_MODELNAME = "sentence-transformers/all-MiniLM-L6-v2"
class Object:
def __init__(self):
config = AutoConfig.from_pretrained(BASE_MODELNAME)
self.bert = AutoModel.from_config(config=config, add_pooling_layer=False)
self.tok = AutoTokenizer.from_pretrained(BASE_MODELNAME)
def tokenize(self, examples):
tokenized_texts = self.tok(
examples["text"],
padding="max_length",
truncation=True,
max_length=256,
)
return tokenized_texts
instance = Object()
result = dict()
for phase in ["train"]:
result[phase] = dataset[phase].map(instance.tokenize, batched=True, load_from_cache_file=True, num_proc=2)
```
## Expected results
Load cache instead of recompute result.
## Actual results
Result recomputed from scratch at each run.
The cache works fine when deleting `bert` attribute.
## Environment info
- `datasets` version: 2.5.3.dev0
- Platform: macOS-10.16-x86_64-i386-64bit
- Python version: 3.9.13
- PyArrow version: 7.0.0
- Pandas version: 1.5.0
| 71 | Map caching not working for some class methods
## Describe the bug
The cache loading is not working as expected for some class methods with a model stored in an attribute.
The new fingerprint for `_map_single` is not the same at each run. The hasher generate a different hash for the class method.
This comes from `dumps` function in `datasets.utils.py_utils` which generates a different dump at each run.
## Steps to reproduce the bug
```python
from datasets import load_dataset
from transformers import AutoConfig, AutoModel, AutoTokenizer
dataset = load_dataset("ethos", "binary")
BASE_MODELNAME = "sentence-transformers/all-MiniLM-L6-v2"
class Object:
def __init__(self):
config = AutoConfig.from_pretrained(BASE_MODELNAME)
self.bert = AutoModel.from_config(config=config, add_pooling_layer=False)
self.tok = AutoTokenizer.from_pretrained(BASE_MODELNAME)
def tokenize(self, examples):
tokenized_texts = self.tok(
examples["text"],
padding="max_length",
truncation=True,
max_length=256,
)
return tokenized_texts
instance = Object()
result = dict()
for phase in ["train"]:
result[phase] = dataset[phase].map(instance.tokenize, batched=True, load_from_cache_file=True, num_proc=2)
```
## Expected results
Load cache instead of recompute result.
## Actual results
Result recomputed from scratch at each run.
The cache works fine when deleting `bert` attribute.
## Environment info
- `datasets` version: 2.5.3.dev0
- Platform: macOS-10.16-x86_64-i386-64bit
- Python version: 3.9.13
- PyArrow version: 7.0.0
- Pandas version: 1.5.0
The hash used for caching is computed by pickling recursively the function passed to `map`. Maybe some objects don't have the same hash across sessions. In particular you can check the hash of your model using
```python
from datasets.fingerprint import Hasher
obj = AutoModel.from_config(config=config, add_pooling_layer=False)
print(Hasher.hash(obj))
```
You can find mode info here: https://huggingface.co/docs/datasets/about_cache
You can also provide your own unique hash in `map` if you want, with the `new_fingerprint` argument | [
0.06155886873602867,
-0.03430083394050598,
0.12326939404010773,
0.3316841125488281,
0.18914702534675598,
0.0026601552963256836,
0.5595555901527405,
0.2945951521396637,
0.2339777648448944,
-0.16494832932949066,
-0.1346816122531891,
0.5997434258460999,
-0.010526998899877071,
-0.44399595260620117,
-0.028614014387130737,
0.307791531085968,
0.14086490869522095,
0.11041989922523499,
0.007760457694530487,
-0.21573524177074432,
-0.06445930898189545,
0.0268916767090559,
-0.2028598189353943,
0.05274609103798866,
-0.4670531153678894,
0.06373868882656097,
-0.030756287276744843,
-0.2805422246456146,
0.12940944731235504,
-0.3205428719520569,
0.43790027499198914,
0.15798194706439972,
0.0178251713514328,
0.5526186227798462,
-0.00011793164594564587,
0.06806202232837677,
0.34811824560165405,
-0.038661085069179535,
0.07676516473293304,
0.1562112718820572,
-0.3572896718978882,
0.04855852574110031,
0.11141480505466461,
-0.19918306171894073,
-0.03387942165136337,
0.2767055630683899,
-0.07332263141870499,
-0.29779043793678284,
0.384915292263031,
0.05499354377388954,
0.18642885982990265,
-0.07803288847208023,
-0.08130989968776703,
0.14561308920383453,
0.08881311118602753,
0.03349277749657631,
-0.028445841744542122,
0.10523678362369537,
0.07325275987386703,
-0.22983968257904053,
-0.41430461406707764,
0.4340413212776184,
-0.07909049093723297,
0.04294201731681824,
0.3221190273761749,
0.22831855714321136,
0.3227609097957611,
-0.11803886294364929,
0.2145216166973114,
-0.02929585427045822,
0.25902068614959717,
-0.1233893558382988,
-0.4350217580795288,
-0.09228773415088654,
-0.2794142961502075,
0.08259512484073639,
0.3436867594718933,
-0.111864373087883,
0.16376566886901855,
0.059078752994537354,
-0.40254613757133484,
0.05833062902092934,
0.11551734805107117,
0.2106877565383911,
-0.014342967420816422,
0.14737936854362488,
-0.04239847883582115,
0.09560198336839676,
-0.09468437731266022,
-0.15240974724292755,
0.17839539051055908,
-0.3044140934944153,
-0.13450829684734344,
0.48703858256340027,
-0.2871546745300293,
-0.09427577257156372,
0.12130391597747803,
0.20100265741348267,
0.010526362806558609,
-0.12339623272418976,
0.211247980594635,
0.24957850575447083,
0.06836363673210144,
0.20066815614700317,
0.1555115431547165,
0.2638757526874542,
0.15421226620674133,
0.5328018069267273,
0.17496588826179504,
-0.01754443161189556,
-0.7388567924499512,
-0.07597790658473969,
-0.04383135586977005,
-0.02810250222682953,
0.8408010005950928,
0.015606810338795185,
-0.2262532114982605,
-0.27306580543518066,
0.31779423356056213,
-0.044421643018722534,
-0.33786338567733765,
-0.16323605179786682,
0.26430296897888184,
0.1987442970275879,
-0.04302569106221199,
0.30547767877578735,
-0.08202409744262695,
-0.04477270692586899,
-0.24288424849510193,
-0.04064984619617462,
-0.2819225788116455,
-0.12732359766960144,
-0.27876394987106323,
0.24924102425575256,
0.12206487357616425,
-0.09906807541847229,
0.21121591329574585,
0.09422419965267181,
-0.1021532416343689,
-0.40887463092803955,
0.01689591445028782,
-0.13856998085975647,
0.14347954094409943,
-0.021191347390413284,
-0.5158941149711609,
0.2639928460121155,
0.1414339542388916,
-0.01044020801782608,
-0.15333548188209534,
0.1540621519088745,
-0.4957059621810913,
-0.2642682194709778,
0.4201674163341522,
0.12433870136737823,
-0.14997141063213348,
-0.013229206204414368,
0.11410761624574661,
0.18033871054649353,
0.700809121131897,
-0.28031161427497864,
-0.005402013659477234,
-0.16684015095233917,
-0.39845937490463257,
-0.27773234248161316,
0.19274380803108215,
0.6279241442680359,
0.06352637708187103,
-0.40147310495376587,
-0.05092214420437813,
0.36991098523139954,
0.12403928488492966,
0.21080324053764343,
-0.2814292013645172,
0.238633394241333,
-0.15567807853221893,
0.19804568588733673,
0.3960317075252533,
-0.3477622866630554,
-0.8758484125137329,
0.13140612840652466,
0.2495492547750473,
0.1360635906457901,
-0.05573803931474686,
0.08063212037086487,
0.05957726389169693,
-0.21045725047588348,
0.10878720134496689,
-0.01614159345626831,
0.026771394535899162,
0.0021249745041131973,
-0.45374488830566406,
-0.11886989325284958,
-0.0032400116324424744,
0.03862353786826134,
0.19675791263580322,
0.16547274589538574,
0.13160687685012817,
0.12738700211048126,
0.08268901705741882,
0.06996990740299225,
0.13994057476520538,
0.10350010544061661,
0.19845226407051086,
-0.2788832187652588,
0.3040022850036621,
-0.02819189429283142,
-0.3095703125,
0.3479386270046234,
-0.31405165791511536,
-0.3966093063354492,
-0.15552769601345062,
-0.004091739654541016,
0.05704706907272339,
-0.21525433659553528,
-0.33489036560058594,
-0.34295347332954407,
0.04675669223070145,
-0.025296129286289215,
0.28675511479377747,
-0.22580774128437042,
-0.07683674246072769,
0.17247137427330017,
0.17640691995620728,
0.029643995687365532,
-0.048309359699487686,
0.07687242329120636,
0.05000812187790871,
-0.16101579368114471,
-0.4735662043094635,
-0.0630742534995079,
0.2817661762237549,
-0.08420953899621964,
-0.3778019845485687,
0.22343987226486206,
0.09348070621490479,
0.25835514068603516,
-0.12947025895118713,
0.19180572032928467,
0.164478600025177,
-0.06647855788469315,
0.14576004445552826,
0.08358265459537506,
0.1588875949382782,
-0.3187044560909271,
-0.004333958029747009,
0.40210121870040894,
0.3989575505256653,
0.10343387722969055,
-0.20117342472076416,
-0.14055022597312927,
-0.044069819152355194,
-0.018688365817070007,
0.06249494105577469,
-0.2558271884918213,
-0.055995289236307144,
0.004671525210142136,
0.5220059156417847,
0.33385366201400757,
0.16737839579582214,
0.03503432124853134,
0.4587230384349823,
0.12978027760982513,
0.036382779479026794,
0.05782656744122505,
-0.3054426312446594,
-0.3031826317310333,
-0.13873788714408875,
0.15004783868789673,
0.41211235523223877,
-0.08060824126005173,
0.05308202654123306,
-0.10592057555913925,
0.16810926795005798,
-0.04650367423892021,
0.11149892956018448,
-0.049765005707740784,
-0.023925434798002243,
0.13494107127189636,
0.12712697684764862,
0.11912261694669724,
-0.1345202922821045,
0.0704951137304306,
0.3644706904888153,
0.030279060825705528,
-0.11497551202774048,
0.11306936293840408,
-0.14004085958003998,
0.47942182421684265,
-0.15044958889484406,
-0.0980178564786911,
-0.04266459122300148,
-0.15674370527267456,
-0.10467749834060669,
0.09297904372215271,
0.12199194729328156,
0.3386109173297882,
-0.2877527177333832,
0.173513263463974,
0.08779501914978027,
-0.14486394822597504,
-0.365185409784317,
-0.28240731358528137,
-0.34900471568107605,
-0.12243568897247314,
0.06175833195447922,
-0.4940928518772125,
-0.2019178569316864,
0.11326877027750015,
-0.12248028814792633,
-0.019338855519890785,
-0.3521173298358917,
0.009206641465425491,
0.12638822197914124,
0.029845813289284706,
-0.13747364282608032,
-0.37859034538269043,
-0.19870297610759735,
0.11108104139566422,
0.5070838928222656,
-0.5938030481338501,
-0.055465348064899445,
0.11060595512390137,
0.1255824714899063,
-0.01980413682758808,
0.012105293571949005,
-0.008670985698699951,
-0.08200906217098236,
0.003096308559179306,
0.03880394250154495,
-0.08976210653781891,
0.08352628350257874,
0.37897786498069763,
-0.04648429900407791,
-0.030109211802482605,
-0.13153579831123352,
0.05039646476507187,
-0.27080386877059937,
-0.4685400724411011,
0.6391112804412842,
-0.05888201668858528,
-0.08797456324100494,
-0.1274050772190094,
-0.0240456685423851,
0.13093698024749756,
0.24665570259094238,
-0.3786427974700928,
-0.3336309492588043,
-0.16279107332229614,
0.042855437844991684,
0.11480046808719635,
-0.05812755227088928,
0.09338159114122391,
0.11863140761852264,
0.08743489533662796,
-0.09989525377750397,
-0.2409759908914566,
0.17868515849113464,
0.06476526707410812,
0.1226486936211586,
0.03472137451171875,
0.3120920956134796,
0.019778430461883545,
0.7929547429084778,
0.48790091276168823,
-0.2566363215446472,
0.09527283906936646,
0.1871119737625122,
-0.23769353330135345,
-0.13135087490081787,
-0.3095780313014984,
-0.06960144639015198,
-0.33002373576164246,
-0.22474154829978943,
0.1579063981771469,
0.24144327640533447,
-0.19363321363925934,
-0.11270330846309662,
0.08994409441947937,
-0.09768389165401459,
-0.3634316623210907,
-0.06568500399589539,
-0.3985666036605835,
0.1392120122909546,
-0.030272923409938812,
0.3522189259529114,
-0.4436310827732086,
-0.2384849488735199,
0.38488781452178955,
-0.044500932097435,
0.11664026975631714,
-0.07740845531225204,
0.004108797758817673,
0.172857865691185,
-0.2536189556121826,
0.2923678755760193,
0.02913171611726284,
0.24559363722801208,
-0.09182855486869812,
-0.030667727813124657,
0.08615660667419434,
0.14860932528972626,
0.5605372190475464,
-0.24501682817935944,
0.16989807784557343,
0.05930671468377113,
-0.306189626455307,
0.0011527333408594131,
-0.20875652134418488,
0.014982592314481735,
0.08722981065511703,
0.1438380777835846,
0.4800415635108948,
-0.09605686366558075,
-0.029543621465563774,
-0.3584385812282562,
-0.12429477274417877,
-0.17557761073112488,
-0.37057259678840637,
0.006287530064582825,
0.2603183388710022,
0.034024566411972046,
0.013263747096061707,
-0.0859002098441124,
-0.044950220733881,
0.30988168716430664,
-0.2745985686779022,
-0.16276368498802185,
-0.1766619086265564,
0.0952756255865097,
0.19742600619792938,
0.33979806303977966,
-0.1087859570980072,
0.3305969536304474,
0.2512910068035126,
-0.0895354300737381,
-0.0330597460269928,
0.46497321128845215,
-0.29766759276390076,
-0.24292510747909546,
-0.059385351836681366,
-0.13384972512722015,
0.01933102309703827,
0.1570730060338974,
-0.19093994796276093,
0.03809715062379837,
0.15337009727954865,
-0.1286054402589798,
-0.1194169744849205,
-0.1229335218667984,
0.1482919305562973,
0.23719458281993866,
-0.308691143989563,
-0.4224381148815155,
0.47991943359375,
0.18617111444473267,
-0.13338209688663483,
0.4701724052429199,
-0.5721489787101746,
-0.3979204297065735,
0.29872673749923706,
0.08870622515678406,
0.8457885980606079,
-0.08968867361545563,
0.07170326262712479,
-0.2270447313785553,
0.16275310516357422,
0.1835491955280304,
0.00854133814573288,
0.16584773361682892,
-0.3080374300479889,
-0.15280205011367798,
-0.0645381286740303,
-0.16169339418411255,
-0.053344354033470154,
0.4139009714126587,
-0.1194499135017395,
0.2966453731060028,
-0.17042776942253113,
0.6717292070388794,
0.17478206753730774,
-0.017233440652489662,
0.3760029971599579,
-0.19765065610408783,
-0.011647278442978859,
0.17701755464076996,
0.09367044270038605,
0.2869100272655487,
0.029327861964702606,
-0.096026211977005,
-0.08974960446357727,
-0.08701987564563751,
-0.025725804269313812,
0.3303728401660919,
-0.3540918529033661,
0.44052326679229736,
0.3716595768928528,
-0.026433855295181274,
0.08405891060829163,
0.18208615481853485,
0.00857381522655487,
-0.13806864619255066,
-0.11388809978961945,
0.18628977239131927,
0.32800811529159546,
0.4605838358402252,
-0.014212741516530514,
-0.17974087595939636,
0.2109798640012741,
0.1905200183391571,
-0.04349586367607117,
0.07901544123888016,
-0.21959485113620758,
-0.4155023694038391,
-0.06797797232866287,
0.14405934512615204,
0.2089623510837555,
-0.27617204189300537,
0.04745258018374443,
-0.28763875365257263,
-0.11737601459026337,
-0.17679665982723236,
0.12722764909267426,
0.3528367877006531,
-0.21727420389652252,
0.3486706018447876,
-0.19193682074546814,
-0.2778417468070984,
0.09120349586009979,
0.49301502108573914,
0.03634266555309296,
0.11461122334003448,
0.6128954887390137,
-0.30160489678382874,
-0.1477910280227661,
-0.10992854833602905,
-0.27354881167411804,
0.04315830394625664,
-0.3331568241119385,
0.15575961768627167,
-0.28748592734336853,
-0.05187016725540161,
0.14067666232585907,
0.035355955362319946,
0.22224092483520508,
0.24115365743637085,
-0.10128269344568253,
-0.35110706090927124,
-0.48884302377700806,
-0.2182263284921646,
-0.033115778118371964,
0.09243239462375641,
-0.19020217657089233,
-0.029546093195676804,
-0.09222938120365143,
0.5849628448486328,
-0.2563169598579407,
0.016811776906251907,
-0.05581433326005936,
0.002054685726761818,
-0.2410258948802948,
-0.09892547875642776,
0.26909637451171875,
-0.08984214067459106,
0.029867814853787422,
0.22022610902786255,
-0.20330733060836792,
-0.1568087935447693,
-0.10894237458705902,
0.1383105367422104,
0.21480488777160645,
-0.01619039848446846,
-0.08479943871498108,
0.07348448783159256,
0.13754038512706757,
-0.37772876024246216,
0.005266668274998665,
0.2290996015071869,
-0.001521572470664978,
0.20158438384532928,
0.422070175409317,
-0.03503064811229706,
-0.24302440881729126,
0.009441141039133072,
-0.2733515799045563,
-0.1361106038093567,
0.04516906663775444,
0.10754659026861191,
0.03832642361521721,
-0.008035823702812195,
-0.008941777981817722,
0.027428213506937027,
0.03976289927959442,
-0.04085402190685272,
0.3971517086029053,
-0.25933194160461426,
0.0206599198281765,
0.35658499598503113,
-0.08277492970228195,
0.21964094042778015,
-0.1041765883564949,
-0.2218661606311798,
0.0813416987657547,
0.17961227893829346,
-0.12747645378112793,
-0.13597168028354645,
0.2194068431854248,
0.19601938128471375,
-0.05553917586803436,
0.12744632363319397,
0.029631908982992172,
-0.1994176208972931,
0.013336129486560822,
0.03090924397110939,
0.35783642530441284,
-0.40547990798950195,
0.32770732045173645,
0.2510378658771515,
0.247345432639122,
0.3046182096004486,
0.7232329249382019,
0.1285339742898941,
-0.11509241908788681,
0.18493181467056274,
0.04108032211661339,
0.1379612237215042,
-0.04491673409938812,
0.2490231692790985,
-0.13936644792556763,
-0.3835047483444214,
0.11794660985469818,
0.28944554924964905,
-0.17420899868011475,
0.19719070196151733,
-0.10575219988822937,
0.24574187397956848,
-0.10133387893438339,
-0.16450834274291992,
-0.07399376481771469,
0.0719982162117958,
-0.16130828857421875,
-0.33821895718574524,
0.17772755026817322,
-0.18320026993751526,
-0.0008570477366447449,
0.03148678317666054,
-0.10429331660270691,
0.11694516241550446,
0.6052470207214355,
0.20715996623039246,
-0.02413862943649292,
-0.16051305830478668,
-0.3916276693344116,
0.13792148232460022,
0.6268928050994873,
-0.38234469294548035,
0.33258286118507385,
-0.4201676845550537,
-0.21624153852462769,
-0.007304072380065918,
0.1623188853263855,
0.20795880258083344,
0.4820035398006439,
-0.02340536192059517,
0.1852271407842636,
0.2196400761604309,
-0.002529677003622055,
-0.07818470895290375,
0.4617944061756134,
0.013430625200271606,
-0.5142109990119934,
-0.1322113424539566,
0.034565240144729614,
-0.1491083800792694,
0.055774617940187454,
-0.22302623093128204,
0.33370083570480347,
-0.15772399306297302,
0.6257854104042053,
0.051780685782432556,
-0.05212921276688576,
0.05447801202535629,
0.0710139274597168,
-0.08017779886722565,
-0.24603070318698883,
0.36343246698379517,
-0.11372172087430954,
0.260183185338974,
-0.0808686763048172,
0.0440840870141983,
0.0919896811246872,
0.2739071547985077,
0.37192603945732117,
-0.27467581629753113,
-0.4049486219882965,
0.21733291447162628,
-0.395943820476532,
0.4191797971725464,
-0.13717377185821533,
0.213200643658638,
0.04484109207987785,
0.1149342954158783,
-0.18078774213790894,
-0.3069666624069214,
0.14561238884925842,
-0.07209664583206177,
0.1351691633462906,
0.1525690257549286,
-0.2879619598388672,
0.16313832998275757,
-0.3806910514831543,
-0.007970742881298065,
0.21960772573947906,
-0.3705208897590637,
0.26319098472595215,
-0.05414336547255516,
0.06513150036334991,
0.025895848870277405,
-0.2912503480911255,
0.25096312165260315,
0.1900627166032791,
0.53700852394104,
0.15092112123966217,
0.14176329970359802,
0.1449003517627716,
0.1270422637462616,
-0.19319966435432434,
-0.09962092339992523,
-0.09634973853826523,
0.012719064950942993,
-0.19971847534179688,
0.14520485699176788,
-0.2300999015569687,
-0.15605485439300537,
-0.4426690936088562,
0.0076963454484939575,
-0.04447685927152634,
-0.4492548108100891,
-0.04406462609767914,
0.01912561245262623,
-0.14999936521053314,
0.0018573899287730455,
0.22567185759544373,
0.39418473839759827,
-0.19601485133171082,
0.22583545744419098,
-0.3477248549461365,
-0.18246090412139893,
0.3209458887577057,
-0.8052186965942383,
-0.28499603271484375,
-0.12351901829242706,
0.27315425872802734,
-0.25547969341278076,
0.018848640844225883,
-0.6661773920059204,
-0.19064000248908997,
0.4691675901412964,
-0.14024606347084045,
-0.33579427003860474,
-0.17253588140010834,
0.22287556529045105,
0.1469384729862213,
-0.20472808182239532,
0.3880305290222168,
0.05457625165581703,
0.053263694047927856,
0.11664433777332306,
-0.17728246748447418
] |
https://github.com/huggingface/datasets/issues/5109 | Map caching not working for some class methods | Indeed, the hash is changing. The `dumps` function serialize the model object in different ways because the model object is not deterministic
```python
from datasets.utils.py_utils import dumps
obj1 = AutoModel.from_config(config=config, add_pooling_layer=False)
obj2 = AutoModel.from_config(config=config, add_pooling_layer=False)
dumps(bert) == dumps(bert2). # False
```
> You can find mode info here: https://huggingface.co/docs/datasets/about_cache
>
> You can also provide your own unique hash in map if you want, with the new_fingerprint argument
Thanks, the doc is so helpful. Indeed, we can fix the hash and get cache hit using `new_fingerprint`. Closing the issue. | ## Describe the bug
The cache loading is not working as expected for some class methods with a model stored in an attribute.
The new fingerprint for `_map_single` is not the same at each run. The hasher generate a different hash for the class method.
This comes from `dumps` function in `datasets.utils.py_utils` which generates a different dump at each run.
## Steps to reproduce the bug
```python
from datasets import load_dataset
from transformers import AutoConfig, AutoModel, AutoTokenizer
dataset = load_dataset("ethos", "binary")
BASE_MODELNAME = "sentence-transformers/all-MiniLM-L6-v2"
class Object:
def __init__(self):
config = AutoConfig.from_pretrained(BASE_MODELNAME)
self.bert = AutoModel.from_config(config=config, add_pooling_layer=False)
self.tok = AutoTokenizer.from_pretrained(BASE_MODELNAME)
def tokenize(self, examples):
tokenized_texts = self.tok(
examples["text"],
padding="max_length",
truncation=True,
max_length=256,
)
return tokenized_texts
instance = Object()
result = dict()
for phase in ["train"]:
result[phase] = dataset[phase].map(instance.tokenize, batched=True, load_from_cache_file=True, num_proc=2)
```
## Expected results
Load cache instead of recompute result.
## Actual results
Result recomputed from scratch at each run.
The cache works fine when deleting `bert` attribute.
## Environment info
- `datasets` version: 2.5.3.dev0
- Platform: macOS-10.16-x86_64-i386-64bit
- Python version: 3.9.13
- PyArrow version: 7.0.0
- Pandas version: 1.5.0
| 89 | Map caching not working for some class methods
## Describe the bug
The cache loading is not working as expected for some class methods with a model stored in an attribute.
The new fingerprint for `_map_single` is not the same at each run. The hasher generate a different hash for the class method.
This comes from `dumps` function in `datasets.utils.py_utils` which generates a different dump at each run.
## Steps to reproduce the bug
```python
from datasets import load_dataset
from transformers import AutoConfig, AutoModel, AutoTokenizer
dataset = load_dataset("ethos", "binary")
BASE_MODELNAME = "sentence-transformers/all-MiniLM-L6-v2"
class Object:
def __init__(self):
config = AutoConfig.from_pretrained(BASE_MODELNAME)
self.bert = AutoModel.from_config(config=config, add_pooling_layer=False)
self.tok = AutoTokenizer.from_pretrained(BASE_MODELNAME)
def tokenize(self, examples):
tokenized_texts = self.tok(
examples["text"],
padding="max_length",
truncation=True,
max_length=256,
)
return tokenized_texts
instance = Object()
result = dict()
for phase in ["train"]:
result[phase] = dataset[phase].map(instance.tokenize, batched=True, load_from_cache_file=True, num_proc=2)
```
## Expected results
Load cache instead of recompute result.
## Actual results
Result recomputed from scratch at each run.
The cache works fine when deleting `bert` attribute.
## Environment info
- `datasets` version: 2.5.3.dev0
- Platform: macOS-10.16-x86_64-i386-64bit
- Python version: 3.9.13
- PyArrow version: 7.0.0
- Pandas version: 1.5.0
Indeed, the hash is changing. The `dumps` function serialize the model object in different ways because the model object is not deterministic
```python
from datasets.utils.py_utils import dumps
obj1 = AutoModel.from_config(config=config, add_pooling_layer=False)
obj2 = AutoModel.from_config(config=config, add_pooling_layer=False)
dumps(bert) == dumps(bert2). # False
```
> You can find mode info here: https://huggingface.co/docs/datasets/about_cache
>
> You can also provide your own unique hash in map if you want, with the new_fingerprint argument
Thanks, the doc is so helpful. Indeed, we can fix the hash and get cache hit using `new_fingerprint`. Closing the issue. | [
0.06064460799098015,
-0.0009960159659385681,
0.13304996490478516,
0.32389020919799805,
0.2014191597700119,
-0.009757772088050842,
0.6343293786048889,
0.294051855802536,
0.20974721014499664,
-0.16269390285015106,
-0.15033173561096191,
0.6095576882362366,
-0.004029073752462864,
-0.416095495223999,
-0.011091685853898525,
0.3047369420528412,
0.15452760457992554,
0.10255026072263718,
-0.00534462183713913,
-0.21927644312381744,
-0.02915205992758274,
0.04940764605998993,
-0.18628627061843872,
0.05342140793800354,
-0.46639829874038696,
0.07845726609230042,
-0.03137810528278351,
-0.2864028513431549,
0.13171501457691193,
-0.3463243246078491,
0.4196341931819916,
0.1761821061372757,
0.022215217351913452,
0.5592458248138428,
-0.00011914940841961652,
0.07885803282260895,
0.33344346284866333,
-0.037099190056324005,
0.06438842415809631,
0.15967904031276703,
-0.34115803241729736,
0.04578890651464462,
0.14890554547309875,
-0.17905475199222565,
-0.020229283720254898,
0.2907038927078247,
-0.0726732537150383,
-0.2664474844932556,
0.3811514377593994,
0.05746541544795036,
0.17515134811401367,
-0.08749228715896606,
-0.08990094810724258,
0.15289811789989471,
0.06384161859750748,
0.07726848870515823,
-0.030300648882985115,
0.13157226145267487,
0.05496229976415634,
-0.2053978443145752,
-0.3875087797641754,
0.44160786271095276,
-0.09214026480913162,
0.00728561170399189,
0.31688442826271057,
0.23136453330516815,
0.3672953248023987,
-0.08135760575532913,
0.23931467533111572,
-0.015384957194328308,
0.2675125300884247,
-0.1281893253326416,
-0.427997887134552,
-0.08642309904098511,
-0.28596067428588867,
0.07704824209213257,
0.36106857657432556,
-0.10320810973644257,
0.19346843659877777,
0.07056617736816406,
-0.39985814690589905,
0.0421687550842762,
0.11878976225852966,
0.19008561968803406,
-0.03177500143647194,
0.14271999895572662,
-0.050247274339199066,
0.09062201529741287,
-0.1312621533870697,
-0.14348521828651428,
0.16494040191173553,
-0.3003315329551697,
-0.15407980978488922,
0.46163079142570496,
-0.256504088640213,
-0.1102464497089386,
0.09731606394052505,
0.15715250372886658,
0.003774438053369522,
-0.10350367426872253,
0.2465171217918396,
0.26427367329597473,
0.07339978963136673,
0.1842402219772339,
0.15149728953838348,
0.2408113330602646,
0.17381250858306885,
0.4986962378025055,
0.1646645963191986,
0.013677362352609634,
-0.7320814728736877,
-0.11104277521371841,
-0.04603942483663559,
-0.014857035130262375,
0.8263317346572876,
0.02726122736930847,
-0.2019616663455963,
-0.27728188037872314,
0.38113516569137573,
-0.0574057400226593,
-0.3489663302898407,
-0.1533830314874649,
0.2327972799539566,
0.18083041906356812,
-0.038933489471673965,
0.3126579523086548,
-0.08771827071905136,
-0.018690939992666245,
-0.26442837715148926,
-0.04932989180088043,
-0.27592071890830994,
-0.14661550521850586,
-0.2819880247116089,
0.2366752326488495,
0.10974101722240448,
-0.09691926836967468,
0.1961108297109604,
0.1433672159910202,
-0.12119075655937195,
-0.4008983373641968,
0.006376942619681358,
-0.10474881529808044,
0.16479308903217316,
-0.03126459941267967,
-0.5098310112953186,
0.2699597179889679,
0.15334749221801758,
-0.06349778920412064,
-0.15932270884513855,
0.14968350529670715,
-0.48982858657836914,
-0.25194478034973145,
0.41087207198143005,
0.10604795068502426,
-0.12100177258253098,
-0.015155617147684097,
0.13589200377464294,
0.18851704895496368,
0.6988910436630249,
-0.3078320622444153,
0.013466335833072662,
-0.19805368781089783,
-0.37769976258277893,
-0.2835146486759186,
0.18877196311950684,
0.636757493019104,
0.022966977208852768,
-0.39168858528137207,
-0.020111555233597755,
0.35915759205818176,
0.08504465967416763,
0.16680888831615448,
-0.27548396587371826,
0.2049986720085144,
-0.1435691863298416,
0.20021416246891022,
0.37498265504837036,
-0.3604629933834076,
-0.8647035956382751,
0.14674539864063263,
0.2417474240064621,
0.13062849640846252,
-0.04943045228719711,
0.06343326717615128,
0.05757099762558937,
-0.18479005992412567,
0.09764015674591064,
-0.04107239097356796,
0.02900252304971218,
-0.0011478438973426819,
-0.43960392475128174,
-0.1270255744457245,
0.014127776026725769,
0.005933430045843124,
0.20623831450939178,
0.16318801045417786,
0.14184153079986572,
0.17421706020832062,
0.12659446895122528,
0.08405126631259918,
0.12711095809936523,
0.07905378937721252,
0.1701674610376358,
-0.2845531105995178,
0.312885046005249,
-0.02357804961502552,
-0.27901655435562134,
0.3211852014064789,
-0.3420001268386841,
-0.38514113426208496,
-0.17954815924167633,
-0.006689745932817459,
0.08201512694358826,
-0.22780121862888336,
-0.3108612596988678,
-0.3534969091415405,
0.03204841911792755,
-0.03323804587125778,
0.2701404094696045,
-0.2013864815235138,
-0.07234496623277664,
0.16715632379055023,
0.19302506744861603,
0.047689832746982574,
-0.0900806337594986,
0.08884624391794205,
0.06786898523569107,
-0.15150360763072968,
-0.5066007375717163,
-0.06297101825475693,
0.28282439708709717,
-0.08371663093566895,
-0.3827168047428131,
0.22463589906692505,
0.087872713804245,
0.2726280093193054,
-0.1400853395462036,
0.2206014096736908,
0.18440942466259003,
-0.05965122953057289,
0.1872340589761734,
0.09326469898223877,
0.12514549493789673,
-0.30475497245788574,
0.004296388477087021,
0.41178667545318604,
0.36553317308425903,
0.09757961332798004,
-0.20837725698947906,
-0.15391868352890015,
-0.013897759839892387,
-0.029788905754685402,
0.03238055109977722,
-0.2896394431591034,
-0.11046361923217773,
0.04274769872426987,
0.511797308921814,
0.33302611112594604,
0.1594671607017517,
0.06443116068840027,
0.4403040409088135,
0.12652619183063507,
0.00828620046377182,
0.05578741431236267,
-0.3474886119365692,
-0.3212457001209259,
-0.1538596898317337,
0.13951052725315094,
0.4189895987510681,
-0.08508534729480743,
0.052856385707855225,
-0.09209541976451874,
0.18879517912864685,
-0.07796864956617355,
0.1393285095691681,
-0.05074840784072876,
-0.06505784392356873,
0.1394425928592682,
0.1380029171705246,
0.10475695133209229,
-0.13833235204219818,
0.10838580131530762,
0.34958416223526,
0.01603797636926174,
-0.12287856638431549,
0.12844876945018768,
-0.18054065108299255,
0.5066922307014465,
-0.16519074141979218,
-0.11027274280786514,
-0.06462273001670837,
-0.1500522494316101,
-0.09716388583183289,
0.10157103836536407,
0.12227945029735565,
0.32808324694633484,
-0.2909039258956909,
0.17605027556419373,
0.08100992441177368,
-0.09569037705659866,
-0.35821279883384705,
-0.26600539684295654,
-0.36147841811180115,
-0.13198913633823395,
0.07294385135173798,
-0.4790467917919159,
-0.22521759569644928,
0.10969417542219162,
-0.1446382999420166,
-0.019648408517241478,
-0.37096211314201355,
0.00971086323261261,
0.14594030380249023,
0.05634727329015732,
-0.12546566128730774,
-0.3781599998474121,
-0.1666809469461441,
0.12932293117046356,
0.5007624626159668,
-0.5889407396316528,
-0.027456197887659073,
0.11735455691814423,
0.12196504324674606,
-0.01737116277217865,
0.009913139045238495,
-0.008065886795520782,
-0.11363611370325089,
0.02509964257478714,
0.04212913662195206,
-0.091756172478199,
0.09773692488670349,
0.40178605914115906,
-0.04201341047883034,
-0.04299136996269226,
-0.14946603775024414,
0.04087033122777939,
-0.2744612395763397,
-0.4954254627227783,
0.6199794411659241,
-0.07527115195989609,
-0.08733603358268738,
-0.12452659010887146,
-0.005350243300199509,
0.10611733049154282,
0.22273342311382294,
-0.3556603193283081,
-0.3332275152206421,
-0.13165967166423798,
0.018326178193092346,
0.1412230134010315,
-0.06616537272930145,
0.10232749581336975,
0.13649792969226837,
0.08916186541318893,
-0.0756290927529335,
-0.2171681672334671,
0.17949223518371582,
0.0576837956905365,
0.13160786032676697,
0.05518990755081177,
0.3194544017314911,
0.02076626941561699,
0.784339964389801,
0.45853450894355774,
-0.277015745639801,
0.06499822437763214,
0.1613067090511322,
-0.23667733371257782,
-0.148814857006073,
-0.32329264283180237,
-0.07926804572343826,
-0.34488317370414734,
-0.22972773015499115,
0.17816510796546936,
0.2507537007331848,
-0.1670471727848053,
-0.09540129452943802,
0.10105001926422119,
-0.09607814252376556,
-0.37666192650794983,
-0.03614892065525055,
-0.40189090371131897,
0.12757208943367004,
-0.014122110791504383,
0.3395078778266907,
-0.46335557103157043,
-0.24657684564590454,
0.4078438878059387,
-0.018654748797416687,
0.06153927370905876,
-0.07872703671455383,
-0.03150525689125061,
0.16779327392578125,
-0.24360162019729614,
0.3100218176841736,
0.035205237567424774,
0.2472362071275711,
-0.10543480515480042,
-0.05546581745147705,
0.08099324256181717,
0.14565938711166382,
0.5787771344184875,
-0.24873827397823334,
0.16727283596992493,
0.06806735694408417,
-0.3143715560436249,
-0.0029568541795015335,
-0.24078680574893951,
0.004937268793582916,
0.0772174820303917,
0.12366585433483124,
0.5003914833068848,
-0.07136434316635132,
-0.03835893049836159,
-0.3465821146965027,
-0.10869735479354858,
-0.20203953981399536,
-0.3512493371963501,
0.01885213330388069,
0.258739709854126,
0.02890784852206707,
0.011345162987709045,
-0.1240416020154953,
-0.06148131936788559,
0.3070710003376007,
-0.28937962651252747,
-0.1499009132385254,
-0.18105262517929077,
0.09010250121355057,
0.19756603240966797,
0.32427576184272766,
-0.09568051248788834,
0.28681105375289917,
0.27312955260276794,
-0.08406908810138702,
-0.029784230515360832,
0.4530413746833801,
-0.2940059006214142,
-0.23307818174362183,
-0.06276438385248184,
-0.16541552543640137,
0.015145041048526764,
0.20658284425735474,
-0.1800995022058487,
0.05521082505583763,
0.17381615936756134,
-0.13229714334011078,
-0.13396543264389038,
-0.11674357205629349,
0.15486809611320496,
0.23673252761363983,
-0.3014069199562073,
-0.41834893822669983,
0.48747241497039795,
0.1555342674255371,
-0.15364237129688263,
0.4367173910140991,
-0.6037210822105408,
-0.41379693150520325,
0.3163793087005615,
0.07779255509376526,
0.8774327039718628,
-0.06788790225982666,
0.09465795755386353,
-0.20974814891815186,
0.12582939863204956,
0.15829631686210632,
-0.007215965539216995,
0.157862588763237,
-0.3550647497177124,
-0.15442529320716858,
-0.08103987574577332,
-0.15337735414505005,
-0.04056563973426819,
0.41230595111846924,
-0.11659027636051178,
0.27110475301742554,
-0.20985588431358337,
0.669912576675415,
0.15854550898075104,
-0.0025503598153591156,
0.37196314334869385,
-0.18706165254116058,
-0.02070142701268196,
0.1670028418302536,
0.10867254436016083,
0.26738595962524414,
0.023243650794029236,
-0.10762756317853928,
-0.07615359127521515,
-0.09265656769275665,
-0.019826017320156097,
0.32770100235939026,
-0.3353657126426697,
0.44039154052734375,
0.39415687322616577,
-0.021718017756938934,
0.06799376010894775,
0.16422848403453827,
0.03792620822787285,
-0.1230323314666748,
-0.10552388429641724,
0.17252366244792938,
0.31265702843666077,
0.47692665457725525,
0.0012781161349266768,
-0.18158912658691406,
0.21219629049301147,
0.2120535671710968,
-0.042459242045879364,
0.0425892248749733,
-0.19661417603492737,
-0.4004485011100769,
-0.06732834130525589,
0.10408841073513031,
0.2237451672554016,
-0.30620506405830383,
0.04613880440592766,
-0.33216696977615356,
-0.10588061809539795,
-0.17130012810230255,
0.11293137073516846,
0.3354055881500244,
-0.20708274841308594,
0.3349834680557251,
-0.17159444093704224,
-0.27661213278770447,
0.10480101406574249,
0.5077125430107117,
0.02817179635167122,
0.09624837338924408,
0.635053277015686,
-0.27068161964416504,
-0.13389712572097778,
-0.1055128276348114,
-0.25345876812934875,
0.06079615280032158,
-0.3204846680164337,
0.16300468146800995,
-0.2827152907848358,
-0.047993145883083344,
0.12950868904590607,
0.03373738378286362,
0.2281275987625122,
0.23451703786849976,
-0.1075085699558258,
-0.32281848788261414,
-0.47753429412841797,
-0.2030191570520401,
-0.017225302755832672,
0.10373920947313309,
-0.16367217898368835,
-0.023395422846078873,
-0.10663922876119614,
0.5875241756439209,
-0.24224846065044403,
0.058711275458335876,
-0.0066218748688697815,
0.0071052927523851395,
-0.25106462836265564,
-0.11662857979536057,
0.2613096237182617,
-0.11064930260181427,
0.024988023564219475,
0.20658470690250397,
-0.20679423213005066,
-0.14922410249710083,
-0.14121682941913605,
0.1430654078722,
0.22202762961387634,
-0.02320043370127678,
-0.07584318518638611,
0.08432374149560928,
0.16642296314239502,
-0.35475343465805054,
0.022216375917196274,
0.23697036504745483,
-0.012937486171722412,
0.19169974327087402,
0.4258710443973541,
-0.022794559597969055,
-0.24373002350330353,
0.000916752964258194,
-0.27464812994003296,
-0.11319977045059204,
0.0754215195775032,
0.10231082141399384,
0.014866327866911888,
-0.0063209012150764465,
-0.0388522669672966,
0.08168778568506241,
0.048217643052339554,
-0.0382363423705101,
0.3995833396911621,
-0.23683159053325653,
0.020444992929697037,
0.36116552352905273,
-0.10342704504728317,
0.20840506255626678,
-0.09900873899459839,
-0.23525401949882507,
0.0755881518125534,
0.16918396949768066,
-0.1060963124036789,
-0.1222643330693245,
0.2175094485282898,
0.1767095923423767,
-0.09752510488033295,
0.12254546582698822,
0.0686546266078949,
-0.18666240572929382,
-0.008364319801330566,
0.04355543851852417,
0.3827366828918457,
-0.4151921272277832,
0.3380019962787628,
0.27656516432762146,
0.19519497454166412,
0.32584649324417114,
0.7555464506149292,
0.09575212001800537,
-0.14027032256126404,
0.1832447499036789,
0.03976966440677643,
0.12018317729234695,
-0.003810916095972061,
0.24566514790058136,
-0.15320295095443726,
-0.3812997043132782,
0.12187917530536652,
0.28939616680145264,
-0.17964741587638855,
0.21728184819221497,
-0.0685117244720459,
0.2852872312068939,
-0.09920256584882736,
-0.18002600967884064,
-0.07013650238513947,
0.08679887652397156,
-0.16669031977653503,
-0.3813159763813019,
0.15992066264152527,
-0.2009996920824051,
-0.024813000112771988,
0.05760421231389046,
-0.12893551588058472,
0.1323694884777069,
0.6403282880783081,
0.22389620542526245,
-0.022119782865047455,
-0.1934065818786621,
-0.3943890929222107,
0.11564807593822479,
0.6056867241859436,
-0.3874737620353699,
0.3088546097278595,
-0.3997378349304199,
-0.20006868243217468,
0.020659100264310837,
0.1599605679512024,
0.21274398267269135,
0.4810277819633484,
-0.003049597144126892,
0.16508471965789795,
0.21193534135818481,
0.027476882562041283,
-0.048779696226119995,
0.44069239497184753,
0.033467646688222885,
-0.4956895709037781,
-0.1690240502357483,
0.03488890826702118,
-0.13904599845409393,
0.06416488438844681,
-0.21538962423801422,
0.32783108949661255,
-0.14604951441287994,
0.6484530568122864,
0.08710695803165436,
-0.042031385004520416,
0.050577353686094284,
0.05049103498458862,
-0.09027445316314697,
-0.26547014713287354,
0.3974498510360718,
-0.10109512507915497,
0.2575051784515381,
-0.07002786546945572,
0.03800336271524429,
0.13933365046977997,
0.2594614028930664,
0.36913812160491943,
-0.31883570551872253,
-0.38760921359062195,
0.26329606771469116,
-0.3861488997936249,
0.4209195077419281,
-0.11232905089855194,
0.23668047785758972,
0.015520691871643066,
0.12934111058712006,
-0.16107159852981567,
-0.32332509756088257,
0.14130155742168427,
-0.10903804749250412,
0.15088286995887756,
0.15090736746788025,
-0.2712344527244568,
0.21965067088603973,
-0.38022279739379883,
0.02614288590848446,
0.19988617300987244,
-0.3653055727481842,
0.2708744406700134,
-0.06316035240888596,
0.04957182705402374,
0.030975833535194397,
-0.30722957849502563,
0.25742316246032715,
0.15989075601100922,
0.5470666885375977,
0.16182444989681244,
0.14313535392284393,
0.16076913475990295,
0.09630849212408066,
-0.18417051434516907,
-0.09666115790605545,
-0.11483529210090637,
0.021127965301275253,
-0.22609162330627441,
0.17817598581314087,
-0.22071336209774017,
-0.15652020275592804,
-0.4447881579399109,
-0.0030098422430455685,
-0.06276191025972366,
-0.43987753987312317,
-0.09602530300617218,
0.03215421736240387,
-0.14004918932914734,
-0.007757270708680153,
0.22539694607257843,
0.416481077671051,
-0.1845097541809082,
0.2382635921239853,
-0.3289412260055542,
-0.1945490837097168,
0.3107803165912628,
-0.8245007395744324,
-0.31732842326164246,
-0.1302524358034134,
0.2825806140899658,
-0.2954941391944885,
0.037400178611278534,
-0.6765150427818298,
-0.20670372247695923,
0.44853475689888,
-0.16365566849708557,
-0.32041555643081665,
-0.16426493227481842,
0.235934779047966,
0.12413382530212402,
-0.22335316240787506,
0.36872047185897827,
0.07752815634012222,
0.04996493458747864,
0.07793080806732178,
-0.1918991208076477
] |
https://github.com/huggingface/datasets/issues/5105 | Specifying an exisiting folder in download_and_prepare deletes everything in it | Thanks for reporting, @cakiki.
I would say the deletion of the dir is an expected behavior though... | ## Describe the bug
The builder correctly creates the `output_dir` folder if it doesn't exist, but if the folder exists everything within it is deleted. Specifying `"."` as the `output_dir` deletes everything in your current dir but also leads to **another bug** whose traceback is the following:
```
Traceback (most recent call last)
Input In [11], in <cell line: 1>()
----> 1 rotten_tomatoes_builder.download_and_prepare(output_dir=".", max_shard_size="200MB", file_format="parquet")
File ~/BIGSCIENCE/env/lib/python3.9/site-packages/datasets/builder.py:818, in download_and_prepare(self, output_dir, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, file_format, max_shard_size, storage_options, **download_and_prepare_kwargs)
File /usr/lib/python3.9/contextlib.py:124, in _GeneratorContextManager.__exit__(self, type, value, traceback)
122 if type is None:
123 try:
--> 124 next(self.gen)
125 except StopIteration:
126 return False
File ~/BIGSCIENCE/env/lib/python3.9/site-packages/datasets/builder.py:760, in incomplete_dir(dirname)
File /usr/lib/python3.9/shutil.py:722, in rmtree(path, ignore_errors, onerror)
720 os.rmdir(path)
721 except OSError:
--> 722 onerror(os.rmdir, path, sys.exc_info())
723 else:
724 try:
725 # symlinks to directories are forbidden, see bug #1669
File /usr/lib/python3.9/shutil.py:720, in rmtree(path, ignore_errors, onerror)
718 _rmtree_safe_fd(fd, path, onerror)
719 try:
--> 720 os.rmdir(path)
721 except OSError:
722 onerror(os.rmdir, path, sys.exc_info())
OSError: [Errno 22] Invalid argument: '/home/christopher/BIGSCIENCE/.'
```
## Steps to reproduce the bug
```python
rotten_tomatoes_builder = load_dataset_builder("rotten_tomatoes")
rotten_tomatoes_builder.download_and_prepare(output_dir="./test_folder", max_shard_size="200MB", file_format="parquet")
```
If `test_folder` contains any files they will all be deleted
## Expected results
Either a warning that all files will be deleted, but preferably that they not be deleted at all.
## Actual results
N/A
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.3.2
- Platform: Linux-5.15.0-48-generic-x86_64-with-glibc2.29
- Python version: 3.8.10
- PyArrow version: 8.0.0
- Pandas version: 1.4.3
| 17 | Specifying an exisiting folder in download_and_prepare deletes everything in it
## Describe the bug
The builder correctly creates the `output_dir` folder if it doesn't exist, but if the folder exists everything within it is deleted. Specifying `"."` as the `output_dir` deletes everything in your current dir but also leads to **another bug** whose traceback is the following:
```
Traceback (most recent call last)
Input In [11], in <cell line: 1>()
----> 1 rotten_tomatoes_builder.download_and_prepare(output_dir=".", max_shard_size="200MB", file_format="parquet")
File ~/BIGSCIENCE/env/lib/python3.9/site-packages/datasets/builder.py:818, in download_and_prepare(self, output_dir, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, file_format, max_shard_size, storage_options, **download_and_prepare_kwargs)
File /usr/lib/python3.9/contextlib.py:124, in _GeneratorContextManager.__exit__(self, type, value, traceback)
122 if type is None:
123 try:
--> 124 next(self.gen)
125 except StopIteration:
126 return False
File ~/BIGSCIENCE/env/lib/python3.9/site-packages/datasets/builder.py:760, in incomplete_dir(dirname)
File /usr/lib/python3.9/shutil.py:722, in rmtree(path, ignore_errors, onerror)
720 os.rmdir(path)
721 except OSError:
--> 722 onerror(os.rmdir, path, sys.exc_info())
723 else:
724 try:
725 # symlinks to directories are forbidden, see bug #1669
File /usr/lib/python3.9/shutil.py:720, in rmtree(path, ignore_errors, onerror)
718 _rmtree_safe_fd(fd, path, onerror)
719 try:
--> 720 os.rmdir(path)
721 except OSError:
722 onerror(os.rmdir, path, sys.exc_info())
OSError: [Errno 22] Invalid argument: '/home/christopher/BIGSCIENCE/.'
```
## Steps to reproduce the bug
```python
rotten_tomatoes_builder = load_dataset_builder("rotten_tomatoes")
rotten_tomatoes_builder.download_and_prepare(output_dir="./test_folder", max_shard_size="200MB", file_format="parquet")
```
If `test_folder` contains any files they will all be deleted
## Expected results
Either a warning that all files will be deleted, but preferably that they not be deleted at all.
## Actual results
N/A
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.3.2
- Platform: Linux-5.15.0-48-generic-x86_64-with-glibc2.29
- Python version: 3.8.10
- PyArrow version: 8.0.0
- Pandas version: 1.4.3
Thanks for reporting, @cakiki.
I would say the deletion of the dir is an expected behavior though... | [
-0.27821946144104004,
0.437811017036438,
-0.09798125922679901,
0.33214181661605835,
0.39338529109954834,
-0.18040987849235535,
-0.07301931083202362,
0.35373541712760925,
-0.07171329110860825,
0.32459384202957153,
-0.22473783791065216,
0.25985389947891235,
-0.1422298401594162,
-0.0067804232239723206,
-0.009657534770667553,
0.03759331256151199,
-0.016081370413303375,
0.10384690016508102,
-0.40833598375320435,
-0.06699532270431519,
-0.15724694728851318,
0.25157931447029114,
0.1184065192937851,
-0.029605276882648468,
-0.261800080537796,
0.01089823804795742,
-0.10896656662225723,
0.38250094652175903,
-0.36246222257614136,
-0.3260248899459839,
0.05615644156932831,
0.06622530519962311,
0.036981213837862015,
0.6268475651741028,
-0.00011124436423415318,
0.05587778985500336,
0.3338559865951538,
-0.19133631885051727,
-0.6521346569061279,
-0.27187150716781616,
-0.23772889375686646,
0.046018086373806,
-0.05052240937948227,
0.20483607053756714,
0.27532491087913513,
-0.1693984568119049,
-0.05017969012260437,
0.13309472799301147,
0.014295414090156555,
0.4034768342971802,
0.22657299041748047,
0.04654259979724884,
0.1291816085577011,
-0.07561501860618591,
0.40211063623428345,
0.4149652123451233,
-0.13438598811626434,
0.18408222496509552,
0.0778721272945404,
0.10692984610795975,
-0.09993178397417068,
-0.05719659850001335,
0.028647692874073982,
-0.11965091526508331,
0.18301166594028473,
0.207594096660614,
0.5200475454330444,
-0.46067583560943604,
0.011885231360793114,
0.08693993091583252,
0.2767429053783417,
-0.24470409750938416,
-0.32144394516944885,
-0.20625972747802734,
-0.02355603128671646,
-0.45910030603408813,
0.1091858521103859,
0.28665706515312195,
-0.39833498001098633,
0.025500457733869553,
-0.201943501830101,
0.056352969259023666,
-0.1362726092338562,
0.12528440356254578,
0.2771435081958771,
0.38343581557273865,
-0.05414365231990814,
-0.0561489462852478,
-0.08009719848632812,
0.25494861602783203,
0.34398069977760315,
-0.506132960319519,
0.06434391438961029,
0.11739680171012878,
0.12222747504711151,
-0.02310122363269329,
0.08581916987895966,
0.20204228162765503,
0.024602986872196198,
0.3016294240951538,
0.11907331645488739,
-0.22657418251037598,
0.20176216959953308,
0.04834825545549393,
0.232242614030838,
0.3369772732257843,
-0.1833416223526001,
0.209466353058815,
0.21873119473457336,
0.5351457595825195,
0.07956428825855255,
-0.03394981473684311,
0.06905634701251984,
-0.17323336005210876,
-0.07409735023975372,
0.1269586682319641,
0.20527857542037964,
0.11256425082683563,
-0.3237599730491638,
-0.11690487712621689,
0.15382790565490723,
-0.035582102835178375,
0.14566999673843384,
0.34053167700767517,
-0.18378324806690216,
-0.05507297068834305,
-0.07310651242733002,
0.3646031618118286,
-0.04721147194504738,
0.12304875999689102,
-0.19625155627727509,
0.1941324770450592,
-0.2652837336063385,
-0.1442999392747879,
0.10307803750038147,
-0.20970958471298218,
0.44572657346725464,
0.11371424049139023,
0.20203402638435364,
-0.23591673374176025,
-0.22324666380882263,
0.06484556198120117,
0.21142923831939697,
0.3496602475643158,
0.005144760012626648,
0.029494406655430794,
-0.15123634040355682,
-0.3786497712135315,
-0.08048339188098907,
0.22949913144111633,
0.022696781903505325,
-0.4166105091571808,
-0.09178988635540009,
0.29611673951148987,
0.046288661658763885,
0.11309505254030228,
-0.004870988428592682,
-0.2593807280063629,
0.1646026372909546,
0.1734655797481537,
0.05677192285656929,
-0.06901365518569946,
0.07584856450557709,
-0.20032432675361633,
0.16631650924682617,
0.2262287735939026,
-0.166026309132576,
-0.07430244237184525,
-0.5036726593971252,
-0.07052262127399445,
0.21246206760406494,
0.1655179113149643,
-0.057723477482795715,
0.4968222677707672,
-0.4122900366783142,
-0.2583751082420349,
0.7255463600158691,
-0.1325162649154663,
-0.2513323128223419,
0.403478741645813,
-0.22411081194877625,
0.22243312001228333,
0.15507814288139343,
0.07778812199831009,
0.06086894869804382,
-0.21448072791099548,
-0.15176573395729065,
0.05523134768009186,
-0.011666635051369667,
-0.02467728778719902,
-0.3284969925880432,
-0.10303010791540146,
-0.24863143265247345,
-0.25306379795074463,
0.25100621581077576,
0.2394876778125763,
-0.2189207673072815,
-0.316677987575531,
0.5237343311309814,
0.18957263231277466,
0.19846372306346893,
-0.1380736231803894,
0.31514063477516174,
0.08645743876695633,
-0.19606557488441467,
0.03799423575401306,
-0.06031306833028793,
0.22423610091209412,
-0.6051806211471558,
0.0010551735758781433,
-0.2567427158355713,
-0.2444789707660675,
-0.39511969685554504,
0.14641569554805756,
-0.30302318930625916,
-0.45241430401802063,
0.21619431674480438,
0.298564076423645,
0.2918778657913208,
-0.11969681084156036,
-0.2974589765071869,
-0.18313831090927124,
-0.09706401824951172,
0.1882358342409134,
0.22363629937171936,
0.03589359670877457,
-0.38231268525123596,
-0.2535121440887451,
-0.08900755643844604,
0.11218786239624023,
0.019028939306735992,
-0.12431951612234116,
0.0780961662530899,
0.4383176565170288,
-0.18054074048995972,
-0.009960249066352844,
-0.10780329257249832,
-0.17965881526470184,
0.04701872915029526,
0.3553707003593445,
0.025849387049674988,
0.3869059979915619,
0.17288626730442047,
0.2292594611644745,
0.05448026582598686,
0.21401746571063995,
-0.15071769058704376,
0.26966485381126404,
0.2264494150876999,
-0.3002842962741852,
0.002460336312651634,
0.07469487190246582,
0.20842167735099792,
-0.38007017970085144,
0.0719139575958252,
0.2674199342727661,
0.15378104150295258,
0.1537178009748459,
0.25727778673171997,
-0.07645107060670853,
0.14416354894638062,
-0.11215445399284363,
-0.16314923763275146,
0.22529485821723938,
0.013837821781635284,
-0.2777000665664673,
-0.2411109209060669,
0.21525554358959198,
0.6397190093994141,
-0.022224735468626022,
0.19065497815608978,
-0.005020841956138611,
0.16776873171329498,
-0.3391660749912262,
0.37859296798706055,
0.17564848065376282,
0.08966159075498581,
0.5621708035469055,
0.16208887100219727,
-0.10048145800828934,
-0.38990318775177,
-0.10866837203502655,
0.01236148551106453,
0.06794122606515884,
-0.012928765267133713,
0.14822566509246826,
-0.07106881588697433,
-0.09556204080581665,
-0.06804069131612778,
-0.22207903861999512,
0.0810139924287796,
-0.3955824673175812,
0.2931942343711853,
0.11253264546394348,
-0.40969574451446533,
0.20015692710876465,
0.17473040521144867,
0.032342299818992615,
-0.16509279608726501,
-0.10735974460840225,
-0.15833202004432678,
0.02736566960811615,
-0.1527414321899414,
0.10408668220043182,
0.13924948871135712,
-0.49609121680259705,
0.03595674782991409,
-0.1259843111038208,
-0.31623226404190063,
-0.14306622743606567,
0.13794785737991333,
0.22351817786693573,
0.031964100897312164,
0.4501151144504547,
0.324503093957901,
0.011975415050983429,
0.45100200176239014,
-0.3471708595752716,
0.14397135376930237,
-0.12754420936107635,
0.09450536221265793,
0.02817787602543831,
0.16263508796691895,
-0.08068542927503586,
-0.2871217429637909,
-0.20923826098442078,
0.02014501951634884,
-0.38894933462142944,
0.04358075559139252,
0.31773966550827026,
0.12885746359825134,
-0.2108224630355835,
0.24821937084197998,
-0.12175065279006958,
-0.17357055842876434,
0.3501370847225189,
-0.11007396131753922,
-0.4587409794330597,
0.2025245875120163,
-0.17565637826919556,
-0.17311479151248932,
-0.025116607546806335,
-0.16470986604690552,
0.39513781666755676,
-0.322077214717865,
-0.33784544467926025,
0.25375956296920776,
-0.2356879562139511,
0.08409756422042847,
0.2399500161409378,
0.15099689364433289,
0.2559373378753662,
0.03286729007959366,
-0.19533416628837585,
-0.016715489327907562,
0.1379948854446411,
0.12042325735092163,
0.13446611166000366,
0.22386397421360016,
-0.1394059658050537,
-0.09926746040582657,
-0.06716414541006088,
0.6975774765014648,
0.20427535474300385,
0.017678769305348396,
0.2689792513847351,
0.07082098722457886,
0.5678977370262146,
-0.20028695464134216,
-0.03931570053100586,
-0.08735721558332443,
-0.03410431742668152,
-0.33744287490844727,
0.330739289522171,
0.17851603031158447,
-0.007744176313281059,
-0.16166165471076965,
0.14950908720493317,
-0.07714828848838806,
-0.27792003750801086,
0.08422985672950745,
0.07961513102054596,
-0.2086443305015564,
0.12114086747169495,
0.043006397783756256,
0.2552351951599121,
0.002101665362715721,
0.06790482997894287,
0.3803640604019165,
0.3864595890045166,
-0.08101525157690048,
0.24264301359653473,
-0.016308365389704704,
-0.06899755448102951,
0.035011254251003265,
0.20428669452667236,
-0.34587565064430237,
0.1379816234111786,
-0.22213542461395264,
0.11556156724691391,
-0.0042582168243825436,
0.3973209857940674,
0.02961435541510582,
-0.1292356699705124,
-0.04083414375782013,
0.010641563683748245,
-0.16009920835494995,
-0.15927734971046448,
-0.0994337797164917,
-0.06293594092130661,
0.03055698797106743,
-0.20349285006523132,
-0.17408829927444458,
-0.07466822117567062,
0.161384716629982,
0.3369930386543274,
-0.07910081744194031,
-0.2654877007007599,
-0.3585684597492218,
-0.294656366109848,
-0.3246013820171356,
0.04049212485551834,
0.1264999806880951,
0.027490733191370964,
-0.13332337141036987,
-0.13500171899795532,
0.24248163402080536,
-0.13860511779785156,
0.02647395431995392,
-0.16274809837341309,
0.2882135808467865,
-0.2817825973033905,
-0.14494068920612335,
-0.3768092393875122,
-0.05792421102523804,
0.20376162230968475,
0.38251742720603943,
-0.3298737704753876,
0.12108513712882996,
0.07895685732364655,
-0.15298157930374146,
0.267098993062973,
0.514724850654602,
-0.19240088760852814,
-0.21312829852104187,
-0.23131728172302246,
0.09601473808288574,
-0.22758890688419342,
0.07805944979190826,
0.44253817200660706,
-0.3501623868942261,
0.32716092467308044,
-0.2014603614807129,
0.458589643239975,
-0.1664382815361023,
-0.13572734594345093,
0.1230720579624176,
-0.04292689263820648,
-0.3342525064945221,
0.3389207124710083,
-0.028576046228408813,
0.9157615303993225,
0.38601088523864746,
0.44093817472457886,
0.1750502586364746,
-0.03574492782354355,
0.1409476101398468,
-0.10865253955125809,
0.3385414481163025,
-0.243693009018898,
-0.046873170882463455,
0.07213610410690308,
-0.06666673719882965,
-0.11485729366540909,
-0.015896223485469818,
-0.09001736342906952,
0.430454820394516,
-0.6516679525375366,
0.4213300347328186,
-0.0912514477968216,
0.24172279238700867,
-0.4007604420185089,
-0.09045533835887909,
-0.026153050363063812,
0.11652033030986786,
0.35568124055862427,
0.2823549807071686,
-0.22845971584320068,
0.1383417695760727,
0.07599055767059326,
0.07026001811027527,
-0.1725652813911438,
0.05263161659240723,
-0.26264896988868713,
0.07069012522697449,
0.022114470601081848,
-0.12400158494710922,
-0.23850832879543304,
0.32830169796943665,
-0.07248741388320923,
0.24304266273975372,
0.16762536764144897,
0.14017850160598755,
0.40054795145988464,
0.1836313009262085,
0.021153872832655907,
-0.004454080015420914,
0.07997895032167435,
-0.13373996317386627,
0.04392615705728531,
0.0969603955745697,
-0.23075543344020844,
0.3665078282356262,
-0.1826682835817337,
-0.12745018303394318,
0.1969512403011322,
-0.5401639342308044,
-0.12558874487876892,
-0.22033792734146118,
-0.208805650472641,
-0.29001355171203613,
0.15446917712688446,
0.013741742819547653,
-0.24213677644729614,
0.008958198130130768,
-0.009090878069400787,
-0.301262229681015,
-0.3334777057170868,
-0.008522219955921173,
0.11426688730716705,
0.06619498133659363,
0.25279471278190613,
-0.19777195155620575,
-0.2751310467720032,
-0.3393304646015167,
-0.026532530784606934,
-0.2918674349784851,
-0.37268784642219543,
0.5063014626502991,
0.0714680626988411,
-0.10902085155248642,
-0.0671001672744751,
0.3733953535556793,
0.21150484681129456,
0.17778435349464417,
-0.2745482325553894,
0.08513385057449341,
-0.09969350695610046,
-0.005782067775726318,
0.20017676055431366,
0.3597211241722107,
-0.5607548952102661,
0.03387684002518654,
0.08911927789449692,
-0.042631350457668304,
-0.3639194667339325,
-0.10939492285251617,
-0.10021845251321793,
0.20759880542755127,
-0.17889171838760376,
0.1207137331366539,
0.24979627132415771,
0.04497295990586281,
0.14695091545581818,
0.10165135562419891,
-0.13608777523040771,
-0.201307475566864,
-0.18910440802574158,
0.14075759053230286,
0.012582441791892052,
-0.029694760218262672,
0.09100539237260818,
0.18394902348518372,
-0.006896374747157097,
-0.17461112141609192,
0.48359930515289307,
-0.127045139670372,
0.10294479131698608,
0.009269083850085735,
0.06417533755302429,
-0.12545379996299744,
-0.20486541092395782,
-0.12146762013435364,
-0.4467935860157013,
0.4464651346206665,
0.284619003534317,
-0.07187766581773758,
-0.0447542667388916,
-0.16581036150455475,
0.09650817513465881,
0.09676215052604675,
-0.1687604933977127,
0.3687521815299988,
0.4450603425502777,
-0.06899753212928772,
-0.10396099090576172,
-0.2593567371368408,
0.41088730096817017,
0.34791651368141174,
0.0076769618317484856,
-0.17154560983181,
0.0894131138920784,
0.2628985345363617,
-0.17300519347190857,
0.08474414050579071,
-0.5597090721130371,
-0.022139858454465866,
0.12519751489162445,
0.3754635751247406,
-0.05477744713425636,
-0.2786834239959717,
-0.17623580992221832,
0.27553868293762207,
0.21806035935878754,
-0.16065174341201782,
0.1508193463087082,
0.28244906663894653,
-0.08879012614488602,
0.3114747703075409,
0.15699684619903564,
-0.020290344953536987,
-0.01103518158197403,
0.16456179320812225,
-0.41210347414016724,
0.2526043653488159,
-0.3032665252685547,
-0.15250518918037415,
0.03662519529461861,
-0.09994204342365265,
0.21529772877693176,
0.31965795159339905,
-0.19011157751083374,
0.09110160171985626,
0.11519093066453934,
0.09501007944345474,
-0.22857773303985596,
0.2695878744125366,
-0.16621828079223633,
0.1842535138130188,
-0.2699583172798157,
-0.2574930489063263,
-0.20619723200798035,
-0.4245535433292389,
-0.1352434903383255,
0.08766742050647736,
0.11510799825191498,
-0.058123379945755005,
0.0052006542682647705,
0.2751913070678711,
-0.12826599180698395,
-0.10683836042881012,
0.3213598430156708,
-0.1574452519416809,
0.10096962004899979,
-0.2918878495693207,
0.14172708988189697,
0.4772270917892456,
0.18594369292259216,
-0.19506630301475525,
0.0015861205756664276,
0.5850268602371216,
0.24886275827884674,
-0.271427184343338,
-0.12646043300628662,
-0.041886091232299805,
-0.12493471801280975,
-0.21340486407279968,
0.16258041560649872,
0.06543745845556259,
0.18711484968662262,
0.10559876263141632,
0.1875285804271698,
-0.1858900785446167,
0.07889896631240845,
0.4173631966114044,
0.23505181074142456,
-0.017120810225605965,
0.65129154920578,
0.16149789094924927,
-0.08169911801815033,
-0.1418481469154358,
0.0459759496152401,
-0.4098568260669708,
-0.3293796479701996,
0.21283800899982452,
-0.3754694163799286,
0.25562140345573425,
-0.023073416203260422,
0.11355696618556976,
0.1284535825252533,
0.36420467495918274,
0.13155905902385712,
-0.29825714230537415,
-0.5083574056625366,
0.08592583239078522,
-0.15494012832641602,
-0.018416576087474823,
0.09645670652389526,
0.059299319982528687,
-0.3999486565589905,
0.30282631516456604,
-0.20936083793640137,
0.2329225093126297,
0.04224330186843872,
0.15607666969299316,
-0.2077760100364685,
0.037227991968393326,
-0.2552059590816498,
-0.02985471859574318,
-0.23327644169330597,
0.10392176359891891,
0.1580425649881363,
-0.34905701875686646,
-0.1145382821559906,
-0.7524122595787048,
0.1466265320777893,
0.09981376677751541,
-0.10913754999637604,
0.4259904623031616,
0.17686350643634796,
0.18167820572853088,
0.03707074373960495,
-0.07601490616798401,
-0.3977448046207428,
-0.456383615732193,
-0.14543169736862183,
-0.0264079961925745,
-0.29685869812965393,
-0.1529839038848877,
0.1301264464855194,
0.28314438462257385,
-0.22389820218086243,
0.17000490427017212,
-0.44942086935043335,
0.20976774394512177,
0.2200476974248886,
0.14679360389709473,
-0.1004149317741394,
-0.12934577465057373,
-0.07628367841243744,
0.13978369534015656,
0.2785826027393341,
-0.023109182715415955,
-0.08821502327919006,
0.08189035207033157,
-0.372352659702301,
-0.46809741854667664,
0.702512800693512,
0.25799232721328735,
-0.34948351979255676,
-0.26903313398361206,
0.16746558248996735,
0.17681241035461426,
0.09664154797792435,
-0.22371229529380798,
0.2065865695476532,
0.20715881884098053,
0.053190164268016815,
-0.15928567945957184,
0.027527112513780594,
-0.33509698510169983,
0.1122158020734787,
-0.014119178056716919,
0.32999640703201294,
0.09553319215774536,
-0.32929185032844543,
-0.13305042684078217,
-0.3149959444999695
] |
https://github.com/huggingface/datasets/issues/5105 | Specifying an exisiting folder in download_and_prepare deletes everything in it | Thank you both for your feedback!
@albertvillanova I think I might have have the wrong mental model of what the function was meant to do. I thought it would be an API similar to the pandas `to_XX` write methods (Like the one @lhoestq mentions) so I just assumed it would download the dataframe to whichever folder I specififed (`"./"` in my case) so I could load it into a dask dataframe. I absolutely did not expect it to delete everything in my local directory, including the script where I called it from :smile:
I think Quentin's proposed solution sounds like a reasonable feature! | ## Describe the bug
The builder correctly creates the `output_dir` folder if it doesn't exist, but if the folder exists everything within it is deleted. Specifying `"."` as the `output_dir` deletes everything in your current dir but also leads to **another bug** whose traceback is the following:
```
Traceback (most recent call last)
Input In [11], in <cell line: 1>()
----> 1 rotten_tomatoes_builder.download_and_prepare(output_dir=".", max_shard_size="200MB", file_format="parquet")
File ~/BIGSCIENCE/env/lib/python3.9/site-packages/datasets/builder.py:818, in download_and_prepare(self, output_dir, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, file_format, max_shard_size, storage_options, **download_and_prepare_kwargs)
File /usr/lib/python3.9/contextlib.py:124, in _GeneratorContextManager.__exit__(self, type, value, traceback)
122 if type is None:
123 try:
--> 124 next(self.gen)
125 except StopIteration:
126 return False
File ~/BIGSCIENCE/env/lib/python3.9/site-packages/datasets/builder.py:760, in incomplete_dir(dirname)
File /usr/lib/python3.9/shutil.py:722, in rmtree(path, ignore_errors, onerror)
720 os.rmdir(path)
721 except OSError:
--> 722 onerror(os.rmdir, path, sys.exc_info())
723 else:
724 try:
725 # symlinks to directories are forbidden, see bug #1669
File /usr/lib/python3.9/shutil.py:720, in rmtree(path, ignore_errors, onerror)
718 _rmtree_safe_fd(fd, path, onerror)
719 try:
--> 720 os.rmdir(path)
721 except OSError:
722 onerror(os.rmdir, path, sys.exc_info())
OSError: [Errno 22] Invalid argument: '/home/christopher/BIGSCIENCE/.'
```
## Steps to reproduce the bug
```python
rotten_tomatoes_builder = load_dataset_builder("rotten_tomatoes")
rotten_tomatoes_builder.download_and_prepare(output_dir="./test_folder", max_shard_size="200MB", file_format="parquet")
```
If `test_folder` contains any files they will all be deleted
## Expected results
Either a warning that all files will be deleted, but preferably that they not be deleted at all.
## Actual results
N/A
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.3.2
- Platform: Linux-5.15.0-48-generic-x86_64-with-glibc2.29
- Python version: 3.8.10
- PyArrow version: 8.0.0
- Pandas version: 1.4.3
| 103 | Specifying an exisiting folder in download_and_prepare deletes everything in it
## Describe the bug
The builder correctly creates the `output_dir` folder if it doesn't exist, but if the folder exists everything within it is deleted. Specifying `"."` as the `output_dir` deletes everything in your current dir but also leads to **another bug** whose traceback is the following:
```
Traceback (most recent call last)
Input In [11], in <cell line: 1>()
----> 1 rotten_tomatoes_builder.download_and_prepare(output_dir=".", max_shard_size="200MB", file_format="parquet")
File ~/BIGSCIENCE/env/lib/python3.9/site-packages/datasets/builder.py:818, in download_and_prepare(self, output_dir, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, file_format, max_shard_size, storage_options, **download_and_prepare_kwargs)
File /usr/lib/python3.9/contextlib.py:124, in _GeneratorContextManager.__exit__(self, type, value, traceback)
122 if type is None:
123 try:
--> 124 next(self.gen)
125 except StopIteration:
126 return False
File ~/BIGSCIENCE/env/lib/python3.9/site-packages/datasets/builder.py:760, in incomplete_dir(dirname)
File /usr/lib/python3.9/shutil.py:722, in rmtree(path, ignore_errors, onerror)
720 os.rmdir(path)
721 except OSError:
--> 722 onerror(os.rmdir, path, sys.exc_info())
723 else:
724 try:
725 # symlinks to directories are forbidden, see bug #1669
File /usr/lib/python3.9/shutil.py:720, in rmtree(path, ignore_errors, onerror)
718 _rmtree_safe_fd(fd, path, onerror)
719 try:
--> 720 os.rmdir(path)
721 except OSError:
722 onerror(os.rmdir, path, sys.exc_info())
OSError: [Errno 22] Invalid argument: '/home/christopher/BIGSCIENCE/.'
```
## Steps to reproduce the bug
```python
rotten_tomatoes_builder = load_dataset_builder("rotten_tomatoes")
rotten_tomatoes_builder.download_and_prepare(output_dir="./test_folder", max_shard_size="200MB", file_format="parquet")
```
If `test_folder` contains any files they will all be deleted
## Expected results
Either a warning that all files will be deleted, but preferably that they not be deleted at all.
## Actual results
N/A
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.3.2
- Platform: Linux-5.15.0-48-generic-x86_64-with-glibc2.29
- Python version: 3.8.10
- PyArrow version: 8.0.0
- Pandas version: 1.4.3
Thank you both for your feedback!
@albertvillanova I think I might have have the wrong mental model of what the function was meant to do. I thought it would be an API similar to the pandas `to_XX` write methods (Like the one @lhoestq mentions) so I just assumed it would download the dataframe to whichever folder I specififed (`"./"` in my case) so I could load it into a dask dataframe. I absolutely did not expect it to delete everything in my local directory, including the script where I called it from :smile:
I think Quentin's proposed solution sounds like a reasonable feature! | [
-0.27821946144104004,
0.437811017036438,
-0.09798125922679901,
0.33214181661605835,
0.39338529109954834,
-0.18040987849235535,
-0.07301931083202362,
0.35373541712760925,
-0.07171329110860825,
0.32459384202957153,
-0.22473783791065216,
0.25985389947891235,
-0.1422298401594162,
-0.0067804232239723206,
-0.009657534770667553,
0.03759331256151199,
-0.016081370413303375,
0.10384690016508102,
-0.40833598375320435,
-0.06699532270431519,
-0.15724694728851318,
0.25157931447029114,
0.1184065192937851,
-0.029605276882648468,
-0.261800080537796,
0.01089823804795742,
-0.10896656662225723,
0.38250094652175903,
-0.36246222257614136,
-0.3260248899459839,
0.05615644156932831,
0.06622530519962311,
0.036981213837862015,
0.6268475651741028,
-0.00011124436423415318,
0.05587778985500336,
0.3338559865951538,
-0.19133631885051727,
-0.6521346569061279,
-0.27187150716781616,
-0.23772889375686646,
0.046018086373806,
-0.05052240937948227,
0.20483607053756714,
0.27532491087913513,
-0.1693984568119049,
-0.05017969012260437,
0.13309472799301147,
0.014295414090156555,
0.4034768342971802,
0.22657299041748047,
0.04654259979724884,
0.1291816085577011,
-0.07561501860618591,
0.40211063623428345,
0.4149652123451233,
-0.13438598811626434,
0.18408222496509552,
0.0778721272945404,
0.10692984610795975,
-0.09993178397417068,
-0.05719659850001335,
0.028647692874073982,
-0.11965091526508331,
0.18301166594028473,
0.207594096660614,
0.5200475454330444,
-0.46067583560943604,
0.011885231360793114,
0.08693993091583252,
0.2767429053783417,
-0.24470409750938416,
-0.32144394516944885,
-0.20625972747802734,
-0.02355603128671646,
-0.45910030603408813,
0.1091858521103859,
0.28665706515312195,
-0.39833498001098633,
0.025500457733869553,
-0.201943501830101,
0.056352969259023666,
-0.1362726092338562,
0.12528440356254578,
0.2771435081958771,
0.38343581557273865,
-0.05414365231990814,
-0.0561489462852478,
-0.08009719848632812,
0.25494861602783203,
0.34398069977760315,
-0.506132960319519,
0.06434391438961029,
0.11739680171012878,
0.12222747504711151,
-0.02310122363269329,
0.08581916987895966,
0.20204228162765503,
0.024602986872196198,
0.3016294240951538,
0.11907331645488739,
-0.22657418251037598,
0.20176216959953308,
0.04834825545549393,
0.232242614030838,
0.3369772732257843,
-0.1833416223526001,
0.209466353058815,
0.21873119473457336,
0.5351457595825195,
0.07956428825855255,
-0.03394981473684311,
0.06905634701251984,
-0.17323336005210876,
-0.07409735023975372,
0.1269586682319641,
0.20527857542037964,
0.11256425082683563,
-0.3237599730491638,
-0.11690487712621689,
0.15382790565490723,
-0.035582102835178375,
0.14566999673843384,
0.34053167700767517,
-0.18378324806690216,
-0.05507297068834305,
-0.07310651242733002,
0.3646031618118286,
-0.04721147194504738,
0.12304875999689102,
-0.19625155627727509,
0.1941324770450592,
-0.2652837336063385,
-0.1442999392747879,
0.10307803750038147,
-0.20970958471298218,
0.44572657346725464,
0.11371424049139023,
0.20203402638435364,
-0.23591673374176025,
-0.22324666380882263,
0.06484556198120117,
0.21142923831939697,
0.3496602475643158,
0.005144760012626648,
0.029494406655430794,
-0.15123634040355682,
-0.3786497712135315,
-0.08048339188098907,
0.22949913144111633,
0.022696781903505325,
-0.4166105091571808,
-0.09178988635540009,
0.29611673951148987,
0.046288661658763885,
0.11309505254030228,
-0.004870988428592682,
-0.2593807280063629,
0.1646026372909546,
0.1734655797481537,
0.05677192285656929,
-0.06901365518569946,
0.07584856450557709,
-0.20032432675361633,
0.16631650924682617,
0.2262287735939026,
-0.166026309132576,
-0.07430244237184525,
-0.5036726593971252,
-0.07052262127399445,
0.21246206760406494,
0.1655179113149643,
-0.057723477482795715,
0.4968222677707672,
-0.4122900366783142,
-0.2583751082420349,
0.7255463600158691,
-0.1325162649154663,
-0.2513323128223419,
0.403478741645813,
-0.22411081194877625,
0.22243312001228333,
0.15507814288139343,
0.07778812199831009,
0.06086894869804382,
-0.21448072791099548,
-0.15176573395729065,
0.05523134768009186,
-0.011666635051369667,
-0.02467728778719902,
-0.3284969925880432,
-0.10303010791540146,
-0.24863143265247345,
-0.25306379795074463,
0.25100621581077576,
0.2394876778125763,
-0.2189207673072815,
-0.316677987575531,
0.5237343311309814,
0.18957263231277466,
0.19846372306346893,
-0.1380736231803894,
0.31514063477516174,
0.08645743876695633,
-0.19606557488441467,
0.03799423575401306,
-0.06031306833028793,
0.22423610091209412,
-0.6051806211471558,
0.0010551735758781433,
-0.2567427158355713,
-0.2444789707660675,
-0.39511969685554504,
0.14641569554805756,
-0.30302318930625916,
-0.45241430401802063,
0.21619431674480438,
0.298564076423645,
0.2918778657913208,
-0.11969681084156036,
-0.2974589765071869,
-0.18313831090927124,
-0.09706401824951172,
0.1882358342409134,
0.22363629937171936,
0.03589359670877457,
-0.38231268525123596,
-0.2535121440887451,
-0.08900755643844604,
0.11218786239624023,
0.019028939306735992,
-0.12431951612234116,
0.0780961662530899,
0.4383176565170288,
-0.18054074048995972,
-0.009960249066352844,
-0.10780329257249832,
-0.17965881526470184,
0.04701872915029526,
0.3553707003593445,
0.025849387049674988,
0.3869059979915619,
0.17288626730442047,
0.2292594611644745,
0.05448026582598686,
0.21401746571063995,
-0.15071769058704376,
0.26966485381126404,
0.2264494150876999,
-0.3002842962741852,
0.002460336312651634,
0.07469487190246582,
0.20842167735099792,
-0.38007017970085144,
0.0719139575958252,
0.2674199342727661,
0.15378104150295258,
0.1537178009748459,
0.25727778673171997,
-0.07645107060670853,
0.14416354894638062,
-0.11215445399284363,
-0.16314923763275146,
0.22529485821723938,
0.013837821781635284,
-0.2777000665664673,
-0.2411109209060669,
0.21525554358959198,
0.6397190093994141,
-0.022224735468626022,
0.19065497815608978,
-0.005020841956138611,
0.16776873171329498,
-0.3391660749912262,
0.37859296798706055,
0.17564848065376282,
0.08966159075498581,
0.5621708035469055,
0.16208887100219727,
-0.10048145800828934,
-0.38990318775177,
-0.10866837203502655,
0.01236148551106453,
0.06794122606515884,
-0.012928765267133713,
0.14822566509246826,
-0.07106881588697433,
-0.09556204080581665,
-0.06804069131612778,
-0.22207903861999512,
0.0810139924287796,
-0.3955824673175812,
0.2931942343711853,
0.11253264546394348,
-0.40969574451446533,
0.20015692710876465,
0.17473040521144867,
0.032342299818992615,
-0.16509279608726501,
-0.10735974460840225,
-0.15833202004432678,
0.02736566960811615,
-0.1527414321899414,
0.10408668220043182,
0.13924948871135712,
-0.49609121680259705,
0.03595674782991409,
-0.1259843111038208,
-0.31623226404190063,
-0.14306622743606567,
0.13794785737991333,
0.22351817786693573,
0.031964100897312164,
0.4501151144504547,
0.324503093957901,
0.011975415050983429,
0.45100200176239014,
-0.3471708595752716,
0.14397135376930237,
-0.12754420936107635,
0.09450536221265793,
0.02817787602543831,
0.16263508796691895,
-0.08068542927503586,
-0.2871217429637909,
-0.20923826098442078,
0.02014501951634884,
-0.38894933462142944,
0.04358075559139252,
0.31773966550827026,
0.12885746359825134,
-0.2108224630355835,
0.24821937084197998,
-0.12175065279006958,
-0.17357055842876434,
0.3501370847225189,
-0.11007396131753922,
-0.4587409794330597,
0.2025245875120163,
-0.17565637826919556,
-0.17311479151248932,
-0.025116607546806335,
-0.16470986604690552,
0.39513781666755676,
-0.322077214717865,
-0.33784544467926025,
0.25375956296920776,
-0.2356879562139511,
0.08409756422042847,
0.2399500161409378,
0.15099689364433289,
0.2559373378753662,
0.03286729007959366,
-0.19533416628837585,
-0.016715489327907562,
0.1379948854446411,
0.12042325735092163,
0.13446611166000366,
0.22386397421360016,
-0.1394059658050537,
-0.09926746040582657,
-0.06716414541006088,
0.6975774765014648,
0.20427535474300385,
0.017678769305348396,
0.2689792513847351,
0.07082098722457886,
0.5678977370262146,
-0.20028695464134216,
-0.03931570053100586,
-0.08735721558332443,
-0.03410431742668152,
-0.33744287490844727,
0.330739289522171,
0.17851603031158447,
-0.007744176313281059,
-0.16166165471076965,
0.14950908720493317,
-0.07714828848838806,
-0.27792003750801086,
0.08422985672950745,
0.07961513102054596,
-0.2086443305015564,
0.12114086747169495,
0.043006397783756256,
0.2552351951599121,
0.002101665362715721,
0.06790482997894287,
0.3803640604019165,
0.3864595890045166,
-0.08101525157690048,
0.24264301359653473,
-0.016308365389704704,
-0.06899755448102951,
0.035011254251003265,
0.20428669452667236,
-0.34587565064430237,
0.1379816234111786,
-0.22213542461395264,
0.11556156724691391,
-0.0042582168243825436,
0.3973209857940674,
0.02961435541510582,
-0.1292356699705124,
-0.04083414375782013,
0.010641563683748245,
-0.16009920835494995,
-0.15927734971046448,
-0.0994337797164917,
-0.06293594092130661,
0.03055698797106743,
-0.20349285006523132,
-0.17408829927444458,
-0.07466822117567062,
0.161384716629982,
0.3369930386543274,
-0.07910081744194031,
-0.2654877007007599,
-0.3585684597492218,
-0.294656366109848,
-0.3246013820171356,
0.04049212485551834,
0.1264999806880951,
0.027490733191370964,
-0.13332337141036987,
-0.13500171899795532,
0.24248163402080536,
-0.13860511779785156,
0.02647395431995392,
-0.16274809837341309,
0.2882135808467865,
-0.2817825973033905,
-0.14494068920612335,
-0.3768092393875122,
-0.05792421102523804,
0.20376162230968475,
0.38251742720603943,
-0.3298737704753876,
0.12108513712882996,
0.07895685732364655,
-0.15298157930374146,
0.267098993062973,
0.514724850654602,
-0.19240088760852814,
-0.21312829852104187,
-0.23131728172302246,
0.09601473808288574,
-0.22758890688419342,
0.07805944979190826,
0.44253817200660706,
-0.3501623868942261,
0.32716092467308044,
-0.2014603614807129,
0.458589643239975,
-0.1664382815361023,
-0.13572734594345093,
0.1230720579624176,
-0.04292689263820648,
-0.3342525064945221,
0.3389207124710083,
-0.028576046228408813,
0.9157615303993225,
0.38601088523864746,
0.44093817472457886,
0.1750502586364746,
-0.03574492782354355,
0.1409476101398468,
-0.10865253955125809,
0.3385414481163025,
-0.243693009018898,
-0.046873170882463455,
0.07213610410690308,
-0.06666673719882965,
-0.11485729366540909,
-0.015896223485469818,
-0.09001736342906952,
0.430454820394516,
-0.6516679525375366,
0.4213300347328186,
-0.0912514477968216,
0.24172279238700867,
-0.4007604420185089,
-0.09045533835887909,
-0.026153050363063812,
0.11652033030986786,
0.35568124055862427,
0.2823549807071686,
-0.22845971584320068,
0.1383417695760727,
0.07599055767059326,
0.07026001811027527,
-0.1725652813911438,
0.05263161659240723,
-0.26264896988868713,
0.07069012522697449,
0.022114470601081848,
-0.12400158494710922,
-0.23850832879543304,
0.32830169796943665,
-0.07248741388320923,
0.24304266273975372,
0.16762536764144897,
0.14017850160598755,
0.40054795145988464,
0.1836313009262085,
0.021153872832655907,
-0.004454080015420914,
0.07997895032167435,
-0.13373996317386627,
0.04392615705728531,
0.0969603955745697,
-0.23075543344020844,
0.3665078282356262,
-0.1826682835817337,
-0.12745018303394318,
0.1969512403011322,
-0.5401639342308044,
-0.12558874487876892,
-0.22033792734146118,
-0.208805650472641,
-0.29001355171203613,
0.15446917712688446,
0.013741742819547653,
-0.24213677644729614,
0.008958198130130768,
-0.009090878069400787,
-0.301262229681015,
-0.3334777057170868,
-0.008522219955921173,
0.11426688730716705,
0.06619498133659363,
0.25279471278190613,
-0.19777195155620575,
-0.2751310467720032,
-0.3393304646015167,
-0.026532530784606934,
-0.2918674349784851,
-0.37268784642219543,
0.5063014626502991,
0.0714680626988411,
-0.10902085155248642,
-0.0671001672744751,
0.3733953535556793,
0.21150484681129456,
0.17778435349464417,
-0.2745482325553894,
0.08513385057449341,
-0.09969350695610046,
-0.005782067775726318,
0.20017676055431366,
0.3597211241722107,
-0.5607548952102661,
0.03387684002518654,
0.08911927789449692,
-0.042631350457668304,
-0.3639194667339325,
-0.10939492285251617,
-0.10021845251321793,
0.20759880542755127,
-0.17889171838760376,
0.1207137331366539,
0.24979627132415771,
0.04497295990586281,
0.14695091545581818,
0.10165135562419891,
-0.13608777523040771,
-0.201307475566864,
-0.18910440802574158,
0.14075759053230286,
0.012582441791892052,
-0.029694760218262672,
0.09100539237260818,
0.18394902348518372,
-0.006896374747157097,
-0.17461112141609192,
0.48359930515289307,
-0.127045139670372,
0.10294479131698608,
0.009269083850085735,
0.06417533755302429,
-0.12545379996299744,
-0.20486541092395782,
-0.12146762013435364,
-0.4467935860157013,
0.4464651346206665,
0.284619003534317,
-0.07187766581773758,
-0.0447542667388916,
-0.16581036150455475,
0.09650817513465881,
0.09676215052604675,
-0.1687604933977127,
0.3687521815299988,
0.4450603425502777,
-0.06899753212928772,
-0.10396099090576172,
-0.2593567371368408,
0.41088730096817017,
0.34791651368141174,
0.0076769618317484856,
-0.17154560983181,
0.0894131138920784,
0.2628985345363617,
-0.17300519347190857,
0.08474414050579071,
-0.5597090721130371,
-0.022139858454465866,
0.12519751489162445,
0.3754635751247406,
-0.05477744713425636,
-0.2786834239959717,
-0.17623580992221832,
0.27553868293762207,
0.21806035935878754,
-0.16065174341201782,
0.1508193463087082,
0.28244906663894653,
-0.08879012614488602,
0.3114747703075409,
0.15699684619903564,
-0.020290344953536987,
-0.01103518158197403,
0.16456179320812225,
-0.41210347414016724,
0.2526043653488159,
-0.3032665252685547,
-0.15250518918037415,
0.03662519529461861,
-0.09994204342365265,
0.21529772877693176,
0.31965795159339905,
-0.19011157751083374,
0.09110160171985626,
0.11519093066453934,
0.09501007944345474,
-0.22857773303985596,
0.2695878744125366,
-0.16621828079223633,
0.1842535138130188,
-0.2699583172798157,
-0.2574930489063263,
-0.20619723200798035,
-0.4245535433292389,
-0.1352434903383255,
0.08766742050647736,
0.11510799825191498,
-0.058123379945755005,
0.0052006542682647705,
0.2751913070678711,
-0.12826599180698395,
-0.10683836042881012,
0.3213598430156708,
-0.1574452519416809,
0.10096962004899979,
-0.2918878495693207,
0.14172708988189697,
0.4772270917892456,
0.18594369292259216,
-0.19506630301475525,
0.0015861205756664276,
0.5850268602371216,
0.24886275827884674,
-0.271427184343338,
-0.12646043300628662,
-0.041886091232299805,
-0.12493471801280975,
-0.21340486407279968,
0.16258041560649872,
0.06543745845556259,
0.18711484968662262,
0.10559876263141632,
0.1875285804271698,
-0.1858900785446167,
0.07889896631240845,
0.4173631966114044,
0.23505181074142456,
-0.017120810225605965,
0.65129154920578,
0.16149789094924927,
-0.08169911801815033,
-0.1418481469154358,
0.0459759496152401,
-0.4098568260669708,
-0.3293796479701996,
0.21283800899982452,
-0.3754694163799286,
0.25562140345573425,
-0.023073416203260422,
0.11355696618556976,
0.1284535825252533,
0.36420467495918274,
0.13155905902385712,
-0.29825714230537415,
-0.5083574056625366,
0.08592583239078522,
-0.15494012832641602,
-0.018416576087474823,
0.09645670652389526,
0.059299319982528687,
-0.3999486565589905,
0.30282631516456604,
-0.20936083793640137,
0.2329225093126297,
0.04224330186843872,
0.15607666969299316,
-0.2077760100364685,
0.037227991968393326,
-0.2552059590816498,
-0.02985471859574318,
-0.23327644169330597,
0.10392176359891891,
0.1580425649881363,
-0.34905701875686646,
-0.1145382821559906,
-0.7524122595787048,
0.1466265320777893,
0.09981376677751541,
-0.10913754999637604,
0.4259904623031616,
0.17686350643634796,
0.18167820572853088,
0.03707074373960495,
-0.07601490616798401,
-0.3977448046207428,
-0.456383615732193,
-0.14543169736862183,
-0.0264079961925745,
-0.29685869812965393,
-0.1529839038848877,
0.1301264464855194,
0.28314438462257385,
-0.22389820218086243,
0.17000490427017212,
-0.44942086935043335,
0.20976774394512177,
0.2200476974248886,
0.14679360389709473,
-0.1004149317741394,
-0.12934577465057373,
-0.07628367841243744,
0.13978369534015656,
0.2785826027393341,
-0.023109182715415955,
-0.08821502327919006,
0.08189035207033157,
-0.372352659702301,
-0.46809741854667664,
0.702512800693512,
0.25799232721328735,
-0.34948351979255676,
-0.26903313398361206,
0.16746558248996735,
0.17681241035461426,
0.09664154797792435,
-0.22371229529380798,
0.2065865695476532,
0.20715881884098053,
0.053190164268016815,
-0.15928567945957184,
0.027527112513780594,
-0.33509698510169983,
0.1122158020734787,
-0.014119178056716919,
0.32999640703201294,
0.09553319215774536,
-0.32929185032844543,
-0.13305042684078217,
-0.3149959444999695
] |
https://github.com/huggingface/datasets/issues/5105 | Specifying an exisiting folder in download_and_prepare deletes everything in it | actually there's already a `download_mode` parameter that defaults to `REUSE_DATASET_IF_EXISTS` - so I guess it's just a matter of not deleting files unrelated to the dataset, and to overwrite existing dataset files if the download mode is `REUSE_CACHE_IF_EXISTS` or `FORCE_REDOWNLOAD` | ## Describe the bug
The builder correctly creates the `output_dir` folder if it doesn't exist, but if the folder exists everything within it is deleted. Specifying `"."` as the `output_dir` deletes everything in your current dir but also leads to **another bug** whose traceback is the following:
```
Traceback (most recent call last)
Input In [11], in <cell line: 1>()
----> 1 rotten_tomatoes_builder.download_and_prepare(output_dir=".", max_shard_size="200MB", file_format="parquet")
File ~/BIGSCIENCE/env/lib/python3.9/site-packages/datasets/builder.py:818, in download_and_prepare(self, output_dir, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, file_format, max_shard_size, storage_options, **download_and_prepare_kwargs)
File /usr/lib/python3.9/contextlib.py:124, in _GeneratorContextManager.__exit__(self, type, value, traceback)
122 if type is None:
123 try:
--> 124 next(self.gen)
125 except StopIteration:
126 return False
File ~/BIGSCIENCE/env/lib/python3.9/site-packages/datasets/builder.py:760, in incomplete_dir(dirname)
File /usr/lib/python3.9/shutil.py:722, in rmtree(path, ignore_errors, onerror)
720 os.rmdir(path)
721 except OSError:
--> 722 onerror(os.rmdir, path, sys.exc_info())
723 else:
724 try:
725 # symlinks to directories are forbidden, see bug #1669
File /usr/lib/python3.9/shutil.py:720, in rmtree(path, ignore_errors, onerror)
718 _rmtree_safe_fd(fd, path, onerror)
719 try:
--> 720 os.rmdir(path)
721 except OSError:
722 onerror(os.rmdir, path, sys.exc_info())
OSError: [Errno 22] Invalid argument: '/home/christopher/BIGSCIENCE/.'
```
## Steps to reproduce the bug
```python
rotten_tomatoes_builder = load_dataset_builder("rotten_tomatoes")
rotten_tomatoes_builder.download_and_prepare(output_dir="./test_folder", max_shard_size="200MB", file_format="parquet")
```
If `test_folder` contains any files they will all be deleted
## Expected results
Either a warning that all files will be deleted, but preferably that they not be deleted at all.
## Actual results
N/A
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.3.2
- Platform: Linux-5.15.0-48-generic-x86_64-with-glibc2.29
- Python version: 3.8.10
- PyArrow version: 8.0.0
- Pandas version: 1.4.3
| 40 | Specifying an exisiting folder in download_and_prepare deletes everything in it
## Describe the bug
The builder correctly creates the `output_dir` folder if it doesn't exist, but if the folder exists everything within it is deleted. Specifying `"."` as the `output_dir` deletes everything in your current dir but also leads to **another bug** whose traceback is the following:
```
Traceback (most recent call last)
Input In [11], in <cell line: 1>()
----> 1 rotten_tomatoes_builder.download_and_prepare(output_dir=".", max_shard_size="200MB", file_format="parquet")
File ~/BIGSCIENCE/env/lib/python3.9/site-packages/datasets/builder.py:818, in download_and_prepare(self, output_dir, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, file_format, max_shard_size, storage_options, **download_and_prepare_kwargs)
File /usr/lib/python3.9/contextlib.py:124, in _GeneratorContextManager.__exit__(self, type, value, traceback)
122 if type is None:
123 try:
--> 124 next(self.gen)
125 except StopIteration:
126 return False
File ~/BIGSCIENCE/env/lib/python3.9/site-packages/datasets/builder.py:760, in incomplete_dir(dirname)
File /usr/lib/python3.9/shutil.py:722, in rmtree(path, ignore_errors, onerror)
720 os.rmdir(path)
721 except OSError:
--> 722 onerror(os.rmdir, path, sys.exc_info())
723 else:
724 try:
725 # symlinks to directories are forbidden, see bug #1669
File /usr/lib/python3.9/shutil.py:720, in rmtree(path, ignore_errors, onerror)
718 _rmtree_safe_fd(fd, path, onerror)
719 try:
--> 720 os.rmdir(path)
721 except OSError:
722 onerror(os.rmdir, path, sys.exc_info())
OSError: [Errno 22] Invalid argument: '/home/christopher/BIGSCIENCE/.'
```
## Steps to reproduce the bug
```python
rotten_tomatoes_builder = load_dataset_builder("rotten_tomatoes")
rotten_tomatoes_builder.download_and_prepare(output_dir="./test_folder", max_shard_size="200MB", file_format="parquet")
```
If `test_folder` contains any files they will all be deleted
## Expected results
Either a warning that all files will be deleted, but preferably that they not be deleted at all.
## Actual results
N/A
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.3.2
- Platform: Linux-5.15.0-48-generic-x86_64-with-glibc2.29
- Python version: 3.8.10
- PyArrow version: 8.0.0
- Pandas version: 1.4.3
actually there's already a `download_mode` parameter that defaults to `REUSE_DATASET_IF_EXISTS` - so I guess it's just a matter of not deleting files unrelated to the dataset, and to overwrite existing dataset files if the download mode is `REUSE_CACHE_IF_EXISTS` or `FORCE_REDOWNLOAD` | [
-0.27821946144104004,
0.437811017036438,
-0.09798125922679901,
0.33214181661605835,
0.39338529109954834,
-0.18040987849235535,
-0.07301931083202362,
0.35373541712760925,
-0.07171329110860825,
0.32459384202957153,
-0.22473783791065216,
0.25985389947891235,
-0.1422298401594162,
-0.0067804232239723206,
-0.009657534770667553,
0.03759331256151199,
-0.016081370413303375,
0.10384690016508102,
-0.40833598375320435,
-0.06699532270431519,
-0.15724694728851318,
0.25157931447029114,
0.1184065192937851,
-0.029605276882648468,
-0.261800080537796,
0.01089823804795742,
-0.10896656662225723,
0.38250094652175903,
-0.36246222257614136,
-0.3260248899459839,
0.05615644156932831,
0.06622530519962311,
0.036981213837862015,
0.6268475651741028,
-0.00011124436423415318,
0.05587778985500336,
0.3338559865951538,
-0.19133631885051727,
-0.6521346569061279,
-0.27187150716781616,
-0.23772889375686646,
0.046018086373806,
-0.05052240937948227,
0.20483607053756714,
0.27532491087913513,
-0.1693984568119049,
-0.05017969012260437,
0.13309472799301147,
0.014295414090156555,
0.4034768342971802,
0.22657299041748047,
0.04654259979724884,
0.1291816085577011,
-0.07561501860618591,
0.40211063623428345,
0.4149652123451233,
-0.13438598811626434,
0.18408222496509552,
0.0778721272945404,
0.10692984610795975,
-0.09993178397417068,
-0.05719659850001335,
0.028647692874073982,
-0.11965091526508331,
0.18301166594028473,
0.207594096660614,
0.5200475454330444,
-0.46067583560943604,
0.011885231360793114,
0.08693993091583252,
0.2767429053783417,
-0.24470409750938416,
-0.32144394516944885,
-0.20625972747802734,
-0.02355603128671646,
-0.45910030603408813,
0.1091858521103859,
0.28665706515312195,
-0.39833498001098633,
0.025500457733869553,
-0.201943501830101,
0.056352969259023666,
-0.1362726092338562,
0.12528440356254578,
0.2771435081958771,
0.38343581557273865,
-0.05414365231990814,
-0.0561489462852478,
-0.08009719848632812,
0.25494861602783203,
0.34398069977760315,
-0.506132960319519,
0.06434391438961029,
0.11739680171012878,
0.12222747504711151,
-0.02310122363269329,
0.08581916987895966,
0.20204228162765503,
0.024602986872196198,
0.3016294240951538,
0.11907331645488739,
-0.22657418251037598,
0.20176216959953308,
0.04834825545549393,
0.232242614030838,
0.3369772732257843,
-0.1833416223526001,
0.209466353058815,
0.21873119473457336,
0.5351457595825195,
0.07956428825855255,
-0.03394981473684311,
0.06905634701251984,
-0.17323336005210876,
-0.07409735023975372,
0.1269586682319641,
0.20527857542037964,
0.11256425082683563,
-0.3237599730491638,
-0.11690487712621689,
0.15382790565490723,
-0.035582102835178375,
0.14566999673843384,
0.34053167700767517,
-0.18378324806690216,
-0.05507297068834305,
-0.07310651242733002,
0.3646031618118286,
-0.04721147194504738,
0.12304875999689102,
-0.19625155627727509,
0.1941324770450592,
-0.2652837336063385,
-0.1442999392747879,
0.10307803750038147,
-0.20970958471298218,
0.44572657346725464,
0.11371424049139023,
0.20203402638435364,
-0.23591673374176025,
-0.22324666380882263,
0.06484556198120117,
0.21142923831939697,
0.3496602475643158,
0.005144760012626648,
0.029494406655430794,
-0.15123634040355682,
-0.3786497712135315,
-0.08048339188098907,
0.22949913144111633,
0.022696781903505325,
-0.4166105091571808,
-0.09178988635540009,
0.29611673951148987,
0.046288661658763885,
0.11309505254030228,
-0.004870988428592682,
-0.2593807280063629,
0.1646026372909546,
0.1734655797481537,
0.05677192285656929,
-0.06901365518569946,
0.07584856450557709,
-0.20032432675361633,
0.16631650924682617,
0.2262287735939026,
-0.166026309132576,
-0.07430244237184525,
-0.5036726593971252,
-0.07052262127399445,
0.21246206760406494,
0.1655179113149643,
-0.057723477482795715,
0.4968222677707672,
-0.4122900366783142,
-0.2583751082420349,
0.7255463600158691,
-0.1325162649154663,
-0.2513323128223419,
0.403478741645813,
-0.22411081194877625,
0.22243312001228333,
0.15507814288139343,
0.07778812199831009,
0.06086894869804382,
-0.21448072791099548,
-0.15176573395729065,
0.05523134768009186,
-0.011666635051369667,
-0.02467728778719902,
-0.3284969925880432,
-0.10303010791540146,
-0.24863143265247345,
-0.25306379795074463,
0.25100621581077576,
0.2394876778125763,
-0.2189207673072815,
-0.316677987575531,
0.5237343311309814,
0.18957263231277466,
0.19846372306346893,
-0.1380736231803894,
0.31514063477516174,
0.08645743876695633,
-0.19606557488441467,
0.03799423575401306,
-0.06031306833028793,
0.22423610091209412,
-0.6051806211471558,
0.0010551735758781433,
-0.2567427158355713,
-0.2444789707660675,
-0.39511969685554504,
0.14641569554805756,
-0.30302318930625916,
-0.45241430401802063,
0.21619431674480438,
0.298564076423645,
0.2918778657913208,
-0.11969681084156036,
-0.2974589765071869,
-0.18313831090927124,
-0.09706401824951172,
0.1882358342409134,
0.22363629937171936,
0.03589359670877457,
-0.38231268525123596,
-0.2535121440887451,
-0.08900755643844604,
0.11218786239624023,
0.019028939306735992,
-0.12431951612234116,
0.0780961662530899,
0.4383176565170288,
-0.18054074048995972,
-0.009960249066352844,
-0.10780329257249832,
-0.17965881526470184,
0.04701872915029526,
0.3553707003593445,
0.025849387049674988,
0.3869059979915619,
0.17288626730442047,
0.2292594611644745,
0.05448026582598686,
0.21401746571063995,
-0.15071769058704376,
0.26966485381126404,
0.2264494150876999,
-0.3002842962741852,
0.002460336312651634,
0.07469487190246582,
0.20842167735099792,
-0.38007017970085144,
0.0719139575958252,
0.2674199342727661,
0.15378104150295258,
0.1537178009748459,
0.25727778673171997,
-0.07645107060670853,
0.14416354894638062,
-0.11215445399284363,
-0.16314923763275146,
0.22529485821723938,
0.013837821781635284,
-0.2777000665664673,
-0.2411109209060669,
0.21525554358959198,
0.6397190093994141,
-0.022224735468626022,
0.19065497815608978,
-0.005020841956138611,
0.16776873171329498,
-0.3391660749912262,
0.37859296798706055,
0.17564848065376282,
0.08966159075498581,
0.5621708035469055,
0.16208887100219727,
-0.10048145800828934,
-0.38990318775177,
-0.10866837203502655,
0.01236148551106453,
0.06794122606515884,
-0.012928765267133713,
0.14822566509246826,
-0.07106881588697433,
-0.09556204080581665,
-0.06804069131612778,
-0.22207903861999512,
0.0810139924287796,
-0.3955824673175812,
0.2931942343711853,
0.11253264546394348,
-0.40969574451446533,
0.20015692710876465,
0.17473040521144867,
0.032342299818992615,
-0.16509279608726501,
-0.10735974460840225,
-0.15833202004432678,
0.02736566960811615,
-0.1527414321899414,
0.10408668220043182,
0.13924948871135712,
-0.49609121680259705,
0.03595674782991409,
-0.1259843111038208,
-0.31623226404190063,
-0.14306622743606567,
0.13794785737991333,
0.22351817786693573,
0.031964100897312164,
0.4501151144504547,
0.324503093957901,
0.011975415050983429,
0.45100200176239014,
-0.3471708595752716,
0.14397135376930237,
-0.12754420936107635,
0.09450536221265793,
0.02817787602543831,
0.16263508796691895,
-0.08068542927503586,
-0.2871217429637909,
-0.20923826098442078,
0.02014501951634884,
-0.38894933462142944,
0.04358075559139252,
0.31773966550827026,
0.12885746359825134,
-0.2108224630355835,
0.24821937084197998,
-0.12175065279006958,
-0.17357055842876434,
0.3501370847225189,
-0.11007396131753922,
-0.4587409794330597,
0.2025245875120163,
-0.17565637826919556,
-0.17311479151248932,
-0.025116607546806335,
-0.16470986604690552,
0.39513781666755676,
-0.322077214717865,
-0.33784544467926025,
0.25375956296920776,
-0.2356879562139511,
0.08409756422042847,
0.2399500161409378,
0.15099689364433289,
0.2559373378753662,
0.03286729007959366,
-0.19533416628837585,
-0.016715489327907562,
0.1379948854446411,
0.12042325735092163,
0.13446611166000366,
0.22386397421360016,
-0.1394059658050537,
-0.09926746040582657,
-0.06716414541006088,
0.6975774765014648,
0.20427535474300385,
0.017678769305348396,
0.2689792513847351,
0.07082098722457886,
0.5678977370262146,
-0.20028695464134216,
-0.03931570053100586,
-0.08735721558332443,
-0.03410431742668152,
-0.33744287490844727,
0.330739289522171,
0.17851603031158447,
-0.007744176313281059,
-0.16166165471076965,
0.14950908720493317,
-0.07714828848838806,
-0.27792003750801086,
0.08422985672950745,
0.07961513102054596,
-0.2086443305015564,
0.12114086747169495,
0.043006397783756256,
0.2552351951599121,
0.002101665362715721,
0.06790482997894287,
0.3803640604019165,
0.3864595890045166,
-0.08101525157690048,
0.24264301359653473,
-0.016308365389704704,
-0.06899755448102951,
0.035011254251003265,
0.20428669452667236,
-0.34587565064430237,
0.1379816234111786,
-0.22213542461395264,
0.11556156724691391,
-0.0042582168243825436,
0.3973209857940674,
0.02961435541510582,
-0.1292356699705124,
-0.04083414375782013,
0.010641563683748245,
-0.16009920835494995,
-0.15927734971046448,
-0.0994337797164917,
-0.06293594092130661,
0.03055698797106743,
-0.20349285006523132,
-0.17408829927444458,
-0.07466822117567062,
0.161384716629982,
0.3369930386543274,
-0.07910081744194031,
-0.2654877007007599,
-0.3585684597492218,
-0.294656366109848,
-0.3246013820171356,
0.04049212485551834,
0.1264999806880951,
0.027490733191370964,
-0.13332337141036987,
-0.13500171899795532,
0.24248163402080536,
-0.13860511779785156,
0.02647395431995392,
-0.16274809837341309,
0.2882135808467865,
-0.2817825973033905,
-0.14494068920612335,
-0.3768092393875122,
-0.05792421102523804,
0.20376162230968475,
0.38251742720603943,
-0.3298737704753876,
0.12108513712882996,
0.07895685732364655,
-0.15298157930374146,
0.267098993062973,
0.514724850654602,
-0.19240088760852814,
-0.21312829852104187,
-0.23131728172302246,
0.09601473808288574,
-0.22758890688419342,
0.07805944979190826,
0.44253817200660706,
-0.3501623868942261,
0.32716092467308044,
-0.2014603614807129,
0.458589643239975,
-0.1664382815361023,
-0.13572734594345093,
0.1230720579624176,
-0.04292689263820648,
-0.3342525064945221,
0.3389207124710083,
-0.028576046228408813,
0.9157615303993225,
0.38601088523864746,
0.44093817472457886,
0.1750502586364746,
-0.03574492782354355,
0.1409476101398468,
-0.10865253955125809,
0.3385414481163025,
-0.243693009018898,
-0.046873170882463455,
0.07213610410690308,
-0.06666673719882965,
-0.11485729366540909,
-0.015896223485469818,
-0.09001736342906952,
0.430454820394516,
-0.6516679525375366,
0.4213300347328186,
-0.0912514477968216,
0.24172279238700867,
-0.4007604420185089,
-0.09045533835887909,
-0.026153050363063812,
0.11652033030986786,
0.35568124055862427,
0.2823549807071686,
-0.22845971584320068,
0.1383417695760727,
0.07599055767059326,
0.07026001811027527,
-0.1725652813911438,
0.05263161659240723,
-0.26264896988868713,
0.07069012522697449,
0.022114470601081848,
-0.12400158494710922,
-0.23850832879543304,
0.32830169796943665,
-0.07248741388320923,
0.24304266273975372,
0.16762536764144897,
0.14017850160598755,
0.40054795145988464,
0.1836313009262085,
0.021153872832655907,
-0.004454080015420914,
0.07997895032167435,
-0.13373996317386627,
0.04392615705728531,
0.0969603955745697,
-0.23075543344020844,
0.3665078282356262,
-0.1826682835817337,
-0.12745018303394318,
0.1969512403011322,
-0.5401639342308044,
-0.12558874487876892,
-0.22033792734146118,
-0.208805650472641,
-0.29001355171203613,
0.15446917712688446,
0.013741742819547653,
-0.24213677644729614,
0.008958198130130768,
-0.009090878069400787,
-0.301262229681015,
-0.3334777057170868,
-0.008522219955921173,
0.11426688730716705,
0.06619498133659363,
0.25279471278190613,
-0.19777195155620575,
-0.2751310467720032,
-0.3393304646015167,
-0.026532530784606934,
-0.2918674349784851,
-0.37268784642219543,
0.5063014626502991,
0.0714680626988411,
-0.10902085155248642,
-0.0671001672744751,
0.3733953535556793,
0.21150484681129456,
0.17778435349464417,
-0.2745482325553894,
0.08513385057449341,
-0.09969350695610046,
-0.005782067775726318,
0.20017676055431366,
0.3597211241722107,
-0.5607548952102661,
0.03387684002518654,
0.08911927789449692,
-0.042631350457668304,
-0.3639194667339325,
-0.10939492285251617,
-0.10021845251321793,
0.20759880542755127,
-0.17889171838760376,
0.1207137331366539,
0.24979627132415771,
0.04497295990586281,
0.14695091545581818,
0.10165135562419891,
-0.13608777523040771,
-0.201307475566864,
-0.18910440802574158,
0.14075759053230286,
0.012582441791892052,
-0.029694760218262672,
0.09100539237260818,
0.18394902348518372,
-0.006896374747157097,
-0.17461112141609192,
0.48359930515289307,
-0.127045139670372,
0.10294479131698608,
0.009269083850085735,
0.06417533755302429,
-0.12545379996299744,
-0.20486541092395782,
-0.12146762013435364,
-0.4467935860157013,
0.4464651346206665,
0.284619003534317,
-0.07187766581773758,
-0.0447542667388916,
-0.16581036150455475,
0.09650817513465881,
0.09676215052604675,
-0.1687604933977127,
0.3687521815299988,
0.4450603425502777,
-0.06899753212928772,
-0.10396099090576172,
-0.2593567371368408,
0.41088730096817017,
0.34791651368141174,
0.0076769618317484856,
-0.17154560983181,
0.0894131138920784,
0.2628985345363617,
-0.17300519347190857,
0.08474414050579071,
-0.5597090721130371,
-0.022139858454465866,
0.12519751489162445,
0.3754635751247406,
-0.05477744713425636,
-0.2786834239959717,
-0.17623580992221832,
0.27553868293762207,
0.21806035935878754,
-0.16065174341201782,
0.1508193463087082,
0.28244906663894653,
-0.08879012614488602,
0.3114747703075409,
0.15699684619903564,
-0.020290344953536987,
-0.01103518158197403,
0.16456179320812225,
-0.41210347414016724,
0.2526043653488159,
-0.3032665252685547,
-0.15250518918037415,
0.03662519529461861,
-0.09994204342365265,
0.21529772877693176,
0.31965795159339905,
-0.19011157751083374,
0.09110160171985626,
0.11519093066453934,
0.09501007944345474,
-0.22857773303985596,
0.2695878744125366,
-0.16621828079223633,
0.1842535138130188,
-0.2699583172798157,
-0.2574930489063263,
-0.20619723200798035,
-0.4245535433292389,
-0.1352434903383255,
0.08766742050647736,
0.11510799825191498,
-0.058123379945755005,
0.0052006542682647705,
0.2751913070678711,
-0.12826599180698395,
-0.10683836042881012,
0.3213598430156708,
-0.1574452519416809,
0.10096962004899979,
-0.2918878495693207,
0.14172708988189697,
0.4772270917892456,
0.18594369292259216,
-0.19506630301475525,
0.0015861205756664276,
0.5850268602371216,
0.24886275827884674,
-0.271427184343338,
-0.12646043300628662,
-0.041886091232299805,
-0.12493471801280975,
-0.21340486407279968,
0.16258041560649872,
0.06543745845556259,
0.18711484968662262,
0.10559876263141632,
0.1875285804271698,
-0.1858900785446167,
0.07889896631240845,
0.4173631966114044,
0.23505181074142456,
-0.017120810225605965,
0.65129154920578,
0.16149789094924927,
-0.08169911801815033,
-0.1418481469154358,
0.0459759496152401,
-0.4098568260669708,
-0.3293796479701996,
0.21283800899982452,
-0.3754694163799286,
0.25562140345573425,
-0.023073416203260422,
0.11355696618556976,
0.1284535825252533,
0.36420467495918274,
0.13155905902385712,
-0.29825714230537415,
-0.5083574056625366,
0.08592583239078522,
-0.15494012832641602,
-0.018416576087474823,
0.09645670652389526,
0.059299319982528687,
-0.3999486565589905,
0.30282631516456604,
-0.20936083793640137,
0.2329225093126297,
0.04224330186843872,
0.15607666969299316,
-0.2077760100364685,
0.037227991968393326,
-0.2552059590816498,
-0.02985471859574318,
-0.23327644169330597,
0.10392176359891891,
0.1580425649881363,
-0.34905701875686646,
-0.1145382821559906,
-0.7524122595787048,
0.1466265320777893,
0.09981376677751541,
-0.10913754999637604,
0.4259904623031616,
0.17686350643634796,
0.18167820572853088,
0.03707074373960495,
-0.07601490616798401,
-0.3977448046207428,
-0.456383615732193,
-0.14543169736862183,
-0.0264079961925745,
-0.29685869812965393,
-0.1529839038848877,
0.1301264464855194,
0.28314438462257385,
-0.22389820218086243,
0.17000490427017212,
-0.44942086935043335,
0.20976774394512177,
0.2200476974248886,
0.14679360389709473,
-0.1004149317741394,
-0.12934577465057373,
-0.07628367841243744,
0.13978369534015656,
0.2785826027393341,
-0.023109182715415955,
-0.08821502327919006,
0.08189035207033157,
-0.372352659702301,
-0.46809741854667664,
0.702512800693512,
0.25799232721328735,
-0.34948351979255676,
-0.26903313398361206,
0.16746558248996735,
0.17681241035461426,
0.09664154797792435,
-0.22371229529380798,
0.2065865695476532,
0.20715881884098053,
0.053190164268016815,
-0.15928567945957184,
0.027527112513780594,
-0.33509698510169983,
0.1122158020734787,
-0.014119178056716919,
0.32999640703201294,
0.09553319215774536,
-0.32929185032844543,
-0.13305042684078217,
-0.3149959444999695
] |
https://github.com/huggingface/datasets/issues/5099 | datasets doesn't support # in data paths | `datasets` doesn't seem to urlencode the directory names here
https://github.com/huggingface/datasets/blob/7feeb5648a63b6135a8259dedc3b1e19185ee4c7/src/datasets/utils/file_utils.py#L109-L111
for example we should have
```python
from datasets.utils.file_utils import hf_hub_url
url = hf_hub_url("loubnabnl/bigcode_csharp", "data/c#/data_0003.jsonl")
print(url)
# Currently returns
# https://huggingface.co/datasets/loubnabnl/bigcode_csharp/resolve/main/data/c#/data_0003.jsonl
# while it should be
# https://huggingface.co/datasets/loubnabnl/bigcode_csharp/resolve/main/data/c%23/data_0003.jsonl
``` | ## Describe the bug
dataset files with `#` symbol their paths aren't read correctly.
## Steps to reproduce the bug
The data in folder `c#`of this [dataset](https://huggingface.co/datasets/loubnabnl/bigcode_csharp) can't be loaded. While the folder `c_sharp` with the same data is loaded properly
```python
ds = load_dataset('loubnabnl/bigcode_csharp', split="train", data_files=["data/c#/*"])
```
```
FileNotFoundError: Couldn't find file at https://huggingface.co/datasets/loubnabnl/bigcode_csharp/resolve/27a3166cff4bb18e11919cafa6f169c0f57483de/data/c#/data_0003.jsonl
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.5.2
- Platform: macOS-12.2.1-arm64-arm-64bit
- Python version: 3.9.13
- PyArrow version: 9.0.0
- Pandas version: 1.4.3
cc @lhoestq | 38 | datasets doesn't support # in data paths
## Describe the bug
dataset files with `#` symbol their paths aren't read correctly.
## Steps to reproduce the bug
The data in folder `c#`of this [dataset](https://huggingface.co/datasets/loubnabnl/bigcode_csharp) can't be loaded. While the folder `c_sharp` with the same data is loaded properly
```python
ds = load_dataset('loubnabnl/bigcode_csharp', split="train", data_files=["data/c#/*"])
```
```
FileNotFoundError: Couldn't find file at https://huggingface.co/datasets/loubnabnl/bigcode_csharp/resolve/27a3166cff4bb18e11919cafa6f169c0f57483de/data/c#/data_0003.jsonl
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.5.2
- Platform: macOS-12.2.1-arm64-arm-64bit
- Python version: 3.9.13
- PyArrow version: 9.0.0
- Pandas version: 1.4.3
cc @lhoestq
`datasets` doesn't seem to urlencode the directory names here
https://github.com/huggingface/datasets/blob/7feeb5648a63b6135a8259dedc3b1e19185ee4c7/src/datasets/utils/file_utils.py#L109-L111
for example we should have
```python
from datasets.utils.file_utils import hf_hub_url
url = hf_hub_url("loubnabnl/bigcode_csharp", "data/c#/data_0003.jsonl")
print(url)
# Currently returns
# https://huggingface.co/datasets/loubnabnl/bigcode_csharp/resolve/main/data/c#/data_0003.jsonl
# while it should be
# https://huggingface.co/datasets/loubnabnl/bigcode_csharp/resolve/main/data/c%23/data_0003.jsonl
``` | [
-0.2091766744852066,
0.1359013319015503,
-0.08399754762649536,
0.41576313972473145,
0.3824024796485901,
0.01960335671901703,
-0.0763368308544159,
0.4112899601459503,
-0.030178207904100418,
0.22143150866031647,
0.02437463216483593,
0.4805358350276947,
-0.39222806692123413,
0.2883240580558777,
0.16164639592170715,
0.14042283594608307,
0.10117487609386444,
0.0012268051505088806,
-0.25393983721733093,
-0.1501486599445343,
-0.3877851963043213,
0.2999234199523926,
-0.012117236852645874,
0.11662319302558899,
-0.19994133710861206,
0.02196597121655941,
-0.16750754415988922,
0.49291521310806274,
-0.11988776177167892,
-0.30458563566207886,
0.06279589980840683,
0.009192898869514465,
0.4282071590423584,
0.44853171706199646,
-0.0001107696007238701,
0.26886069774627686,
0.3945538401603699,
0.0015151184052228928,
-0.4300445020198822,
-0.5024785995483398,
-0.6006397008895874,
-0.26901182532310486,
0.08253201842308044,
-0.11941295117139816,
0.04089384526014328,
0.10989410430192947,
0.05296710133552551,
-0.30014342069625854,
0.38445955514907837,
0.5029305815696716,
0.21559561789035797,
0.3483227789402008,
0.008669313043355942,
0.07873442023992538,
0.44594040513038635,
0.34375619888305664,
0.02768220566213131,
0.568899929523468,
0.10387619584798813,
0.08661267161369324,
0.05752434581518173,
0.07711344957351685,
0.057098135352134705,
-0.23378239572048187,
0.1560477912425995,
0.19122840464115143,
-0.10828284174203873,
-0.11969421803951263,
0.003807399421930313,
0.1265779584646225,
0.44884151220321655,
-0.3387848138809204,
-0.305182546377182,
-0.10511311888694763,
-0.17393824458122253,
-0.2121943086385727,
0.3580525517463684,
0.12900996208190918,
0.19788949191570282,
0.39498621225357056,
-0.1753983348608017,
-0.07732559740543365,
-0.13677017390727997,
0.39758992195129395,
0.12901967763900757,
0.060343481600284576,
-0.22977519035339355,
-0.037306465208530426,
0.025544898584485054,
0.0603036992251873,
-0.02311406284570694,
-0.07629216462373734,
-0.004386011511087418,
0.1861739605665207,
-0.06049104407429695,
0.090635284781456,
0.0638836920261383,
0.21675464510917664,
0.2148013412952423,
0.06506389379501343,
0.14318503439426422,
0.08073513209819794,
-0.35167771577835083,
0.3198525011539459,
-0.09041109681129456,
-0.011291667819023132,
0.03507326543331146,
0.020978786051273346,
0.42067939043045044,
0.11236505210399628,
0.013566341251134872,
-0.2002810537815094,
-0.5717225074768066,
-0.3018225133419037,
-0.4078553020954132,
0.0710802972316742,
0.1848926991224289,
-0.0870761051774025,
-0.401702880859375,
0.036374833434820175,
-0.03562484681606293,
-0.20914188027381897,
0.30374640226364136,
0.6102400422096252,
0.15551762282848358,
0.07537027448415756,
-0.03679036721587181,
0.06501202285289764,
0.03727147728204727,
0.06934703886508942,
-0.24831277132034302,
0.1066713035106659,
-0.23654597997665405,
-0.03957065939903259,
0.12567546963691711,
-0.10244143009185791,
0.2906672954559326,
0.09550882130861282,
0.05992904677987099,
-0.043933477252721786,
-0.10662614554166794,
-0.10809469223022461,
-0.10151907056570053,
0.0005214512348175049,
-0.27447831630706787,
0.27292564511299133,
0.10914094746112823,
-0.08574219793081284,
-0.13780388236045837,
0.12076615542173386,
-0.4677433371543884,
-0.24475617706775665,
-0.2942282259464264,
0.14409036934375763,
-0.14032915234565735,
-0.06890535354614258,
-0.6388121843338013,
0.05875936150550842,
-0.124394990503788,
-0.0046842060983181,
0.07198113203048706,
-0.008671272546052933,
-0.1336304247379303,
-0.19087037444114685,
0.2605030834674835,
0.47484517097473145,
-0.48580798506736755,
-0.04978786036372185,
0.21646033227443695,
-0.04923314228653908,
0.019707083702087402,
0.3485373556613922,
-0.4050620496273041,
0.12633496522903442,
-0.35502222180366516,
0.11036202311515808,
0.3485186994075775,
-0.5934663414955139,
-0.3495842218399048,
0.36526691913604736,
-0.06844557821750641,
-0.22961357235908508,
0.16773642599582672,
-0.28220951557159424,
0.01868215575814247,
-0.08682594448328018,
-0.10165657103061676,
0.19138027727603912,
0.29172343015670776,
-0.1191587969660759,
-0.23716741800308228,
-0.40627995133399963,
-0.020519256591796875,
0.16366541385650635,
0.05695866793394089,
-0.11071193963289261,
0.36439722776412964,
-0.13417121767997742,
0.4555961787700653,
-0.23399683833122253,
-0.07313313335180283,
0.48465704917907715,
0.276958167552948,
0.10940806567668915,
0.014494922012090683,
-0.07736431807279587,
-0.4421427845954895,
0.16632550954818726,
-0.18233631551265717,
-0.17976008355617523,
-0.39729851484298706,
-0.09454649686813354,
-0.2903408110141754,
-0.16342568397521973,
-0.20913802087306976,
0.00042454153299331665,
0.09575410187244415,
0.06499332934617996,
0.08243897557258606,
0.32806017994880676,
-0.38926732540130615,
0.3322747051715851,
-0.19922326505184174,
0.2218693494796753,
-0.17714862525463104,
0.6136823296546936,
-0.01878848858177662,
-0.035507429391145706,
0.08119325339794159,
0.4110475778579712,
0.24028420448303223,
-0.344068318605423,
-0.07646257430315018,
0.3592032492160797,
-0.03843638300895691,
0.09751933813095093,
0.1519392430782318,
0.2597363293170929,
0.21735359728336334,
-0.4153781533241272,
-0.12721455097198486,
0.3308391571044922,
0.2995529770851135,
0.13843747973442078,
-0.17900311946868896,
0.1318429708480835,
-0.4194435179233551,
0.13368532061576843,
0.25848668813705444,
-0.2004767805337906,
0.24105119705200195,
-0.14181804656982422,
-0.0825207382440567,
-0.038058802485466,
0.24914488196372986,
0.2475956529378891,
0.33001023530960083,
0.1787138134241104,
-0.3355141282081604,
-0.23323315382003784,
0.6817909479141235,
-0.04426372051239014,
0.10401612520217896,
0.20659276843070984,
-0.24327191710472107,
0.10465198010206223,
0.14744633436203003,
0.13990937173366547,
0.3860323429107666,
0.21307873725891113,
-0.0833953320980072,
0.11845538765192032,
-0.012037967331707478,
-0.2398630678653717,
0.22992101311683655,
0.07605557143688202,
0.04599873721599579,
0.07859107851982117,
0.08835889399051666,
-0.006863403134047985,
-0.3864744305610657,
-0.42460668087005615,
0.036932557821273804,
0.11816202849149704,
-0.5643129944801331,
0.1878892481327057,
-0.5270654559135437,
-0.3680490255355835,
-0.3412751853466034,
-0.3582112491130829,
-0.0847463607788086,
-0.22924794256687164,
-0.2904367446899414,
0.04873751476407051,
0.011871296912431717,
0.08917133510112762,
-0.25417977571487427,
0.07105202972888947,
-0.0879269689321518,
-0.16779933869838715,
-0.26981520652770996,
0.0458555594086647,
-0.30639922618865967,
-0.014667032286524773,
0.5277596116065979,
0.04164563864469528,
-0.03729207068681717,
-0.4020930528640747,
0.09170927107334137,
-0.3593630790710449,
-0.3054061532020569,
0.10421137511730194,
0.013558987528085709,
0.22733192145824432,
-0.006168685853481293,
0.06977711617946625,
-0.2566848397254944,
-0.14882086217403412,
0.30555516481399536,
0.07293091714382172,
-0.10415659099817276,
-0.006494821980595589,
-0.022757478058338165,
-0.1677713841199875,
-0.19831426441669464,
-0.25622230768203735,
-0.41496866941452026,
-0.35345831513404846,
0.21610085666179657,
-0.06298263370990753,
0.12158679217100143,
0.2251625955104828,
0.004057103767991066,
0.42249879240989685,
-0.15206052362918854,
-0.13842342793941498,
-0.09209593385457993,
-0.5683431625366211,
0.6323938965797424,
-0.21500059962272644,
-0.33614417910575867,
0.08639390766620636,
-0.08162862062454224,
0.0733061134815216,
-0.28226739168167114,
-0.2798832058906555,
-0.16212238371372223,
-0.3308778405189514,
0.17310550808906555,
0.0710853859782219,
0.19409877061843872,
0.014135889708995819,
-0.05627359449863434,
-0.024334382265806198,
-0.33071374893188477,
-0.14938683807849884,
0.16096815466880798,
0.026114560663700104,
0.17086851596832275,
0.16328835487365723,
0.4942566454410553,
0.11807280778884888,
0.3702911138534546,
0.34513598680496216,
-0.09956753253936768,
0.5162513256072998,
-0.23843622207641602,
0.3818444013595581,
0.10121891647577286,
-0.2859029769897461,
0.1625254899263382,
0.008966699242591858,
-0.01186833530664444,
0.28718847036361694,
0.20983770489692688,
0.2909412086009979,
0.035381510853767395,
-0.2067825049161911,
-0.3792402446269989,
-0.13906238973140717,
0.06066031754016876,
-0.25303182005882263,
-0.06723064929246902,
0.08437205851078033,
-0.04894360899925232,
0.10746654868125916,
-0.13116873800754547,
0.2752275764942169,
0.41028618812561035,
0.12619557976722717,
0.19670867919921875,
-0.04346461594104767,
-0.16286037862300873,
-0.44364088773727417,
0.23794808983802795,
0.04140430688858032,
0.3769843876361847,
-0.07589031755924225,
0.17660978436470032,
0.09192860126495361,
-0.08168011903762817,
0.8235262036323547,
-0.14558911323547363,
0.003131777048110962,
-0.039800822734832764,
0.029214322566986084,
-0.36320340633392334,
0.10997869074344635,
-0.09742915630340576,
0.20533984899520874,
-0.06265465915203094,
0.3951762318611145,
-0.18066759407520294,
-0.17229948937892914,
0.11410989612340927,
0.03840026259422302,
-0.017185654491186142,
-0.15187102556228638,
-0.2631077766418457,
-0.2995494306087494,
-0.1824108362197876,
-0.1424870491027832,
0.13279859721660614,
0.0971774235367775,
-0.25749340653419495,
-0.258792906999588,
-0.005970237776637077,
-0.39848390221595764,
0.18410804867744446,
0.08079488575458527,
0.35967737436294556,
-0.11384844034910202,
-0.022128727287054062,
0.2906816601753235,
0.25812089443206787,
0.2844916582107544,
0.6958662867546082,
-0.18912836909294128,
-0.4788885712623596,
-0.06136482208967209,
-0.12150409817695618,
0.30865082144737244,
0.19188739359378815,
-0.2934907078742981,
0.06539876759052277,
0.26721757650375366,
-0.07355931401252747,
-0.3506588041782379,
0.25802457332611084,
0.19444814324378967,
0.20753434300422668,
-0.26370611786842346,
-0.32942721247673035,
0.6271308660507202,
0.20241610705852509,
-0.02660536766052246,
0.12083824723958969,
0.408191978931427,
-0.57076096534729,
0.13667461276054382,
-0.21692833304405212,
0.8343691229820251,
-0.175296351313591,
0.10769276320934296,
0.20821917057037354,
-0.38160568475723267,
0.2939547002315521,
-0.01376362144947052,
-0.06382092833518982,
-0.3552410304546356,
-0.019139263778924942,
-0.13998369872570038,
-0.13938631117343903,
0.2468147575855255,
0.23553569614887238,
-0.1153167188167572,
0.34450286626815796,
-0.2630709409713745,
0.5281149744987488,
0.09511120617389679,
0.23803675174713135,
-0.06194399297237396,
0.06802395731210709,
-0.35163894295692444,
0.11947683990001678,
0.005742263048887253,
-0.0038791485130786896,
-0.09448123723268509,
-0.3166106343269348,
-0.3950543701648712,
-0.23807884752750397,
0.053934067487716675,
0.12545433640480042,
-0.24032528698444366,
0.11997710913419724,
0.07378247380256653,
-0.36991196870803833,
0.32749080657958984,
0.25973251461982727,
0.4061011075973511,
0.0899435430765152,
-0.35161539912223816,
0.06458592414855957,
-0.14607253670692444,
0.11197686195373535,
-0.13819067180156708,
0.09336467832326889,
0.08711288124322891,
0.1180197224020958,
-0.06868180632591248,
-0.002388566732406616,
0.01464954111725092,
-0.264925479888916,
-0.12973938882350922,
0.2718147039413452,
0.055645689368247986,
-0.0015261045191437006,
-0.20136460661888123,
0.0004169195890426636,
-0.10475565493106842,
-0.21100953221321106,
0.14816515147686005,
0.14660337567329407,
0.04985760152339935,
0.034528881311416626,
0.16371437907218933,
-0.18334418535232544,
-0.0931062251329422,
0.2516234517097473,
-0.4318550229072571,
0.07687239348888397,
0.45360949635505676,
0.07203315198421478,
-0.2502482533454895,
-0.08830971270799637,
0.45984768867492676,
0.5233311653137207,
-0.36013010144233704,
0.07946588844060898,
0.06162042170763016,
0.32528752088546753,
-0.08534985035657883,
0.1355130821466446,
-0.015114251524209976,
-0.17655152082443237,
-0.11075203120708466,
-0.4979761242866516,
-0.13094773888587952,
0.3487876057624817,
-0.2461809366941452,
0.10148638486862183,
0.12517189979553223,
0.10825279355049133,
-0.029322972521185875,
-0.3417595326900482,
-0.318195104598999,
0.39372727274894714,
-0.15258461236953735,
-0.13860847055912018,
0.09712319076061249,
0.13015307486057281,
0.4762926697731018,
-0.1477644294500351,
0.15442104637622833,
0.04948902502655983,
-0.046694763004779816,
-0.18299365043640137,
-0.32546526193618774,
0.0996810719370842,
0.14409586787223816,
0.13513922691345215,
-0.05417925864458084,
0.02913191169500351,
0.031425103545188904,
-0.0877167358994484,
-0.03010423481464386,
0.13581591844558716,
0.029844902455806732,
0.281996488571167,
-0.0033328644931316376,
-0.29388031363487244,
-0.12881524860858917,
0.1379147320985794,
-0.0808725655078888,
0.2977169156074524,
0.013095872476696968,
0.24490250647068024,
-0.0565771721303463,
0.015172816812992096,
0.008030619472265244,
-0.022633157670497894,
0.21951822936534882,
0.12585461139678955,
0.2799455523490906,
-0.3520869016647339,
0.015213161706924438,
0.18878856301307678,
0.28226596117019653,
0.2696799039840698,
-0.21727891266345978,
-0.07852933555841446,
0.5004611611366272,
0.13619104027748108,
-0.07403741031885147,
-0.08819713443517685,
-0.010811442509293556,
0.0683152973651886,
0.13592413067817688,
0.11261086910963058,
0.26222917437553406,
-0.12936462461948395,
-0.29890310764312744,
-0.1219412237405777,
0.5427612066268921,
0.07585151493549347,
0.11471594870090485,
0.48357805609703064,
0.07296346127986908,
0.06076494976878166,
0.14914464950561523,
0.10304231941699982,
0.23454898595809937,
0.79561847448349,
-0.07807386666536331,
0.12525004148483276,
0.008464561775326729,
0.2511029839515686,
0.0049436986446380615,
-0.3198706805706024,
-0.2632652223110199,
0.07512260973453522,
-0.04788902401924133,
0.033660225570201874,
-0.15514856576919556,
0.45421212911605835,
-0.03980514034628868,
0.2191338837146759,
0.1688137650489807,
0.12188544869422913,
-0.0018920861184597015,
-0.27326682209968567,
-0.10813587158918381,
-0.22105437517166138,
-0.12572041153907776,
-0.15980218350887299,
-0.2152917981147766,
-0.33129870891571045,
0.2625969648361206,
0.09758301079273224,
0.14594028890132904,
-0.28177881240844727,
0.09350191801786423,
0.2854459583759308,
0.013298176229000092,
-0.1935136765241623,
0.404313862323761,
-0.03811557590961456,
-0.017764568328857422,
0.12410639226436615,
-0.015259740874171257,
0.4804287552833557,
0.403435617685318,
0.043372780084609985,
-0.12118308991193771,
-0.16426238417625427,
-0.11076804995536804,
-0.013085372745990753,
0.23643334209918976,
-0.060519441962242126,
0.07793256640434265,
0.20488755404949188,
0.1724998503923416,
-0.08481933921575546,
0.05872177705168724,
0.016220998018980026,
0.4204758405685425,
-0.08512936532497406,
0.36568355560302734,
-0.3182956278324127,
0.1513146460056305,
-0.1003870964050293,
-0.17387595772743225,
-0.5654401183128357,
0.0343661792576313,
0.5572457909584045,
-0.14335063099861145,
0.24951359629631042,
0.09981545805931091,
0.07946975529193878,
-0.03388167917728424,
0.3093259036540985,
0.33760619163513184,
0.41006165742874146,
-0.21999862790107727,
-0.05471042916178703,
-0.5416301488876343,
-0.17106622457504272,
0.006046127527952194,
-0.17090819776058197,
-0.10076650232076645,
0.03719676285982132,
-0.15115565061569214,
-0.012297991663217545,
0.2293754518032074,
0.15281058847904205,
-0.09743158519268036,
-0.09909979999065399,
-0.26468703150749207,
-0.08328159153461456,
-0.2813981771469116,
0.10337287932634354,
-0.013030542060732841,
-0.18636691570281982,
0.20667675137519836,
-0.04207374528050423,
-0.0891522765159607,
-0.3399319052696228,
0.15719300508499146,
-0.2743759751319885,
-0.2930701971054077,
0.24181726574897766,
0.15750201046466827,
0.20027568936347961,
-0.11568953841924667,
0.158424973487854,
-0.14920057356357574,
-0.29037711024284363,
-0.14471778273582458,
0.35751116275787354,
-0.07714153826236725,
0.296448290348053,
-0.4251871705055237,
-0.20900849997997284,
-0.25531935691833496,
-0.12308309227228165,
-0.0923660397529602,
0.06579145044088364,
-0.17514918744564056,
0.09860788285732269,
-0.18856412172317505,
-0.08512462675571442,
0.020944945514202118,
0.26710858941078186,
-0.005290515720844269,
0.16994430124759674,
-0.09983658790588379,
-0.3176462650299072,
0.4873270094394684,
-0.5569333434104919,
-0.21007125079631805,
0.16363734006881714,
0.25745314359664917,
0.13694818317890167,
-0.164716899394989,
-0.2983715236186981,
0.11696527153253555,
0.4011537432670593,
0.12748846411705017,
-0.20128576457500458,
0.145132377743721,
0.13736625015735626,
0.15148986876010895,
-0.07266917079687119,
-0.06992940604686737,
0.1757267713546753,
-0.1986536830663681,
0.19997374713420868,
-0.35282766819000244
] |
https://github.com/huggingface/datasets/issues/5099 | datasets doesn't support # in data paths | @loubnabnl The dataset you linked in the description of the bug does not work and returns a 404. Where can I find the dataset to reproduce the bug? | ## Describe the bug
dataset files with `#` symbol their paths aren't read correctly.
## Steps to reproduce the bug
The data in folder `c#`of this [dataset](https://huggingface.co/datasets/loubnabnl/bigcode_csharp) can't be loaded. While the folder `c_sharp` with the same data is loaded properly
```python
ds = load_dataset('loubnabnl/bigcode_csharp', split="train", data_files=["data/c#/*"])
```
```
FileNotFoundError: Couldn't find file at https://huggingface.co/datasets/loubnabnl/bigcode_csharp/resolve/27a3166cff4bb18e11919cafa6f169c0f57483de/data/c#/data_0003.jsonl
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.5.2
- Platform: macOS-12.2.1-arm64-arm-64bit
- Python version: 3.9.13
- PyArrow version: 9.0.0
- Pandas version: 1.4.3
cc @lhoestq | 28 | datasets doesn't support # in data paths
## Describe the bug
dataset files with `#` symbol their paths aren't read correctly.
## Steps to reproduce the bug
The data in folder `c#`of this [dataset](https://huggingface.co/datasets/loubnabnl/bigcode_csharp) can't be loaded. While the folder `c_sharp` with the same data is loaded properly
```python
ds = load_dataset('loubnabnl/bigcode_csharp', split="train", data_files=["data/c#/*"])
```
```
FileNotFoundError: Couldn't find file at https://huggingface.co/datasets/loubnabnl/bigcode_csharp/resolve/27a3166cff4bb18e11919cafa6f169c0f57483de/data/c#/data_0003.jsonl
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.5.2
- Platform: macOS-12.2.1-arm64-arm-64bit
- Python version: 3.9.13
- PyArrow version: 9.0.0
- Pandas version: 1.4.3
cc @lhoestq
@loubnabnl The dataset you linked in the description of the bug does not work and returns a 404. Where can I find the dataset to reproduce the bug? | [
-0.18062348663806915,
0.19160407781600952,
-0.08600079268217087,
0.47223734855651855,
0.23272131383419037,
0.13766813278198242,
0.023798078298568726,
0.35274720191955566,
-0.06538982689380646,
0.15885448455810547,
0.2941090762615204,
0.5142216682434082,
-0.4371044933795929,
0.29324132204055786,
0.19888685643672943,
0.03795818239450455,
0.1198190227150917,
0.07539697736501694,
-0.27540141344070435,
-0.06700867414474487,
-0.21658676862716675,
0.30452460050582886,
-0.10369613766670227,
0.08254855126142502,
-0.22955864667892456,
-0.01393725536763668,
-0.16254602372646332,
0.48366305232048035,
-0.037567928433418274,
-0.30694037675857544,
0.2571660280227661,
-0.18279285728931427,
0.42915216088294983,
0.5228301882743835,
-0.00011141570576000959,
0.23558329045772552,
0.3945130705833435,
-0.034708768129348755,
-0.3640872538089752,
-0.5039278864860535,
-0.7391367554664612,
-0.17533980309963226,
0.11612899601459503,
-0.1598743498325348,
0.050066955387592316,
-0.0012363418936729431,
0.05741633102297783,
-0.39738041162490845,
0.4248337745666504,
0.5479016304016113,
0.22208759188652039,
0.3847993016242981,
0.012479718774557114,
-0.06977051496505737,
0.3606378138065338,
0.31456291675567627,
-0.008348893374204636,
0.5956912040710449,
0.1233467161655426,
0.06865876913070679,
0.12593412399291992,
0.06380349397659302,
0.12281273305416107,
-0.13915681838989258,
0.21269160509109497,
0.12332919985055923,
-0.022374659776687622,
-0.2360747754573822,
0.04657825082540512,
0.2559579312801361,
0.6015347838401794,
-0.32313627004623413,
-0.24565130472183228,
-0.14230109751224518,
-0.14185109734535217,
-0.16459877789020538,
0.3814542889595032,
0.18819811940193176,
0.1503666192293167,
0.4347553551197052,
-0.2041773498058319,
0.02580200880765915,
-0.16583871841430664,
0.31718316674232483,
0.030941449105739594,
-0.08612605929374695,
-0.1706257164478302,
-0.021328747272491455,
-0.08023776113986969,
0.03152197599411011,
-0.06580646336078644,
0.006279563531279564,
0.12675981223583221,
0.1470663845539093,
-0.1171276718378067,
0.03715558350086212,
0.16687719523906708,
0.08213786780834198,
0.18620941042900085,
0.023691698908805847,
0.2461206465959549,
-0.0883387103676796,
-0.3251279294490814,
0.33827850222587585,
0.002331005409359932,
0.0013058101758360863,
-0.11192478984594345,
-0.07105330377817154,
0.31204694509506226,
0.09720953553915024,
-0.03248909115791321,
-0.09276633709669113,
-0.5636094212532043,
-0.1844533383846283,
-0.23051334917545319,
0.004919122904539108,
0.22446994483470917,
-0.1089695394039154,
-0.4899854063987732,
0.10821801424026489,
-0.1306169182062149,
-0.21331146359443665,
0.250532865524292,
0.5997174978256226,
0.15345752239227295,
0.01714565046131611,
-0.12187250703573227,
-0.02060098573565483,
0.196365088224411,
-0.06118690222501755,
-0.26254111528396606,
0.13007588684558868,
-0.31383541226387024,
-0.11520440131425858,
0.19282060861587524,
-0.07155518233776093,
0.40622958540916443,
0.08874975889921188,
-0.07991872727870941,
0.011660989373922348,
0.013196947053074837,
0.04643864929676056,
-0.17469507455825806,
0.10329805314540863,
-0.25374385714530945,
0.1736852377653122,
0.1361883282661438,
-0.040828026831150055,
-0.195970818400383,
0.17533299326896667,
-0.4347054362297058,
-0.28836166858673096,
-0.3425339460372925,
0.12758736312389374,
-0.18667076528072357,
-0.10310450196266174,
-0.48204997181892395,
0.10443641245365143,
-0.13591325283050537,
-0.0694468691945076,
0.11387410014867783,
-0.01941622793674469,
-0.09627015888690948,
-0.23076727986335754,
0.26247113943099976,
0.4817212224006653,
-0.6799978017807007,
-0.07575646042823792,
0.11135291308164597,
-0.02923460677266121,
0.07396634668111801,
0.2974897027015686,
-0.35405993461608887,
0.09764682501554489,
-0.3875911235809326,
0.09532147645950317,
0.38335558772087097,
-0.45889970660209656,
-0.43196433782577515,
0.2468639612197876,
-0.222330704331398,
-0.219675213098526,
0.13766731321811676,
-0.2724575996398926,
-0.01692262291908264,
-0.09088151156902313,
-0.06815612316131592,
0.22254717350006104,
0.18609116971492767,
-0.26368385553359985,
-0.1757756620645523,
-0.39364975690841675,
0.09927511215209961,
0.1400192826986313,
0.016306988894939423,
-0.10725853592157364,
0.3662685751914978,
-0.23479364812374115,
0.33250725269317627,
-0.1549769788980484,
-0.11623834818601608,
0.4408568739891052,
0.33955731987953186,
0.022373661398887634,
0.15606755018234253,
-0.166197270154953,
-0.3678193688392639,
0.23788869380950928,
-0.18884441256523132,
-0.3070976734161377,
-0.22274602949619293,
-0.03026786632835865,
-0.43924346566200256,
-0.06465491652488708,
-0.2188720554113388,
-0.10548378527164459,
0.08652947843074799,
0.08834831416606903,
0.14008694887161255,
0.2911803722381592,
-0.4596204161643982,
0.3023126423358917,
-0.2720063626766205,
0.19918864965438843,
-0.15052293241024017,
0.444149911403656,
-0.01777832768857479,
-0.14880964159965515,
0.14395208656787872,
0.34738367795944214,
0.18211379647254944,
-0.3540300726890564,
-0.1116240844130516,
0.35930728912353516,
0.0012061716988682747,
0.054779890924692154,
0.12685683369636536,
0.3974912464618683,
0.1069265827536583,
-0.46832501888275146,
-0.10685969144105911,
0.3518044352531433,
0.2061775177717209,
0.20095467567443848,
-0.2794446051120758,
0.054255105555057526,
-0.3756547272205353,
0.06747552007436752,
0.21391074359416962,
-0.05324450135231018,
0.35641470551490784,
-0.19135823845863342,
-0.07044137269258499,
0.01685774326324463,
0.3029212951660156,
0.08685228228569031,
0.4517788887023926,
0.1849268227815628,
-0.454679936170578,
-0.0867011770606041,
0.6040896773338318,
-0.10158982872962952,
0.19017444550991058,
0.20917955040931702,
-0.33092623949050903,
0.02632858231663704,
0.1930769383907318,
0.21505866944789886,
0.38882356882095337,
0.18570876121520996,
-0.08255647122859955,
0.04946117848157883,
0.02500983327627182,
-0.213278666138649,
0.2552359998226166,
-0.03520284593105316,
0.10877565294504166,
0.03778734803199768,
0.22644855082035065,
0.09033343195915222,
-0.3399435877799988,
-0.45183098316192627,
-0.03248363733291626,
0.16492068767547607,
-0.43307432532310486,
0.3106374144554138,
-0.5373963713645935,
-0.23566803336143494,
-0.36637115478515625,
-0.2857610583305359,
-0.014048278331756592,
-0.065979965031147,
-0.2490607351064682,
-0.022500384598970413,
0.033359598368406296,
0.0926579013466835,
-0.3808884620666504,
0.18491607904434204,
0.016433672979474068,
-0.018960921093821526,
-0.22415553033351898,
0.05265309289097786,
-0.3633350729942322,
0.004965800791978836,
0.505760133266449,
0.07282304763793945,
0.08856665343046188,
-0.36907586455345154,
0.1129717081785202,
-0.2553512156009674,
-0.3714493215084076,
0.150371253490448,
0.11906715482473373,
0.29196760058403015,
0.0670081377029419,
0.11050532758235931,
-0.20180757343769073,
-0.20480933785438538,
0.1581326127052307,
-0.05089025944471359,
-0.13244009017944336,
0.01936083287000656,
-0.044919099658727646,
-0.15438145399093628,
-0.1502929925918579,
-0.322353333234787,
-0.3610195815563202,
-0.28973156213760376,
0.21823249757289886,
-0.09451299905776978,
0.07107175886631012,
0.146810844540596,
0.08536763489246368,
0.5164973735809326,
-0.14475372433662415,
-0.059744276106357574,
-0.07019118964672089,
-0.6073606014251709,
0.5133116245269775,
-0.1730683445930481,
-0.37309500575065613,
0.15963658690452576,
-0.19477586448192596,
-0.0018938519060611725,
-0.22796118259429932,
-0.32521378993988037,
0.03691287711262703,
-0.3636297881603241,
0.17322374880313873,
0.037917789071798325,
0.04330569878220558,
0.22694852948188782,
-0.08536067605018616,
-0.0408368781208992,
-0.4219455420970917,
-0.2041064202785492,
0.09418691694736481,
0.06684434413909912,
0.23800605535507202,
0.216374933719635,
0.4391247630119324,
0.08595147728919983,
0.5412326455116272,
0.2969413697719574,
-0.1846431940793991,
0.4086720943450928,
-0.20364512503147125,
0.33082154393196106,
0.15563100576400757,
-0.26928189396858215,
0.17877742648124695,
0.04028075933456421,
-0.08504851162433624,
0.17234495282173157,
0.1846819519996643,
0.0446920171380043,
0.04429105669260025,
-0.19107529520988464,
-0.41590455174446106,
-0.03903891146183014,
-0.0045272428542375565,
-0.2636915445327759,
0.07999036461114883,
0.07281160354614258,
-0.05535721406340599,
0.1478201150894165,
-0.012715036980807781,
0.2665235698223114,
0.33457064628601074,
0.17268234491348267,
0.08833259344100952,
0.05083579197525978,
-0.17909295856952667,
-0.5208934545516968,
0.11053982377052307,
-0.10330335795879364,
0.45153748989105225,
-0.11070969700813293,
0.1546882688999176,
0.02987387776374817,
-0.11779952049255371,
0.9307986497879028,
-0.14979179203510284,
0.14168888330459595,
-0.00922489259392023,
0.1152878999710083,
-0.306844562292099,
0.05116984620690346,
-0.10373785346746445,
0.325385719537735,
-0.014074459671974182,
0.31701987981796265,
-0.07343441992998123,
-0.014942982234060764,
0.2335941344499588,
0.0410311222076416,
-0.01019027829170227,
-0.22317560017108917,
-0.15880121290683746,
-0.18918046355247498,
-0.10351645946502686,
-0.042070455849170685,
0.00946725346148014,
0.07454784959554672,
-0.17847587168216705,
-0.13765020668506622,
-0.06635401397943497,
-0.27300649881362915,
0.14618267118930817,
0.2143198847770691,
0.30108964443206787,
-0.1710377037525177,
0.0366700105369091,
0.32759031653404236,
0.20693981647491455,
0.24036337435245514,
0.5849752426147461,
-0.07610200345516205,
-0.4096847176551819,
0.11735482513904572,
-0.09539449214935303,
0.2815718948841095,
0.14828447997570038,
-0.30826759338378906,
-0.0820501372218132,
0.27777138352394104,
-0.24939171969890594,
-0.27774578332901,
0.2634190320968628,
0.2014853060245514,
0.14807367324829102,
-0.1687961220741272,
-0.34572359919548035,
0.588959813117981,
0.277509480714798,
-0.038588542491197586,
0.26633208990097046,
0.2298472374677658,
-0.4227253496646881,
0.09434864670038223,
-0.1641378402709961,
0.8335146903991699,
-0.04362502694129944,
0.03061305545270443,
0.2637426257133484,
-0.30357927083969116,
0.3208097219467163,
-0.06223826855421066,
-0.09016460180282593,
-0.3334055542945862,
-0.10385607928037643,
-0.1463233083486557,
-0.3100704550743103,
0.13747651875019073,
0.1636364758014679,
-0.09065825492143631,
0.2581953704357147,
-0.3349970579147339,
0.48719456791877747,
0.17071519792079926,
0.21710816025733948,
0.031104441732168198,
0.1352614015340805,
-0.3767518401145935,
0.1248660534620285,
0.06077425926923752,
-0.0279313363134861,
-0.09579489380121231,
-0.2623761296272278,
-0.4104035198688507,
-0.23283813893795013,
-0.28489968180656433,
0.03029938042163849,
-0.19315291941165924,
0.04995949938893318,
0.20394818484783173,
-0.4926055669784546,
0.45481646060943604,
0.2980794608592987,
0.31797128915786743,
0.052274707704782486,
-0.4925529956817627,
0.10448618233203888,
-0.1387178599834442,
-0.02933226339519024,
-0.03741580620408058,
0.02237699180841446,
0.11587086319923401,
0.08447518199682236,
0.01753530651330948,
0.1002587154507637,
-0.05545680597424507,
-0.11989773064851761,
-0.05943358689546585,
0.3109676241874695,
-0.027476325631141663,
0.04786718636751175,
-0.27396413683891296,
0.06089562177658081,
0.07275538146495819,
-0.2635350823402405,
0.1644744575023651,
0.21541905403137207,
0.05807223916053772,
-0.041404932737350464,
0.07914123684167862,
-0.06803418695926666,
-0.10207776725292206,
0.16643989086151123,
-0.3820800483226776,
0.1126205325126648,
0.39835095405578613,
0.14900262653827667,
-0.07074546813964844,
-0.12307407706975937,
0.4285420775413513,
0.5256732702255249,
-0.3478705883026123,
0.07864324748516083,
-0.09489980340003967,
0.31409919261932373,
-0.06469281017780304,
0.0840887725353241,
0.14689472317695618,
-0.20556983351707458,
-0.15246738493442535,
-0.5798604488372803,
-0.11897948384284973,
0.26881104707717896,
-0.2476980835199356,
0.13157790899276733,
-0.005481760948896408,
0.012534048408269882,
-0.05484062433242798,
-0.31619182229042053,
-0.3050802946090698,
0.3531349301338196,
-0.18825802206993103,
-0.2739577293395996,
0.2469676434993744,
0.23040813207626343,
0.37224850058555603,
-0.18576499819755554,
0.1093425303697586,
0.07693913578987122,
0.005449935793876648,
-0.21652603149414062,
-0.32455724477767944,
0.10371454060077667,
0.05293814837932587,
0.1393965184688568,
0.08829998970031738,
0.0007780678570270538,
-0.1165667176246643,
-0.03069121390581131,
-0.11538524925708771,
-0.013899656012654305,
0.0015753209590911865,
0.21275557577610016,
-0.02370327338576317,
-0.26214343309402466,
-0.20603002607822418,
0.15286386013031006,
-0.05443659424781799,
0.2138281762599945,
0.049190081655979156,
0.28610843420028687,
0.04263315722346306,
0.03516979515552521,
0.0719335600733757,
-0.0036253854632377625,
0.12369997799396515,
0.1670098900794983,
0.2734041213989258,
-0.3753291964530945,
0.020069148391485214,
0.2274583876132965,
0.25004297494888306,
0.24629910290241241,
-0.2553248107433319,
0.13734716176986694,
0.4571758806705475,
0.1591152548789978,
-0.2186788022518158,
-0.15714363753795624,
0.1429118663072586,
0.19127562642097473,
0.10687203705310822,
0.06959218531847,
0.22272244095802307,
-0.19123518466949463,
-0.27763617038726807,
-0.011351038701832294,
0.5227795839309692,
0.12326622754335403,
0.2391815036535263,
0.530308723449707,
0.03529582545161247,
0.057201121002435684,
0.14246095716953278,
0.156491219997406,
0.330746054649353,
0.7568557858467102,
0.023518234491348267,
0.05190016329288483,
0.07557345181703568,
0.15899235010147095,
-0.025950491428375244,
-0.25785064697265625,
-0.16221259534358978,
0.06370142847299576,
-0.05227823555469513,
0.09333118051290512,
-0.108086958527565,
0.48784729838371277,
-0.05679768696427345,
0.29366496205329895,
0.058109819889068604,
0.04593317583203316,
-0.004246998578310013,
-0.1642257124185562,
-0.11462800204753876,
-0.29706570506095886,
-0.012676231563091278,
-0.12584646046161652,
-0.17695683240890503,
-0.2212763875722885,
0.3041558265686035,
0.0010143741965293884,
0.10342194139957428,
-0.41597780585289,
0.1816399097442627,
0.36919835209846497,
-0.027423150837421417,
-0.12050539255142212,
0.38246986269950867,
-0.05775190889835358,
-0.1648431122303009,
0.05459561571478844,
0.01197757013142109,
0.5171585083007812,
0.2865242660045624,
-0.0042829085141420364,
-0.14648115634918213,
-0.16678664088249207,
-0.17873264849185944,
-0.035748258233070374,
0.2975344657897949,
-0.07181264460086823,
-0.025823689997196198,
0.11397001147270203,
0.14018681645393372,
-0.05168546363711357,
0.13291960954666138,
0.019067928194999695,
0.44227921962738037,
-0.3442056179046631,
0.17905643582344055,
-0.46300438046455383,
0.16084077954292297,
-0.06999529153108597,
-0.05462873727083206,
-0.4273664057254791,
0.009544137865304947,
0.5410624146461487,
0.03265921026468277,
0.17942515015602112,
0.11329643428325653,
0.08060342073440552,
-0.14343339204788208,
0.3056686222553253,
0.3629053831100464,
0.5245558023452759,
-0.15584881603717804,
-0.09444818645715714,
-0.635741114616394,
-0.09189710766077042,
-0.15769009292125702,
-0.1676761955022812,
0.07249374687671661,
0.048803821206092834,
-0.19116747379302979,
-0.056027717888355255,
0.3910115957260132,
0.34417250752449036,
-0.15367163717746735,
0.06546860933303833,
-0.2543303370475769,
-0.22316665947437286,
-0.29044389724731445,
0.09072116017341614,
-0.05727062001824379,
-0.08484377712011337,
0.24283644556999207,
-0.08917822688817978,
-0.10320794582366943,
-0.3553770184516907,
-0.04043097048997879,
-0.24814368784427643,
-0.19966375827789307,
0.2647322118282318,
0.1542407125234604,
0.16619640588760376,
-0.03315228223800659,
0.09095997363328934,
-0.272250771522522,
-0.2210613638162613,
-0.16771239042282104,
0.26934152841567993,
-0.057725582271814346,
0.2181398570537567,
-0.5210382342338562,
-0.2048892229795456,
-0.2415643334388733,
-0.13756710290908813,
-0.006983820348978043,
0.10446581244468689,
-0.31494665145874023,
0.14310257136821747,
-0.32438626885414124,
-0.01821506954729557,
0.1625182032585144,
0.24607032537460327,
-0.10795329511165619,
0.04373995214700699,
0.0227210596203804,
-0.20828981697559357,
0.3781498670578003,
-0.7233261466026306,
-0.18690168857574463,
0.0644274652004242,
0.20395627617835999,
0.17780548334121704,
-0.10501687973737717,
-0.1364593803882599,
0.1001879945397377,
0.4438978135585785,
0.1598876416683197,
-0.15041887760162354,
0.09245352447032928,
0.02256178855895996,
0.18842272460460663,
-0.0005724690854549408,
0.08902386575937271,
0.20395663380622864,
-0.2294178009033203,
0.21454834938049316,
-0.35291874408721924
] |
https://github.com/huggingface/datasets/issues/5099 | datasets doesn't support # in data paths | I think you can create a dataset repository on the Hub with a dummy file containing a `#` | ## Describe the bug
dataset files with `#` symbol their paths aren't read correctly.
## Steps to reproduce the bug
The data in folder `c#`of this [dataset](https://huggingface.co/datasets/loubnabnl/bigcode_csharp) can't be loaded. While the folder `c_sharp` with the same data is loaded properly
```python
ds = load_dataset('loubnabnl/bigcode_csharp', split="train", data_files=["data/c#/*"])
```
```
FileNotFoundError: Couldn't find file at https://huggingface.co/datasets/loubnabnl/bigcode_csharp/resolve/27a3166cff4bb18e11919cafa6f169c0f57483de/data/c#/data_0003.jsonl
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.5.2
- Platform: macOS-12.2.1-arm64-arm-64bit
- Python version: 3.9.13
- PyArrow version: 9.0.0
- Pandas version: 1.4.3
cc @lhoestq | 18 | datasets doesn't support # in data paths
## Describe the bug
dataset files with `#` symbol their paths aren't read correctly.
## Steps to reproduce the bug
The data in folder `c#`of this [dataset](https://huggingface.co/datasets/loubnabnl/bigcode_csharp) can't be loaded. While the folder `c_sharp` with the same data is loaded properly
```python
ds = load_dataset('loubnabnl/bigcode_csharp', split="train", data_files=["data/c#/*"])
```
```
FileNotFoundError: Couldn't find file at https://huggingface.co/datasets/loubnabnl/bigcode_csharp/resolve/27a3166cff4bb18e11919cafa6f169c0f57483de/data/c#/data_0003.jsonl
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.5.2
- Platform: macOS-12.2.1-arm64-arm-64bit
- Python version: 3.9.13
- PyArrow version: 9.0.0
- Pandas version: 1.4.3
cc @lhoestq
I think you can create a dataset repository on the Hub with a dummy file containing a `#` | [
-0.30818721652030945,
0.1164131760597229,
-0.09123972058296204,
0.3513009548187256,
0.3450326919555664,
0.09891653805971146,
0.0209820456802845,
0.4554470181465149,
-0.03980519622564316,
0.22690436244010925,
0.11732082813978195,
0.6159343123435974,
-0.3614945709705353,
0.3803955614566803,
0.06224880367517471,
0.22567948698997498,
0.06454240530729294,
0.12334040552377701,
-0.1542796939611435,
-0.12215152382850647,
-0.2471407651901245,
0.2506783604621887,
-0.009743429720401764,
0.1122467964887619,
-0.3393051028251648,
0.0380307137966156,
-0.09509806334972382,
0.4806627929210663,
-0.1032675951719284,
-0.30800777673721313,
0.17949946224689484,
0.01722264476120472,
0.4014354944229126,
0.4271255135536194,
-0.00010409200331196189,
0.24648262560367584,
0.4134786128997803,
0.004867877811193466,
-0.3792193830013275,
-0.4819059371948242,
-0.5732823014259338,
-0.22176752984523773,
0.1420947015285492,
-0.20924806594848633,
-0.03272540494799614,
0.15897344052791595,
0.08119109272956848,
-0.19140778481960297,
0.4624793529510498,
0.4943528473377228,
0.2815319299697876,
0.40294450521469116,
0.07364757359027863,
-0.06432325392961502,
0.4132228493690491,
0.22409696877002716,
-0.018374554812908173,
0.6794442534446716,
0.09894044697284698,
0.15679265558719635,
0.028270825743675232,
0.008904222398996353,
0.06461000442504883,
-0.09960399568080902,
0.25823771953582764,
0.2113238126039505,
0.0168413408100605,
-0.16883485019207,
0.011564111337065697,
0.15276658535003662,
0.44651150703430176,
-0.39007145166397095,
-0.24092933535575867,
-0.1589602679014206,
-0.10994309186935425,
-0.24676088988780975,
0.34022092819213867,
0.14870530366897583,
0.21174511313438416,
0.40213608741760254,
-0.11229725927114487,
-0.06002358719706535,
-0.18893691897392273,
0.337324321269989,
0.0768425464630127,
0.03614739701151848,
-0.19536182284355164,
0.013556841760873795,
-0.034722950309515,
0.059848636388778687,
0.032508693635463715,
-0.07900628447532654,
0.025860648602247238,
0.05952072888612747,
-0.056047189980745316,
-0.019499223679304123,
0.11452016234397888,
0.18855828046798706,
0.16811498999595642,
0.0372004397213459,
0.15430587530136108,
0.049204081296920776,
-0.3094249665737152,
0.30139848589897156,
-0.023995820432901382,
0.02116137370467186,
-0.009012728929519653,
-0.01977166160941124,
0.4481086730957031,
-0.012016253545880318,
-0.03184737265110016,
-0.136240154504776,
-0.5941135287284851,
-0.19607551395893097,
-0.3279457092285156,
0.0161944180727005,
0.14709879457950592,
-0.12242089956998825,
-0.40349480509757996,
-0.016975484788417816,
0.037850722670555115,
-0.06103590875864029,
0.2624719440937042,
0.593092679977417,
0.1701863557100296,
0.10340661555528641,
-0.1322975754737854,
0.07059822231531143,
0.01460755430161953,
0.15278629958629608,
-0.32221436500549316,
0.1655072420835495,
-0.21754693984985352,
-0.12006037682294846,
0.19019639492034912,
-0.19468986988067627,
0.3347645699977875,
-0.0010116416960954666,
0.0736253410577774,
0.013892874121665955,
-0.009642131626605988,
-0.006645986810326576,
-0.18821623921394348,
0.10422156751155853,
-0.1832364946603775,
0.24108411371707916,
0.0760679692029953,
-0.1304871141910553,
-0.18910518288612366,
0.16174401342868805,
-0.4301409423351288,
-0.3593538999557495,
-0.3335115313529968,
0.20996327698230743,
-0.20304100215435028,
-0.11940433084964752,
-0.5989369750022888,
0.004035919904708862,
-0.1606053113937378,
-0.03104211762547493,
-0.038950420916080475,
0.04504279047250748,
-0.037681736052036285,
-0.2724452018737793,
0.14632953703403473,
0.40239566564559937,
-0.4895813465118408,
-0.024506457149982452,
0.1824389100074768,
-0.05643888935446739,
-0.058593980967998505,
0.2532571256160736,
-0.4171452820301056,
0.10614249110221863,
-0.27377161383628845,
0.21976889669895172,
0.3311694264411926,
-0.6296111345291138,
-0.3921896815299988,
0.2246292680501938,
-0.25639551877975464,
-0.34412750601768494,
0.03338111191987991,
-0.14043965935707092,
0.04784489795565605,
-0.11090444028377533,
-0.09376111626625061,
0.07101964950561523,
0.2721564471721649,
-0.09584233164787292,
-0.22661584615707397,
-0.4427241384983063,
0.017326857894659042,
0.1624419391155243,
0.09852974116802216,
-0.0927899107336998,
0.31435948610305786,
-0.06622276455163956,
0.36871668696403503,
-0.20941618084907532,
-0.044134609401226044,
0.39721226692199707,
0.31717345118522644,
-0.02324889600276947,
-0.0067795743234455585,
-0.020335428416728973,
-0.4269968867301941,
0.24533048272132874,
-0.11030230671167374,
-0.12081795930862427,
-0.2646346688270569,
-0.134036123752594,
-0.31929484009742737,
-0.14537008106708527,
-0.12370328605175018,
-0.031327906996011734,
0.1668292135000229,
-0.020049937069416046,
0.1653466522693634,
0.1987220048904419,
-0.43394970893859863,
0.3787666857242584,
-0.20200181007385254,
0.16953609883785248,
-0.22554904222488403,
0.5488787293434143,
-0.08505185693502426,
-0.10563994199037552,
0.19827885925769806,
0.34847292304039,
0.21314015984535217,
-0.3259684145450592,
-0.09150414168834686,
0.34054771065711975,
-0.11825927346944809,
0.03870641812682152,
0.24775388836860657,
0.37822580337524414,
0.17488470673561096,
-0.36907511949539185,
-0.09020739793777466,
0.20386740565299988,
0.24086523056030273,
0.17435914278030396,
-0.23090526461601257,
0.1437140703201294,
-0.3535119295120239,
0.021929264068603516,
0.09644509851932526,
-0.14100110530853271,
0.3607727885246277,
-0.13298065960407257,
-0.08236312866210938,
-0.004619695246219635,
0.0853482186794281,
0.2319451868534088,
0.3249033987522125,
0.20501667261123657,
-0.2615821361541748,
-0.12577477097511292,
0.6339075565338135,
-0.0026804525405168533,
0.1394404172897339,
0.16201740503311157,
-0.35916075110435486,
0.06423210352659225,
0.12578418850898743,
0.061396870762109756,
0.43182170391082764,
0.25268498063087463,
-0.10882224142551422,
0.11502363532781601,
-0.005638273432850838,
-0.27889829874038696,
0.18810543417930603,
0.029718291014432907,
0.07616421580314636,
0.052926499396562576,
0.19510981440544128,
-0.06747680902481079,
-0.4134066104888916,
-0.37776979804039,
0.08813705295324326,
0.1617293357849121,
-0.41003260016441345,
0.08054777979850769,
-0.43943265080451965,
-0.1582324504852295,
-0.2249528169631958,
-0.34059590101242065,
-0.03657783940434456,
-0.13795332610607147,
-0.11596451699733734,
0.18566417694091797,
-0.007723238319158554,
0.08025801926851273,
-0.2272137552499771,
0.1488770693540573,
-0.06157182902097702,
-0.047158315777778625,
-0.23059839010238647,
-0.11576575040817261,
-0.32218676805496216,
0.08028934895992279,
0.48209983110427856,
0.11573731154203415,
0.08831160515546799,
-0.3315931558609009,
0.14662958681583405,
-0.32813575863838196,
-0.21822306513786316,
0.10857270658016205,
-0.06098015606403351,
0.15981122851371765,
-0.019426532089710236,
0.09444752335548401,
-0.20264378190040588,
-0.17087307572364807,
0.24792808294296265,
-0.08870387077331543,
-0.11875490844249725,
-0.03281624615192413,
-0.050160497426986694,
-0.29452207684516907,
-0.18642328679561615,
-0.3032665252685547,
-0.41919100284576416,
-0.3989255130290985,
0.20639446377754211,
0.004631992429494858,
0.03307304531335831,
0.13173523545265198,
0.06719568371772766,
0.38202449679374695,
-0.05359885096549988,
-0.2208196073770523,
-0.14170148968696594,
-0.6454421281814575,
0.5415087342262268,
-0.2684747874736786,
-0.3759697675704956,
0.2279786467552185,
-0.1253206431865692,
0.05898858606815338,
-0.37262624502182007,
-0.29791945219039917,
-0.21363911032676697,
-0.2465723305940628,
0.20937219262123108,
0.11753692477941513,
0.09252811968326569,
0.19420449435710907,
-0.05554044246673584,
-0.11716624349355698,
-0.32084837555885315,
-0.22505071759223938,
0.17801591753959656,
0.11936045438051224,
0.13539449870586395,
0.08856093138456345,
0.2786911129951477,
0.035996634513139725,
0.39059144258499146,
0.34523239731788635,
-0.25307607650756836,
0.35902345180511475,
-0.2205381840467453,
0.31193941831588745,
0.06872271001338959,
-0.18236637115478516,
0.1763499528169632,
0.050068892538547516,
-0.07524100691080093,
0.3406331539154053,
0.18258333206176758,
0.15172220766544342,
-0.0032831281423568726,
-0.22667311131954193,
-0.4020725190639496,
-0.1711466908454895,
0.027767611667513847,
-0.22159138321876526,
-0.0981295183300972,
0.15851397812366486,
-0.03356379270553589,
-0.03353879228234291,
-0.18061408400535583,
0.25246280431747437,
0.27014613151550293,
0.050195664167404175,
0.10481252521276474,
0.01946277543902397,
-0.15369410812854767,
-0.5877005457878113,
0.29095959663391113,
-0.016332129016518593,
0.2645260989665985,
-0.01263398677110672,
0.1228950098156929,
0.13195841014385223,
-0.13557898998260498,
0.8377931714057922,
-0.20331886410713196,
0.02402441017329693,
0.07754559814929962,
0.05283772200345993,
-0.36457332968711853,
0.02405250445008278,
-0.14906103909015656,
0.3238379955291748,
-0.16232582926750183,
0.33830583095550537,
-0.25586363673210144,
-0.20099034905433655,
0.10180996358394623,
-0.055737730115652084,
-0.037009820342063904,
-0.1951719969511032,
-0.25171342492103577,
-0.19681942462921143,
-0.31146618723869324,
-0.10742608457803726,
0.052630841732025146,
0.10950005054473877,
-0.3677120506763458,
-0.24344243109226227,
-0.009762559086084366,
-0.2892017364501953,
0.17593304812908173,
0.19320274889469147,
0.39579135179519653,
-0.034780971705913544,
0.011346358805894852,
0.294927179813385,
0.337679386138916,
0.2226516306400299,
0.6290253400802612,
-0.044335853308439255,
-0.39787355065345764,
0.02683991938829422,
-0.17277586460113525,
0.1623421311378479,
0.21067680418491364,
-0.2673966884613037,
0.014645680785179138,
0.19541800022125244,
-0.07721087336540222,
-0.3092954158782959,
0.3531334102153778,
0.12391933798789978,
0.15871299803256989,
-0.22821097075939178,
-0.22354839742183685,
0.597316324710846,
0.17622916400432587,
-0.065220907330513,
0.08267458528280258,
0.2733791470527649,
-0.4198222756385803,
0.16995280981063843,
-0.16865986585617065,
0.8135983347892761,
-0.2510055899620056,
0.13023725152015686,
0.20667874813079834,
-0.25532153248786926,
0.3710525333881378,
-0.17221607267856598,
0.010123524814844131,
-0.4161323010921478,
-0.02375834807753563,
-0.1348685771226883,
-0.14091980457305908,
0.01953788846731186,
0.2418959140777588,
-0.07518233358860016,
0.2592466175556183,
-0.22718261182308197,
0.656795859336853,
0.006839422974735498,
0.30927541851997375,
0.0032853931188583374,
-0.0100437942892313,
-0.3418158292770386,
0.2291598916053772,
0.03202950954437256,
0.01733282208442688,
-0.11894113570451736,
-0.31266218423843384,
-0.4080706238746643,
-0.22420673072338104,
-0.014725953340530396,
0.11092104762792587,
-0.045131977647542953,
0.1654510349035263,
0.07215878367424011,
-0.2846428155899048,
0.2158321887254715,
0.17702049016952515,
0.5059669613838196,
0.12212373316287994,
-0.45059165358543396,
0.06494791805744171,
-0.1598360538482666,
-0.00704827019944787,
-0.11253274232149124,
0.07612112909555435,
0.031161732971668243,
0.04929811507463455,
-0.04016882926225662,
0.08639577031135559,
0.02577926591038704,
-0.27866464853286743,
-0.08611584454774857,
0.3202914893627167,
0.10571543127298355,
0.007230317685753107,
-0.1370706707239151,
0.11842238903045654,
-0.21879298985004425,
-0.24067743122577667,
0.20788398385047913,
0.1627131700515747,
-0.008473282679915428,
0.11980513483285904,
0.18517805635929108,
-0.2184402048587799,
-0.06909088790416718,
0.24381276965141296,
-0.3363149166107178,
0.07612680643796921,
0.39747047424316406,
-0.015272803604602814,
-0.14328917860984802,
-0.15264484286308289,
0.34402230381965637,
0.49183475971221924,
-0.32669931650161743,
0.1598988175392151,
0.1215856596827507,
0.226162388920784,
0.012918624095618725,
0.2043541818857193,
0.04841073229908943,
-0.06653795391321182,
-0.0936659723520279,
-0.45593905448913574,
-0.2265465259552002,
0.30533990263938904,
-0.16268125176429749,
0.16339008510112762,
0.13426050543785095,
0.19783136248588562,
-0.08984963595867157,
-0.3398790657520294,
-0.39565178751945496,
0.4198586642742157,
-0.2749979496002197,
-0.13130326569080353,
-0.007482003420591354,
0.10053455829620361,
0.40509000420570374,
-0.19193249940872192,
0.17684461176395416,
0.1662006974220276,
-0.12291747331619263,
-0.30213862657546997,
-0.2580179274082184,
0.07982558012008667,
0.1229080781340599,
0.1750008761882782,
-0.02920711785554886,
0.029852326959371567,
-0.0563686303794384,
-0.010789033025503159,
0.043905045837163925,
0.11062268167734146,
0.022667530924081802,
0.17561271786689758,
0.12769396603107452,
-0.23244744539260864,
-0.14423884451389313,
0.1364462673664093,
0.00632370263338089,
0.3021198511123657,
-0.08073277026414871,
0.2018400877714157,
-0.06051944941282272,
0.05989810824394226,
0.17542535066604614,
-0.018122181296348572,
0.24849557876586914,
0.18134084343910217,
0.1863337755203247,
-0.33588308095932007,
0.00740799680352211,
0.2588908076286316,
0.27402639389038086,
0.23861956596374512,
-0.20515036582946777,
0.042167097330093384,
0.4417693018913269,
0.21925227344036102,
-0.17610007524490356,
-0.10179561376571655,
0.04572053626179695,
0.0653672143816948,
0.18442732095718384,
0.028515629470348358,
0.330359548330307,
-0.14284563064575195,
-0.32986050844192505,
-0.012149148620665073,
0.5238446593284607,
0.061290398240089417,
0.04076825827360153,
0.49478599429130554,
0.02491827681660652,
0.04267561435699463,
0.16853484511375427,
0.11304347217082977,
0.19537220895290375,
0.8557333946228027,
-0.03324060142040253,
0.14626377820968628,
0.058511823415756226,
0.20118750631809235,
0.049291446805000305,
-0.222431480884552,
-0.23501242697238922,
0.019438937306404114,
0.09009865671396255,
-0.021629638969898224,
-0.07708893716335297,
0.36001309752464294,
-0.03223762288689613,
0.18945488333702087,
0.041575632989406586,
0.06337475776672363,
-0.05469992011785507,
-0.2246265560388565,
-0.16799455881118774,
-0.21020302176475525,
-0.0712534636259079,
-0.11025382578372955,
-0.2576315104961395,
-0.27305811643600464,
0.2586591839790344,
0.12292607128620148,
0.10961314290761948,
-0.2509255111217499,
0.1697254180908203,
0.2564712166786194,
0.0158228799700737,
-0.11601036787033081,
0.32999664545059204,
-0.05998776853084564,
-0.03329068422317505,
0.10186756402254105,
0.019956815987825394,
0.5109645128250122,
0.2944023013114929,
-0.060024064034223557,
-0.06808298826217651,
-0.08528806269168854,
-0.1557864099740982,
-0.08099846541881561,
0.18989181518554688,
0.04872129485011101,
0.047781795263290405,
0.14740198850631714,
0.2368130087852478,
-0.15650172531604767,
0.10414004325866699,
-0.07978272438049316,
0.4273429214954376,
-0.04492112621665001,
0.2348966896533966,
-0.2181793451309204,
0.09959142655134201,
-0.1592501997947693,
-0.07810506969690323,
-0.46362513303756714,
0.07895810902118683,
0.5165401697158813,
-0.1162378191947937,
0.2304864525794983,
0.008508071303367615,
0.13040800392627716,
-0.14579670131206512,
0.4208524823188782,
0.2580588757991791,
0.39828282594680786,
-0.23783186078071594,
-0.024684414267539978,
-0.5556158423423767,
-0.04392286390066147,
-0.12545038759708405,
-0.14421342313289642,
-0.10924909263849258,
0.06947079300880432,
-0.1108558252453804,
0.03423362225294113,
0.1574917733669281,
0.2394406944513321,
-0.16955849528312683,
-0.0546017587184906,
-0.3151909112930298,
-0.006136797368526459,
-0.2683303952217102,
0.0009040255099534988,
0.09709219634532928,
-0.19590729475021362,
0.2167729288339615,
0.009030682034790516,
-0.03246346861124039,
-0.277704119682312,
0.16310061514377594,
-0.2079407125711441,
-0.28231197595596313,
0.27362585067749023,
0.07392861694097519,
0.2030889093875885,
-0.07801435887813568,
0.2089356929063797,
-0.22881141304969788,
-0.25661370158195496,
-0.26659896969795227,
0.22615787386894226,
-0.03213474527001381,
0.2509743571281433,
-0.42602232098579407,
-0.1196427047252655,
-0.14377757906913757,
-0.25068211555480957,
-0.023489192128181458,
0.12923358380794525,
-0.2715533971786499,
0.11069537699222565,
-0.26045316457748413,
0.010765154846012592,
0.01771232858300209,
0.30060824751853943,
-0.015982776880264282,
0.00621158629655838,
-0.07980381697416306,
-0.2874983251094818,
0.5525709986686707,
-0.5654752254486084,
-0.26538825035095215,
0.07729307562112808,
0.18102845549583435,
0.1627480685710907,
-0.2322760820388794,
-0.14216990768909454,
0.24149492383003235,
0.33398616313934326,
0.04217059910297394,
-0.217122882604599,
0.1185799092054367,
0.07126200199127197,
0.14589650928974152,
-0.09557747840881348,
-0.07849554717540741,
0.19444328546524048,
-0.134769469499588,
0.08063885569572449,
-0.45431309938430786
] |
https://github.com/huggingface/datasets/issues/5099 | datasets doesn't support # in data paths | Ah sorry it was private I just made it public, I can also help with this if needed | ## Describe the bug
dataset files with `#` symbol their paths aren't read correctly.
## Steps to reproduce the bug
The data in folder `c#`of this [dataset](https://huggingface.co/datasets/loubnabnl/bigcode_csharp) can't be loaded. While the folder `c_sharp` with the same data is loaded properly
```python
ds = load_dataset('loubnabnl/bigcode_csharp', split="train", data_files=["data/c#/*"])
```
```
FileNotFoundError: Couldn't find file at https://huggingface.co/datasets/loubnabnl/bigcode_csharp/resolve/27a3166cff4bb18e11919cafa6f169c0f57483de/data/c#/data_0003.jsonl
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.5.2
- Platform: macOS-12.2.1-arm64-arm-64bit
- Python version: 3.9.13
- PyArrow version: 9.0.0
- Pandas version: 1.4.3
cc @lhoestq | 18 | datasets doesn't support # in data paths
## Describe the bug
dataset files with `#` symbol their paths aren't read correctly.
## Steps to reproduce the bug
The data in folder `c#`of this [dataset](https://huggingface.co/datasets/loubnabnl/bigcode_csharp) can't be loaded. While the folder `c_sharp` with the same data is loaded properly
```python
ds = load_dataset('loubnabnl/bigcode_csharp', split="train", data_files=["data/c#/*"])
```
```
FileNotFoundError: Couldn't find file at https://huggingface.co/datasets/loubnabnl/bigcode_csharp/resolve/27a3166cff4bb18e11919cafa6f169c0f57483de/data/c#/data_0003.jsonl
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.5.2
- Platform: macOS-12.2.1-arm64-arm-64bit
- Python version: 3.9.13
- PyArrow version: 9.0.0
- Pandas version: 1.4.3
cc @lhoestq
Ah sorry it was private I just made it public, I can also help with this if needed | [
-0.26596444845199585,
0.15241342782974243,
-0.11883433163166046,
0.4522739052772522,
0.3733292818069458,
0.047265924513339996,
-0.03504321351647377,
0.40546268224716187,
-0.02588869072496891,
0.15918132662773132,
0.1695338487625122,
0.5867083668708801,
-0.4151313006877899,
0.3853553533554077,
0.07561896741390228,
0.07880507409572601,
0.08540232479572296,
0.09542453289031982,
-0.2520277500152588,
-0.07886792719364166,
-0.33082783222198486,
0.27570414543151855,
-0.06024470180273056,
0.12717582285404205,
-0.20374837517738342,
-0.09439907968044281,
-0.13173100352287292,
0.49727874994277954,
-0.11043552309274673,
-0.2919183075428009,
0.06995899230241776,
-0.08874981105327606,
0.44486576318740845,
0.4672466218471527,
-0.0001057201880030334,
0.2537986636161804,
0.3946543335914612,
0.023280823603272438,
-0.3559176027774811,
-0.501735270023346,
-0.5940237641334534,
-0.2705601453781128,
0.14670762419700623,
-0.19923385977745056,
-0.002705998718738556,
0.0008693104609847069,
0.010026833042502403,
-0.36911895871162415,
0.49575895071029663,
0.5168370008468628,
0.2623733878135681,
0.3380805552005768,
0.03782568499445915,
0.018719574436545372,
0.4195472002029419,
0.2601993680000305,
0.06178455799818039,
0.5681889057159424,
0.07451648265123367,
0.023260029032826424,
0.05173155665397644,
0.023517267778515816,
0.04947149008512497,
-0.17662586271762848,
0.21281638741493225,
0.17311587929725647,
0.008966177701950073,
-0.16597503423690796,
-0.002305593341588974,
0.14569205045700073,
0.509605348110199,
-0.2770356237888336,
-0.22470144927501678,
-0.11558268964290619,
-0.16417048871517181,
-0.25080016255378723,
0.3580675423145294,
0.1386173665523529,
0.18939374387264252,
0.3756221532821655,
-0.10931296646595001,
0.040417615324258804,
-0.1515049934387207,
0.3807523250579834,
0.11634257435798645,
-0.0500548779964447,
-0.22445619106292725,
0.012926571071147919,
0.04340239614248276,
0.02238135039806366,
-0.03754603862762451,
-0.06024591624736786,
0.02530163899064064,
0.14064596593379974,
-0.11869308352470398,
0.08379103243350983,
0.08124717324972153,
0.12481201440095901,
0.1491544246673584,
0.07741148769855499,
0.18828830122947693,
-0.020455162972211838,
-0.24064111709594727,
0.3142269551753998,
0.0015261787921190262,
-0.012592772021889687,
-0.07350819557905197,
0.010211541317403316,
0.36230772733688354,
0.013122612610459328,
-0.04349929094314575,
-0.16909101605415344,
-0.5693614482879639,
-0.3406156003475189,
-0.2944396138191223,
0.0012340769171714783,
0.2009483277797699,
-0.12181375920772552,
-0.42684316635131836,
0.029818087816238403,
-0.05277964472770691,
-0.2077873945236206,
0.29741171002388,
0.6270850896835327,
0.17995543777942657,
0.04236292093992233,
-0.07113157212734222,
0.07074733078479767,
0.08675850182771683,
0.11618726700544357,
-0.2715887725353241,
0.11854609847068787,
-0.2564029097557068,
-0.1385827660560608,
0.16611547768115997,
-0.10056284070014954,
0.3197293281555176,
0.09202510863542557,
-0.03215528279542923,
-0.03575005754828453,
0.0060929954051971436,
-0.08751979470252991,
-0.17801347374916077,
0.055477675050497055,
-0.2851719856262207,
0.22354277968406677,
0.13365043699741364,
-0.06577363610267639,
-0.1327553391456604,
0.20401450991630554,
-0.3903592824935913,
-0.2841949462890625,
-0.31129780411720276,
0.20517125725746155,
-0.10962311923503876,
-0.1320318877696991,
-0.6041916012763977,
0.04124830290675163,
-0.08255123347043991,
-0.04225814715027809,
0.0220329612493515,
-0.04935694485902786,
-0.07875540852546692,
-0.2553442418575287,
0.20391836762428284,
0.4058748483657837,
-0.5836696624755859,
-0.011409997940063477,
0.1326274275779724,
-0.11804135143756866,
0.048556581139564514,
0.33976492285728455,
-0.43083643913269043,
0.07778859883546829,
-0.32593706250190735,
0.14177170395851135,
0.38104018568992615,
-0.4618309438228607,
-0.34346795082092285,
0.34404686093330383,
-0.18982644379138947,
-0.2702033817768097,
0.1529432237148285,
-0.20266450941562653,
0.004686706233769655,
-0.08117220550775528,
-0.11781966686248779,
0.15262943506240845,
0.27273449301719666,
-0.10895097255706787,
-0.24714301526546478,
-0.3719094693660736,
0.13239723443984985,
0.1508781760931015,
0.027978884056210518,
-0.1315935254096985,
0.3514522314071655,
-0.2630944848060608,
0.39729878306388855,
-0.20340335369110107,
-0.1310005486011505,
0.4215525984764099,
0.2976965606212616,
0.012733303010463715,
0.013035289943218231,
-0.05199190974235535,
-0.4429663419723511,
0.16918402910232544,
-0.11797440052032471,
-0.26131951808929443,
-0.2926948070526123,
-0.0423789918422699,
-0.31579118967056274,
-0.1310470700263977,
-0.17197313904762268,
-0.02531702071428299,
0.15528666973114014,
0.05112926661968231,
0.10628801584243774,
0.23556266725063324,
-0.41672664880752563,
0.2922063171863556,
-0.22457927465438843,
0.1625162959098816,
-0.07331442832946777,
0.45771321654319763,
-0.10226858407258987,
-0.1002802848815918,
0.13168618083000183,
0.33762019872665405,
0.26027679443359375,
-0.3393031656742096,
-0.12061580270528793,
0.34785035252571106,
-0.06211913749575615,
-0.041165128350257874,
0.12432347238063812,
0.3274328112602234,
0.0973464697599411,
-0.4061300754547119,
-0.12863008677959442,
0.3062535226345062,
0.27094578742980957,
0.11602804809808731,
-0.20740410685539246,
0.11533372849225998,
-0.39993324875831604,
0.10977892577648163,
0.14509162306785583,
-0.20869441330432892,
0.2861569821834564,
-0.16905304789543152,
-0.06239897012710571,
0.04536256194114685,
0.18894043564796448,
0.23709243535995483,
0.3639160990715027,
0.23703064024448395,
-0.37681055068969727,
-0.2049616277217865,
0.658852756023407,
-0.025000179186463356,
0.06582097709178925,
0.17277944087982178,
-0.277744859457016,
0.07944080233573914,
0.08793428540229797,
0.1857815384864807,
0.46730881929397583,
0.27845096588134766,
-0.09778985381126404,
0.0749695897102356,
0.017553498968482018,
-0.2461218535900116,
0.2748886048793793,
0.025509539991617203,
0.10653086751699448,
0.04093300923705101,
0.1453685313463211,
0.013920932076871395,
-0.3688158094882965,
-0.4012899696826935,
0.0688217505812645,
0.19266186654567719,
-0.47245651483535767,
0.20391274988651276,
-0.4505104124546051,
-0.3359508514404297,
-0.2935827672481537,
-0.3064843416213989,
0.027297670021653175,
-0.10270541161298752,
-0.24955444037914276,
0.054128192365169525,
-0.01895913854241371,
0.10674957931041718,
-0.2763550281524658,
0.10824011266231537,
-0.023374976590275764,
-0.0789070799946785,
-0.2343350499868393,
-0.011265447363257408,
-0.35932815074920654,
0.06448569893836975,
0.5859783291816711,
0.04208995774388313,
0.052680179476737976,
-0.3050200939178467,
0.0797351524233818,
-0.2848452627658844,
-0.2724149227142334,
0.03133031353354454,
0.004140269011259079,
0.22799843549728394,
-0.024337396025657654,
0.15016718208789825,
-0.20188389718532562,
-0.19866937398910522,
0.24981972575187683,
-0.03616505488753319,
-0.12530238926410675,
-0.07576867938041687,
-0.012548946775496006,
-0.21048381924629211,
-0.20830237865447998,
-0.35890766978263855,
-0.43009382486343384,
-0.37687918543815613,
0.26634711027145386,
-0.045407865196466446,
0.06060818210244179,
0.17681218683719635,
0.11940993368625641,
0.4224933087825775,
-0.0960945412516594,
-0.05568118393421173,
-0.11295431852340698,
-0.5748217105865479,
0.5483896732330322,
-0.1764034926891327,
-0.38611605763435364,
0.1702805608510971,
-0.1241738349199295,
0.032584626227617264,
-0.3138989806175232,
-0.25921007990837097,
-0.06056731194257736,
-0.3357747793197632,
0.17014889419078827,
0.042079806327819824,
0.11264684796333313,
0.09010618925094604,
-0.031549256294965744,
-0.10724589973688126,
-0.34564635157585144,
-0.18723568320274353,
0.16858398914337158,
-0.027709219604730606,
0.15786617994308472,
0.09357183426618576,
0.4755491614341736,
0.07076801359653473,
0.4232550859451294,
0.2763078212738037,
-0.25202876329421997,
0.4287886321544647,
-0.23232534527778625,
0.32862189412117004,
0.09073709696531296,
-0.29029083251953125,
0.14883339405059814,
-0.0014760196208953857,
-0.05435332655906677,
0.2485133558511734,
0.10733116418123245,
0.09803909063339233,
0.054127179086208344,
-0.11098530888557434,
-0.4267650842666626,
-0.04627937078475952,
0.08118217438459396,
-0.18499992787837982,
-0.07774939388036728,
0.12321768701076508,
-0.07086724787950516,
0.06948450207710266,
-0.07924561947584152,
0.19849246740341187,
0.3400593101978302,
0.10218429565429688,
0.14378443360328674,
0.023684155195951462,
-0.1484743356704712,
-0.40478232502937317,
0.2543885409832001,
-0.020990129560232162,
0.30520451068878174,
-0.07848408818244934,
0.11364687234163284,
0.0917997658252716,
-0.11937910318374634,
0.9038928747177124,
-0.05080114305019379,
-0.028232768177986145,
0.03873326629400253,
0.07000668346881866,
-0.319826602935791,
0.04725604131817818,
-0.11433729529380798,
0.2203027755022049,
-0.02302861213684082,
0.3572055697441101,
-0.17918622493743896,
-0.13879700005054474,
0.12536710500717163,
0.04088587313890457,
0.01518477126955986,
-0.25859570503234863,
-0.28096556663513184,
-0.20191162824630737,
-0.25106731057167053,
-0.04435940831899643,
0.09840919077396393,
0.13004755973815918,
-0.3657356798648834,
-0.2732015550136566,
-0.04706534743309021,
-0.3273504078388214,
0.13368971645832062,
0.127184197306633,
0.40743714570999146,
-0.11656296253204346,
0.016884129494428635,
0.2774518132209778,
0.34698936343193054,
0.27697616815567017,
0.631105899810791,
-0.139984592795372,
-0.3994466960430145,
-0.015527542680501938,
-0.15036238729953766,
0.2967301607131958,
0.12017127871513367,
-0.3143255114555359,
-0.0011241808533668518,
0.27584150433540344,
-0.08990396559238434,
-0.20934905111789703,
0.33510664105415344,
0.22696422040462494,
0.2109963446855545,
-0.21315573155879974,
-0.35825085639953613,
0.5740973949432373,
0.22851310670375824,
-0.030749041587114334,
0.08902715146541595,
0.21150076389312744,
-0.4159233272075653,
0.131504625082016,
-0.2373162806034088,
0.7952401638031006,
-0.2189672440290451,
0.08823296427726746,
0.26102712750434875,
-0.33105236291885376,
0.3259219825267792,
-0.0062277913093566895,
-0.031181897968053818,
-0.3834567070007324,
-0.06700179725885391,
-0.08056792616844177,
-0.20054495334625244,
0.1363416463136673,
0.25291159749031067,
-0.06949594616889954,
0.2969318926334381,
-0.2740510106086731,
0.4820829927921295,
0.08908931165933609,
0.2926887571811676,
0.11240159720182419,
0.08956345915794373,
-0.33149170875549316,
0.16963975131511688,
0.011419247835874557,
-0.05217719450592995,
-0.12181153148412704,
-0.34959959983825684,
-0.35424667596817017,
-0.22708570957183838,
0.01037539541721344,
0.1201825961470604,
-0.23963768780231476,
0.16370488703250885,
0.062459565699100494,
-0.42138880491256714,
0.3383710980415344,
0.2581748962402344,
0.30325204133987427,
0.06495039910078049,
-0.3185751736164093,
0.03387242555618286,
-0.07914455980062485,
0.01879502646625042,
-0.18487349152565002,
0.06702519208192825,
0.10381408035755157,
0.09752153605222702,
-0.04577840864658356,
0.04125653952360153,
-0.0683140754699707,
-0.23073576390743256,
-0.09280034899711609,
0.35634326934814453,
0.05536622554063797,
-0.03942711278796196,
-0.24227415025234222,
0.0050445497035980225,
-0.11298629641532898,
-0.2308448851108551,
0.2064102590084076,
0.16929227113723755,
0.0769355446100235,
0.07987421005964279,
0.14182743430137634,
-0.19662576913833618,
-0.09264814853668213,
0.21910196542739868,
-0.3922692835330963,
0.13674697279930115,
0.47786852717399597,
0.0728868693113327,
-0.1831178218126297,
-0.14545634388923645,
0.3686595857143402,
0.479574978351593,
-0.2443375289440155,
0.134138822555542,
0.1583399921655655,
0.2954118251800537,
0.0032650947105139494,
0.18252769112586975,
0.03958068788051605,
-0.10951998084783554,
-0.047457240521907806,
-0.5092724561691284,
-0.21051809191703796,
0.2895594835281372,
-0.2604822814464569,
0.13323186337947845,
0.14821991324424744,
0.1547551304101944,
-0.05191805213689804,
-0.3427378833293915,
-0.3722498118877411,
0.37483611702919006,
-0.16087689995765686,
-0.1728578507900238,
0.23737530410289764,
0.09749570488929749,
0.4209287166595459,
-0.07642006874084473,
0.19467875361442566,
0.08003748953342438,
-0.04421059787273407,
-0.28296351432800293,
-0.21935592591762543,
0.06469355523586273,
0.15373462438583374,
0.12742550671100616,
-0.025384247303009033,
-0.025013430044054985,
-0.009862992912530899,
0.005210342817008495,
-0.09051571786403656,
0.007624659687280655,
0.0024934113025665283,
0.23327374458312988,
-0.08623896539211273,
-0.2687545120716095,
-0.13847030699253082,
0.14632144570350647,
-0.13744555413722992,
0.17211490869522095,
-0.016561491414904594,
0.23358649015426636,
-0.008873138576745987,
0.011528752744197845,
0.038789235055446625,
-0.11757177859544754,
0.20398414134979248,
0.19801297783851624,
0.18517178297042847,
-0.3934258818626404,
-0.055043112486600876,
0.21819765865802765,
0.28048014640808105,
0.26971858739852905,
-0.19513775408267975,
0.044756174087524414,
0.46719223260879517,
0.22323454916477203,
-0.16953712701797485,
-0.024485941976308823,
0.022411668673157692,
0.12980657815933228,
0.1720350980758667,
0.050717420876026154,
0.20080387592315674,
-0.17579159140586853,
-0.3322957754135132,
-0.07391729950904846,
0.5071169137954712,
0.06347213685512543,
0.0910377949476242,
0.49398112297058105,
0.0664631724357605,
0.009868808090686798,
0.17888469994068146,
0.17393797636032104,
0.2556758224964142,
0.8359969258308411,
-0.05416036397218704,
0.06720921397209167,
0.03874364495277405,
0.22105436027050018,
-0.09004753082990646,
-0.33396151661872864,
-0.1743401139974594,
0.11870168149471283,
-0.007012903690338135,
-0.008261382579803467,
-0.0971863716840744,
0.45162153244018555,
0.010270842351019382,
0.20457126200199127,
0.14278870820999146,
0.09917961806058884,
-0.034401148557662964,
-0.21299298107624054,
-0.15350405871868134,
-0.2428191900253296,
-0.0037406980991363525,
-0.1292462944984436,
-0.2303183376789093,
-0.19190220534801483,
0.27583807706832886,
0.09458707273006439,
0.10915093123912811,
-0.2934439778327942,
0.09480464458465576,
0.33111628890037537,
-0.018496304750442505,
-0.17565703392028809,
0.36364075541496277,
-0.020624428987503052,
-0.07431061565876007,
0.12014172971248627,
-0.021035095676779747,
0.5442227721214294,
0.4136734902858734,
-0.010032404214143753,
-0.1365738958120346,
-0.13427956402301788,
-0.16914331912994385,
-0.06800000369548798,
0.2380896508693695,
0.012288451194763184,
0.06938068568706512,
0.1963513046503067,
0.21256078779697418,
-0.1397198736667633,
0.15740853548049927,
0.002636011689901352,
0.4246324300765991,
-0.14224377274513245,
0.12904471158981323,
-0.2885156571865082,
0.06985459476709366,
-0.14905096590518951,
-0.13511648774147034,
-0.4650726616382599,
0.049584902822971344,
0.5152725577354431,
-0.062320828437805176,
0.24219152331352234,
0.0843079462647438,
0.11287190020084381,
-0.10804426670074463,
0.3515067398548126,
0.2799689769744873,
0.4968600273132324,
-0.2647168040275574,
0.004371531307697296,
-0.6099035143852234,
-0.08937761932611465,
-0.08741845190525055,
-0.14186981320381165,
-0.08245720714330673,
0.07907982170581818,
-0.1155010387301445,
-0.03223470598459244,
0.29243576526641846,
0.2714794874191284,
-0.14377038180828094,
-0.03164713829755783,
-0.3392583429813385,
-0.04949074611067772,
-0.2864975333213806,
0.0471600741147995,
0.07184047996997833,
-0.16399747133255005,
0.18226231634616852,
-0.09439125657081604,
-0.010821856558322906,
-0.3566429018974304,
0.12300918996334076,
-0.2839202582836151,
-0.154334157705307,
0.24698887765407562,
0.12573672831058502,
0.24904023110866547,
-0.06218439340591431,
0.17348255217075348,
-0.15765981376171112,
-0.22110889852046967,
-0.23529678583145142,
0.3567603528499603,
0.012415295466780663,
0.30029305815696716,
-0.4165315330028534,
-0.0843430757522583,
-0.2292291820049286,
-0.19184814393520355,
-0.06778374314308167,
0.03637399896979332,
-0.22764816880226135,
0.10160177201032639,
-0.17689916491508484,
-0.08243104815483093,
0.015134480781853199,
0.2676720917224884,
-0.02200254797935486,
0.08426673710346222,
-0.13493740558624268,
-0.27860185503959656,
0.46361401677131653,
-0.6393574476242065,
-0.18934257328510284,
0.13276490569114685,
0.1786612868309021,
0.15200862288475037,
-0.1098494604229927,
-0.18192419409751892,
0.14903196692466736,
0.3994632959365845,
0.08621436357498169,
-0.19221606850624084,
0.08873918652534485,
0.06459657847881317,
0.1774348020553589,
-0.05069006606936455,
-0.024523936212062836,
0.1731078326702118,
-0.15958543121814728,
0.11600270867347717,
-0.39311790466308594
] |
https://github.com/huggingface/datasets/issues/5099 | datasets doesn't support # in data paths | @lhoestq Should I url encode also repo_id and revision parameters? I'm not sure what are the valid characters there.
Personally, I would be cautious and only url encode the path parameter. | ## Describe the bug
dataset files with `#` symbol their paths aren't read correctly.
## Steps to reproduce the bug
The data in folder `c#`of this [dataset](https://huggingface.co/datasets/loubnabnl/bigcode_csharp) can't be loaded. While the folder `c_sharp` with the same data is loaded properly
```python
ds = load_dataset('loubnabnl/bigcode_csharp', split="train", data_files=["data/c#/*"])
```
```
FileNotFoundError: Couldn't find file at https://huggingface.co/datasets/loubnabnl/bigcode_csharp/resolve/27a3166cff4bb18e11919cafa6f169c0f57483de/data/c#/data_0003.jsonl
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.5.2
- Platform: macOS-12.2.1-arm64-arm-64bit
- Python version: 3.9.13
- PyArrow version: 9.0.0
- Pandas version: 1.4.3
cc @lhoestq | 31 | datasets doesn't support # in data paths
## Describe the bug
dataset files with `#` symbol their paths aren't read correctly.
## Steps to reproduce the bug
The data in folder `c#`of this [dataset](https://huggingface.co/datasets/loubnabnl/bigcode_csharp) can't be loaded. While the folder `c_sharp` with the same data is loaded properly
```python
ds = load_dataset('loubnabnl/bigcode_csharp', split="train", data_files=["data/c#/*"])
```
```
FileNotFoundError: Couldn't find file at https://huggingface.co/datasets/loubnabnl/bigcode_csharp/resolve/27a3166cff4bb18e11919cafa6f169c0f57483de/data/c#/data_0003.jsonl
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.5.2
- Platform: macOS-12.2.1-arm64-arm-64bit
- Python version: 3.9.13
- PyArrow version: 9.0.0
- Pandas version: 1.4.3
cc @lhoestq
@lhoestq Should I url encode also repo_id and revision parameters? I'm not sure what are the valid characters there.
Personally, I would be cautious and only url encode the path parameter. | [
-0.23935462534427643,
0.3422907590866089,
-0.09241901338100433,
0.4141099452972412,
0.31247687339782715,
-0.07263568788766861,
-0.06012551113963127,
0.348783940076828,
-0.17380933463573456,
0.1275741010904312,
0.21336416900157928,
0.4802649915218353,
-0.3821050822734833,
0.2710797190666199,
0.1039850190281868,
0.1227802261710167,
0.06962983310222626,
0.04827133193612099,
-0.15875570476055145,
-0.20386694371700287,
-0.46780925989151,
0.22484971582889557,
0.09242412447929382,
0.21043790876865387,
-0.05573942884802818,
-0.009219413623213768,
-0.179240420460701,
0.48999300599098206,
-0.2014080286026001,
-0.25086647272109985,
0.016007671132683754,
-0.054517339915037155,
0.4985838830471039,
0.4259994924068451,
-0.00011089218605775386,
0.26490360498428345,
0.4094313979148865,
-0.03745189309120178,
-0.4969480037689209,
-0.44649118185043335,
-0.6578413248062134,
-0.33079493045806885,
0.09384933114051819,
-0.2931915819644928,
0.061061255633831024,
0.04350925609469414,
0.06646344065666199,
-0.33803877234458923,
0.4954102635383606,
0.6155799627304077,
0.20646439492702484,
0.25089558959007263,
0.06873643398284912,
0.18458427488803864,
0.5062583088874817,
0.34060096740722656,
0.03758092224597931,
0.5650121569633484,
0.05026302486658096,
0.2617728114128113,
-0.027286887168884277,
0.08458277583122253,
0.056576862931251526,
-0.21628545224666595,
0.13633573055267334,
0.22936929762363434,
0.08937850594520569,
-0.13262414932250977,
0.029232414439320564,
0.0666147768497467,
0.4416293501853943,
-0.2509215772151947,
-0.4094047546386719,
-0.012424446642398834,
-0.230401411652565,
-0.2518883943557739,
0.29637470841407776,
0.12805534899234772,
0.2745668292045593,
0.4720275402069092,
-0.31911376118659973,
-0.13715526461601257,
-0.17737796902656555,
0.40217655897140503,
0.13604116439819336,
0.0900701954960823,
-0.16375936567783356,
0.09362620115280151,
-0.08157052099704742,
-0.0584535077214241,
-0.071214959025383,
-0.06340082734823227,
0.017257414758205414,
0.11295045912265778,
0.05382130295038223,
0.0539102703332901,
-0.011994123458862305,
0.1166999340057373,
0.29558536410331726,
0.11405069380998611,
0.09567522257566452,
-0.0599818080663681,
-0.28007104992866516,
0.29307812452316284,
-0.08967474102973938,
0.0140606090426445,
0.002949759364128113,
0.12002120167016983,
0.4842209815979004,
-0.08745824545621872,
-0.019265953451395035,
-0.11645191162824631,
-0.6275191307067871,
-0.20423339307308197,
-0.26744645833969116,
0.09919267892837524,
0.25709885358810425,
-0.13256220519542694,
-0.3938732445240021,
0.09284236282110214,
-0.22139379382133484,
-0.3088993430137634,
0.20503248274326324,
0.5379142165184021,
0.18248412013053894,
0.07092736661434174,
0.020229201763868332,
0.06336542963981628,
0.13058045506477356,
0.022689979523420334,
-0.18690747022628784,
0.05304751172661781,
-0.22303415834903717,
-0.0009370464831590652,
0.027347411960363388,
-0.045949775725603104,
0.33241498470306396,
0.0031095873564481735,
-0.03407532721757889,
-0.059342436492443085,
-0.050435811281204224,
-0.0642302930355072,
-0.08674410730600357,
0.03582008555531502,
-0.2670685052871704,
0.2700709104537964,
0.12203037738800049,
-0.1399376094341278,
-0.1457609087228775,
0.27819550037384033,
-0.4884570837020874,
-0.2983650267124176,
-0.3221411108970642,
0.13154016435146332,
-0.12032420933246613,
-0.11933575570583344,
-0.5256061553955078,
0.011679710820317268,
-0.001395106315612793,
0.031355950981378555,
0.07713424414396286,
0.029641732573509216,
-0.018172036856412888,
-0.23177415132522583,
0.2710057199001312,
0.3896394968032837,
-0.4735710024833679,
-0.03007972240447998,
0.2733520269393921,
-0.017274238169193268,
0.18745964765548706,
0.46983808279037476,
-0.44087693095207214,
0.015581391751766205,
-0.22782784700393677,
0.008410923182964325,
0.46696239709854126,
-0.5136969685554504,
-0.33264705538749695,
0.5115435719490051,
-0.0922183021903038,
-0.35706862807273865,
0.16668832302093506,
-0.23168453574180603,
-0.008889289572834969,
-0.16923223435878754,
-0.1102323979139328,
0.20074152946472168,
0.2199895977973938,
-0.10275373607873917,
-0.3096686601638794,
-0.5201594829559326,
0.14258313179016113,
0.15681269764900208,
0.08033934235572815,
-0.09593633562326431,
0.26356765627861023,
-0.27076470851898193,
0.38782110810279846,
-0.2712268829345703,
-0.11794974654912949,
0.43204164505004883,
0.3319576382637024,
0.005249865353107452,
0.03417089954018593,
0.07773671299219131,
-0.4024238586425781,
0.06706517934799194,
-0.15801124274730682,
-0.2389468550682068,
-0.38112813234329224,
-0.1614939570426941,
-0.2919473648071289,
-0.08872488141059875,
-0.20055197179317474,
-0.03203476592898369,
0.09254804998636246,
0.11778683960437775,
0.08124658465385437,
0.27979522943496704,
-0.4370200037956238,
0.2582729160785675,
-0.2700221836566925,
0.14860720932483673,
-0.00024293363094329834,
0.4411027133464813,
-0.13559767603874207,
-0.04674297943711281,
0.15382520854473114,
0.35379573702812195,
0.33278384804725647,
-0.379565566778183,
-0.08390834182500839,
0.38979193568229675,
-0.06146174296736717,
0.0318179577589035,
0.24780508875846863,
0.2182319462299347,
0.1972832977771759,
-0.31443968415260315,
-0.08258470892906189,
0.33443358540534973,
0.24758470058441162,
0.20027866959571838,
-0.17763522267341614,
0.09948935359716415,
-0.27526456117630005,
0.1025846004486084,
0.20369450747966766,
-0.200340136885643,
0.36093875765800476,
-0.18043158948421478,
-0.22738158702850342,
0.008775092661380768,
0.14150600135326385,
0.2780308127403259,
0.3246079385280609,
0.22459156811237335,
-0.3555367887020111,
-0.22727802395820618,
0.6200727224349976,
-0.13207250833511353,
0.08121873438358307,
0.28219127655029297,
-0.16792923212051392,
0.06975612789392471,
0.03557596728205681,
0.2791177034378052,
0.3419216275215149,
0.22361527383327484,
-0.1300676465034485,
0.09074249863624573,
-0.005971865728497505,
-0.23961547017097473,
0.25500762462615967,
0.07663699984550476,
0.07012614607810974,
0.019600726664066315,
0.09815970808267593,
0.06415239721536636,
-0.24865129590034485,
-0.45480045676231384,
0.12099752575159073,
0.18695703148841858,
-0.5957740545272827,
0.22136938571929932,
-0.49956148862838745,
-0.4527141749858856,
-0.2882804870605469,
-0.3568522036075592,
-0.023965921252965927,
-0.17915348708629608,
-0.2834564447402954,
-0.17873257398605347,
-0.07464130222797394,
0.20854778587818146,
-0.310528039932251,
0.059278249740600586,
-0.016401324421167374,
-0.14635910093784332,
-0.15864147245883942,
-0.0009679808281362057,
-0.34871381521224976,
-0.014847174286842346,
0.5964391231536865,
-0.1247696503996849,
0.1461266726255417,
-0.4068804383277893,
0.16038808226585388,
-0.4083743989467621,
-0.27663731575012207,
0.12162783741950989,
-0.012448865920305252,
0.19144444167613983,
-0.03210435062646866,
0.09612547606229782,
-0.20716196298599243,
-0.2388174682855606,
0.3161377012729645,
0.16813234984874725,
-0.0842481330037117,
-0.0869210958480835,
0.021416781470179558,
-0.3110261857509613,
-0.2570696771144867,
-0.3370927572250366,
-0.36984819173812866,
-0.2665935754776001,
0.1772831380367279,
0.0032664351165294647,
0.2032012641429901,
0.23290269076824188,
0.011836801655590534,
0.45425528287887573,
0.052695807069540024,
-0.12867434322834015,
-0.11186134070158005,
-0.567455530166626,
0.6963033080101013,
-0.16570651531219482,
-0.375762939453125,
0.18095600605010986,
-0.09828196465969086,
0.036982376128435135,
-0.07034462690353394,
-0.2140466868877411,
-0.1345209777355194,
-0.26806601881980896,
0.1341792792081833,
0.06606046855449677,
0.0750679299235344,
0.05516284704208374,
0.04841344431042671,
-0.04254506900906563,
-0.2874680459499359,
-0.2816503345966339,
0.26759251952171326,
0.05168812721967697,
0.26569247245788574,
0.1647796928882599,
0.6923598051071167,
0.026653733104467392,
0.5744996666908264,
0.29194584488868713,
-0.1867607831954956,
0.38441920280456543,
-0.28996387124061584,
0.20640219748020172,
0.30511045455932617,
-0.15851764380931854,
0.1750611662864685,
0.017775043845176697,
-0.1776147335767746,
0.2751483917236328,
0.14434731006622314,
0.12088053673505783,
-0.008588749915361404,
-0.12701164186000824,
-0.45605602860450745,
-0.14029642939567566,
0.08948351442813873,
-0.1711190938949585,
0.0763593539595604,
0.052646007388830185,
-0.013629231601953506,
0.12811405956745148,
0.015173949301242828,
0.1808755248785019,
0.4072204828262329,
0.18814922869205475,
0.18902455270290375,
0.014265436679124832,
-0.1777464598417282,
-0.3977345824241638,
0.24900616705417633,
0.01647142320871353,
0.4720369875431061,
-0.0739007219672203,
0.16710636019706726,
0.06581397354602814,
-0.21800287067890167,
0.7213072180747986,
-0.26409056782722473,
0.026491481810808182,
-0.04381255432963371,
0.06092466413974762,
-0.2842875123023987,
0.0700981616973877,
-0.10919839143753052,
0.24503733217716217,
-0.024339009076356888,
0.4344613552093506,
-0.24740514159202576,
-0.11073944717645645,
0.19229651987552643,
-0.05158694460988045,
-0.06433771550655365,
-0.13961391150951385,
-0.18982301652431488,
-0.32406896352767944,
-0.2442903220653534,
-0.11590508371591568,
0.12395720928907394,
0.005036788526922464,
-0.20692361891269684,
-0.18588663637638092,
-0.05099693685770035,
-0.28809699416160583,
0.16883599758148193,
0.08458150923252106,
0.33189868927001953,
-0.15491411089897156,
-0.04070737585425377,
0.2261558622121811,
0.32768020033836365,
0.3072018325328827,
0.5559358596801758,
-0.14698034524917603,
-0.40359991788864136,
-0.08056998997926712,
-0.304841548204422,
0.3561074435710907,
0.23745009303092957,
-0.33761751651763916,
-0.08307453244924545,
0.4137425124645233,
-0.16096243262290955,
-0.24819892644882202,
0.16202284395694733,
0.20136882364749908,
0.13784463703632355,
-0.34724369645118713,
-0.4858940839767456,
0.5730839967727661,
0.26927998661994934,
-0.05423281341791153,
-0.04074643552303314,
0.3987465500831604,
-0.5537175536155701,
0.010903926566243172,
0.00833987444639206,
0.9738258719444275,
-0.14701561629772186,
0.044064730405807495,
0.20931139588356018,
-0.43439966440200806,
0.24001319706439972,
-0.01783914305269718,
-0.14298294484615326,
-0.299725741147995,
0.12683619558811188,
-0.16450482606887817,
-0.13797421753406525,
0.23750770092010498,
0.16481393575668335,
-0.29081693291664124,
0.33865511417388916,
-0.23255661129951477,
0.3411939740180969,
0.1616816371679306,
0.29208967089653015,
0.0636332556605339,
0.08580511808395386,
-0.3170202076435089,
0.11216028034687042,
-0.0930485725402832,
-0.11050276458263397,
-0.08985693752765656,
-0.4064090847969055,
-0.4076560437679291,
-0.26024866104125977,
0.0052522048354148865,
0.09484102576971054,
-0.3583231568336487,
0.1324124038219452,
0.041914600878953934,
-0.46703362464904785,
0.2820022702217102,
0.22769516706466675,
0.45243948698043823,
0.03860892727971077,
-0.36216965317726135,
0.0030768923461437225,
-0.2193707525730133,
0.16559059917926788,
-0.1779748797416687,
0.06466463953256607,
0.17633280158042908,
0.04133102297782898,
0.04313168674707413,
-0.017408937215805054,
-0.04712190106511116,
-0.24161483347415924,
-0.056968651711940765,
0.14655259251594543,
0.1259152889251709,
-0.04051288589835167,
-0.20275413990020752,
0.021926920861005783,
-0.2765246033668518,
-0.12761105597019196,
0.11885291337966919,
0.1631373167037964,
0.10146480053663254,
0.006458088755607605,
0.18617726862430573,
-0.15022727847099304,
-0.08488202095031738,
0.1568627804517746,
-0.3091660439968109,
0.09615027904510498,
0.47378066182136536,
-0.058301329612731934,
-0.22797927260398865,
-0.05479404702782631,
0.4407731890678406,
0.39860767126083374,
-0.24271565675735474,
0.019261855632066727,
-0.01779199205338955,
0.28708577156066895,
-0.0719841942191124,
0.10780206322669983,
0.039937689900398254,
-0.045204080641269684,
-0.07993336021900177,
-0.5001670122146606,
-0.1307835727930069,
0.3064100742340088,
-0.1820250004529953,
0.013083942234516144,
0.08921361714601517,
0.046161308884620667,
0.020844003185629845,
-0.43280211091041565,
-0.3128887414932251,
0.34884825348854065,
-0.19687549769878387,
-0.1043471097946167,
0.16126728057861328,
0.16263777017593384,
0.4518834948539734,
-0.15832561254501343,
0.10639031231403351,
-0.01284024491906166,
-0.060517817735672,
-0.13536891341209412,
-0.3479767441749573,
0.0952329933643341,
0.20268017053604126,
0.058253973722457886,
-0.032020796090364456,
-0.03752626106142998,
0.013109398074448109,
0.0676516592502594,
-0.11729928851127625,
0.049413591623306274,
0.016292870044708252,
0.25812670588493347,
-0.11317001283168793,
-0.19278541207313538,
-0.1899547576904297,
0.13348501920700073,
-0.18728968501091003,
0.36379724740982056,
0.09271139651536942,
0.32797226309776306,
0.03105170652270317,
-0.06240455061197281,
-0.0005343649536371231,
-0.11201249808073044,
0.2092249095439911,
0.27121594548225403,
0.2499697506427765,
-0.43113434314727783,
0.010364364832639694,
0.3530368506908417,
0.2193613052368164,
0.3532896339893341,
-0.3207618296146393,
-0.05468473583459854,
0.5000751614570618,
0.15218520164489746,
-0.06903447210788727,
0.06774964928627014,
-0.04347272217273712,
0.012346816249191761,
0.06691402196884155,
0.11998038738965988,
0.08244459331035614,
-0.16858917474746704,
-0.22176788747310638,
-0.06393556296825409,
0.6004226803779602,
0.04680824279785156,
0.09164848923683167,
0.4775022566318512,
0.009076934307813644,
0.20176707208156586,
0.0743420347571373,
0.16787342727184296,
0.24045827984809875,
0.6055576801300049,
-0.09243286401033401,
0.1064261719584465,
0.3631526827812195,
0.32103753089904785,
0.03462976589798927,
-0.07802329957485199,
-0.17443899810314178,
0.12144341319799423,
-0.05936536192893982,
0.07017716765403748,
-0.015496030449867249,
0.396793395280838,
0.05413714423775673,
0.24386264383792877,
0.20641589164733887,
0.17154991626739502,
-0.003417540341615677,
-0.2580178678035736,
-0.20237328112125397,
-0.19377431273460388,
-0.15464551746845245,
-0.13773605227470398,
-0.3451959490776062,
-0.2484578937292099,
0.10790955275297165,
0.19286294281482697,
0.18382827937602997,
-0.32576891779899597,
0.15984031558036804,
0.17514964938163757,
0.04662957787513733,
-0.2629867494106293,
0.45485877990722656,
0.07394874095916748,
-0.07240943610668182,
0.14363038539886475,
-0.003598542883992195,
0.4651857912540436,
0.48687177896499634,
0.043213337659835815,
-0.033942002803087234,
-0.11089824140071869,
-0.11570679396390915,
-0.019888319075107574,
0.19754767417907715,
-0.009490340948104858,
0.06807965040206909,
0.2589084208011627,
0.15180712938308716,
-0.0708712786436081,
0.15825039148330688,
0.0031428374350070953,
0.3992067873477936,
-0.0487174354493618,
0.302729994058609,
-0.29542386531829834,
0.07855107635259628,
-0.040159083902835846,
-0.19111445546150208,
-0.4156026840209961,
0.04165178909897804,
0.4452468454837799,
-0.040989529341459274,
0.24689608812332153,
0.14750300347805023,
0.07737036049365997,
-0.05804229900240898,
0.3674647808074951,
0.4228250980377197,
0.34836944937705994,
-0.18355752527713776,
0.008555091917514801,
-0.5836514830589294,
-0.1806706190109253,
-0.042600441724061966,
-0.3309233486652374,
-0.06863465160131454,
0.03034970350563526,
-0.09437710791826248,
0.06754784286022186,
0.176986962556839,
0.18538373708724976,
-0.2084597796201706,
-0.11544951796531677,
-0.2910013794898987,
-0.1583753228187561,
-0.2423192709684372,
0.16236156225204468,
-0.026755264028906822,
-0.09278707206249237,
0.26273465156555176,
0.011490273289382458,
-0.08141017705202103,
-0.3563408851623535,
0.014972694218158722,
-0.2414345145225525,
-0.13282665610313416,
0.2257012128829956,
0.19670875370502472,
0.2055879533290863,
-0.08898310363292694,
0.13051937520503998,
-0.01882544532418251,
-0.14881426095962524,
-0.17141912877559662,
0.3430939316749573,
0.01899152435362339,
0.2166886031627655,
-0.438734769821167,
-0.10991978645324707,
-0.30562901496887207,
-0.038648251444101334,
-0.18432468175888062,
-0.03312542662024498,
-0.14720219373703003,
0.13865406811237335,
0.005317255854606628,
-0.2801579236984253,
-0.05784230679273605,
0.17567622661590576,
0.005748007446527481,
0.11182005703449249,
-0.10777852684259415,
-0.24550309777259827,
0.4679749011993408,
-0.6158359050750732,
-0.1909608691930771,
0.20937183499336243,
0.25993090867996216,
0.14988379180431366,
0.0013951193541288376,
-0.23262086510658264,
0.11438963562250137,
0.4139268100261688,
0.11716274172067642,
-0.35297542810440063,
0.06935307383537292,
0.17012540996074677,
0.12222960591316223,
-0.0864856094121933,
-0.06862550973892212,
0.11681053787469864,
-0.2573041319847107,
0.07387888431549072,
-0.36520445346832275
] |
https://github.com/huggingface/datasets/issues/5099 | datasets doesn't support # in data paths | These are possible solutions (assuming `from urllib.parse import quote`):
1) url encode only the path parameter:
```
# src/datasets/utils/file_utils.py
def hf_hub_url(repo_id: str, path: str, revision: Optional[str] = None) -> str:
revision = revision or config.HUB_DEFAULT_VERSION
return config.HUB_DATASETS_URL.format(repo_id=repo_id, path=quote(path), revision=revision)
```
2) url encode all parameters:
```
# src/datasets/utils/file_utils.py
def hf_hub_url(repo_id: str, path: str, revision: Optional[str] = None) -> str:
revision = revision or config.HUB_DEFAULT_VERSION
return config.HUB_DATASETS_URL.format(repo_id=quote(repo_id), path=quote(path), revision=quote(revision))
```
3) url encode the whole url:
```
# src/datasets/config.py
HUB_DATASETS_PATH = "/datasets/{repo_id}/resolve/{revision}/{path}"
HUB_DATASETS_URL = HF_ENDPOINT + HUB_DATASETS_PATH
```
```
# src/datasets/utils/file_utils.py
def hf_hub_url(repo_id: str, path: str, revision: Optional[str] = None) -> str:
revision = revision or config.HUB_DEFAULT_VERSION
return config.HF_ENDPOINT + quote(config.HUB_DATASETS_PATH.format(repo_id=repo_id, path=path, revision=revision))
``` | ## Describe the bug
dataset files with `#` symbol their paths aren't read correctly.
## Steps to reproduce the bug
The data in folder `c#`of this [dataset](https://huggingface.co/datasets/loubnabnl/bigcode_csharp) can't be loaded. While the folder `c_sharp` with the same data is loaded properly
```python
ds = load_dataset('loubnabnl/bigcode_csharp', split="train", data_files=["data/c#/*"])
```
```
FileNotFoundError: Couldn't find file at https://huggingface.co/datasets/loubnabnl/bigcode_csharp/resolve/27a3166cff4bb18e11919cafa6f169c0f57483de/data/c#/data_0003.jsonl
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.5.2
- Platform: macOS-12.2.1-arm64-arm-64bit
- Python version: 3.9.13
- PyArrow version: 9.0.0
- Pandas version: 1.4.3
cc @lhoestq | 113 | datasets doesn't support # in data paths
## Describe the bug
dataset files with `#` symbol their paths aren't read correctly.
## Steps to reproduce the bug
The data in folder `c#`of this [dataset](https://huggingface.co/datasets/loubnabnl/bigcode_csharp) can't be loaded. While the folder `c_sharp` with the same data is loaded properly
```python
ds = load_dataset('loubnabnl/bigcode_csharp', split="train", data_files=["data/c#/*"])
```
```
FileNotFoundError: Couldn't find file at https://huggingface.co/datasets/loubnabnl/bigcode_csharp/resolve/27a3166cff4bb18e11919cafa6f169c0f57483de/data/c#/data_0003.jsonl
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.5.2
- Platform: macOS-12.2.1-arm64-arm-64bit
- Python version: 3.9.13
- PyArrow version: 9.0.0
- Pandas version: 1.4.3
cc @lhoestq
These are possible solutions (assuming `from urllib.parse import quote`):
1) url encode only the path parameter:
```
# src/datasets/utils/file_utils.py
def hf_hub_url(repo_id: str, path: str, revision: Optional[str] = None) -> str:
revision = revision or config.HUB_DEFAULT_VERSION
return config.HUB_DATASETS_URL.format(repo_id=repo_id, path=quote(path), revision=revision)
```
2) url encode all parameters:
```
# src/datasets/utils/file_utils.py
def hf_hub_url(repo_id: str, path: str, revision: Optional[str] = None) -> str:
revision = revision or config.HUB_DEFAULT_VERSION
return config.HUB_DATASETS_URL.format(repo_id=quote(repo_id), path=quote(path), revision=quote(revision))
```
3) url encode the whole url:
```
# src/datasets/config.py
HUB_DATASETS_PATH = "/datasets/{repo_id}/resolve/{revision}/{path}"
HUB_DATASETS_URL = HF_ENDPOINT + HUB_DATASETS_PATH
```
```
# src/datasets/utils/file_utils.py
def hf_hub_url(repo_id: str, path: str, revision: Optional[str] = None) -> str:
revision = revision or config.HUB_DEFAULT_VERSION
return config.HF_ENDPOINT + quote(config.HUB_DATASETS_PATH.format(repo_id=repo_id, path=path, revision=revision))
``` | [
-0.26046356558799744,
0.17757588624954224,
-0.06597240269184113,
0.3687845468521118,
0.37515151500701904,
0.022101908922195435,
-0.02405305579304695,
0.4590635895729065,
-0.059669721871614456,
0.19818353652954102,
0.056489259004592896,
0.6017807126045227,
-0.3670687675476074,
0.3597273528575897,
0.04000106453895569,
0.17776824533939362,
0.047941483557224274,
0.10145854204893112,
-0.09748263657093048,
-0.11685898154973984,
-0.35684412717819214,
0.26633337140083313,
-0.02016283944249153,
0.14030660688877106,
-0.2911364436149597,
-0.003388168290257454,
-0.12146934121847153,
0.5329985618591309,
-0.12795723974704742,
-0.3170504868030548,
0.15336297452449799,
0.03896171599626541,
0.45742642879486084,
0.41949883103370667,
-0.00010962480882881209,
0.25954669713974,
0.37616264820098877,
0.03165632486343384,
-0.39824026823043823,
-0.47515714168548584,
-0.5781528949737549,
-0.25227537751197815,
0.06591703742742538,
-0.1928001493215561,
0.046594731509685516,
0.18548651039600372,
0.003589903935790062,
-0.186048224568367,
0.3927682638168335,
0.5178601145744324,
0.2187364548444748,
0.3041989505290985,
0.04141797497868538,
0.05598859861493111,
0.4794131815433502,
0.2557743489742279,
0.025836752727627754,
0.56005859375,
0.11700320243835449,
0.13233934342861176,
0.014096751809120178,
0.031182091683149338,
0.0332120880484581,
-0.176853209733963,
0.14595596492290497,
0.17667636275291443,
-0.03981179744005203,
-0.15200555324554443,
-0.003733694553375244,
0.13685165345668793,
0.3895760774612427,
-0.34980735182762146,
-0.26120269298553467,
-0.07846403867006302,
-0.1743983030319214,
-0.17642547190189362,
0.2961278259754181,
0.17486947774887085,
0.23258978128433228,
0.40018051862716675,
-0.1669289618730545,
-0.09973151981830597,
-0.17723390460014343,
0.3747011423110962,
0.108205646276474,
0.055796317756175995,
-0.17957310378551483,
0.008117381483316422,
-0.06407572329044342,
0.06325634568929672,
0.037989888340234756,
-0.10663729906082153,
0.020636113360524178,
0.15725797414779663,
-0.025793422013521194,
0.020169362425804138,
0.10970625281333923,
0.20995941758155823,
0.2355615496635437,
0.06685703247785568,
0.16289889812469482,
0.10498255491256714,
-0.4108389616012573,
0.3703955411911011,
-0.0896519273519516,
0.002760562114417553,
-0.026105426251888275,
0.06696652621030807,
0.4687145948410034,
0.08624155819416046,
-0.05762971192598343,
-0.11510885506868362,
-0.5853175520896912,
-0.23310129344463348,
-0.3328801095485687,
0.08919048309326172,
0.212861567735672,
-0.12102369964122772,
-0.43657124042510986,
0.04615354165434837,
-0.06800706684589386,
-0.1023329421877861,
0.308070570230484,
0.6174715757369995,
0.06457497179508209,
0.12015201896429062,
-0.08307239413261414,
0.02606271579861641,
0.02843852899968624,
0.1628902703523636,
-0.2739199697971344,
0.14195756614208221,
-0.18769191205501556,
-0.08084002137184143,
0.13607949018478394,
-0.15684863924980164,
0.32216963171958923,
0.11055123060941696,
0.0004535093903541565,
-0.0625808835029602,
-0.05931176245212555,
-0.16294170916080475,
-0.14178499579429626,
0.06260646879673004,
-0.20120295882225037,
0.2445148080587387,
0.10378322005271912,
-0.07983511686325073,
-0.16540834307670593,
0.1608714461326599,
-0.4655354619026184,
-0.31224220991134644,
-0.2735351622104645,
0.16305820643901825,
-0.1769048422574997,
-0.10594989359378815,
-0.6735793352127075,
0.014881586655974388,
-0.10916697233915329,
-0.02376830205321312,
-0.022775553166866302,
-0.015039019286632538,
-0.1271156370639801,
-0.2540337145328522,
0.2517510652542114,
0.4480489492416382,
-0.45176029205322266,
-0.04622785001993179,
0.26376867294311523,
-0.020861461758613586,
0.03927655518054962,
0.2941868305206299,
-0.4123377203941345,
0.1659436970949173,
-0.32759204506874084,
0.18175755441188812,
0.3051570951938629,
-0.6398830413818359,
-0.3892311155796051,
0.3354227542877197,
-0.0882609412074089,
-0.27538758516311646,
0.08796195685863495,
-0.24393612146377563,
0.058065444231033325,
-0.12166539579629898,
-0.07220493257045746,
0.2284572422504425,
0.2981850504875183,
-0.0523662269115448,
-0.26087522506713867,
-0.4713433086872101,
-0.05525635927915573,
0.1884268969297409,
0.12014926970005035,
-0.11666057258844376,
0.3667430281639099,
-0.0961257666349411,
0.43232762813568115,
-0.22068917751312256,
-0.0746564120054245,
0.4390329122543335,
0.3221321702003479,
0.05407223850488663,
0.03085053712129593,
-0.1032375916838646,
-0.3939206898212433,
0.20096614956855774,
-0.168644979596138,
-0.168808713555336,
-0.38086962699890137,
-0.10009251534938812,
-0.34171566367149353,
-0.16748885810375214,
-0.2269020825624466,
0.0016243159770965576,
0.14494438469409943,
0.0613805390894413,
0.055198583751916885,
0.3033905029296875,
-0.3755345046520233,
0.3982723653316498,
-0.23855261504650116,
0.17949113249778748,
-0.07809656858444214,
0.6496760845184326,
-0.05381198227405548,
-0.06970341503620148,
0.14683616161346436,
0.3816092908382416,
0.26495590806007385,
-0.30213719606399536,
-0.11813928931951523,
0.33288049697875977,
-0.011628776788711548,
0.07698450237512589,
0.20448952913284302,
0.24851809442043304,
0.20795413851737976,
-0.38209089636802673,
-0.10791059583425522,
0.3004096746444702,
0.3009273111820221,
0.1628284752368927,
-0.13853564858436584,
0.14137032628059387,
-0.3631828725337982,
0.10221035033464432,
0.21865214407444,
-0.20526236295700073,
0.3241775631904602,
-0.1852056235074997,
-0.028797432780265808,
-0.021375514566898346,
0.1364913433790207,
0.33819580078125,
0.26886051893234253,
0.22677910327911377,
-0.2539454698562622,
-0.1627204418182373,
0.7377226948738098,
-0.0010030567646026611,
0.09650891274213791,
0.1859649419784546,
-0.2866029143333435,
0.06366539001464844,
0.10336025804281235,
0.11908482015132904,
0.36844396591186523,
0.21505403518676758,
-0.17043861746788025,
0.13298162817955017,
-0.07686196267604828,
-0.2070092409849167,
0.20354393124580383,
0.079900823533535,
0.09758967906236649,
0.09439443051815033,
0.13938312232494354,
0.009141193702816963,
-0.4253873825073242,
-0.49231448769569397,
0.1179870143532753,
0.1734330803155899,
-0.5023899078369141,
0.10957518965005875,
-0.4814710319042206,
-0.2521263659000397,
-0.22118635475635529,
-0.42375269532203674,
-0.01841697469353676,
-0.20381392538547516,
-0.23919571936130524,
0.14293813705444336,
0.00024135783314704895,
0.11642911285161972,
-0.21335911750793457,
0.1343139261007309,
-0.02237097918987274,
-0.19893841445446014,
-0.18858830630779266,
-0.024126816540956497,
-0.367171972990036,
0.004396449774503708,
0.48858463764190674,
0.06495828926563263,
-0.019453546032309532,
-0.39706656336784363,
0.09579774737358093,
-0.3621078431606293,
-0.2673283517360687,
0.07077325135469437,
-0.00366838276386261,
0.19706673920154572,
-0.027833931148052216,
0.07574789226055145,
-0.1976088434457779,
-0.16440369188785553,
0.2957368493080139,
0.05739673227071762,
-0.07334516942501068,
-0.008624996989965439,
-0.05855981260538101,
-0.21689514815807343,
-0.15224918723106384,
-0.2861602306365967,
-0.3929467797279358,
-0.39623191952705383,
0.11884681135416031,
-0.014862112700939178,
0.13428933918476105,
0.12539009749889374,
0.03895142674446106,
0.41684022545814514,
-0.09986254572868347,
-0.13304319977760315,
-0.1278712898492813,
-0.578905463218689,
0.5887283086776733,
-0.1912238746881485,
-0.3962222635746002,
0.17247426509857178,
-0.15860383212566376,
0.05151159316301346,
-0.27257466316223145,
-0.2586742043495178,
-0.14913365244865417,
-0.33306586742401123,
0.17589525878429413,
0.05481545254588127,
0.14048105478286743,
0.053519655019044876,
-0.04092419147491455,
-0.047448303550481796,
-0.3388739824295044,
-0.22756606340408325,
0.17702117562294006,
0.11844076961278915,
0.16601188480854034,
0.14458391070365906,
0.40623217821121216,
0.1253216415643692,
0.32448530197143555,
0.32961905002593994,
-0.1494278907775879,
0.5031314492225647,
-0.25901928544044495,
0.3023112118244171,
0.14550329744815826,
-0.23458482325077057,
0.17909342050552368,
0.005418509244918823,
-0.06328853964805603,
0.33013665676116943,
0.1916666030883789,
0.18833403289318085,
0.0026968829333782196,
-0.27253130078315735,
-0.35095950961112976,
-0.16644340753555298,
0.006892860867083073,
-0.2086958885192871,
-0.06301183253526688,
0.15029826760292053,
-0.04647708684206009,
0.027882840484380722,
-0.10051193088293076,
0.3142182528972626,
0.36137181520462036,
0.06321271508932114,
0.14637985825538635,
0.009649265557527542,
-0.16829116642475128,
-0.4914069175720215,
0.23338252305984497,
0.051098547875881195,
0.38479313254356384,
-0.028216946870088577,
0.1948731243610382,
0.12830762565135956,
-0.1390785276889801,
0.7816248536109924,
-0.2345452457666397,
0.09993141889572144,
-0.004430386237800121,
0.0005135387182235718,
-0.4140945374965668,
0.04254712536931038,
-0.11280424892902374,
0.2178143560886383,
-0.13609416782855988,
0.4255203306674957,
-0.23444265127182007,
-0.17597943544387817,
0.0950608104467392,
-0.041838400065898895,
-0.024866092950105667,
-0.12818141281604767,
-0.23980990052223206,
-0.29142245650291443,
-0.2797930836677551,
-0.10319871455430984,
0.1057981625199318,
0.14075705409049988,
-0.28382760286331177,
-0.3109511435031891,
-0.03819455951452255,
-0.352106511592865,
0.15594826638698578,
0.11554782092571259,
0.3842206299304962,
-0.05933746322989464,
-0.008712472394108772,
0.17595142126083374,
0.2355305403470993,
0.32374539971351624,
0.6513292789459229,
-0.12870818376541138,
-0.45228272676467896,
-0.0491894856095314,
-0.16112901270389557,
0.21587654948234558,
0.19734987616539001,
-0.2946537733078003,
0.026325300335884094,
0.20806337893009186,
-0.04211366921663284,
-0.3056032359600067,
0.3663769066333771,
0.1596166044473648,
0.1340542435646057,
-0.2601238489151001,
-0.3376791179180145,
0.6169003248214722,
0.23404566943645477,
-0.05018850043416023,
0.11074737459421158,
0.3468436002731323,
-0.5155194401741028,
0.21751096844673157,
-0.15328645706176758,
0.7838678956031799,
-0.1558830738067627,
0.09515745937824249,
0.25695133209228516,
-0.361286997795105,
0.26598861813545227,
-0.091683030128479,
-0.06031326204538345,
-0.37166115641593933,
0.018940210342407227,
-0.14241783320903778,
-0.13138364255428314,
0.12113861739635468,
0.16647547483444214,
-0.12090063095092773,
0.27922043204307556,
-0.2651357054710388,
0.6374754905700684,
0.1359253227710724,
0.26827171444892883,
-0.1095852479338646,
0.039403870701789856,
-0.3386606276035309,
0.1490754783153534,
-0.018482878804206848,
-0.023714397102594376,
-0.09816672652959824,
-0.32341259717941284,
-0.42395856976509094,
-0.24872349202632904,
0.011204138398170471,
0.19554585218429565,
-0.2231837660074234,
0.17748332023620605,
-0.0616595484316349,
-0.2977956533432007,
0.24104976654052734,
0.167991042137146,
0.419216513633728,
0.09726063907146454,
-0.366600900888443,
0.0556861013174057,
-0.12895098328590393,
0.08291760832071304,
-0.17003677785396576,
0.05980921536684036,
0.1318531483411789,
0.056227244436740875,
-0.09161247313022614,
0.015459645539522171,
-0.014371255412697792,
-0.2460852414369583,
-0.06980397552251816,
0.30484384298324585,
0.16481292247772217,
-0.025367705151438713,
-0.22143350541591644,
0.012558013200759888,
-0.17392626404762268,
-0.2471679151058197,
0.16713149845600128,
0.1564246416091919,
-0.007739558815956116,
0.14955773949623108,
0.16928675770759583,
-0.254698783159256,
-0.051832955330610275,
0.23534756898880005,
-0.3495168089866638,
0.12617173790931702,
0.45913267135620117,
-0.03980833292007446,
-0.18995024263858795,
-0.09344619512557983,
0.4271540939807892,
0.4753534197807312,
-0.3108833134174347,
0.1197374239563942,
0.061750639230012894,
0.2695688009262085,
-0.02546846494078636,
0.2041427195072174,
-0.022992335259914398,
-0.08817815035581589,
-0.09789146482944489,
-0.5797027349472046,
-0.1712479293346405,
0.3230811357498169,
-0.2995884418487549,
0.1112678200006485,
0.11793956905603409,
0.153848335146904,
-0.04276379942893982,
-0.35743018984794617,
-0.3352610170841217,
0.4579247534275055,
-0.22997330129146576,
-0.09320954978466034,
-0.08203903585672379,
0.1299562156200409,
0.41017505526542664,
-0.1576298475265503,
0.14502669870853424,
0.0895983874797821,
-0.10091791301965714,
-0.22554153203964233,
-0.35153669118881226,
0.10420827567577362,
0.2158648669719696,
0.16621583700180054,
-0.12622621655464172,
-0.010556408204138279,
0.007641125470399857,
-0.04884247109293938,
0.01572161540389061,
0.16962462663650513,
0.01781318709254265,
0.23670396208763123,
0.06048037111759186,
-0.3031637966632843,
-0.15041394531726837,
0.14871549606323242,
-0.08639264106750488,
0.26334047317504883,
0.027654379606246948,
0.26618385314941406,
-0.09296248108148575,
0.030391864478588104,
0.15696856379508972,
-0.05306001752614975,
0.20326927304267883,
0.15865136682987213,
0.2600818872451782,
-0.3708112835884094,
0.0353376679122448,
0.18631745874881744,
0.22334200143814087,
0.2634704113006592,
-0.21737055480480194,
-0.10297456383705139,
0.44666996598243713,
0.17426763474941254,
-0.11851214617490768,
-0.0702325776219368,
0.051189567893743515,
-0.011511965654790401,
0.16392947733402252,
0.04236049950122833,
0.3052442669868469,
-0.13868702948093414,
-0.3545946478843689,
-0.06297376751899719,
0.5964146852493286,
0.0833202600479126,
0.08096624910831451,
0.559349775314331,
0.027617286890745163,
0.09423136711120605,
0.09604890644550323,
0.1287836879491806,
0.20546600222587585,
0.830836296081543,
0.0017679110169410706,
0.14413435757160187,
0.08276426792144775,
0.25115010142326355,
0.016376063227653503,
-0.268126517534256,
-0.2579241991043091,
0.060430705547332764,
-0.012258589267730713,
-0.034502312541007996,
-0.14710210263729095,
0.4001554250717163,
0.018042173236608505,
0.24032050371170044,
0.11202359944581985,
0.08000045269727707,
-0.014717217534780502,
-0.23185263574123383,
-0.18399235606193542,
-0.1887628734111786,
-0.10884309560060501,
-0.14033903181552887,
-0.2057601809501648,
-0.3118327260017395,
0.191387340426445,
0.16078874468803406,
0.05621057748794556,
-0.26735952496528625,
0.1272667497396469,
0.3167240023612976,
0.0019387081265449524,
-0.17605239152908325,
0.37975409626960754,
-0.0632045716047287,
-0.01692240685224533,
0.07290776073932648,
-0.03777715563774109,
0.4941651523113251,
0.4260484278202057,
-0.05169122293591499,
-0.11674942821264267,
-0.08520573377609253,
-0.10115126520395279,
-0.007363410666584969,
0.15899492800235748,
0.01264682412147522,
0.06167379021644592,
0.19880709052085876,
0.18565820157527924,
-0.11873308569192886,
0.04909805208444595,
-0.039998043328523636,
0.452401727437973,
-0.020914781838655472,
0.37910133600234985,
-0.2549014985561371,
0.14928168058395386,
-0.09746269881725311,
-0.13139984011650085,
-0.4721616208553314,
0.004807834513485432,
0.5930880904197693,
-0.1426338106393814,
0.2775360345840454,
0.09601324051618576,
0.09317285567522049,
-0.13813036680221558,
0.3344959616661072,
0.31162717938423157,
0.30617672204971313,
-0.2336203008890152,
-0.026430219411849976,
-0.5519916415214539,
-0.1041075810790062,
-0.010613225400447845,
-0.2151942104101181,
-0.03725902736186981,
0.028264587745070457,
-0.21515989303588867,
-0.026726823300123215,
0.19333216547966003,
0.20933373272418976,
-0.051542431116104126,
-0.08747829496860504,
-0.31456437706947327,
-0.05348611995577812,
-0.2363608032464981,
0.07946714758872986,
-0.009218577295541763,
-0.26841557025909424,
0.18825475871562958,
-0.06400837004184723,
-0.04792405664920807,
-0.29353463649749756,
0.05227164924144745,
-0.19411040842533112,
-0.30707648396492004,
0.2782561182975769,
0.10436909645795822,
0.22225213050842285,
-0.11229746043682098,
0.2300643026828766,
-0.17158865928649902,
-0.2553371787071228,
-0.19905446469783783,
0.24940338730812073,
-0.042926158756017685,
0.29819631576538086,
-0.37529999017715454,
-0.1138077825307846,
-0.22121389210224152,
-0.1612802892923355,
-0.07130597531795502,
0.03523484617471695,
-0.1810019165277481,
0.10311830043792725,
-0.1523456573486328,
-0.07637820392847061,
-0.03328222036361694,
0.23570048809051514,
-0.014944866299629211,
0.16790027916431427,
-0.11111066490411758,
-0.3549465239048004,
0.5641207098960876,
-0.49493181705474854,
-0.26429110765457153,
0.12038733810186386,
0.24579834938049316,
0.13872233033180237,
-0.17011335492134094,
-0.186251699924469,
0.18550696969032288,
0.35638266801834106,
0.07399435341358185,
-0.30499017238616943,
0.14341233670711517,
0.14032499492168427,
0.19550636410713196,
-0.04673299565911293,
-0.16204917430877686,
0.14315924048423767,
-0.1687324345111847,
0.0717058777809143,
-0.3767198324203491
] |
https://github.com/huggingface/datasets/issues/5099 | datasets doesn't support # in data paths | repo_id can only contain alphanumeric characters and _- so it doesn't need to be encoded.
However I agree it's a good idea to also apply `quote` to the revision as well as in 2. ! | ## Describe the bug
dataset files with `#` symbol their paths aren't read correctly.
## Steps to reproduce the bug
The data in folder `c#`of this [dataset](https://huggingface.co/datasets/loubnabnl/bigcode_csharp) can't be loaded. While the folder `c_sharp` with the same data is loaded properly
```python
ds = load_dataset('loubnabnl/bigcode_csharp', split="train", data_files=["data/c#/*"])
```
```
FileNotFoundError: Couldn't find file at https://huggingface.co/datasets/loubnabnl/bigcode_csharp/resolve/27a3166cff4bb18e11919cafa6f169c0f57483de/data/c#/data_0003.jsonl
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.5.2
- Platform: macOS-12.2.1-arm64-arm-64bit
- Python version: 3.9.13
- PyArrow version: 9.0.0
- Pandas version: 1.4.3
cc @lhoestq | 35 | datasets doesn't support # in data paths
## Describe the bug
dataset files with `#` symbol their paths aren't read correctly.
## Steps to reproduce the bug
The data in folder `c#`of this [dataset](https://huggingface.co/datasets/loubnabnl/bigcode_csharp) can't be loaded. While the folder `c_sharp` with the same data is loaded properly
```python
ds = load_dataset('loubnabnl/bigcode_csharp', split="train", data_files=["data/c#/*"])
```
```
FileNotFoundError: Couldn't find file at https://huggingface.co/datasets/loubnabnl/bigcode_csharp/resolve/27a3166cff4bb18e11919cafa6f169c0f57483de/data/c#/data_0003.jsonl
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.5.2
- Platform: macOS-12.2.1-arm64-arm-64bit
- Python version: 3.9.13
- PyArrow version: 9.0.0
- Pandas version: 1.4.3
cc @lhoestq
repo_id can only contain alphanumeric characters and _- so it doesn't need to be encoded.
However I agree it's a good idea to also apply `quote` to the revision as well as in 2. ! | [
-0.2246050238609314,
0.3217463791370392,
-0.11245283484458923,
0.36193132400512695,
0.3766547441482544,
0.013073362410068512,
-0.05143040791153908,
0.4347369968891144,
-0.1642584353685379,
0.16487079858779907,
0.17711134254932404,
0.5607144236564636,
-0.3094666302204132,
0.3385910093784332,
0.03510257601737976,
0.06695479899644852,
0.08277490735054016,
0.19055038690567017,
-0.13934314250946045,
-0.13328441977500916,
-0.400572806596756,
0.27279412746429443,
0.0350450724363327,
0.15603479743003845,
-0.1253541260957718,
-0.0779673382639885,
-0.11862345039844513,
0.39561593532562256,
-0.16403990983963013,
-0.3192461431026459,
0.018663620576262474,
-0.014827679842710495,
0.44582536816596985,
0.5238333940505981,
-0.00010581624519545585,
0.22134365141391754,
0.41298192739486694,
-0.041955962777137756,
-0.5285681486129761,
-0.5206633806228638,
-0.5500589609146118,
-0.2593146562576294,
0.12510651350021362,
-0.22712010145187378,
0.004806816577911377,
-0.03906929865479469,
0.011298704892396927,
-0.32805341482162476,
0.5403534173965454,
0.5328741073608398,
0.26788273453712463,
0.27554214000701904,
0.12471896409988403,
0.0038906787522137165,
0.46498775482177734,
0.2133219689130783,
0.011712083593010902,
0.48560869693756104,
0.04460560530424118,
0.20973818004131317,
0.08938874304294586,
0.1285971701145172,
0.06535583734512329,
-0.1544133722782135,
0.1021052896976471,
0.20297572016716003,
0.09450707584619522,
-0.1209632158279419,
0.056992482393980026,
0.13602223992347717,
0.5427040457725525,
-0.35041067004203796,
-0.4114777445793152,
-0.057444434612989426,
-0.17702096700668335,
-0.32716768980026245,
0.301439493894577,
0.14086072146892548,
0.21119660139083862,
0.39059484004974365,
-0.2566721737384796,
-0.010808833874762058,
-0.15252192318439484,
0.3043780028820038,
0.05056013911962509,
-0.028634242713451385,
-0.22722817957401276,
0.07053959369659424,
0.010731831192970276,
-0.06242836266756058,
-0.14323441684246063,
0.035352498292922974,
-0.05140777304768562,
0.102226622402668,
0.019107352942228317,
0.03051569312810898,
0.03611738979816437,
-0.011300638318061829,
0.23675140738487244,
0.04570223018527031,
0.028351306915283203,
-0.0035826005041599274,
-0.26797518134117126,
0.29041552543640137,
-0.06558504700660706,
0.08275911211967468,
0.03645038604736328,
0.10558509081602097,
0.38842642307281494,
-0.04316883161664009,
0.008732665330171585,
-0.15434175729751587,
-0.5930225253105164,
-0.24761056900024414,
-0.28034451603889465,
0.08081088960170746,
0.18549463152885437,
-0.14821062982082367,
-0.42707064747810364,
0.1166989728808403,
-0.2123582661151886,
-0.23427437245845795,
0.07440454512834549,
0.5815200209617615,
0.17612388730049133,
0.010958097875118256,
-0.030884474515914917,
0.09648454189300537,
0.08778820186853409,
0.06522104889154434,
-0.3075683116912842,
0.08804596960544586,
-0.20708762109279633,
-0.0796947032213211,
0.07162988185882568,
-0.09695108234882355,
0.346889466047287,
-0.0009937277063727379,
0.003921844065189362,
0.021377496421337128,
-0.03493201732635498,
-0.024002324789762497,
-0.1211722120642662,
0.1525503247976303,
-0.20545464754104614,
0.25520455837249756,
0.13464586436748505,
-0.15007156133651733,
-0.18107019364833832,
0.22681498527526855,
-0.35945191979408264,
-0.29111385345458984,
-0.3791431188583374,
0.1949676126241684,
-0.10981053113937378,
-0.14548633992671967,
-0.5848878026008606,
0.012517308816313744,
0.0007277727127075195,
0.02549811080098152,
0.0021248087286949158,
-0.023357126861810684,
-0.027491480112075806,
-0.22157396376132965,
0.20509985089302063,
0.4093637466430664,
-0.5369467735290527,
-0.06456411629915237,
0.2782689929008484,
-0.11253926157951355,
0.09701358526945114,
0.3925764262676239,
-0.3601478636264801,
-0.04770442098379135,
-0.18466991186141968,
0.07103674113750458,
0.404293417930603,
-0.4545011818408966,
-0.39488476514816284,
0.4289780259132385,
-0.1647280752658844,
-0.3494310975074768,
0.18245354294776917,
-0.324940025806427,
0.025318816304206848,
-0.10778313130140305,
-0.09389245510101318,
0.07511389255523682,
0.2487936168909073,
-0.059621892869472504,
-0.28412944078445435,
-0.5043243765830994,
0.07415244728326797,
0.12383247911930084,
-0.004678502678871155,
-0.08573705703020096,
0.267464280128479,
-0.2626120448112488,
0.3929923176765442,
-0.18199221789836884,
-0.0894116461277008,
0.43025046586990356,
0.376655250787735,
0.0016959533095359802,
0.06313401460647583,
0.03951200842857361,
-0.3987928032875061,
0.1257719099521637,
-0.1091991439461708,
-0.1684880554676056,
-0.3376663327217102,
-0.10133791714906693,
-0.3460758626461029,
-0.09464523196220398,
-0.1545650213956833,
-0.12377159297466278,
0.1656656265258789,
0.13752013444900513,
0.1838105469942093,
0.26253584027290344,
-0.3822275400161743,
0.28784939646720886,
-0.1801207959651947,
0.13209734857082367,
-0.05595230683684349,
0.3684470057487488,
-0.14482200145721436,
-0.11636330187320709,
0.16000151634216309,
0.37973731756210327,
0.2853257954120636,
-0.316719114780426,
-0.09012160450220108,
0.3594648241996765,
-0.11498107016086578,
0.0393437035381794,
0.18406322598457336,
0.2947932183742523,
0.07384457439184189,
-0.25849029421806335,
-0.08255819976329803,
0.2587812840938568,
0.21861404180526733,
0.18057799339294434,
-0.22558936476707458,
0.14608505368232727,
-0.24860753118991852,
0.09218631684780121,
0.1497751772403717,
-0.1987132579088211,
0.3767399489879608,
-0.15739433467388153,
-0.10108594596385956,
-0.05025900900363922,
0.07100505381822586,
0.3294774889945984,
0.34015506505966187,
0.22795969247817993,
-0.3400503396987915,
-0.14045986533164978,
0.6917558908462524,
-0.06428641825914383,
0.022629283368587494,
0.14054560661315918,
-0.32392314076423645,
0.06933780014514923,
0.018152302131056786,
0.2788824439048767,
0.29982852935791016,
0.3003217577934265,
-0.1312013566493988,
0.04060180485248566,
0.03598734363913536,
-0.2496262788772583,
0.2418426275253296,
0.07076500356197357,
0.07962074875831604,
0.0019166544079780579,
0.21160297095775604,
0.05596838518977165,
-0.286622017621994,
-0.3386628329753876,
0.12246771901845932,
0.2276029884815216,
-0.4776935875415802,
0.16599029302597046,
-0.4518444240093231,
-0.3091520071029663,
-0.3218558728694916,
-0.3521707057952881,
-0.040154699236154556,
-0.1607820987701416,
-0.22011582553386688,
-0.031154494732618332,
-0.027411041781306267,
0.23259598016738892,
-0.12482240796089172,
0.04015199840068817,
0.05820339918136597,
-0.09462469816207886,
-0.17910924553871155,
-0.028450611978769302,
-0.3686601519584656,
0.06955130398273468,
0.46958187222480774,
-0.11891327053308487,
0.14182397723197937,
-0.34584668278694153,
0.02545509859919548,
-0.417683482170105,
-0.2812310755252838,
0.10368852317333221,
-0.1365068107843399,
0.15857988595962524,
-0.01700189709663391,
0.08730709552764893,
-0.18251372873783112,
-0.1956898272037506,
0.23411035537719727,
0.059431709349155426,
-0.2125675082206726,
-0.11045586317777634,
-0.03948380425572395,
-0.2467474490404129,
-0.2808893918991089,
-0.37247592210769653,
-0.3651997148990631,
-0.33860597014427185,
0.32758355140686035,
0.03921578451991081,
0.11135752499103546,
0.22630786895751953,
0.07155359536409378,
0.4202537536621094,
-0.04435313865542412,
-0.09305388480424881,
-0.18145954608917236,
-0.5171422958374023,
0.596804141998291,
-0.20261181890964508,
-0.3912421464920044,
0.23372358083724976,
-0.06372016668319702,
-0.0389183945953846,
-0.1960216760635376,
-0.2511850595474243,
-0.06583306193351746,
-0.3126475214958191,
0.15126194059848785,
0.10397808253765106,
0.10633976757526398,
0.20132705569267273,
0.0417671799659729,
-0.13355118036270142,
-0.35626596212387085,
-0.2882262170314789,
0.27340808510780334,
0.06066775321960449,
0.20776045322418213,
0.09892772883176804,
0.6251180171966553,
0.049434516578912735,
0.5631831288337708,
0.29552316665649414,
-0.28377485275268555,
0.290956974029541,
-0.28984782099723816,
0.2644430696964264,
0.1041172593832016,
-0.14109322428703308,
0.15418919920921326,
-0.009502872824668884,
-0.06608486920595169,
0.3006896376609802,
0.09347120672464371,
0.05487588047981262,
0.03631474822759628,
-0.11625345051288605,
-0.4031957983970642,
-0.04124832898378372,
0.02999378740787506,
-0.20284374058246613,
-0.005566619336605072,
0.14180563390254974,
-0.008820127695798874,
0.06285126507282257,
0.0026286737993359566,
0.10644222795963287,
0.23473158478736877,
0.18747682869434357,
0.12441359460353851,
0.00936906784772873,
-0.07521195709705353,
-0.47049427032470703,
0.30337464809417725,
-0.0008164448663592339,
0.2948242127895355,
-0.01967848837375641,
0.03003677725791931,
0.13746769726276398,
-0.15132658183574677,
0.7644385099411011,
-0.12227632850408554,
-0.061123304069042206,
0.06496065855026245,
-0.03527994826436043,
-0.2977446913719177,
0.02228381112217903,
-0.16475903987884521,
0.26287397742271423,
-0.15276117622852325,
0.39711204171180725,
-0.30382853746414185,
-0.1520817130804062,
0.20050475001335144,
-0.028466328978538513,
-0.0210418701171875,
-0.14100328087806702,
-0.30341169238090515,
-0.17795026302337646,
-0.29894500970840454,
-0.07311508804559708,
0.11233224719762802,
0.05601608753204346,
-0.38857024908065796,
-0.1317562758922577,
0.0165098849684,
-0.2506065368652344,
0.16731667518615723,
0.10685355961322784,
0.45582762360572815,
-0.06830596923828125,
0.03948880359530449,
0.29751867055892944,
0.34763628244400024,
0.39734625816345215,
0.5737865567207336,
-0.14653325080871582,
-0.399248868227005,
-0.03347441926598549,
-0.2456226944923401,
0.2939286530017853,
0.21367813646793365,
-0.2913571000099182,
-0.09272290021181107,
0.2535957098007202,
-0.09492188692092896,
-0.1751345694065094,
0.1868767887353897,
0.2067127376794815,
0.10427987575531006,
-0.2334144413471222,
-0.43687790632247925,
0.5667412281036377,
0.18850946426391602,
-0.04213445633649826,
-0.0018732547760009766,
0.2993950843811035,
-0.4307802617549896,
0.14821936190128326,
-0.1461808681488037,
0.8509694933891296,
-0.17713989317417145,
0.12261566519737244,
0.2364647388458252,
-0.3746723532676697,
0.3337589204311371,
-0.03506673127412796,
-0.059692710638046265,
-0.38977691531181335,
0.040798500180244446,
-0.11958522349596024,
-0.12581831216812134,
0.11085638403892517,
0.19700303673744202,
-0.2516472339630127,
0.28054776787757874,
-0.2812689244747162,
0.3877567648887634,
0.21676170825958252,
0.2404511570930481,
0.07591825723648071,
0.06871606409549713,
-0.3515154719352722,
0.16942189633846283,
0.026131410151720047,
-0.06213874742388725,
-0.04592593386769295,
-0.3875887393951416,
-0.43941596150398254,
-0.3004823923110962,
-0.06462977081537247,
0.12243261188268661,
-0.2399219274520874,
0.14011722803115845,
0.13020160794258118,
-0.400365948677063,
0.22031767666339874,
0.20260226726531982,
0.47432440519332886,
0.05348338931798935,
-0.36217570304870605,
0.044379085302352905,
-0.026848234236240387,
0.09842362999916077,
-0.14884993433952332,
0.06673327088356018,
0.18322375416755676,
0.05164457857608795,
-0.0047748759388923645,
0.05385814607143402,
-0.07439548522233963,
-0.27417537569999695,
-0.16896390914916992,
0.21533828973770142,
0.09006291627883911,
-0.05946765094995499,
-0.14642536640167236,
0.05325739085674286,
-0.19148066639900208,
-0.23264949023723602,
0.1882353574037552,
0.15039634704589844,
-0.03303588181734085,
-0.02784106880426407,
0.17382192611694336,
-0.22893987596035004,
-0.10103389620780945,
0.2736685872077942,
-0.3504658341407776,
0.11914500594139099,
0.5808203220367432,
-0.0022489838302135468,
-0.17819400131702423,
-0.12917768955230713,
0.25336387753486633,
0.5041385889053345,
-0.2543424367904663,
0.11665050685405731,
0.018279576674103737,
0.23439301550388336,
0.026766419410705566,
0.3150700628757477,
-0.030751541256904602,
-0.07171083241701126,
-0.018957480788230896,
-0.444694846868515,
-0.20628570020198822,
0.2838318943977356,
-0.2741207182407379,
0.046594567596912384,
0.18340378999710083,
0.13517600297927856,
-0.05381219834089279,
-0.3851757347583771,
-0.3906358480453491,
0.338202565908432,
-0.14031723141670227,
-0.0736965462565422,
0.19588302075862885,
0.08742937445640564,
0.4632384479045868,
-0.10040567815303802,
0.18276064097881317,
0.10888063907623291,
-0.12782521545886993,
-0.2594588100910187,
-0.30144965648651123,
0.06477997452020645,
0.0824720710515976,
0.1277952343225479,
-0.04132028669118881,
0.06526846438646317,
-0.09288574755191803,
0.03656204789876938,
-0.026289556175470352,
0.07104033976793289,
0.03199390694499016,
0.3077407777309418,
0.040571946650743484,
-0.14100605249404907,
-0.12426422536373138,
0.04984268918633461,
-0.14851431548595428,
0.27426034212112427,
-0.012899398803710938,
0.3124459981918335,
-0.09551108628511429,
-0.0028235316276550293,
0.04636143147945404,
-0.1379244029521942,
0.1129908412694931,
0.29437997937202454,
0.23658064007759094,
-0.4021323323249817,
-0.03999292105436325,
0.29469120502471924,
0.3486139476299286,
0.27679765224456787,
-0.2415795922279358,
-0.1068987026810646,
0.4872179329395294,
0.2178650200366974,
-0.16351328790187836,
0.026242846623063087,
0.048081524670124054,
0.042402997612953186,
0.12373529374599457,
0.11039383709430695,
0.23157206177711487,
-0.1819700300693512,
-0.2322581559419632,
0.009650031104683876,
0.5953055024147034,
-0.05515376478433609,
0.08349321782588959,
0.5304673314094543,
0.028058599680662155,
0.11337552964687347,
0.1657814234495163,
0.20668819546699524,
0.2387714684009552,
0.7215932011604309,
-0.12183082848787308,
0.11469980329275131,
0.21881046891212463,
0.21878895163536072,
-0.009584784507751465,
-0.15873980522155762,
-0.055496696382761,
0.142347514629364,
0.0013158470392227173,
0.030001036822795868,
-0.017101511359214783,
0.4155605137348175,
0.062266189604997635,
0.28460410237312317,
0.10880858451128006,
0.15659208595752716,
-0.02659928798675537,
-0.27411049604415894,
-0.15131384134292603,
-0.18937420845031738,
-0.13831375539302826,
-0.11317381262779236,
-0.2999904453754425,
-0.189585343003273,
0.32546567916870117,
0.1369931548833847,
0.1530306041240692,
-0.32095423340797424,
0.013114454224705696,
0.14780917763710022,
0.046890050172805786,
-0.254038006067276,
0.37705597281455994,
-0.007906325161457062,
-0.08314666152000427,
0.16996333003044128,
0.03393233194947243,
0.5373632311820984,
0.4004074037075043,
-0.007931957021355629,
-0.09079167991876602,
-0.1478341519832611,
-0.16350093483924866,
-0.017824336886405945,
0.22959773242473602,
-0.010800361633300781,
0.051943134516477585,
0.18516233563423157,
0.20466327667236328,
-0.12021742761135101,
0.18441034853458405,
0.0027059540152549744,
0.4745309352874756,
-0.12042553722858429,
0.14678356051445007,
-0.2567703127861023,
0.05746053159236908,
-0.12146507203578949,
-0.08219464868307114,
-0.4141814410686493,
0.07099071145057678,
0.4045533835887909,
-0.016008194535970688,
0.22601982951164246,
0.08360294997692108,
0.12190653383731842,
-0.11020880937576294,
0.3649722933769226,
0.3567013442516327,
0.30979305505752563,
-0.20080654323101044,
0.02890591323375702,
-0.5375313758850098,
-0.09677480906248093,
-0.028222959488630295,
-0.14430977404117584,
-0.11226899176836014,
0.12169098854064941,
-0.015140973031520844,
-0.022975273430347443,
0.1971346139907837,
0.16738416254520416,
-0.25954222679138184,
-0.07371114194393158,
-0.39879128336906433,
-0.12575232982635498,
-0.22739891707897186,
0.051553621888160706,
0.07813803851604462,
-0.12322809547185898,
0.19281843304634094,
-0.04597797244787216,
-0.003933224827051163,
-0.38534682989120483,
0.013599783182144165,
-0.16917477548122406,
-0.08844076097011566,
0.22620980441570282,
0.20281152427196503,
0.16525280475616455,
-0.08246275782585144,
0.05325636267662048,
-0.15677832067012787,
-0.17615510523319244,
-0.26890018582344055,
0.34740975499153137,
-0.03249645605683327,
0.3239515721797943,
-0.40895533561706543,
-0.09082190692424774,
-0.2698098421096802,
-0.08960390090942383,
-0.0913955420255661,
-0.05764055997133255,
-0.2368708997964859,
0.15000851452350616,
-0.06713373959064484,
-0.2232227921485901,
0.004705595783889294,
0.2367878258228302,
0.024488281458616257,
0.09043358266353607,
-0.1583690345287323,
-0.29182562232017517,
0.5037628412246704,
-0.6756160259246826,
-0.2314690798521042,
0.15697531402111053,
0.1691133677959442,
0.1958950310945511,
-0.1843697726726532,
-0.2693120539188385,
0.2802061140537262,
0.3953036069869995,
0.09228533506393433,
-0.33827903866767883,
0.0631677508354187,
0.1426158845424652,
0.1798427253961563,
-0.0846373587846756,
0.09802035242319107,
0.17483845353126526,
-0.18694068491458893,
0.01885734498500824,
-0.40571922063827515
] |
https://github.com/huggingface/datasets/issues/5098 | Classes label error when loading symbolic links using imagefolder | Hi, thanks for reporting and suggesting a fix! We still need to account for `.`/`..` in the file path, so a more robust fix would be `Path(os.path.abspath(filepath))`. | **Is your feature request related to a problem? Please describe.**
Like this: #4015
When there are **symbolic links** to pictures in the data folder, the parent folder name of the **real file** will be used as the class name instead of the parent folder of the symbolic link itself. Can you give an option to decide whether to enable symbolic link tracking?
This is inconsistent with the `torchvision.datasets.ImageFolder` behavior.
For example:


It use `others` in green circle as class label but not `abnormal`, I wish `load_dataset` not use the real file parent as label.
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context about the feature request here.
| 27 | Classes label error when loading symbolic links using imagefolder
**Is your feature request related to a problem? Please describe.**
Like this: #4015
When there are **symbolic links** to pictures in the data folder, the parent folder name of the **real file** will be used as the class name instead of the parent folder of the symbolic link itself. Can you give an option to decide whether to enable symbolic link tracking?
This is inconsistent with the `torchvision.datasets.ImageFolder` behavior.
For example:


It use `others` in green circle as class label but not `abnormal`, I wish `load_dataset` not use the real file parent as label.
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context about the feature request here.
Hi, thanks for reporting and suggesting a fix! We still need to account for `.`/`..` in the file path, so a more robust fix would be `Path(os.path.abspath(filepath))`. | [
-0.26920077204704285,
0.041932687163352966,
0.03758114203810692,
0.7047107219696045,
0.2662848234176636,
0.05047309398651123,
0.4039705991744995,
0.023749690502882004,
0.361828088760376,
0.07373768091201782,
-0.06793902069330215,
0.3443042039871216,
-0.4016428291797638,
-0.3618543744087219,
-0.2685368061065674,
-0.31392648816108704,
-0.06715593487024307,
0.04205241799354553,
-0.03292161971330643,
-0.112632617354393,
-0.3969469666481018,
0.31238019466400146,
0.15624882280826569,
0.20203982293605804,
-0.3037324547767639,
-0.08570149540901184,
-0.03457718342542648,
0.3876259922981262,
-0.020594527944922447,
-0.4045819044113159,
-0.04615116864442825,
-0.04306432232260704,
0.33130890130996704,
0.5438010096549988,
-0.00010736037802416831,
-0.08322480320930481,
0.5611956715583801,
-0.011315075680613518,
-0.4336163401603699,
-0.09556519985198975,
-0.020240942016243935,
0.11044751107692719,
0.3358519673347473,
-0.23428010940551758,
-0.19021448493003845,
0.16684584319591522,
0.06329939514398575,
-0.03700996935367584,
0.03477470576763153,
-0.053744278848171234,
0.2769911587238312,
-0.12781444191932678,
-0.049689970910549164,
0.08663014322519302,
0.4762990474700928,
0.3703480362892151,
-0.016524076461791992,
0.5583304166793823,
0.1519978791475296,
-0.03684735298156738,
-0.212063729763031,
0.6317792534828186,
0.024149378761649132,
0.13055002689361572,
0.4111039638519287,
0.003506019711494446,
-0.15086355805397034,
-0.2224842607975006,
-0.06505291163921356,
0.12829753756523132,
0.692445695400238,
-0.017308615148067474,
-0.12267833203077316,
-0.14859609305858612,
0.04522146284580231,
-0.17421311140060425,
0.3787020146846771,
0.1673867255449295,
-0.12672382593154907,
-0.11107954382896423,
-0.1203029528260231,
0.07409627735614777,
-0.26922905445098877,
0.22951534390449524,
-0.004155334085226059,
-0.1836099922657013,
0.014488568529486656,
0.12601207196712494,
0.15472041070461273,
-0.03306913375854492,
0.38665536046028137,
0.10351730138063431,
-0.20225560665130615,
0.08489905297756195,
0.08214886486530304,
0.051089800894260406,
-0.12902617454528809,
0.3583018183708191,
-0.19917050004005432,
-0.09788072109222412,
0.1637183129787445,
-0.026976920664310455,
-0.08366774022579193,
0.29236510396003723,
0.032465219497680664,
0.1364123672246933,
-0.023931562900543213,
0.4968872368335724,
0.2595605254173279,
0.18397830426692963,
-0.08017447590827942,
-0.04011739045381546,
-0.47951385378837585,
-0.18150895833969116,
-0.1893758475780487,
-0.02085243910551071,
-0.195181742310524,
-0.08002262562513351,
-0.38934287428855896,
-0.1786959320306778,
0.11209424585103989,
0.007154842372983694,
0.3297911286354065,
0.42642995715141296,
0.20630821585655212,
-0.021532952785491943,
0.5545832514762878,
-0.15101726353168488,
-0.004492095671594143,
0.17911192774772644,
-0.0111186932772398,
0.044753365218639374,
-0.3597472906112671,
0.10973145812749863,
0.047882985323667526,
0.12369763851165771,
0.23461663722991943,
0.0542045533657074,
0.04671914875507355,
0.07557971030473709,
0.03360609710216522,
-0.12468144297599792,
0.14769399166107178,
0.03609056770801544,
-0.34653449058532715,
-0.010691745206713676,
0.16494296491146088,
0.11010721325874329,
-0.11328843981027603,
0.09530096501111984,
-0.5836212038993835,
-0.0658460408449173,
0.0014383774250745773,
0.1682853102684021,
0.10654236376285553,
-0.07629445940256119,
-0.04582446068525314,
0.015122700482606888,
-0.18543478846549988,
-0.16223783791065216,
0.20114988088607788,
-0.30370938777923584,
-0.15223602950572968,
-0.09619124233722687,
-0.06861861050128937,
0.4408075213432312,
-0.28143051266670227,
-0.19648976624011993,
0.04816737025976181,
-0.026676680892705917,
-0.21481984853744507,
0.20313245058059692,
-0.25891801714897156,
0.18901878595352173,
-0.5780510902404785,
-0.03953095152974129,
0.2680090665817261,
-0.582670271396637,
0.08023965358734131,
0.1941070705652237,
-0.0483580157160759,
-0.10551788657903671,
-0.001998916268348694,
0.518146812915802,
0.06008186563849449,
-0.07386479526758194,
-0.35889482498168945,
0.3627117872238159,
0.11116978526115417,
0.07736632972955704,
-0.18252886831760406,
0.012883609160780907,
0.046080753207206726,
0.3278108537197113,
-0.2347765415906906,
0.01058623194694519,
0.14556609094142914,
0.061279118061065674,
0.06327582150697708,
-0.3991331160068512,
-0.0938422754406929,
0.26652759313583374,
0.11330202221870422,
0.32318127155303955,
0.03171614930033684,
0.1555868685245514,
-0.16522318124771118,
0.15533989667892456,
-0.07334557920694351,
0.1398237943649292,
-0.22634302079677582,
-0.005257025361061096,
-0.08224039524793625,
-0.16776125133037567,
-0.38735640048980713,
-0.06821729242801666,
0.09353666007518768,
0.22727559506893158,
-0.3359806537628174,
-0.20566707849502563,
0.23693914711475372,
0.17524443566799164,
-0.2256280928850174,
0.2110365629196167,
0.04118293523788452,
0.34870246052742004,
-0.1016310527920723,
0.023453108966350555,
-0.16750329732894897,
0.09612565487623215,
0.21824976801872253,
-0.12696340680122375,
-0.08996688574552536,
0.564227819442749,
0.18968908488750458,
-0.10038617253303528,
0.10851410031318665,
-0.0194007009267807,
0.144616037607193,
-0.5793032050132751,
0.2342512458562851,
0.2232816517353058,
0.23021049797534943,
0.11322285979986191,
-0.21567928791046143,
0.3971121311187744,
-0.08403445780277252,
0.056590694934129715,
0.08509305119514465,
-0.2621191143989563,
-0.034561991691589355,
-0.12082184851169586,
0.05913925915956497,
-0.12029565870761871,
0.1054740697145462,
0.31859758496284485,
0.273540198802948,
0.08338360488414764,
-0.21155913174152374,
-0.09225285798311234,
0.08235477656126022,
0.05027079954743385,
-0.004417404532432556,
0.3285239338874817,
-0.32604241371154785,
0.0780281201004982,
0.14536035060882568,
0.17407014966011047,
0.2981341481208801,
0.26393747329711914,
0.01306634396314621,
-0.1454707533121109,
-0.16155467927455902,
-0.06947119534015656,
0.3448019325733185,
-0.15752235054969788,
0.21983765065670013,
-0.021058395504951477,
0.02243262156844139,
-0.038707274943590164,
-0.2628657817840576,
-0.30764713883399963,
-0.036337681114673615,
-0.08873878419399261,
-0.3645327687263489,
0.05047342926263809,
0.026064397767186165,
-0.49075451493263245,
-0.2722567021846771,
-0.10392162203788757,
-0.3190865218639374,
-0.07851456105709076,
0.20476064085960388,
0.19043418765068054,
-0.13523921370506287,
0.11235367506742477,
0.059295687824487686,
0.20421844720840454,
0.08340605348348618,
-0.3126713037490845,
-0.0916161984205246,
-0.12465760111808777,
-0.23054802417755127,
0.037866827100515366,
0.19006961584091187,
-0.13037268817424774,
0.21446757018566132,
-0.2906684875488281,
0.13568399846553802,
-0.2787954807281494,
-0.3637474775314331,
0.09796258807182312,
-0.015265073627233505,
-0.06764497607946396,
0.24162174761295319,
0.08615375310182571,
0.09613126516342163,
-0.35514095425605774,
0.2644089162349701,
-0.18561623990535736,
-0.05093448609113693,
-0.23001624643802643,
0.07150419801473618,
0.09755485504865646,
-0.08483216166496277,
-0.12301569432020187,
-0.27669185400009155,
-0.2698797881603241,
0.06437522917985916,
0.18534474074840546,
0.06061330810189247,
0.23927338421344757,
0.09732431918382645,
0.04467403143644333,
0.08724436908960342,
0.12675124406814575,
-0.048399366438388824,
-0.18962165713310242,
0.06253820657730103,
-0.23111146688461304,
-0.16040290892124176,
0.11187748610973358,
0.01859327405691147,
0.1978369802236557,
-0.1469474881887436,
-0.39439475536346436,
-0.4548037350177765,
0.1394437849521637,
0.3726503551006317,
-0.017963461577892303,
-0.02041863463819027,
0.12548214197158813,
0.3314667344093323,
-0.223594069480896,
-0.11072933673858643,
-0.0030400585383176804,
-0.02028600126504898,
-0.45876073837280273,
0.5629751682281494,
-0.059855297207832336,
0.2641289532184601,
0.017612386494874954,
0.5911746621131897,
-0.17135269939899445,
-0.42085695266723633,
0.24372482299804688,
-0.16158133745193481,
0.43360501527786255,
-0.12621095776557922,
0.016852030530571938,
0.28132936358451843,
-0.00410674512386322,
-0.09412414580583572,
0.24941034615039825,
0.15829116106033325,
-0.339110791683197,
-0.05379275232553482,
0.22061315178871155,
-0.27809131145477295,
-0.014505164697766304,
0.13844381272792816,
-0.1528235226869583,
0.004004724323749542,
-0.3870307505130768,
-0.11976383626461029,
-0.03855324909090996,
-0.4035029709339142,
0.28141462802886963,
0.5121601819992065,
0.07128100097179413,
0.003149758093059063,
-0.2017754167318344,
0.16200797259807587,
0.33913272619247437,
0.08661037683486938,
0.16615022718906403,
0.011577148921787739,
-0.29837146401405334,
-0.10062586516141891,
0.08027053624391556,
0.09757525473833084,
0.43301165103912354,
-0.01766909472644329,
0.27171820402145386,
0.10175713896751404,
-0.05724959447979927,
-0.3027160167694092,
-0.08045056462287903,
-0.07881803810596466,
-0.07769456505775452,
0.08256310224533081,
0.15631482005119324,
-0.1098734587430954,
-0.17760765552520752,
-0.06796805560588837,
0.10330788046121597,
-0.20165172219276428,
-0.18928252160549164,
-0.15869690477848053,
0.13242194056510925,
-0.2830475866794586,
-0.03380397707223892,
0.16784675419330597,
0.030704515054821968,
-0.17083516716957092,
-0.1382288932800293,
-0.06103704869747162,
-0.2826748192310333,
-0.2345232516527176,
-0.05564996227622032,
0.2848486602306366,
0.07328202575445175,
-0.037830330431461334,
0.27215576171875,
0.6876410245895386,
0.462995320558548,
0.4673025608062744,
-0.5156835317611694,
-0.04689888656139374,
-0.01341303065419197,
-0.052190616726875305,
-0.050392456352710724,
0.3125572204589844,
-0.01107793115079403,
-0.39358219504356384,
-0.4339870512485504,
-0.1954200714826584,
-0.3922378718852997,
0.27454301714897156,
0.11614689230918884,
0.03230276703834534,
0.044161468744277954,
-0.0208243727684021,
0.3807997703552246,
0.12263140082359314,
-0.24645540118217468,
0.2724863886833191,
-0.1875525563955307,
-0.5449404120445251,
0.13558977842330933,
0.29884710907936096,
0.7907242178916931,
-0.08285906910896301,
0.36198240518569946,
-0.0610799714922905,
-0.40370333194732666,
0.23374062776565552,
0.10283184051513672,
0.02211555279791355,
-0.4638901948928833,
-0.005154057405889034,
-0.02871697023510933,
-0.016406405717134476,
-0.08651719242334366,
0.10334986448287964,
0.053437333554029465,
0.042593564838171005,
-0.18324324488639832,
0.11015833914279938,
-0.19572216272354126,
0.2655160427093506,
0.1164151057600975,
-0.17966222763061523,
0.24852779507637024,
0.1806095987558365,
0.09580112993717194,
0.11360619962215424,
-0.2648991346359253,
-0.056853942573070526,
-0.1012769490480423,
-0.25226128101348877,
0.01839817315340042,
0.13389229774475098,
-0.5000069737434387,
0.08228451013565063,
-0.2183467149734497,
-0.48697859048843384,
-0.028504688292741776,
0.5376771688461304,
0.21077270805835724,
-0.15407146513462067,
-0.21558640897274017,
0.3596976399421692,
-0.11036495119333267,
0.35081595182418823,
-0.06496889144182205,
-0.10572988539934158,
0.3450876474380493,
0.04971642047166824,
0.27492639422416687,
-0.20643043518066406,
-0.1300085186958313,
-0.18322546780109406,
-0.005958378314971924,
-0.10927370190620422,
0.21986094117164612,
-0.21586564183235168,
-0.02287367358803749,
-0.3522420823574066,
-0.07445746660232544,
-0.08847223967313766,
0.201446071267128,
0.00047700852155685425,
-0.0818658396601677,
-0.25783154368400574,
0.22894783318042755,
-0.33132800459861755,
0.03900148719549179,
0.4564568102359772,
-0.3340210020542145,
-0.3367965817451477,
0.20194141566753387,
0.08235242962837219,
-0.151694655418396,
-0.20768868923187256,
0.41764307022094727,
0.5309608578681946,
-0.6061286926269531,
0.077536441385746,
0.293573796749115,
-0.1788802593946457,
0.07497991621494293,
0.27340754866600037,
0.17531058192253113,
-0.07574722915887833,
-0.1916300654411316,
-0.16324731707572937,
-0.44254714250564575,
0.16009899973869324,
-0.521213710308075,
0.4007350504398346,
-0.39275112748146057,
-0.06956213712692261,
0.48450854420661926,
-0.14075763523578644,
-0.349750280380249,
0.19831590354442596,
-0.2445291131734848,
0.16700021922588348,
0.15988583862781525,
0.32573580741882324,
0.1581963151693344,
0.18689373135566711,
0.12528152763843536,
-0.17912724614143372,
-0.08518041670322418,
-0.06086525693535805,
-0.1554824560880661,
0.09809615463018417,
0.13079839944839478,
0.11940733343362808,
-0.1574036031961441,
-0.4708234667778015,
0.24916163086891174,
-0.05260952562093735,
-0.1776028722524643,
-0.13422086834907532,
-0.26776236295700073,
0.3177627623081207,
-0.15700656175613403,
0.13442875444889069,
0.14156994223594666,
0.12944994866847992,
-0.2687544822692871,
0.5014784336090088,
0.044307269155979156,
-0.14191631972789764,
-0.12390800565481186,
-0.1249014288187027,
0.038629502058029175,
0.10438461601734161,
0.06433011591434479,
0.18830791115760803,
0.14692291617393494,
0.11557397246360779,
0.0037227533757686615,
0.0819520428776741,
0.40960678458213806,
0.006698869168758392,
-0.37245267629623413,
-0.29941603541374207,
0.1580963432788849,
0.2165500521659851,
-0.11568707227706909,
-0.12213321030139923,
-0.42782434821128845,
-0.2534489035606384,
0.02907424047589302,
0.12305795401334763,
0.30266913771629333,
0.2124996781349182,
-0.04319147765636444,
-0.12812529504299164,
0.6256105899810791,
-0.13936641812324524,
0.1435101330280304,
0.26452597975730896,
-0.4401171803474426,
0.12722885608673096,
0.5741198062896729,
0.11958678066730499,
0.05706289783120155,
0.6165773868560791,
-0.23628148436546326,
0.31644871830940247,
0.2708337604999542,
0.1548125296831131,
0.1736435890197754,
0.26446449756622314,
-0.008719973266124725,
-0.2471485137939453,
0.39780908823013306,
-0.10301371663808823,
-0.28809767961502075,
0.07208921760320663,
-0.3022165298461914,
-0.38394981622695923,
0.20432215929031372,
0.07728631794452667,
-0.1338491439819336,
-0.16944777965545654,
-0.4643816649913788,
-0.1842135488986969,
-0.116480253636837,
-0.05490315705537796,
-0.27274927496910095,
-0.10033068060874939,
0.2295909970998764,
0.1202024519443512,
0.0067567378282547,
-0.34887129068374634,
-0.2666083574295044,
0.23500403761863708,
0.11739769577980042,
-0.26027506589889526,
0.4118471145629883,
0.024647973477840424,
0.2251540720462799,
0.636026918888092,
0.20888367295265198,
0.22667266428470612,
0.31786689162254333,
0.041839562356472015,
-0.35749417543411255,
-0.3744174838066101,
0.0808519795536995,
-0.1762205958366394,
0.042687490582466125,
0.02513221651315689,
-0.2057485282421112,
0.2281632274389267,
0.11097203195095062,
-0.14955952763557434,
0.34961584210395813,
-0.1685844212770462,
0.0052127111703157425,
0.20194530487060547,
0.3295934498310089,
-0.07128331065177917,
-0.1086234301328659,
-0.3182910084724426,
0.07577899098396301,
-0.1897699534893036,
0.08147702366113663,
0.3794245719909668,
-0.14103253185749054,
0.04096938297152519,
0.12988972663879395,
0.0733603909611702,
0.2559202313423157,
0.355525404214859,
0.23425911366939545,
0.06850861757993698,
-0.2696553170681,
-0.16453206539154053,
-0.384135365486145,
0.13197961449623108,
0.12266583740711212,
-0.4147254228591919,
-0.1404980719089508,
-0.22990302741527557,
0.036622148007154465,
-0.12129785120487213,
0.21636447310447693,
0.11690421402454376,
0.563296377658844,
-0.012512527406215668,
-0.4027926027774811,
0.15622206032276154,
0.06806530803442001,
0.27930188179016113,
-0.020453713834285736,
-0.08663348108530045,
-0.07095907628536224,
0.05109049752354622,
0.0429462268948555,
-0.13058358430862427,
-0.10571422427892685,
-0.28995946049690247,
0.1386561393737793,
0.5704098343849182,
-0.041758328676223755,
0.37255269289016724,
-0.13734170794487,
-0.06071866303682327,
0.0456622913479805,
-0.459799587726593,
-0.22054456174373627,
0.08377726376056671,
0.33431798219680786,
0.30034270882606506,
-0.13699476420879364,
-0.19137489795684814,
-0.5277792811393738,
-0.014929679222404957,
-0.002930477261543274,
0.25275641679763794,
-0.4102129340171814,
0.09531017392873764,
-0.07634413242340088,
0.014868218451738358,
0.08144710212945938,
0.24023112654685974,
0.10496485233306885,
-0.03655826300382614,
-0.40143638849258423,
-0.5521155595779419,
0.621608555316925,
-0.2902536690235138,
0.009550999850034714,
0.3563157916069031,
0.16690745949745178,
0.1753629893064499,
0.28337886929512024,
-0.35360705852508545,
0.1391744315624237,
0.3029109537601471,
0.20295217633247375,
-0.46163299679756165,
-0.03043057769536972,
0.186563640832901,
0.22248972952365875,
0.008245490491390228,
-0.08159011602401733,
0.3066166937351227,
-0.00543552078306675,
-0.048979878425598145,
-0.07302803546190262
] |
https://github.com/huggingface/datasets/issues/5098 | Classes label error when loading symbolic links using imagefolder | > Hi, thanks for reporting and suggesting a fix! We still need to account for `.`/`..` in the file path, so a more robust fix would be `Path(os.path.abspath(filepath))`.
Thanks for your reply! | **Is your feature request related to a problem? Please describe.**
Like this: #4015
When there are **symbolic links** to pictures in the data folder, the parent folder name of the **real file** will be used as the class name instead of the parent folder of the symbolic link itself. Can you give an option to decide whether to enable symbolic link tracking?
This is inconsistent with the `torchvision.datasets.ImageFolder` behavior.
For example:


It use `others` in green circle as class label but not `abnormal`, I wish `load_dataset` not use the real file parent as label.
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context about the feature request here.
| 32 | Classes label error when loading symbolic links using imagefolder
**Is your feature request related to a problem? Please describe.**
Like this: #4015
When there are **symbolic links** to pictures in the data folder, the parent folder name of the **real file** will be used as the class name instead of the parent folder of the symbolic link itself. Can you give an option to decide whether to enable symbolic link tracking?
This is inconsistent with the `torchvision.datasets.ImageFolder` behavior.
For example:


It use `others` in green circle as class label but not `abnormal`, I wish `load_dataset` not use the real file parent as label.
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context about the feature request here.
> Hi, thanks for reporting and suggesting a fix! We still need to account for `.`/`..` in the file path, so a more robust fix would be `Path(os.path.abspath(filepath))`.
Thanks for your reply! | [
-0.2615421414375305,
0.03905549645423889,
0.040898192673921585,
0.7104774713516235,
0.2595892548561096,
0.04581959545612335,
0.41204994916915894,
0.01836313307285309,
0.3706163167953491,
0.07174430042505264,
-0.06196678429841995,
0.34097522497177124,
-0.40204137563705444,
-0.35772421956062317,
-0.26756852865219116,
-0.3120495676994324,
-0.06397116929292679,
0.038548924028873444,
-0.03238430619239807,
-0.11282055079936981,
-0.3978864550590515,
0.30785253643989563,
0.16052140295505524,
0.1974300742149353,
-0.3027142584323883,
-0.09442606568336487,
-0.0345529168844223,
0.38807329535484314,
-0.018513893708586693,
-0.39660441875457764,
-0.04755360633134842,
-0.04055619612336159,
0.32947149872779846,
0.5402629375457764,
-0.00010775616101454943,
-0.08674490451812744,
0.5644457936286926,
-0.007075073197484016,
-0.43287044763565063,
-0.09501631557941437,
-0.0269906148314476,
0.11097588390111923,
0.34081733226776123,
-0.2396966516971588,
-0.19090059399604797,
0.17510828375816345,
0.05256529897451401,
-0.040559325367212296,
0.03803306072950363,
-0.0650867149233818,
0.27343910932540894,
-0.12926101684570312,
-0.04580281302332878,
0.09248145669698715,
0.48326799273490906,
0.373587965965271,
-0.011955982074141502,
0.5636958479881287,
0.16165128350257874,
-0.03614934906363487,
-0.20765873789787292,
0.6355531811714172,
0.024228962138295174,
0.12634524703025818,
0.41630786657333374,
-0.003048485144972801,
-0.14579719305038452,
-0.22622451186180115,
-0.0641750916838646,
0.12356042116880417,
0.7018908858299255,
-0.017043165862560272,
-0.1135546863079071,
-0.14817270636558533,
0.047246020287275314,
-0.1774589866399765,
0.376163512468338,
0.15837766230106354,
-0.1292811632156372,
-0.11369112133979797,
-0.11655255407094955,
0.07007057964801788,
-0.26665428280830383,
0.2354413866996765,
0.004081077873706818,
-0.19021716713905334,
0.01792152039706707,
0.13271498680114746,
0.14539478719234467,
-0.03335033357143402,
0.38522157073020935,
0.10736281424760818,
-0.20399075746536255,
0.08220136165618896,
0.07412631809711456,
0.051980555057525635,
-0.13383269309997559,
0.36287859082221985,
-0.19865810871124268,
-0.09117333590984344,
0.15720140933990479,
-0.03231055289506912,
-0.08680662512779236,
0.3023584187030792,
0.038898758590221405,
0.14110058546066284,
-0.017503701150417328,
0.500492513179779,
0.24666650593280792,
0.1764070689678192,
-0.07868613302707672,
-0.04084393382072449,
-0.4829617738723755,
-0.1790420114994049,
-0.18803909420967102,
-0.021362945437431335,
-0.19736947119235992,
-0.08573757857084274,
-0.38175874948501587,
-0.17994453012943268,
0.10361161082983017,
-0.0018730717711150646,
0.33303287625312805,
0.43165045976638794,
0.2026018351316452,
-0.024945080280303955,
0.5547904968261719,
-0.15556307137012482,
0.006274346262216568,
0.1780095249414444,
-0.0057850126177072525,
0.04533729702234268,
-0.3645268678665161,
0.11225109547376633,
0.05286450311541557,
0.12440092861652374,
0.22981105744838715,
0.052250638604164124,
0.048371270298957825,
0.06791532039642334,
0.03529544919729233,
-0.12572085857391357,
0.15021711587905884,
0.032961100339889526,
-0.35771092772483826,
-0.012486709281802177,
0.15805664658546448,
0.10659484565258026,
-0.1153390109539032,
0.1032758355140686,
-0.5861915946006775,
-0.06665486842393875,
0.0005232375115156174,
0.1612001210451126,
0.10453489422798157,
-0.08109958469867706,
-0.0506390705704689,
0.015231786295771599,
-0.18830883502960205,
-0.1663692146539688,
0.20756863057613373,
-0.3052171468734741,
-0.14886395633220673,
-0.09618113189935684,
-0.07121925055980682,
0.4445706009864807,
-0.28748664259910583,
-0.20594696700572968,
0.04129384830594063,
-0.020892582833766937,
-0.2130693793296814,
0.20782238245010376,
-0.2553747892379761,
0.1926025003194809,
-0.576502799987793,
-0.04875744879245758,
0.2766309678554535,
-0.5894819498062134,
0.07246671617031097,
0.19680532813072205,
-0.051915496587753296,
-0.10590918362140656,
0.003569766879081726,
0.5203319191932678,
0.05152470991015434,
-0.07587836682796478,
-0.36555007100105286,
0.3539929986000061,
0.11162907630205154,
0.07249441742897034,
-0.18366721272468567,
0.013099456205964088,
0.055365078151226044,
0.3250817656517029,
-0.24263526499271393,
0.012139789760112762,
0.14777621626853943,
0.0626790001988411,
0.06447844207286835,
-0.393277645111084,
-0.09135676920413971,
0.2656446099281311,
0.12362495064735413,
0.32365673780441284,
0.03167053312063217,
0.1538991928100586,
-0.1649964153766632,
0.16250193119049072,
-0.08016446232795715,
0.13942688703536987,
-0.22638778388500214,
0.0024598129093647003,
-0.08431659638881683,
-0.1668158769607544,
-0.38249918818473816,
-0.06586889922618866,
0.08528069406747818,
0.2209300398826599,
-0.33435267210006714,
-0.2077171355485916,
0.24080319702625275,
0.17942117154598236,
-0.23162071406841278,
0.21717184782028198,
0.04257498309016228,
0.348565012216568,
-0.10184936970472336,
0.02028920315206051,
-0.1683301031589508,
0.09989101439714432,
0.2224808931350708,
-0.12632057070732117,
-0.08885947614908218,
0.5554144382476807,
0.18821768462657928,
-0.10789318382740021,
0.10351385176181793,
-0.009610652923583984,
0.14291912317276,
-0.573707640171051,
0.23605473339557648,
0.2193984091281891,
0.23576322197914124,
0.10990145057439804,
-0.20880717039108276,
0.3889371156692505,
-0.08560076355934143,
0.06562437117099762,
0.07930497825145721,
-0.26598766446113586,
-0.04288665950298309,
-0.11730869114398956,
0.061133719980716705,
-0.11693713068962097,
0.11318892985582352,
0.3192109167575836,
0.28190192580223083,
0.07681278139352798,
-0.20987187325954437,
-0.09625101834535599,
0.0879233255982399,
0.04841197654604912,
-0.0012644901871681213,
0.33713874220848083,
-0.32670149207115173,
0.07797770202159882,
0.1541903167963028,
0.17387475073337555,
0.30261731147766113,
0.26197823882102966,
0.0006982609629631042,
-0.15057438611984253,
-0.16587279736995697,
-0.06627553701400757,
0.3489488959312439,
-0.15945123136043549,
0.22712114453315735,
-0.02728430926799774,
0.02059432491660118,
-0.035681530833244324,
-0.25530165433883667,
-0.31518685817718506,
-0.032234665006399155,
-0.09742163866758347,
-0.36723899841308594,
0.05456031113862991,
0.03291800618171692,
-0.49488142132759094,
-0.27512896060943604,
-0.10413020849227905,
-0.3243345618247986,
-0.07293917238712311,
0.19561204314231873,
0.19154003262519836,
-0.12988589704036713,
0.11096211522817612,
0.06608055531978607,
0.2140047252178192,
0.07404407858848572,
-0.3129940927028656,
-0.09408882260322571,
-0.12543848156929016,
-0.23296710848808289,
0.032032448798418045,
0.1938711404800415,
-0.13193818926811218,
0.21674561500549316,
-0.28926804661750793,
0.13708601891994476,
-0.2683987021446228,
-0.3650379478931427,
0.10717473179101944,
-0.018514208495616913,
-0.06971565634012222,
0.23409916460514069,
0.08795400708913803,
0.0952160507440567,
-0.35156679153442383,
0.2610209882259369,
-0.18267829716205597,
-0.04573677107691765,
-0.23885464668273926,
0.0690879225730896,
0.09731590002775192,
-0.0858597457408905,
-0.12305470556020737,
-0.2807392179965973,
-0.2646764814853668,
0.07943297177553177,
0.1864195019006729,
0.06039867550134659,
0.24470077455043793,
0.09362820535898209,
0.04851150140166283,
0.08750764280557632,
0.13198263943195343,
-0.051263321191072464,
-0.19039949774742126,
0.05103303864598274,
-0.22670911252498627,
-0.15408708155155182,
0.11556638777256012,
0.02622286230325699,
0.19760103523731232,
-0.15931065380573273,
-0.38921040296554565,
-0.46321922540664673,
0.14263197779655457,
0.37358176708221436,
-0.016388215124607086,
-0.02131071873009205,
0.12558740377426147,
0.33756643533706665,
-0.2149897962808609,
-0.10751733183860779,
-0.007711514830589294,
-0.019458167254924774,
-0.4625946581363678,
0.5731047987937927,
-0.05335257947444916,
0.2634548842906952,
0.010519705712795258,
0.5952028036117554,
-0.17503724992275238,
-0.4148254096508026,
0.24007445573806763,
-0.15137170255184174,
0.4265565872192383,
-0.12891122698783875,
0.018437637016177177,
0.27609506249427795,
-0.014387905597686768,
-0.09880530834197998,
0.24239325523376465,
0.14995074272155762,
-0.34657183289527893,
-0.053931824862957,
0.21083953976631165,
-0.27600744366645813,
-0.013973627239465714,
0.13626965880393982,
-0.14720113575458527,
-0.0005404502153396606,
-0.38634517788887024,
-0.12249340862035751,
-0.03638894855976105,
-0.4090755879878998,
0.2788180112838745,
0.5190163254737854,
0.0643584355711937,
-0.0027026066090911627,
-0.21068784594535828,
0.1572483628988266,
0.3385731279850006,
0.0834708958864212,
0.1664440929889679,
0.016013434156775475,
-0.30148088932037354,
-0.09492730349302292,
0.08272606879472733,
0.10020001232624054,
0.44037163257598877,
-0.018794594332575798,
0.27604958415031433,
0.10506238043308258,
-0.050196316093206406,
-0.2949693500995636,
-0.07804016768932343,
-0.08814233541488647,
-0.08100815117359161,
0.08378934115171432,
0.14941120147705078,
-0.10660280287265778,
-0.1752033680677414,
-0.07474055886268616,
0.10198631137609482,
-0.20378734171390533,
-0.1995186060667038,
-0.1564987301826477,
0.14191067218780518,
-0.2863808572292328,
-0.03307987004518509,
0.17482243478298187,
0.03519533947110176,
-0.1677367389202118,
-0.1369101107120514,
-0.05859538912773132,
-0.28989967703819275,
-0.2299879938364029,
-0.06390008330345154,
0.276589572429657,
0.07459551095962524,
-0.040045399218797684,
0.2758857011795044,
0.6927300691604614,
0.45996764302253723,
0.46120238304138184,
-0.5181355476379395,
-0.04393148422241211,
-0.017036397010087967,
-0.05218871310353279,
-0.03614441305398941,
0.3237072825431824,
-0.010492619127035141,
-0.3906361758708954,
-0.43123412132263184,
-0.19418178498744965,
-0.3930244445800781,
0.2636530101299286,
0.11636373400688171,
0.04469771683216095,
0.04039781168103218,
-0.020899677649140358,
0.38600730895996094,
0.13285772502422333,
-0.24758611619472504,
0.27332746982574463,
-0.18986667692661285,
-0.5440801382064819,
0.1286870539188385,
0.2984168827533722,
0.8054825067520142,
-0.08083410561084747,
0.3597590923309326,
-0.0667354166507721,
-0.4132833480834961,
0.2405550330877304,
0.10941945016384125,
0.021385185420513153,
-0.4647574722766876,
-0.007870092056691647,
-0.02951565384864807,
-0.014495890587568283,
-0.08306235820055008,
0.10217712074518204,
0.05146504566073418,
0.04660949110984802,
-0.1932167112827301,
0.10905095934867859,
-0.19944541156291962,
0.27119874954223633,
0.12762640416622162,
-0.18257386982440948,
0.24515005946159363,
0.1768144816160202,
0.10033285617828369,
0.11542819440364838,
-0.2690950334072113,
-0.06071784347295761,
-0.1012035608291626,
-0.2483120858669281,
0.013049110770225525,
0.13249656558036804,
-0.5009943246841431,
0.07835504412651062,
-0.21648818254470825,
-0.4874730110168457,
-0.015961557626724243,
0.529570996761322,
0.21176260709762573,
-0.1616143435239792,
-0.21694894134998322,
0.3569175601005554,
-0.11022774130105972,
0.3493253290653229,
-0.06027236580848694,
-0.10231088846921921,
0.3514043688774109,
0.05239485204219818,
0.2705693244934082,
-0.20361918210983276,
-0.13466058671474457,
-0.18571510910987854,
-0.009135916829109192,
-0.10722091794013977,
0.21844398975372314,
-0.2165239453315735,
-0.027341721579432487,
-0.3466276228427887,
-0.07535037398338318,
-0.08071476221084595,
0.1996108740568161,
0.002926051616668701,
-0.07688716799020767,
-0.25358566641807556,
0.22786198556423187,
-0.33441850543022156,
0.034272633492946625,
0.4578297436237335,
-0.3328980505466461,
-0.3328765034675598,
0.20388798415660858,
0.08065593242645264,
-0.14845234155654907,
-0.20327228307724,
0.4186035096645355,
0.5309538841247559,
-0.6124463081359863,
0.07528888434171677,
0.30284225940704346,
-0.17921555042266846,
0.07183069735765457,
0.27610570192337036,
0.17962533235549927,
-0.07419168204069138,
-0.19814921915531158,
-0.15956264734268188,
-0.4401895999908447,
0.16207271814346313,
-0.5167664885520935,
0.39344558119773865,
-0.3997616767883301,
-0.06447479128837585,
0.48361900448799133,
-0.13232411444187164,
-0.34560227394104004,
0.19214887917041779,
-0.24663448333740234,
0.16925932466983795,
0.1672477275133133,
0.32096758484840393,
0.16467823088169098,
0.18715240061283112,
0.12063151597976685,
-0.17598901689052582,
-0.08342552930116653,
-0.05527932941913605,
-0.1533787101507187,
0.1013864129781723,
0.13448944687843323,
0.12558388710021973,
-0.15987926721572876,
-0.47616612911224365,
0.2574021518230438,
-0.049810245633125305,
-0.18074312806129456,
-0.13434192538261414,
-0.2663835287094116,
0.31797802448272705,
-0.15979865193367004,
0.13715043663978577,
0.12971603870391846,
0.1355258673429489,
-0.2653789222240448,
0.5038274526596069,
0.045706551522016525,
-0.14386098086833954,
-0.12272088974714279,
-0.12318678200244904,
0.03232872113585472,
0.10228487104177475,
0.06566473096609116,
0.1916312277317047,
0.1452307552099228,
0.12091181427240372,
0.0025127343833446503,
0.07966166734695435,
0.4026719033718109,
0.00233323872089386,
-0.37214815616607666,
-0.3028290271759033,
0.15928274393081665,
0.2123999148607254,
-0.11025910824537277,
-0.1268473118543625,
-0.42530256509780884,
-0.2574189007282257,
0.025210808962583542,
0.13094933331012726,
0.30690786242485046,
0.21894362568855286,
-0.04030550271272659,
-0.12603309750556946,
0.6266905069351196,
-0.14628975093364716,
0.14278966188430786,
0.2523239254951477,
-0.43803203105926514,
0.12789121270179749,
0.5834393501281738,
0.12599383294582367,
0.05654565989971161,
0.6009413599967957,
-0.23767802119255066,
0.307450532913208,
0.2689450681209564,
0.1589149683713913,
0.17549648880958557,
0.2703110873699188,
-0.004378911107778549,
-0.23617300391197205,
0.3932075798511505,
-0.10120757669210434,
-0.29794445633888245,
0.08065426349639893,
-0.30489686131477356,
-0.37757495045661926,
0.2086300402879715,
0.0725669115781784,
-0.1326727569103241,
-0.16767559945583344,
-0.46116524934768677,
-0.18200980126857758,
-0.1261669099330902,
-0.06563752889633179,
-0.27669557929039,
-0.10928624868392944,
0.2275662124156952,
0.11376994848251343,
0.007285617291927338,
-0.3443007171154022,
-0.2781108319759369,
0.24123871326446533,
0.11979217082262039,
-0.26360753178596497,
0.4148547947406769,
0.01026395708322525,
0.22401389479637146,
0.6460768580436707,
0.20848220586776733,
0.22838148474693298,
0.31809842586517334,
0.05009379982948303,
-0.3618917465209961,
-0.3714539706707001,
0.08112528175115585,
-0.16931520402431488,
0.05103931203484535,
0.025459367781877518,
-0.21637827157974243,
0.22417043149471283,
0.1035505086183548,
-0.14933767914772034,
0.354985773563385,
-0.1670178771018982,
0.006944618187844753,
0.19577182829380035,
0.337881863117218,
-0.07734548300504684,
-0.11033905297517776,
-0.32177603244781494,
0.07620596885681152,
-0.1959034502506256,
0.08166743069887161,
0.3851909935474396,
-0.14343439042568207,
0.03677261620759964,
0.12787799537181854,
0.07125561684370041,
0.2521427571773529,
0.3532465696334839,
0.2345779538154602,
0.05794193595647812,
-0.2673533856868744,
-0.1587776243686676,
-0.38044658303260803,
0.13599945604801178,
0.12101395428180695,
-0.4160076379776001,
-0.13700534403324127,
-0.23642368614673615,
0.03430844098329544,
-0.11704118549823761,
0.2204159051179886,
0.1142239049077034,
0.5626014471054077,
-0.015476085245609283,
-0.4060467779636383,
0.15774965286254883,
0.07007024437189102,
0.28492271900177,
-0.020808853209018707,
-0.08129609376192093,
-0.06501011550426483,
0.046215448528528214,
0.035335130989551544,
-0.1356276571750641,
-0.10912007093429565,
-0.29460853338241577,
0.1461607813835144,
0.5806877613067627,
-0.040651872754096985,
0.3783804774284363,
-0.1323358714580536,
-0.06662352383136749,
0.056563422083854675,
-0.45823943614959717,
-0.21963782608509064,
0.08906664699316025,
0.33749040961265564,
0.2917802035808563,
-0.14208339154720306,
-0.1857362985610962,
-0.5231057405471802,
-0.012372360564768314,
-0.010284658521413803,
0.2576901912689209,
-0.4129701256752014,
0.08960144221782684,
-0.0753161832690239,
0.0174843929708004,
0.07619304955005646,
0.2430863082408905,
0.10961711406707764,
-0.03199807554483414,
-0.406328022480011,
-0.5431298017501831,
0.622645914554596,
-0.2938910126686096,
0.012838359922170639,
0.35886579751968384,
0.1753166913986206,
0.1707497537136078,
0.2788170278072357,
-0.3490047752857208,
0.13596031069755554,
0.3038720488548279,
0.2061215043067932,
-0.45785462856292725,
-0.035042259842157364,
0.1893479824066162,
0.22756139934062958,
0.010571248829364777,
-0.0895606279373169,
0.3018637001514435,
-0.0011148583143949509,
-0.04731697961688042,
-0.06439410895109177
] |
https://github.com/huggingface/datasets/issues/5097 | Fatal error with pyarrow/libarrow.so | Thanks for reporting, @catalys1.
This seems a duplicate of:
- #3310
The source of the problem is in PyArrow:
- [ARROW-15141: [C++] Fatal error condition occurred in aws_thread_launch](https://issues.apache.org/jira/browse/ARROW-15141)
- [ARROW-17501: [C++] Fatal error condition occurred in aws_thread_launch](https://issues.apache.org/jira/browse/ARROW-17501)
The bug in their dependency is still unresolved:
- https://github.com/aws/aws-sdk-cpp/issues/1809
Apparently, the `aws-sdk-cpp` PyArrow dependency needs to be pinned at version `1.8.186` if using conda. Have you updated it after installing PyArrow?
```shell
conda list aws-sdk-cpp
```
Maybe you should try to downgrade it to that version:
```shell
conda install -c conda-forge aws-sdk-cpp=1.8.186
``` | ## Describe the bug
When using datasets, at the very end of my jobs the program crashes (see trace below).
It doesn't seem to affect anything, as it appears to happen as the program is closing down. Just importing `datasets` is enough to cause the error.
## Steps to reproduce the bug
This is sufficient to reproduce the problem:
```bash
python -c "import datasets"
```
## Expected results
Program should run to completion without an error.
## Actual results
```bash
Fatal error condition occurred in /opt/vcpkg/buildtrees/aws-c-io/src/9e6648842a-364b708815.clean/source/event_loop.c:72: aws_thread_launch(&cleanup_thread, s_event_loop_destroy_async_thread_fn, el_group, &thread_options) == AWS_OP_SUCCESS
Exiting Application
################################################################################
Stack trace:
################################################################################
/u/user/miniconda3/envs/env/lib/python3.10/site-packages/pyarrow/libarrow.so.900(+0x200af06) [0x150dff547f06]
/u/user/miniconda3/envs/env/lib/python3.10/site-packages/pyarrow/libarrow.so.900(+0x20028e5) [0x150dff53f8e5]
/u/user/miniconda3/envs/env/lib/python3.10/site-packages/pyarrow/libarrow.so.900(+0x1f27e09) [0x150dff464e09]
/u/user/miniconda3/envs/env/lib/python3.10/site-packages/pyarrow/libarrow.so.900(+0x200ba3d) [0x150dff548a3d]
/u/user/miniconda3/envs/env/lib/python3.10/site-packages/pyarrow/libarrow.so.900(+0x1f25948) [0x150dff462948]
/u/user/miniconda3/envs/env/lib/python3.10/site-packages/pyarrow/libarrow.so.900(+0x200ba3d) [0x150dff548a3d]
/u/user/miniconda3/envs/env/lib/python3.10/site-packages/pyarrow/libarrow.so.900(+0x1ee0b46) [0x150dff41db46]
/u/user/miniconda3/envs/env/lib/python3.10/site-packages/pyarrow/libarrow.so.900(+0x194546a) [0x150dfee8246a]
/lib64/libc.so.6(+0x39b0c) [0x150e15eadb0c]
/lib64/libc.so.6(on_exit+0) [0x150e15eadc40]
/u/user/miniconda3/envs/env/bin/python(+0x28db18) [0x560ae370eb18]
/u/user/miniconda3/envs/env/bin/python(+0x28db4b) [0x560ae370eb4b]
/u/user/miniconda3/envs/env/bin/python(+0x28db90) [0x560ae370eb90]
/u/user/miniconda3/envs/env/bin/python(_PyRun_SimpleFileObject+0x1e6) [0x560ae37123e6]
/u/user/miniconda3/envs/env/bin/python(_PyRun_AnyFileObject+0x44) [0x560ae37124c4]
/u/user/miniconda3/envs/env/bin/python(Py_RunMain+0x35d) [0x560ae37135bd]
/u/user/miniconda3/envs/env/bin/python(Py_BytesMain+0x39) [0x560ae37137d9]
/lib64/libc.so.6(__libc_start_main+0xf3) [0x150e15e97493]
/u/user/miniconda3/envs/env/bin/python(+0x2125d4) [0x560ae36935d4]
Aborted (core dumped)
```
## Environment info
- `datasets` version: 2.5.1
- Platform: Linux-4.18.0-348.23.1.el8_5.x86_64-x86_64-with-glibc2.28
- Python version: 3.10.4
- PyArrow version: 9.0.0
- Pandas version: 1.4.3
| 91 | Fatal error with pyarrow/libarrow.so
## Describe the bug
When using datasets, at the very end of my jobs the program crashes (see trace below).
It doesn't seem to affect anything, as it appears to happen as the program is closing down. Just importing `datasets` is enough to cause the error.
## Steps to reproduce the bug
This is sufficient to reproduce the problem:
```bash
python -c "import datasets"
```
## Expected results
Program should run to completion without an error.
## Actual results
```bash
Fatal error condition occurred in /opt/vcpkg/buildtrees/aws-c-io/src/9e6648842a-364b708815.clean/source/event_loop.c:72: aws_thread_launch(&cleanup_thread, s_event_loop_destroy_async_thread_fn, el_group, &thread_options) == AWS_OP_SUCCESS
Exiting Application
################################################################################
Stack trace:
################################################################################
/u/user/miniconda3/envs/env/lib/python3.10/site-packages/pyarrow/libarrow.so.900(+0x200af06) [0x150dff547f06]
/u/user/miniconda3/envs/env/lib/python3.10/site-packages/pyarrow/libarrow.so.900(+0x20028e5) [0x150dff53f8e5]
/u/user/miniconda3/envs/env/lib/python3.10/site-packages/pyarrow/libarrow.so.900(+0x1f27e09) [0x150dff464e09]
/u/user/miniconda3/envs/env/lib/python3.10/site-packages/pyarrow/libarrow.so.900(+0x200ba3d) [0x150dff548a3d]
/u/user/miniconda3/envs/env/lib/python3.10/site-packages/pyarrow/libarrow.so.900(+0x1f25948) [0x150dff462948]
/u/user/miniconda3/envs/env/lib/python3.10/site-packages/pyarrow/libarrow.so.900(+0x200ba3d) [0x150dff548a3d]
/u/user/miniconda3/envs/env/lib/python3.10/site-packages/pyarrow/libarrow.so.900(+0x1ee0b46) [0x150dff41db46]
/u/user/miniconda3/envs/env/lib/python3.10/site-packages/pyarrow/libarrow.so.900(+0x194546a) [0x150dfee8246a]
/lib64/libc.so.6(+0x39b0c) [0x150e15eadb0c]
/lib64/libc.so.6(on_exit+0) [0x150e15eadc40]
/u/user/miniconda3/envs/env/bin/python(+0x28db18) [0x560ae370eb18]
/u/user/miniconda3/envs/env/bin/python(+0x28db4b) [0x560ae370eb4b]
/u/user/miniconda3/envs/env/bin/python(+0x28db90) [0x560ae370eb90]
/u/user/miniconda3/envs/env/bin/python(_PyRun_SimpleFileObject+0x1e6) [0x560ae37123e6]
/u/user/miniconda3/envs/env/bin/python(_PyRun_AnyFileObject+0x44) [0x560ae37124c4]
/u/user/miniconda3/envs/env/bin/python(Py_RunMain+0x35d) [0x560ae37135bd]
/u/user/miniconda3/envs/env/bin/python(Py_BytesMain+0x39) [0x560ae37137d9]
/lib64/libc.so.6(__libc_start_main+0xf3) [0x150e15e97493]
/u/user/miniconda3/envs/env/bin/python(+0x2125d4) [0x560ae36935d4]
Aborted (core dumped)
```
## Environment info
- `datasets` version: 2.5.1
- Platform: Linux-4.18.0-348.23.1.el8_5.x86_64-x86_64-with-glibc2.28
- Python version: 3.10.4
- PyArrow version: 9.0.0
- Pandas version: 1.4.3
Thanks for reporting, @catalys1.
This seems a duplicate of:
- #3310
The source of the problem is in PyArrow:
- [ARROW-15141: [C++] Fatal error condition occurred in aws_thread_launch](https://issues.apache.org/jira/browse/ARROW-15141)
- [ARROW-17501: [C++] Fatal error condition occurred in aws_thread_launch](https://issues.apache.org/jira/browse/ARROW-17501)
The bug in their dependency is still unresolved:
- https://github.com/aws/aws-sdk-cpp/issues/1809
Apparently, the `aws-sdk-cpp` PyArrow dependency needs to be pinned at version `1.8.186` if using conda. Have you updated it after installing PyArrow?
```shell
conda list aws-sdk-cpp
```
Maybe you should try to downgrade it to that version:
```shell
conda install -c conda-forge aws-sdk-cpp=1.8.186
``` | [
-0.6741321086883545,
0.38841432332992554,
0.05871608480811119,
0.14144933223724365,
0.30659735202789307,
-0.064825139939785,
0.24130423367023468,
0.09869427978992462,
-0.22348621487617493,
0.11210634559392929,
0.09991702437400818,
0.6103004813194275,
-0.010139367543160915,
0.09585616737604141,
-0.008745783008635044,
-0.053543418645858765,
0.25263679027557373,
0.18435679376125336,
-0.23487403988838196,
0.10061158239841461,
-0.33415523171424866,
0.3008900284767151,
-0.1943749040365219,
0.4072440266609192,
-0.11706911027431488,
-0.008992141112685204,
-0.08132462948560715,
0.37722283601760864,
0.010688752867281437,
-0.23725247383117676,
0.18173953890800476,
-0.4097532331943512,
0.11279217898845673,
0.6560221910476685,
-0.000122223180369474,
-0.0844685360789299,
0.48749345541000366,
0.31050825119018555,
-0.3618772029876709,
0.027986235916614532,
-0.12185800820589066,
0.10103218257427216,
-0.010445814579725266,
-0.11492173373699188,
0.42013421654701233,
-0.16638432443141937,
0.016591111198067665,
-0.2176719754934311,
0.15912336111068726,
0.29566794633865356,
0.11197264492511749,
0.2859717905521393,
0.29657644033432007,
0.11746518313884735,
0.5350030660629272,
-0.1248929500579834,
-0.248224675655365,
0.3475845158100128,
0.43103399872779846,
-0.4351032078266144,
0.09273310750722885,
-0.07659967243671417,
-0.2933632731437683,
-0.11585785448551178,
0.22666186094284058,
0.021865837275981903,
-0.1508508026599884,
-0.17563506960868835,
0.17214328050613403,
0.12546542286872864,
0.5481716990470886,
-0.638237714767456,
-0.13979506492614746,
-0.12343312799930573,
0.11907342076301575,
-0.45014289021492004,
-0.022403307259082794,
0.46799570322036743,
-0.1835191696882248,
0.23846088349819183,
-0.12661771476268768,
0.0863867998123169,
-0.3107810616493225,
0.3718670606613159,
0.11010996997356415,
0.09571599215269089,
0.05724361538887024,
0.32511216402053833,
0.150319904088974,
0.0618562176823616,
0.26435020565986633,
-0.06887945532798767,
-0.08067204058170319,
0.01693795993924141,
-0.4587465524673462,
0.05220314860343933,
0.13305896520614624,
0.4287390112876892,
0.24182888865470886,
-0.05953042954206467,
-0.15742380917072296,
-0.025522012263536453,
0.21788659691810608,
0.25897374749183655,
0.24221749603748322,
-0.05144032835960388,
-0.022320516407489777,
-0.06072410196065903,
0.3266229033470154,
-0.16653332114219666,
-0.02141747996211052,
0.009379107505083084,
0.21438971161842346,
-0.3462916612625122,
0.29590699076652527,
0.023682646453380585,
0.4689664840698242,
-0.1795526146888733,
-0.314338743686676,
0.45570117235183716,
-0.4197610914707184,
0.22848913073539734,
-0.15058328211307526,
0.6309087872505188,
-0.07896430045366287,
-0.19068637490272522,
0.06476282328367233,
0.2186194658279419,
-0.19837245345115662,
0.04606819525361061,
-0.00938847754150629,
0.1765311062335968,
-0.2146666795015335,
-0.07975936681032181,
0.051962513476610184,
-0.29187408089637756,
0.16929449141025543,
0.15474796295166016,
-0.006395801901817322,
-0.27297765016555786,
-0.13536052405834198,
-0.00008148886263370514,
-0.395378440618515,
0.05207959562540054,
0.067750483751297,
0.03706608712673187,
-0.2727971374988556,
0.07070377469062805,
0.00015970319509506226,
0.48739585280418396,
-0.064737968146801,
-0.43415209650993347,
-0.5926104784011841,
0.10703840106725693,
-0.3198912739753723,
0.1316894292831421,
-0.08278148621320724,
-0.25119465589523315,
0.2750775218009949,
0.10082073509693146,
0.09867372363805771,
-0.3481433391571045,
0.21751931309700012,
-0.2536725103855133,
-0.13594239950180054,
0.3301636874675751,
-0.5888692736625671,
0.11994130909442902,
-0.06806651502847672,
-0.06135303154587746,
0.2283330261707306,
0.15516582131385803,
-0.281489759683609,
0.25004342198371887,
-0.054433174431324005,
0.27655667066574097,
0.17235353589057922,
0.2988981008529663,
-0.42030584812164307,
0.24307559430599213,
-0.010629646480083466,
-0.12021097540855408,
-0.22117918729782104,
-0.02023419924080372,
-0.13427706062793732,
0.04962380230426788,
-0.1304321140050888,
0.061804935336112976,
-0.1299021989107132,
0.044597893953323364,
-0.23055072128772736,
-0.10206151008605957,
-0.13204649090766907,
0.28511321544647217,
0.24914436042308807,
-0.23140719532966614,
0.35413551330566406,
-0.06467629969120026,
0.057447366416454315,
-0.14700476825237274,
-0.0426175519824028,
0.3846665024757385,
0.3925282061100006,
-0.13288387656211853,
0.06859798729419708,
-0.3444151282310486,
-0.5667837858200073,
0.1303500533103943,
0.037960492074489594,
0.08328673988580704,
-0.31801116466522217,
-0.13712570071220398,
-0.1922641098499298,
0.5099967122077942,
0.023038707673549652,
0.2051800638437271,
-0.02155892550945282,
-0.2009904980659485,
-0.1337982714176178,
-0.0012926701456308365,
-0.2244848906993866,
0.008171224035322666,
-0.457165390253067,
0.17396298050880432,
-0.17354460060596466,
0.2949985861778259,
-0.13835503160953522,
-0.6954525113105774,
-0.06775306165218353,
0.12365162372589111,
0.15783584117889404,
-0.09723333269357681,
0.09072432667016983,
0.3063146770000458,
-0.23869465291500092,
0.24635501205921173,
-0.3677602708339691,
0.15358251333236694,
-0.07995794713497162,
-0.27784857153892517,
0.03367217630147934,
-0.041956860572099686,
-0.00463235704228282,
0.2010546624660492,
0.3136526346206665,
0.10528401285409927,
-0.10502481460571289,
0.04392419382929802,
0.0647876188158989,
-0.11102693527936935,
-0.11107229441404343,
-0.23990508913993835,
0.028618590906262398,
0.2594257593154907,
0.3974725902080536,
0.10085602104663849,
0.010576792061328888,
-0.012669580057263374,
-0.38864296674728394,
-0.04921705275774002,
0.6025424003601074,
-0.19592203199863434,
0.36504295468330383,
0.08563277125358582,
-0.07998602837324142,
0.13515034317970276,
0.3778936266899109,
-0.13993629813194275,
0.759138286113739,
0.04235987365245819,
-0.09297977387905121,
0.30779680609703064,
-0.24314966797828674,
-0.12459897994995117,
0.055331505835056305,
0.1732170283794403,
0.4215810000896454,
0.3013772666454315,
0.012217231094837189,
0.027719199657440186,
-0.15422777831554413,
-0.26890385150909424,
-0.009934457018971443,
0.40328648686408997,
-0.3849584758281708,
0.2953107953071594,
-0.19393043220043182,
-0.11781191825866699,
-0.2488212287425995,
-0.16849283874034882,
-0.014730419963598251,
-0.29614540934562683,
0.015074383467435837,
0.35427913069725037,
-0.2338453084230423,
0.21046806871891022,
0.05417625233530998,
0.04665650427341461,
-0.12012014538049698,
-0.017895909026265144,
-0.21272963285446167,
-0.20642408728599548,
-0.3176790773868561,
-0.0903150737285614,
0.4346274137496948,
-0.20770342648029327,
0.13833320140838623,
-0.015187890268862247,
-0.36528104543685913,
-0.42212140560150146,
-0.17647159099578857,
0.1039259135723114,
0.0810847282409668,
0.4400891661643982,
0.22207379341125488,
0.20514832437038422,
-0.18420398235321045,
-0.3966502845287323,
0.12586155533790588,
-0.18111473321914673,
0.062328241765499115,
0.10771659016609192,
-0.13544641435146332,
-0.16122259199619293,
-0.17224599421024323,
-0.0857851430773735,
-0.1312800943851471,
-0.3494754433631897,
0.15619951486587524,
-0.08348380029201508,
0.12633195519447327,
-0.2953294813632965,
0.4523893892765045,
-0.011478753760457039,
0.11576900631189346,
-0.3269862234592438,
0.07266806066036224,
-0.17396661639213562,
-0.006585795432329178,
-0.059253912419080734,
-0.2774144113063812,
0.20417341589927673,
0.05323823541402817,
0.2954481542110443,
0.06889712065458298,
-0.46777409315109253,
0.0481114462018013,
0.08032190054655075,
0.4008559584617615,
-0.1811203509569168,
0.13564272224903107,
-0.03906400501728058,
0.10452451556921005,
0.05244234949350357,
-0.05149146914482117,
-0.10463288426399231,
-0.2539457678794861,
-0.05679085850715637,
0.3147928714752197,
0.061286769807338715,
0.349536269903183,
0.040862295776605606,
0.621144711971283,
-0.035230059176683426,
-0.44070082902908325,
0.3184564709663391,
-0.03161521255970001,
0.3012081980705261,
-0.06417518109083176,
-0.15754280984401703,
0.08814005553722382,
-0.17040199041366577,
-0.10995551943778992,
-0.1345970183610916,
-0.08047514408826828,
-0.28824907541275024,
-0.04930645599961281,
0.0028368085622787476,
-0.3213593363761902,
-0.1904442459344864,
0.21260960400104523,
0.05359233170747757,
0.140816330909729,
-0.1424630731344223,
0.0732618048787117,
0.22141100466251373,
-0.055391356348991394,
0.12680324912071228,
0.08524741232395172,
-0.04645407944917679,
-0.17804457247257233,
0.015343647450208664,
-0.22920818626880646,
-0.4190232455730438,
0.36552685499191284,
-0.28034746646881104,
0.05163472890853882,
-0.0027470439672470093,
0.17065882682800293,
-0.093870609998703,
-0.14500676095485687,
0.32566988468170166,
0.14637471735477448,
-0.02302040159702301,
0.027851808816194534,
0.29473406076431274,
-0.2501067817211151,
-0.18824566900730133,
-0.11180981993675232,
0.2671177089214325,
0.29529353976249695,
-0.0012503042817115784,
-0.44939926266670227,
0.15019039809703827,
0.4620293080806732,
0.05327311158180237,
0.10972248017787933,
-0.36364683508872986,
-0.2675095498561859,
-0.3124774396419525,
-0.1649685949087143,
0.23884093761444092,
-0.06557570397853851,
0.12440957874059677,
-0.25348973274230957,
-0.36278143525123596,
0.11407726258039474,
-0.3128816783428192,
0.11880151182413101,
0.11671803891658783,
-0.1768045425415039,
-0.24712499976158142,
0.10347098112106323,
-0.5980633497238159,
-0.1131228655576706,
0.47103139758110046,
0.4193962514400482,
0.060653358697891235,
-0.3419957756996155,
0.12063107639551163,
0.2135716825723648,
0.42004528641700745,
0.27343690395355225,
-0.30443137884140015,
0.10101331025362015,
0.010026075877249241,
0.13889750838279724,
0.24482207000255585,
-0.042475130409002304,
0.3344922363758087,
0.2896513342857361,
-0.03279489651322365,
0.3654930889606476,
0.44075098633766174,
-0.2410135716199875,
0.04522635042667389,
0.2002314031124115,
-0.04244355857372284,
-0.021389281377196312,
0.2533648610115051,
0.12798941135406494,
1.0105916261672974,
0.013545617461204529,
-0.021510738879442215,
0.31163474917411804,
-0.23640982806682587,
0.487542062997818,
-0.0696987584233284,
0.20022787153720856,
-0.4964340925216675,
0.04226888716220856,
0.04468315839767456,
-0.30719512701034546,
0.23346072435379028,
-0.02890726923942566,
-0.04674506187438965,
0.17466497421264648,
0.0031839460134506226,
0.25810277462005615,
0.13693542778491974,
0.1551668345928192,
-0.27250608801841736,
-0.040986865758895874,
-0.4007452428340912,
0.008653238415718079,
-0.23642770946025848,
0.11422477662563324,
-0.3718825578689575,
0.12948085367679596,
0.04088805243372917,
-0.09884743392467499,
-0.560615062713623,
0.30204808712005615,
-0.3134962320327759,
0.04580998420715332,
0.09895800799131393,
-0.56977778673172,
0.10501191020011902,
0.19837528467178345,
-0.08624367415904999,
0.14734934270381927,
0.009945965372025967,
0.2373301386833191,
-0.05687391012907028,
-0.09351682662963867,
0.30376654863357544,
-0.005477051250636578,
0.09526186436414719,
-0.0473865382373333,
-0.2631851136684418,
0.43814823031425476,
0.06230904906988144,
-0.14667344093322754,
0.08652818202972412,
0.0056652650237083435,
0.0595889613032341,
-0.31343942880630493,
-0.251709520816803,
-0.03483285754919052,
-0.002734620124101639,
-0.21267086267471313,
0.005669774487614632,
0.20782816410064697,
-0.06326264888048172,
0.3807607889175415,
-0.520545482635498,
-0.06597310304641724,
-0.293938547372818,
0.04015910625457764,
-0.09945928305387497,
0.18379396200180054,
0.14616867899894714,
0.6094621419906616,
-0.05730827897787094,
-0.059504397213459015,
-0.14606210589408875,
0.41375863552093506,
-0.5444619059562683,
-0.13956797122955322,
-0.1420341581106186,
0.19203178584575653,
0.00891836266964674,
-0.14790911972522736,
0.0965137854218483,
0.06963694095611572,
-0.24260926246643066,
-0.3471304774284363,
-0.14618878066539764,
0.2828655242919922,
0.380287230014801,
0.24297179281711578,
0.137340247631073,
0.21925660967826843,
-0.14323310554027557,
-0.12528257071971893,
-0.14071381092071533,
0.12079466134309769,
-0.2773091495037079,
0.11939442902803421,
0.19681179523468018,
0.06906886398792267,
0.15783387422561646,
-0.12426073849201202,
-0.0073998067528009415,
0.13787463307380676,
-0.0646476298570633,
-0.11829714477062225,
-0.10827238857746124,
0.16861939430236816,
0.19693872332572937,
0.10069288313388824,
0.061461273580789566,
-0.22370624542236328,
0.20472772419452667,
0.007641964592039585,
0.3565688133239746,
-0.019325189292430878,
-0.31268614530563354,
-0.0340423658490181,
0.2981838881969452,
0.08569551259279251,
-0.21057671308517456,
-0.061420463025569916,
-0.24962005019187927,
0.6092868447303772,
0.09706657379865646,
0.3140735626220703,
0.4253440201282501,
-0.01377040147781372,
-0.13868270814418793,
-0.2037031352519989,
-0.06467346847057343,
0.20352020859718323,
0.4348752498626709,
-0.4739847183227539,
-0.12994788587093353,
-0.35919830203056335,
0.3894326090812683,
0.41931456327438354,
-0.32703936100006104,
-0.1081361174583435,
0.34572863578796387,
0.09138569980859756,
-0.07767333835363388,
-0.1798568069934845,
0.15774305164813995,
0.10149292647838593,
-0.2770397961139679,
0.2264299839735031,
-0.16027449071407318,
-0.19473078846931458,
-0.05485256016254425,
0.14825192093849182,
0.5883402228355408,
0.02286958321928978,
-0.09310714900493622,
0.4325631260871887,
-0.14641296863555908,
0.25042423605918884,
0.11049211770296097,
0.1287941038608551,
0.1680065393447876,
0.2726779580116272,
-0.31109747290611267,
0.18205378949642181,
-0.02093353495001793,
0.20774303376674652,
0.14049489796161652,
-0.2937033474445343,
-0.32844868302345276,
0.18344871699810028,
0.1588629186153412,
0.01602334901690483,
0.17261813580989838,
0.21997937560081482,
0.17503705620765686,
-0.07406695932149887,
-0.062053196132183075,
0.2649099826812744,
-0.3238329589366913,
0.11465547978878021,
-0.19981491565704346,
-0.06208449602127075,
0.3602367341518402,
0.1720138043165207,
-0.12341451644897461,
-0.2532424330711365,
0.4692736864089966,
0.06439711898565292,
-0.10594549775123596,
-0.270264208316803,
0.19435778260231018,
0.14791351556777954,
-0.21780511736869812,
-0.09204674512147903,
0.15539827942848206,
-0.04145227372646332,
-0.03744690120220184,
-0.6083666086196899,
0.17794309556484222,
0.6740679144859314,
0.19148872792720795,
-0.06867583096027374,
0.09398114681243896,
0.25774359703063965,
0.1635221242904663,
0.08314287662506104,
0.00107588991522789,
0.23185378313064575,
0.5648661255836487,
0.22672973573207855,
0.03815169632434845,
-0.08981549739837646,
0.09308961033821106,
0.31921571493148804,
0.2585252523422241,
-0.1453838050365448,
-0.26759713888168335,
-0.21866470575332642,
-0.49458932876586914,
-0.22000476717948914,
0.3364652991294861,
-0.10091093927621841,
0.08456389605998993,
0.429783433675766,
0.12734480202198029,
-0.08341478556394577,
-0.206882506608963,
0.012910675257444382,
0.025863664224743843,
0.6092084646224976,
0.3598836064338684,
0.6631916761398315,
-0.5119311213493347,
-0.14240926504135132,
-0.023114588111639023,
0.5016545057296753,
-0.3109971582889557,
0.13883839547634125,
0.1436585932970047,
0.0012528151273727417,
-0.23696419596672058,
0.21161358058452606,
0.27066510915756226,
0.2468850463628769,
-0.16160964965820312,
0.6222455501556396,
-0.4267060458660126,
-0.3149360418319702,
0.02671470120549202,
-0.23525455594062805,
0.06677393615245819,
-0.2511642575263977,
0.2267061471939087,
-0.3741503357887268,
-0.2009202539920807,
-0.17281995713710785,
-0.16074888408184052,
0.1811976134777069,
-0.12420488893985748,
0.6658168435096741,
-0.13954290747642517,
0.10901367664337158,
0.04781118780374527,
-0.05174374207854271,
-0.13391301035881042,
-0.4370672106742859,
0.07384150475263596,
0.24557793140411377,
0.05567105859518051,
0.07999477535486221,
-0.09163899719715118,
0.0770493745803833,
-0.3072892427444458,
-0.10355091094970703,
-0.0089527927339077,
0.12210539728403091,
0.08556083589792252,
-0.0047029899433255196,
-0.10609152913093567,
0.056760091334581375,
-0.11907398700714111,
0.044212281703948975,
-0.0021523945033550262,
0.09544722735881805,
-0.5196998715400696,
-0.15651237964630127,
0.35071033239364624,
-0.2515508830547333,
-0.194383442401886,
-0.2235184758901596,
0.11131458729505539,
0.137359619140625,
-0.20727162063121796,
-0.47572803497314453,
-0.05068158730864525,
0.14868828654289246,
0.03273596242070198,
-0.2684142291545868,
-0.008740697056055069,
-0.05972212925553322,
0.10356548428535461,
0.1361525058746338,
-0.02649477869272232,
0.03870927542448044,
-0.24235859513282776,
0.2552436590194702,
-0.48358672857284546
] |
https://github.com/huggingface/datasets/issues/5096 | Transfer some canonical datasets under an organization namespace | The transfer of the dummy dataset to the dummy org works as expected:
```python
In [1]: from datasets import load_dataset; ds = load_dataset("dummy_canonical_dataset", download_mode="force_redownload"); ds
Downloading builder script: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2.98k/2.98k [00:00<00:00, 2.01MB/s]
Downloading and preparing dataset dummy_canonical_dataset/default (download: 411 bytes, generated: 385 bytes, post-processed: Unknown size, total: 796 bytes) to .../.cache/huggingface/datasets/dummy_canonical_dataset/default/1.0.0/100870c358637e269fee140585e61e1472d5075a9bf6f866719934c725e55fb4...
Downloading data: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 411/411 [00:00<00:00, 293kB/s]
Dataset dummy_canonical_dataset downloaded and prepared to .../.cache/huggingface/datasets/dummy_canonical_dataset/default/1.0.0/100870c358637e269fee140585e61e1472d5075a9bf6f866719934c725e55fb4. Subsequent calls will reuse this data.
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 304.16it/s]
Out[1]:
DatasetDict({
train: Dataset({
features: ['langs', 'ner_tags', 'tokens'],
num_rows: 3
})
})
In [2]: from datasets import load_dataset; ds = load_dataset("dummy-canonical-org/dummy_canonical_dataset"); ds
Downloading builder script: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2.98k/2.98k [00:00<00:00, 1.57MB/s]
Downloading and preparing dataset dummy_canonical_dataset/default to .../.cache/huggingface/datasets/dummy-canonical-org___dummy_canonical_dataset/default/1.0.0/100870c358637e269fee140585e61e1472d5075a9bf6f866719934c725e55fb4...
Dataset dummy_canonical_dataset downloaded and prepared to .../.cache/huggingface/datasets/dummy-canonical-org___dummy_canonical_dataset/default/1.0.0/100870c358637e269fee140585e61e1472d5075a9bf6f866719934c725e55fb4. Subsequent calls will reuse this data.
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 362.48it/s]
Out[2]:
DatasetDict({
train: Dataset({
features: ['langs', 'ner_tags', 'tokens'],
num_rows: 3
})
})
``` | As discussed during our @huggingface/datasets meeting, we are planning to move some "canonical" dataset scripts under their corresponding organization namespace (if this does not exist).
On the contrary, if the dataset already exists under the organization namespace, we are deprecating the canonical one (and eventually delete it).
First, we should test it using a dummy dataset/organization.
TODO:
- [x] Test with a dummy dataset
- [x] Create dummy canonical dataset: https://huggingface.co/datasets/dummy_canonical_dataset
- [x] Create dummy organization: https://huggingface.co/dummy-canonical-org
- [x] Transfer dummy canonical dataset to dummy organization
- [ ] Transfer datasets
- [x] babi_qa => facebook
- [x] blbooks => TheBritishLibrary/blbooks
- [x] blbooksgenre => TheBritishLibrary/blbooksgenre
- [x] common_gen => allenai
- [x] commonsense_qa => tau
- [x] competition_math => hendrycks/competition_math
- [x] cord19 => allenai
- [x] emotion => dair-ai
- [ ] gem => GEM
- [x] hellaswag => Rowan
- [x] hendrycks_test => cais/mmlu
- [x] indonlu => indonlp
- [ ] multilingual_librispeech => facebook
- It already exists "facebook/multilingual_librispeech"
- [ ] oscar => oscar-corpus
- [x] peer_read => allenai
- [x] qasper => allenai
- [x] reddit => webis/tldr-17
- [x] russian_super_glue => russiannlp
- [x] rvl_cdip => aharley
- [x] s2orc => allenai
- [x] scicite => allenai
- [x] scifact => allenai
- [x] scitldr => allenai
- [x] swiss_judgment_prediction => rcds
- [x] the_pile => EleutherAI
- [ ] wmt14, wmt15, wmt16, wmt17, wmt18, wmt19,... => wmt
- [ ] Deprecate (and eventually remove) datasets that cannot be transferred because they already exist
- [x] banking77 => PolyAI
- [x] common_voice => mozilla-foundation
- [x] german_legal_entity_recognition => elenanereiss
- ...
EDIT: the list above is continuously being updated | 140 | Transfer some canonical datasets under an organization namespace
As discussed during our @huggingface/datasets meeting, we are planning to move some "canonical" dataset scripts under their corresponding organization namespace (if this does not exist).
On the contrary, if the dataset already exists under the organization namespace, we are deprecating the canonical one (and eventually delete it).
First, we should test it using a dummy dataset/organization.
TODO:
- [x] Test with a dummy dataset
- [x] Create dummy canonical dataset: https://huggingface.co/datasets/dummy_canonical_dataset
- [x] Create dummy organization: https://huggingface.co/dummy-canonical-org
- [x] Transfer dummy canonical dataset to dummy organization
- [ ] Transfer datasets
- [x] babi_qa => facebook
- [x] blbooks => TheBritishLibrary/blbooks
- [x] blbooksgenre => TheBritishLibrary/blbooksgenre
- [x] common_gen => allenai
- [x] commonsense_qa => tau
- [x] competition_math => hendrycks/competition_math
- [x] cord19 => allenai
- [x] emotion => dair-ai
- [ ] gem => GEM
- [x] hellaswag => Rowan
- [x] hendrycks_test => cais/mmlu
- [x] indonlu => indonlp
- [ ] multilingual_librispeech => facebook
- It already exists "facebook/multilingual_librispeech"
- [ ] oscar => oscar-corpus
- [x] peer_read => allenai
- [x] qasper => allenai
- [x] reddit => webis/tldr-17
- [x] russian_super_glue => russiannlp
- [x] rvl_cdip => aharley
- [x] s2orc => allenai
- [x] scicite => allenai
- [x] scifact => allenai
- [x] scitldr => allenai
- [x] swiss_judgment_prediction => rcds
- [x] the_pile => EleutherAI
- [ ] wmt14, wmt15, wmt16, wmt17, wmt18, wmt19,... => wmt
- [ ] Deprecate (and eventually remove) datasets that cannot be transferred because they already exist
- [x] banking77 => PolyAI
- [x] common_voice => mozilla-foundation
- [x] german_legal_entity_recognition => elenanereiss
- ...
EDIT: the list above is continuously being updated
The transfer of the dummy dataset to the dummy org works as expected:
```python
In [1]: from datasets import load_dataset; ds = load_dataset("dummy_canonical_dataset", download_mode="force_redownload"); ds
Downloading builder script: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2.98k/2.98k [00:00<00:00, 2.01MB/s]
Downloading and preparing dataset dummy_canonical_dataset/default (download: 411 bytes, generated: 385 bytes, post-processed: Unknown size, total: 796 bytes) to .../.cache/huggingface/datasets/dummy_canonical_dataset/default/1.0.0/100870c358637e269fee140585e61e1472d5075a9bf6f866719934c725e55fb4...
Downloading data: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 411/411 [00:00<00:00, 293kB/s]
Dataset dummy_canonical_dataset downloaded and prepared to .../.cache/huggingface/datasets/dummy_canonical_dataset/default/1.0.0/100870c358637e269fee140585e61e1472d5075a9bf6f866719934c725e55fb4. Subsequent calls will reuse this data.
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 304.16it/s]
Out[1]:
DatasetDict({
train: Dataset({
features: ['langs', 'ner_tags', 'tokens'],
num_rows: 3
})
})
In [2]: from datasets import load_dataset; ds = load_dataset("dummy-canonical-org/dummy_canonical_dataset"); ds
Downloading builder script: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2.98k/2.98k [00:00<00:00, 1.57MB/s]
Downloading and preparing dataset dummy_canonical_dataset/default to .../.cache/huggingface/datasets/dummy-canonical-org___dummy_canonical_dataset/default/1.0.0/100870c358637e269fee140585e61e1472d5075a9bf6f866719934c725e55fb4...
Dataset dummy_canonical_dataset downloaded and prepared to .../.cache/huggingface/datasets/dummy-canonical-org___dummy_canonical_dataset/default/1.0.0/100870c358637e269fee140585e61e1472d5075a9bf6f866719934c725e55fb4. Subsequent calls will reuse this data.
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 362.48it/s]
Out[2]:
DatasetDict({
train: Dataset({
features: ['langs', 'ner_tags', 'tokens'],
num_rows: 3
})
})
``` | [
0.03601277992129326,
0.3146805763244629,
-0.013221616856753826,
0.025197602808475494,
0.16879820823669434,
0.022613786160945892,
0.24629512429237366,
0.39038974046707153,
0.057000499218702316,
0.025375306606292725,
-0.312804639339447,
-0.06983106583356857,
-0.2716740369796753,
0.03336823731660843,
0.21916291117668152,
-0.02534719556570053,
0.28011876344680786,
-0.2540474534034729,
-0.11193116009235382,
0.000845007598400116,
-0.334025114774704,
0.09270244091749191,
-0.1180080771446228,
-0.08785231411457062,
0.07461937516927719,
0.1838786005973816,
-0.3534415662288666,
0.3029385507106781,
-0.2397867888212204,
-0.05576207488775253,
0.3588072955608368,
0.4938142001628876,
0.002233298495411873,
0.7967617511749268,
-0.00011061892291763797,
0.05353102833032608,
0.337501585483551,
-0.005180042237043381,
-0.06838157027959824,
-0.09670981764793396,
0.12705686688423157,
-0.006540786940604448,
-0.20506836473941803,
-0.21504434943199158,
0.03392563760280609,
-0.036264125257730484,
-0.052060432732105255,
-0.6274397373199463,
0.13704989850521088,
0.3337576985359192,
0.20203472673892975,
0.2210952192544937,
-0.32084187865257263,
-0.22245019674301147,
-0.15001672506332397,
0.216275155544281,
-0.07000303268432617,
0.17056141793727875,
0.12356714904308319,
-0.06079749017953873,
0.028144724667072296,
0.1554781049489975,
-0.18896369636058807,
-0.22749470174312592,
0.13131369650363922,
-0.15742798149585724,
-0.2253183126449585,
-0.04895826429128647,
0.1041027083992958,
0.23433607816696167,
0.4135802388191223,
-0.5283428430557251,
-0.2937052547931671,
-0.05991502106189728,
0.02108442783355713,
-0.3564753830432892,
-0.053699709475040436,
0.08972726762294769,
0.21978090703487396,
0.1358124315738678,
-0.22047863900661469,
0.14517632126808167,
-0.07529198378324509,
0.027146250009536743,
-0.105387382209301,
0.2928350865840912,
-0.11963139474391937,
-0.08330699056386948,
0.13971589505672455,
-0.15472698211669922,
0.09724917262792587,
-0.2597275972366333,
-0.004040375351905823,
-0.10250993072986603,
-0.054300229996442795,
-0.14230045676231384,
-0.1305103302001953,
0.48133155703544617,
0.45372119545936584,
0.2500794231891632,
-0.050663456320762634,
0.05952627956867218,
0.02258927747607231,
-0.13849735260009766,
-0.019990500062704086,
0.446463406085968,
0.06951696425676346,
-0.017177265137434006,
0.17367854714393616,
0.5844176411628723,
-0.13330399990081787,
0.14620982110500336,
-0.0731080174446106,
-0.19100940227508545,
-0.09826019406318665,
0.1389855146408081,
0.4809075593948364,
-0.19772037863731384,
-0.25550881028175354,
0.017606018111109734,
0.05676323175430298,
-0.06891253590583801,
0.18268997967243195,
0.32016122341156006,
0.12697674334049225,
0.19077077507972717,
0.07529476284980774,
0.42400306463241577,
-0.15422514081001282,
-0.11233601719141006,
-0.22916314005851746,
0.21584245562553406,
-0.32787495851516724,
-0.11086677759885788,
0.2646735906600952,
0.3332204818725586,
0.008367515169084072,
0.013774043880403042,
0.6366074085235596,
0.04000500589609146,
0.11430121958255768,
0.2182680070400238,
0.2352234423160553,
0.10662104189395905,
-0.20737294852733612,
0.0935727134346962,
0.2817547619342804,
0.03226589411497116,
-0.4001914858818054,
-0.009421579539775848,
0.22304490208625793,
-0.2509647309780121,
0.09635055065155029,
0.22948260605335236,
-0.34835100173950195,
0.031453683972358704,
-0.23221302032470703,
0.172567218542099,
-0.32518061995506287,
0.14287197589874268,
0.18556086719036102,
-0.045319221913814545,
-0.2501612901687622,
0.03734701871871948,
0.16590899229049683,
0.44462114572525024,
0.0506645105779171,
-0.05058513954281807,
-0.2055414617061615,
0.17334160208702087,
0.17369496822357178,
0.21928620338439941,
-0.14719262719154358,
-0.2735174298286438,
-0.29106953740119934,
-0.0730503648519516,
0.05119014531373978,
-0.4424796998500824,
-0.17234234511852264,
-0.13083159923553467,
-0.30119043588638306,
0.21863918006420135,
0.20813699066638947,
-0.18059948086738586,
-0.012016402557492256,
-0.33324024081230164,
-0.3061886429786682,
0.11232368648052216,
-0.1915210783481598,
0.049065396189689636,
-0.24579185247421265,
-0.05772656947374344,
0.0040602535009384155,
-0.04932241886854172,
0.0361291840672493,
-0.22652673721313477,
-0.16731920838356018,
0.02738182246685028,
0.06964106112718582,
-0.06394219398498535,
0.10986462235450745,
0.016251787543296814,
0.21052196621894836,
0.02001882717013359,
0.15811844170093536,
0.1001494899392128,
-0.5807812213897705,
0.15277674794197083,
0.1323746293783188,
0.1388634741306305,
0.27917957305908203,
-0.5364103317260742,
-0.3134549558162689,
-0.030428122729063034,
-0.14633890986442566,
-0.03112969920039177,
0.14048820734024048,
0.28166311979293823,
0.15273192524909973,
0.03628057613968849,
-0.27926939725875854,
0.13196569681167603,
-0.13000109791755676,
0.38821715116500854,
-0.30564194917678833,
0.32862114906311035,
-0.07588770985603333,
0.03723996505141258,
-0.051047876477241516,
0.25457069277763367,
0.10362055152654648,
-0.36441007256507874,
0.18185919523239136,
0.16089075803756714,
0.022484945133328438,
0.10776764899492264,
0.2749273478984833,
0.5534853935241699,
0.10793697088956833,
-0.4116390347480774,
0.3704579174518585,
0.40071263909339905,
-0.230751633644104,
0.023905552923679352,
-0.10351753979921341,
0.6089016199111938,
-0.22696103155612946,
0.1790727972984314,
0.03366365283727646,
-0.010421055369079113,
0.3171018958091736,
-0.3537808656692505,
-0.16970714926719666,
-0.18057245016098022,
0.2875348627567291,
0.20116539299488068,
0.23665012419223785,
0.15889345109462738,
-0.14994797110557556,
0.08600687235593796,
0.09506623446941376,
-0.2327404022216797,
-0.08551093190908432,
0.037203073501586914,
-0.18201658129692078,
-0.22795599699020386,
0.09812141209840775,
0.06888744235038757,
0.306840717792511,
0.22341646254062653,
0.19249331951141357,
0.10577192902565002,
0.07405052334070206,
-0.20582780241966248,
0.24629077315330505,
-0.039842650294303894,
-0.11717750132083893,
0.06537701189517975,
0.027718374505639076,
0.1007414385676384,
-0.35029950737953186,
-0.20460227131843567,
0.11624161154031754,
0.02367030829191208,
-0.2836807668209076,
-0.050492215901613235,
-0.19698940217494965,
-0.5736656188964844,
-0.31073087453842163,
0.0964297205209732,
-0.17335185408592224,
-0.34794771671295166,
0.07709766179323196,
0.14208504557609558,
-0.26182353496551514,
0.2650207579135895,
-0.061177562922239304,
0.4066627025604248,
-0.4737185537815094,
-0.01120767928659916,
-0.29622381925582886,
-0.14225177466869354,
-0.046021826565265656,
0.08038845658302307,
0.4786491394042969,
0.03217360004782677,
0.3983750641345978,
-0.19829745590686798,
0.09060139209032059,
-0.5316441059112549,
-0.5609970092773438,
0.06297193467617035,
-0.10595494508743286,
-0.09508319944143295,
-0.013065077364444733,
0.064992755651474,
0.019409101456403732,
-0.13517844676971436,
-0.053580548614263535,
-0.26359912753105164,
-0.22776688635349274,
0.21447345614433289,
-0.11187933385372162,
0.052342869341373444,
-0.12866708636283875,
-0.06865235418081284,
0.04673997312784195,
-0.1884835809469223,
0.2654454708099365,
-0.21053649485111237,
-0.2663511037826538,
0.38857176899909973,
-0.34617191553115845,
-0.02494734153151512,
0.03483462706208229,
-0.03618665039539337,
-0.07007887214422226,
-0.40345650911331177,
-0.023512374609708786,
0.012818824499845505,
-0.047233644872903824,
0.0800754576921463,
-0.14796976745128632,
0.3451424837112427,
-0.0314546637237072,
-0.08192158490419388,
-0.40935003757476807,
0.03352215513586998,
0.2154233157634735,
0.29856815934181213,
-0.12281142175197601,
0.35357969999313354,
0.021030493080615997,
-0.10679864138364792,
0.03203742951154709,
-0.27472445368766785,
-0.004452452063560486,
-0.02170763537287712,
-0.24322041869163513,
-0.06313621997833252,
-0.026209603995084763,
-0.005797281861305237,
0.519349992275238,
0.1798923760652542,
-0.22689567506313324,
0.05743204429745674,
0.04551420360803604,
0.3789563477039337,
0.08488240092992783,
-0.4390549063682556,
0.15371771156787872,
0.12996257841587067,
-0.12165699899196625,
0.489498496055603,
-0.14502978324890137,
0.15214495360851288,
0.2177964150905609,
0.1617741584777832,
-0.19729605317115784,
-0.4033031761646271,
0.0642189159989357,
-0.4244045615196228,
0.014416389167308807,
-0.042773421853780746,
-0.3315638601779938,
-0.051625803112983704,
-0.20929130911827087,
0.2664707601070404,
0.4571709632873535,
-0.16012132167816162,
-0.13317368924617767,
-0.8004539608955383,
0.38627222180366516,
-0.29133498668670654,
0.6160179376602173,
-0.24042758345603943,
0.08555655926465988,
0.09576888382434845,
-0.035996366292238235,
-0.25771647691726685,
0.07870051264762878,
0.3455878794193268,
-0.1860876977443695,
0.08278216421604156,
0.20608650147914886,
-0.1175706535577774,
-0.14060939848423004,
-0.06736011803150177,
-0.1506984978914261,
0.18053176999092102,
0.03173106908798218,
0.3459205627441406,
-0.2861994504928589,
-0.3775887191295624,
0.28617122769355774,
0.29870185256004333,
0.24967622756958008,
0.13720253109931946,
-0.17338621616363525,
-0.5493564605712891,
-0.1373220980167389,
0.2461465299129486,
0.03792273998260498,
0.01396092027425766,
-0.4668073356151581,
0.2833082973957062,
0.07727116346359253,
-0.26871728897094727,
0.5272123217582703,
-0.14347147941589355,
0.13126850128173828,
0.2335890829563141,
0.23403778672218323,
0.07560228556394577,
0.010336823761463165,
0.4027267396450043,
0.35962724685668945,
-0.28126540780067444,
-0.6468427777290344,
-0.3701677918434143,
0.3382805287837982,
0.41623687744140625,
0.44357630610466003,
0.09398677945137024,
0.10596156865358353,
-0.2877765893936157,
-0.058616116642951965,
-0.2761581540107727,
0.11762867867946625,
0.22723986208438873,
0.13536149263381958,
-0.37937647104263306,
-0.027213308960199356,
0.007713258266448975,
0.23551501333713531,
-0.07795865833759308,
0.3683994710445404,
0.41973942518234253,
-0.4234558343887329,
0.15315845608711243,
-0.007603466510772705,
1.0860503911972046,
-0.4420916438102722,
0.29685133695602417,
0.18279540538787842,
-0.034577563405036926,
0.4850858747959137,
-0.014001816511154175,
-0.10213195532560349,
-0.3185679316520691,
0.037244752049446106,
0.08955621719360352,
0.14957192540168762,
0.3196287751197815,
0.09452944993972778,
-0.5834870934486389,
0.26453110575675964,
-0.18411573767662048,
0.468787282705307,
0.12040126323699951,
0.28154605627059937,
-0.05534795671701431,
-0.22749356925487518,
-0.13542598485946655,
0.19500461220741272,
0.022262856364250183,
0.08336648344993591,
-0.06846834719181061,
0.17827315628528595,
-0.05900048092007637,
0.0456404834985733,
-0.12039109319448471,
0.09768553078174591,
-0.20930345356464386,
-0.16375777125358582,
-0.060117144137620926,
-0.15151354670524597,
0.27517804503440857,
0.23110251128673553,
0.9707485437393188,
0.14742015302181244,
-0.0513542965054512,
0.1522381603717804,
0.0011297240853309631,
0.04577213525772095,
0.2466040700674057,
-0.29108649492263794,
0.1228560358285904,
0.21794015169143677,
-0.09015149623155594,
-0.07650230079889297,
0.20066480338573456,
-0.09088201820850372,
-0.30377212166786194,
-0.1506374329328537,
0.1147153228521347,
-0.5170769691467285,
0.037725064903497696,
0.1330622434616089,
-0.24732071161270142,
-0.11287134885787964,
0.15653665363788605,
-0.009235702455043793,
-0.24040378630161285,
-0.04742448031902313,
-0.06646868586540222,
-0.3099612593650818,
-0.1461370289325714,
-0.037654586136341095,
-0.19239291548728943,
-0.11392451822757721,
0.1332247257232666,
-0.16311438381671906,
0.13090205192565918,
-0.265350878238678,
-0.06298109143972397,
0.5170079469680786,
-0.22547373175621033,
0.2012604922056198,
-0.01144181378185749,
-0.21671965718269348,
0.1953076869249344,
-0.08138018846511841,
0.13659752905368805,
-0.022847890853881836,
-0.013459812849760056,
-0.09562533348798752,
-0.1936817616224289,
0.351451575756073,
-0.00358392670750618,
0.3273860812187195,
-0.03908818960189819,
0.20870669186115265,
-0.17937316000461578,
-0.1807508021593094,
-0.3657854497432709,
0.29917165637016296,
-0.07942065596580505,
-0.046364374458789825,
0.22513942420482635,
-0.22081363201141357,
-0.10087288916110992,
-0.24764326214790344,
0.17064407467842102,
-0.13668186962604523,
-0.07781216502189636,
-0.2297201156616211,
-0.15544025599956512,
0.09269097447395325,
-0.03861110657453537,
-0.054090216755867004,
0.3240002393722534,
-0.04447963833808899,
0.06533923745155334,
-0.33395618200302124,
0.02466895803809166,
0.18843898177146912,
-0.04074040800333023,
0.08761154115200043,
0.48438918590545654,
-0.20625033974647522,
-0.09829389303922653,
0.04195170849561691,
0.1026872918009758,
0.216133713722229,
-0.23425406217575073,
0.15254810452461243,
-0.09598790854215622,
-0.2151220291852951,
0.085065096616745,
0.3822736144065857,
0.40276211500167847,
0.21170392632484436,
0.16860145330429077,
0.1083408072590828,
-0.046882517635822296,
0.18032023310661316,
0.523311972618103,
0.21708793938159943,
-0.2948913276195526,
0.016645239666104317,
0.11642065644264221,
0.14879068732261658,
-0.2131061851978302,
0.05475842207670212,
0.3760952055454254,
-0.13475467264652252,
0.10974240303039551,
0.3557569682598114,
0.4980614483356476,
0.24455448985099792,
0.3160834312438965,
-0.056076835840940475,
0.4652259647846222,
0.02598775178194046,
0.4534125328063965,
-0.0966496616601944,
-0.02192891389131546,
0.13968349993228912,
0.15249720215797424,
0.114403635263443,
0.27135688066482544,
-0.2967013120651245,
0.08782577514648438,
0.7978910803794861,
-0.15198954939842224,
0.2562093138694763,
0.1719617396593094,
-0.22245940566062927,
-0.010087620466947556,
0.21289923787117004,
0.055077698081731796,
0.3261830508708954,
-0.07316574454307556,
0.5840410590171814,
-0.35957071185112,
-0.28901049494743347,
0.015754805877804756,
0.13957136869430542,
0.02145630493760109,
-0.07379800081253052,
-0.12614236772060394,
-0.1473846286535263,
-0.2920483350753784,
-0.0949290543794632,
-0.22018858790397644,
-0.03435886651277542,
0.11216327548027039,
-0.118155837059021,
-0.19823987782001495,
-0.1644424945116043,
0.027861105278134346,
-0.020907841622829437,
0.11743424087762833,
-0.13826997578144073,
0.2289198338985443,
0.18642574548721313,
-0.0740322470664978,
0.26380008459091187,
0.5490747690200806,
0.3939657211303711,
-0.23110580444335938,
-0.22530820965766907,
0.08181723952293396,
-0.1035802960395813,
-0.03017636016011238,
-0.1365763545036316,
0.07786741107702255,
-0.13869419693946838,
-0.31314802169799805,
-0.04082248732447624,
0.191089928150177,
-0.09568528085947037,
-0.2292437106370926,
0.14173446595668793,
-0.26979905366897583,
-0.21269668638706207,
0.2837013900279999,
-0.03090061992406845,
-0.00199059396982193,
-0.28788867592811584,
0.28141704201698303,
-0.26907801628112793,
-0.26919183135032654,
0.4438524544239044,
-0.04823879525065422,
0.1187167838215828,
-0.026986014097929,
0.09666085243225098,
0.27111315727233887,
0.4181256592273712,
0.33567050099372864,
0.15107648074626923,
-0.42119312286376953,
-0.544858992099762,
-0.6589451432228088,
0.3780207633972168,
0.003145746886730194,
-0.0991140604019165,
0.0402856320142746,
-0.08479447662830353,
0.32841846346855164,
-0.15694016218185425,
-0.17172254621982574,
-0.5048792362213135,
0.17946913838386536,
-0.2111613154411316,
-0.4244730472564697,
0.02241414785385132,
-0.02653275430202484,
-0.08751243352890015,
0.21197138726711273,
-0.3328474760055542,
0.030039004981517792,
0.2751343250274658,
-0.07008066028356552,
0.0189371295273304,
0.32692503929138184,
0.16333217918872833,
-0.21126028895378113,
0.044649090617895126,
-0.10202892124652863,
0.36257392168045044,
-0.06963295489549637,
-0.27884823083877563,
-0.1868252009153366,
-0.05712417885661125,
-0.21941515803337097,
0.3479246199131012,
-0.2516549825668335,
-0.03285742178559303,
-0.11009985953569412,
-0.0859874039888382,
0.00582085782662034,
-0.07126156240701675,
0.2512417435646057,
-0.10586448758840561,
-0.519166886806488,
0.17806319892406464,
-0.11427809298038483,
0.19453725218772888,
0.09727555513381958,
0.6413248777389526,
-0.15118408203125,
0.30110782384872437,
-0.41859060525894165,
-0.24046210944652557,
0.647101104259491,
0.04028576612472534,
-0.326809287071228,
-0.03895414248108864,
0.24715642631053925,
-0.4157928228378296,
-0.12887069582939148,
-0.3688119649887085,
0.12743064761161804,
0.1418898105621338,
0.13128146529197693,
-0.17549100518226624,
0.1347920298576355,
0.06843558698892593,
-0.12442770600318909,
-0.06943036615848541,
-0.013638541102409363,
0.2088598906993866,
0.029559453949332237,
0.15404857695102692,
0.03268042951822281
] |
https://github.com/huggingface/datasets/issues/5096 | Transfer some canonical datasets under an organization namespace | Maybe we should be a bit more proactive with these transfers. There are only ≈70 canonical models, so reaching that number with datasets would be great, too. It's not easy considering the current number of ≈750 canonical datasets, but doable.
For instance, it shouldn't be too hard to transfer these datasets (partial list; all of them have more than > 1k downloads):
<details>
<summary> Datasets to transfer </summary>
```
quickdraw -> google
openai_humaneval -> openai
c4 -> allenai/c4 (the canonical version reads data from the org version)
mbpp -> google (ask jaaustin (author) where to transfer the dataset)
competition_math -> hendrycks (author)
gsm8k -> openai
ai2_arc -> allenai
imdb -> stanfordai
greek_legal_code -> chrispap (author)
spider -> Yale-LILY
squad and squad_v2 -> rajpurkarlab (or rajpurkar, a member of the org and one of the authors)
cppe-5 -> rishitdagli
news_commentary -> Helsinki-NLP
jfleg -> keisks (author)
pubmed_qa -> qiaojin (author)
medmcqa -> infinitylogesh (author)
cifar10 and cifar100 -> UniversityofToronto
cc100 -> gwenzek (author)
asset -> facebook
blbooks -> BritishLibraryLabs
capes -> FLSRDS (maybe the author?)
cc_news -> fhamborg (author)
clue -> CLUE benchmark
coqa -> stanfordnlp
lambada -> germank (author)
librispeech_asr -> openslr
drop -> allenai
duorc -> salesforce (ask amritasaha87 (author) where to transfer)
glue -> nyu-mll ?
go_emotions -> google
commonsense_qa -> tau
dbpedia_14 -> JensLehmann (author?)
discofuse -> google
mc4 -> allenai/c4
openbookqa -> allenai
ropes -> allene
trivia_qa -> mandarjoshi (author)
wikiann -> afshinrahimi (author)
xtreme -> google
xscr -> INK-USC
yelp_review_full -> Yelp
truthful_qa -> jacobhilton22 (author)
bigbench -> google
xnli -> facebook
sciq -> allenai
sst2 -> stanfordnlp
blimp -> alexwarstadt (author)
tweet_eval -> cardiffnlp
beans -> AI-Lab-Makerere
lex_glue -> coastalcph
americas_nli -> abteen (author)
opus_euconst -> tiedeman (author)
medical_questions_pairs -> curaihealth
web_questions -> joberant (author)
anli -> facebook
race -> CarnegieMellonCS
klue -> klue
wino_bias -> uclanlp
wiki_qa -> microsoft
xcopa -> cambridgeltl
indic_glue -> ai4bharat
boolq -> google
adversarial_qa -> mbartolo (author)
nq_open -> google
snli -> stanfordnlp
stsb_multi_mt -> PhilipMay (author)
multi_nli -> sleepinyourhat (author)
paws -> google
paws-x -> google
ms_marco - microsoft
xquad -> deepmind
narrativeqa -> deepmind
kilt_tasks -> facebook
hate_speech_offensive -> tdavidson (author)
wiki40b -> google
covost2 -> facebook
common_gen -> INKLAB
multi_eurlex -> kiddothe2b (author)
exams -> mhardalov (author)
tiny_shakespeare -> karpathy (author)
blbooksgenre -> BritishLibraryLabs ?
food101 -> ethz ?
scitail -> allenai
billsum -> FiscalNote
imppres -> facebook
quartz -> allenai
qasc -> allenai
quail -> textmachinelab
wiki_lingua -> esdurmus
cos_e -> salesforce ?
civil_comments -> google ? (create a “jigsaw” org)
xquad_r -> google
wikitext-> metamind (or salesforce)
// deprecate c4 and mc4 in favor of allenai/c4 (add a dataset script to the org version to make it easier to use?)
```
</details>
Also, a space that allows users to claim the existing canonical datasets (for themselves or their organizations) could be nice.
WDYT? | As discussed during our @huggingface/datasets meeting, we are planning to move some "canonical" dataset scripts under their corresponding organization namespace (if this does not exist).
On the contrary, if the dataset already exists under the organization namespace, we are deprecating the canonical one (and eventually delete it).
First, we should test it using a dummy dataset/organization.
TODO:
- [x] Test with a dummy dataset
- [x] Create dummy canonical dataset: https://huggingface.co/datasets/dummy_canonical_dataset
- [x] Create dummy organization: https://huggingface.co/dummy-canonical-org
- [x] Transfer dummy canonical dataset to dummy organization
- [ ] Transfer datasets
- [x] babi_qa => facebook
- [x] blbooks => TheBritishLibrary/blbooks
- [x] blbooksgenre => TheBritishLibrary/blbooksgenre
- [x] common_gen => allenai
- [x] commonsense_qa => tau
- [x] competition_math => hendrycks/competition_math
- [x] cord19 => allenai
- [x] emotion => dair-ai
- [ ] gem => GEM
- [x] hellaswag => Rowan
- [x] hendrycks_test => cais/mmlu
- [x] indonlu => indonlp
- [ ] multilingual_librispeech => facebook
- It already exists "facebook/multilingual_librispeech"
- [ ] oscar => oscar-corpus
- [x] peer_read => allenai
- [x] qasper => allenai
- [x] reddit => webis/tldr-17
- [x] russian_super_glue => russiannlp
- [x] rvl_cdip => aharley
- [x] s2orc => allenai
- [x] scicite => allenai
- [x] scifact => allenai
- [x] scitldr => allenai
- [x] swiss_judgment_prediction => rcds
- [x] the_pile => EleutherAI
- [ ] wmt14, wmt15, wmt16, wmt17, wmt18, wmt19,... => wmt
- [ ] Deprecate (and eventually remove) datasets that cannot be transferred because they already exist
- [x] banking77 => PolyAI
- [x] common_voice => mozilla-foundation
- [x] german_legal_entity_recognition => elenanereiss
- ...
EDIT: the list above is continuously being updated | 470 | Transfer some canonical datasets under an organization namespace
As discussed during our @huggingface/datasets meeting, we are planning to move some "canonical" dataset scripts under their corresponding organization namespace (if this does not exist).
On the contrary, if the dataset already exists under the organization namespace, we are deprecating the canonical one (and eventually delete it).
First, we should test it using a dummy dataset/organization.
TODO:
- [x] Test with a dummy dataset
- [x] Create dummy canonical dataset: https://huggingface.co/datasets/dummy_canonical_dataset
- [x] Create dummy organization: https://huggingface.co/dummy-canonical-org
- [x] Transfer dummy canonical dataset to dummy organization
- [ ] Transfer datasets
- [x] babi_qa => facebook
- [x] blbooks => TheBritishLibrary/blbooks
- [x] blbooksgenre => TheBritishLibrary/blbooksgenre
- [x] common_gen => allenai
- [x] commonsense_qa => tau
- [x] competition_math => hendrycks/competition_math
- [x] cord19 => allenai
- [x] emotion => dair-ai
- [ ] gem => GEM
- [x] hellaswag => Rowan
- [x] hendrycks_test => cais/mmlu
- [x] indonlu => indonlp
- [ ] multilingual_librispeech => facebook
- It already exists "facebook/multilingual_librispeech"
- [ ] oscar => oscar-corpus
- [x] peer_read => allenai
- [x] qasper => allenai
- [x] reddit => webis/tldr-17
- [x] russian_super_glue => russiannlp
- [x] rvl_cdip => aharley
- [x] s2orc => allenai
- [x] scicite => allenai
- [x] scifact => allenai
- [x] scitldr => allenai
- [x] swiss_judgment_prediction => rcds
- [x] the_pile => EleutherAI
- [ ] wmt14, wmt15, wmt16, wmt17, wmt18, wmt19,... => wmt
- [ ] Deprecate (and eventually remove) datasets that cannot be transferred because they already exist
- [x] banking77 => PolyAI
- [x] common_voice => mozilla-foundation
- [x] german_legal_entity_recognition => elenanereiss
- ...
EDIT: the list above is continuously being updated
Maybe we should be a bit more proactive with these transfers. There are only ≈70 canonical models, so reaching that number with datasets would be great, too. It's not easy considering the current number of ≈750 canonical datasets, but doable.
For instance, it shouldn't be too hard to transfer these datasets (partial list; all of them have more than > 1k downloads):
<details>
<summary> Datasets to transfer </summary>
```
quickdraw -> google
openai_humaneval -> openai
c4 -> allenai/c4 (the canonical version reads data from the org version)
mbpp -> google (ask jaaustin (author) where to transfer the dataset)
competition_math -> hendrycks (author)
gsm8k -> openai
ai2_arc -> allenai
imdb -> stanfordai
greek_legal_code -> chrispap (author)
spider -> Yale-LILY
squad and squad_v2 -> rajpurkarlab (or rajpurkar, a member of the org and one of the authors)
cppe-5 -> rishitdagli
news_commentary -> Helsinki-NLP
jfleg -> keisks (author)
pubmed_qa -> qiaojin (author)
medmcqa -> infinitylogesh (author)
cifar10 and cifar100 -> UniversityofToronto
cc100 -> gwenzek (author)
asset -> facebook
blbooks -> BritishLibraryLabs
capes -> FLSRDS (maybe the author?)
cc_news -> fhamborg (author)
clue -> CLUE benchmark
coqa -> stanfordnlp
lambada -> germank (author)
librispeech_asr -> openslr
drop -> allenai
duorc -> salesforce (ask amritasaha87 (author) where to transfer)
glue -> nyu-mll ?
go_emotions -> google
commonsense_qa -> tau
dbpedia_14 -> JensLehmann (author?)
discofuse -> google
mc4 -> allenai/c4
openbookqa -> allenai
ropes -> allene
trivia_qa -> mandarjoshi (author)
wikiann -> afshinrahimi (author)
xtreme -> google
xscr -> INK-USC
yelp_review_full -> Yelp
truthful_qa -> jacobhilton22 (author)
bigbench -> google
xnli -> facebook
sciq -> allenai
sst2 -> stanfordnlp
blimp -> alexwarstadt (author)
tweet_eval -> cardiffnlp
beans -> AI-Lab-Makerere
lex_glue -> coastalcph
americas_nli -> abteen (author)
opus_euconst -> tiedeman (author)
medical_questions_pairs -> curaihealth
web_questions -> joberant (author)
anli -> facebook
race -> CarnegieMellonCS
klue -> klue
wino_bias -> uclanlp
wiki_qa -> microsoft
xcopa -> cambridgeltl
indic_glue -> ai4bharat
boolq -> google
adversarial_qa -> mbartolo (author)
nq_open -> google
snli -> stanfordnlp
stsb_multi_mt -> PhilipMay (author)
multi_nli -> sleepinyourhat (author)
paws -> google
paws-x -> google
ms_marco - microsoft
xquad -> deepmind
narrativeqa -> deepmind
kilt_tasks -> facebook
hate_speech_offensive -> tdavidson (author)
wiki40b -> google
covost2 -> facebook
common_gen -> INKLAB
multi_eurlex -> kiddothe2b (author)
exams -> mhardalov (author)
tiny_shakespeare -> karpathy (author)
blbooksgenre -> BritishLibraryLabs ?
food101 -> ethz ?
scitail -> allenai
billsum -> FiscalNote
imppres -> facebook
quartz -> allenai
qasc -> allenai
quail -> textmachinelab
wiki_lingua -> esdurmus
cos_e -> salesforce ?
civil_comments -> google ? (create a “jigsaw” org)
xquad_r -> google
wikitext-> metamind (or salesforce)
// deprecate c4 and mc4 in favor of allenai/c4 (add a dataset script to the org version to make it easier to use?)
```
</details>
Also, a space that allows users to claim the existing canonical datasets (for themselves or their organizations) could be nice.
WDYT? | [
0.03601277992129326,
0.3146805763244629,
-0.013221616856753826,
0.025197602808475494,
0.16879820823669434,
0.022613786160945892,
0.24629512429237366,
0.39038974046707153,
0.057000499218702316,
0.025375306606292725,
-0.312804639339447,
-0.06983106583356857,
-0.2716740369796753,
0.03336823731660843,
0.21916291117668152,
-0.02534719556570053,
0.28011876344680786,
-0.2540474534034729,
-0.11193116009235382,
0.000845007598400116,
-0.334025114774704,
0.09270244091749191,
-0.1180080771446228,
-0.08785231411457062,
0.07461937516927719,
0.1838786005973816,
-0.3534415662288666,
0.3029385507106781,
-0.2397867888212204,
-0.05576207488775253,
0.3588072955608368,
0.4938142001628876,
0.002233298495411873,
0.7967617511749268,
-0.00011061892291763797,
0.05353102833032608,
0.337501585483551,
-0.005180042237043381,
-0.06838157027959824,
-0.09670981764793396,
0.12705686688423157,
-0.006540786940604448,
-0.20506836473941803,
-0.21504434943199158,
0.03392563760280609,
-0.036264125257730484,
-0.052060432732105255,
-0.6274397373199463,
0.13704989850521088,
0.3337576985359192,
0.20203472673892975,
0.2210952192544937,
-0.32084187865257263,
-0.22245019674301147,
-0.15001672506332397,
0.216275155544281,
-0.07000303268432617,
0.17056141793727875,
0.12356714904308319,
-0.06079749017953873,
0.028144724667072296,
0.1554781049489975,
-0.18896369636058807,
-0.22749470174312592,
0.13131369650363922,
-0.15742798149585724,
-0.2253183126449585,
-0.04895826429128647,
0.1041027083992958,
0.23433607816696167,
0.4135802388191223,
-0.5283428430557251,
-0.2937052547931671,
-0.05991502106189728,
0.02108442783355713,
-0.3564753830432892,
-0.053699709475040436,
0.08972726762294769,
0.21978090703487396,
0.1358124315738678,
-0.22047863900661469,
0.14517632126808167,
-0.07529198378324509,
0.027146250009536743,
-0.105387382209301,
0.2928350865840912,
-0.11963139474391937,
-0.08330699056386948,
0.13971589505672455,
-0.15472698211669922,
0.09724917262792587,
-0.2597275972366333,
-0.004040375351905823,
-0.10250993072986603,
-0.054300229996442795,
-0.14230045676231384,
-0.1305103302001953,
0.48133155703544617,
0.45372119545936584,
0.2500794231891632,
-0.050663456320762634,
0.05952627956867218,
0.02258927747607231,
-0.13849735260009766,
-0.019990500062704086,
0.446463406085968,
0.06951696425676346,
-0.017177265137434006,
0.17367854714393616,
0.5844176411628723,
-0.13330399990081787,
0.14620982110500336,
-0.0731080174446106,
-0.19100940227508545,
-0.09826019406318665,
0.1389855146408081,
0.4809075593948364,
-0.19772037863731384,
-0.25550881028175354,
0.017606018111109734,
0.05676323175430298,
-0.06891253590583801,
0.18268997967243195,
0.32016122341156006,
0.12697674334049225,
0.19077077507972717,
0.07529476284980774,
0.42400306463241577,
-0.15422514081001282,
-0.11233601719141006,
-0.22916314005851746,
0.21584245562553406,
-0.32787495851516724,
-0.11086677759885788,
0.2646735906600952,
0.3332204818725586,
0.008367515169084072,
0.013774043880403042,
0.6366074085235596,
0.04000500589609146,
0.11430121958255768,
0.2182680070400238,
0.2352234423160553,
0.10662104189395905,
-0.20737294852733612,
0.0935727134346962,
0.2817547619342804,
0.03226589411497116,
-0.4001914858818054,
-0.009421579539775848,
0.22304490208625793,
-0.2509647309780121,
0.09635055065155029,
0.22948260605335236,
-0.34835100173950195,
0.031453683972358704,
-0.23221302032470703,
0.172567218542099,
-0.32518061995506287,
0.14287197589874268,
0.18556086719036102,
-0.045319221913814545,
-0.2501612901687622,
0.03734701871871948,
0.16590899229049683,
0.44462114572525024,
0.0506645105779171,
-0.05058513954281807,
-0.2055414617061615,
0.17334160208702087,
0.17369496822357178,
0.21928620338439941,
-0.14719262719154358,
-0.2735174298286438,
-0.29106953740119934,
-0.0730503648519516,
0.05119014531373978,
-0.4424796998500824,
-0.17234234511852264,
-0.13083159923553467,
-0.30119043588638306,
0.21863918006420135,
0.20813699066638947,
-0.18059948086738586,
-0.012016402557492256,
-0.33324024081230164,
-0.3061886429786682,
0.11232368648052216,
-0.1915210783481598,
0.049065396189689636,
-0.24579185247421265,
-0.05772656947374344,
0.0040602535009384155,
-0.04932241886854172,
0.0361291840672493,
-0.22652673721313477,
-0.16731920838356018,
0.02738182246685028,
0.06964106112718582,
-0.06394219398498535,
0.10986462235450745,
0.016251787543296814,
0.21052196621894836,
0.02001882717013359,
0.15811844170093536,
0.1001494899392128,
-0.5807812213897705,
0.15277674794197083,
0.1323746293783188,
0.1388634741306305,
0.27917957305908203,
-0.5364103317260742,
-0.3134549558162689,
-0.030428122729063034,
-0.14633890986442566,
-0.03112969920039177,
0.14048820734024048,
0.28166311979293823,
0.15273192524909973,
0.03628057613968849,
-0.27926939725875854,
0.13196569681167603,
-0.13000109791755676,
0.38821715116500854,
-0.30564194917678833,
0.32862114906311035,
-0.07588770985603333,
0.03723996505141258,
-0.051047876477241516,
0.25457069277763367,
0.10362055152654648,
-0.36441007256507874,
0.18185919523239136,
0.16089075803756714,
0.022484945133328438,
0.10776764899492264,
0.2749273478984833,
0.5534853935241699,
0.10793697088956833,
-0.4116390347480774,
0.3704579174518585,
0.40071263909339905,
-0.230751633644104,
0.023905552923679352,
-0.10351753979921341,
0.6089016199111938,
-0.22696103155612946,
0.1790727972984314,
0.03366365283727646,
-0.010421055369079113,
0.3171018958091736,
-0.3537808656692505,
-0.16970714926719666,
-0.18057245016098022,
0.2875348627567291,
0.20116539299488068,
0.23665012419223785,
0.15889345109462738,
-0.14994797110557556,
0.08600687235593796,
0.09506623446941376,
-0.2327404022216797,
-0.08551093190908432,
0.037203073501586914,
-0.18201658129692078,
-0.22795599699020386,
0.09812141209840775,
0.06888744235038757,
0.306840717792511,
0.22341646254062653,
0.19249331951141357,
0.10577192902565002,
0.07405052334070206,
-0.20582780241966248,
0.24629077315330505,
-0.039842650294303894,
-0.11717750132083893,
0.06537701189517975,
0.027718374505639076,
0.1007414385676384,
-0.35029950737953186,
-0.20460227131843567,
0.11624161154031754,
0.02367030829191208,
-0.2836807668209076,
-0.050492215901613235,
-0.19698940217494965,
-0.5736656188964844,
-0.31073087453842163,
0.0964297205209732,
-0.17335185408592224,
-0.34794771671295166,
0.07709766179323196,
0.14208504557609558,
-0.26182353496551514,
0.2650207579135895,
-0.061177562922239304,
0.4066627025604248,
-0.4737185537815094,
-0.01120767928659916,
-0.29622381925582886,
-0.14225177466869354,
-0.046021826565265656,
0.08038845658302307,
0.4786491394042969,
0.03217360004782677,
0.3983750641345978,
-0.19829745590686798,
0.09060139209032059,
-0.5316441059112549,
-0.5609970092773438,
0.06297193467617035,
-0.10595494508743286,
-0.09508319944143295,
-0.013065077364444733,
0.064992755651474,
0.019409101456403732,
-0.13517844676971436,
-0.053580548614263535,
-0.26359912753105164,
-0.22776688635349274,
0.21447345614433289,
-0.11187933385372162,
0.052342869341373444,
-0.12866708636283875,
-0.06865235418081284,
0.04673997312784195,
-0.1884835809469223,
0.2654454708099365,
-0.21053649485111237,
-0.2663511037826538,
0.38857176899909973,
-0.34617191553115845,
-0.02494734153151512,
0.03483462706208229,
-0.03618665039539337,
-0.07007887214422226,
-0.40345650911331177,
-0.023512374609708786,
0.012818824499845505,
-0.047233644872903824,
0.0800754576921463,
-0.14796976745128632,
0.3451424837112427,
-0.0314546637237072,
-0.08192158490419388,
-0.40935003757476807,
0.03352215513586998,
0.2154233157634735,
0.29856815934181213,
-0.12281142175197601,
0.35357969999313354,
0.021030493080615997,
-0.10679864138364792,
0.03203742951154709,
-0.27472445368766785,
-0.004452452063560486,
-0.02170763537287712,
-0.24322041869163513,
-0.06313621997833252,
-0.026209603995084763,
-0.005797281861305237,
0.519349992275238,
0.1798923760652542,
-0.22689567506313324,
0.05743204429745674,
0.04551420360803604,
0.3789563477039337,
0.08488240092992783,
-0.4390549063682556,
0.15371771156787872,
0.12996257841587067,
-0.12165699899196625,
0.489498496055603,
-0.14502978324890137,
0.15214495360851288,
0.2177964150905609,
0.1617741584777832,
-0.19729605317115784,
-0.4033031761646271,
0.0642189159989357,
-0.4244045615196228,
0.014416389167308807,
-0.042773421853780746,
-0.3315638601779938,
-0.051625803112983704,
-0.20929130911827087,
0.2664707601070404,
0.4571709632873535,
-0.16012132167816162,
-0.13317368924617767,
-0.8004539608955383,
0.38627222180366516,
-0.29133498668670654,
0.6160179376602173,
-0.24042758345603943,
0.08555655926465988,
0.09576888382434845,
-0.035996366292238235,
-0.25771647691726685,
0.07870051264762878,
0.3455878794193268,
-0.1860876977443695,
0.08278216421604156,
0.20608650147914886,
-0.1175706535577774,
-0.14060939848423004,
-0.06736011803150177,
-0.1506984978914261,
0.18053176999092102,
0.03173106908798218,
0.3459205627441406,
-0.2861994504928589,
-0.3775887191295624,
0.28617122769355774,
0.29870185256004333,
0.24967622756958008,
0.13720253109931946,
-0.17338621616363525,
-0.5493564605712891,
-0.1373220980167389,
0.2461465299129486,
0.03792273998260498,
0.01396092027425766,
-0.4668073356151581,
0.2833082973957062,
0.07727116346359253,
-0.26871728897094727,
0.5272123217582703,
-0.14347147941589355,
0.13126850128173828,
0.2335890829563141,
0.23403778672218323,
0.07560228556394577,
0.010336823761463165,
0.4027267396450043,
0.35962724685668945,
-0.28126540780067444,
-0.6468427777290344,
-0.3701677918434143,
0.3382805287837982,
0.41623687744140625,
0.44357630610466003,
0.09398677945137024,
0.10596156865358353,
-0.2877765893936157,
-0.058616116642951965,
-0.2761581540107727,
0.11762867867946625,
0.22723986208438873,
0.13536149263381958,
-0.37937647104263306,
-0.027213308960199356,
0.007713258266448975,
0.23551501333713531,
-0.07795865833759308,
0.3683994710445404,
0.41973942518234253,
-0.4234558343887329,
0.15315845608711243,
-0.007603466510772705,
1.0860503911972046,
-0.4420916438102722,
0.29685133695602417,
0.18279540538787842,
-0.034577563405036926,
0.4850858747959137,
-0.014001816511154175,
-0.10213195532560349,
-0.3185679316520691,
0.037244752049446106,
0.08955621719360352,
0.14957192540168762,
0.3196287751197815,
0.09452944993972778,
-0.5834870934486389,
0.26453110575675964,
-0.18411573767662048,
0.468787282705307,
0.12040126323699951,
0.28154605627059937,
-0.05534795671701431,
-0.22749356925487518,
-0.13542598485946655,
0.19500461220741272,
0.022262856364250183,
0.08336648344993591,
-0.06846834719181061,
0.17827315628528595,
-0.05900048092007637,
0.0456404834985733,
-0.12039109319448471,
0.09768553078174591,
-0.20930345356464386,
-0.16375777125358582,
-0.060117144137620926,
-0.15151354670524597,
0.27517804503440857,
0.23110251128673553,
0.9707485437393188,
0.14742015302181244,
-0.0513542965054512,
0.1522381603717804,
0.0011297240853309631,
0.04577213525772095,
0.2466040700674057,
-0.29108649492263794,
0.1228560358285904,
0.21794015169143677,
-0.09015149623155594,
-0.07650230079889297,
0.20066480338573456,
-0.09088201820850372,
-0.30377212166786194,
-0.1506374329328537,
0.1147153228521347,
-0.5170769691467285,
0.037725064903497696,
0.1330622434616089,
-0.24732071161270142,
-0.11287134885787964,
0.15653665363788605,
-0.009235702455043793,
-0.24040378630161285,
-0.04742448031902313,
-0.06646868586540222,
-0.3099612593650818,
-0.1461370289325714,
-0.037654586136341095,
-0.19239291548728943,
-0.11392451822757721,
0.1332247257232666,
-0.16311438381671906,
0.13090205192565918,
-0.265350878238678,
-0.06298109143972397,
0.5170079469680786,
-0.22547373175621033,
0.2012604922056198,
-0.01144181378185749,
-0.21671965718269348,
0.1953076869249344,
-0.08138018846511841,
0.13659752905368805,
-0.022847890853881836,
-0.013459812849760056,
-0.09562533348798752,
-0.1936817616224289,
0.351451575756073,
-0.00358392670750618,
0.3273860812187195,
-0.03908818960189819,
0.20870669186115265,
-0.17937316000461578,
-0.1807508021593094,
-0.3657854497432709,
0.29917165637016296,
-0.07942065596580505,
-0.046364374458789825,
0.22513942420482635,
-0.22081363201141357,
-0.10087288916110992,
-0.24764326214790344,
0.17064407467842102,
-0.13668186962604523,
-0.07781216502189636,
-0.2297201156616211,
-0.15544025599956512,
0.09269097447395325,
-0.03861110657453537,
-0.054090216755867004,
0.3240002393722534,
-0.04447963833808899,
0.06533923745155334,
-0.33395618200302124,
0.02466895803809166,
0.18843898177146912,
-0.04074040800333023,
0.08761154115200043,
0.48438918590545654,
-0.20625033974647522,
-0.09829389303922653,
0.04195170849561691,
0.1026872918009758,
0.216133713722229,
-0.23425406217575073,
0.15254810452461243,
-0.09598790854215622,
-0.2151220291852951,
0.085065096616745,
0.3822736144065857,
0.40276211500167847,
0.21170392632484436,
0.16860145330429077,
0.1083408072590828,
-0.046882517635822296,
0.18032023310661316,
0.523311972618103,
0.21708793938159943,
-0.2948913276195526,
0.016645239666104317,
0.11642065644264221,
0.14879068732261658,
-0.2131061851978302,
0.05475842207670212,
0.3760952055454254,
-0.13475467264652252,
0.10974240303039551,
0.3557569682598114,
0.4980614483356476,
0.24455448985099792,
0.3160834312438965,
-0.056076835840940475,
0.4652259647846222,
0.02598775178194046,
0.4534125328063965,
-0.0966496616601944,
-0.02192891389131546,
0.13968349993228912,
0.15249720215797424,
0.114403635263443,
0.27135688066482544,
-0.2967013120651245,
0.08782577514648438,
0.7978910803794861,
-0.15198954939842224,
0.2562093138694763,
0.1719617396593094,
-0.22245940566062927,
-0.010087620466947556,
0.21289923787117004,
0.055077698081731796,
0.3261830508708954,
-0.07316574454307556,
0.5840410590171814,
-0.35957071185112,
-0.28901049494743347,
0.015754805877804756,
0.13957136869430542,
0.02145630493760109,
-0.07379800081253052,
-0.12614236772060394,
-0.1473846286535263,
-0.2920483350753784,
-0.0949290543794632,
-0.22018858790397644,
-0.03435886651277542,
0.11216327548027039,
-0.118155837059021,
-0.19823987782001495,
-0.1644424945116043,
0.027861105278134346,
-0.020907841622829437,
0.11743424087762833,
-0.13826997578144073,
0.2289198338985443,
0.18642574548721313,
-0.0740322470664978,
0.26380008459091187,
0.5490747690200806,
0.3939657211303711,
-0.23110580444335938,
-0.22530820965766907,
0.08181723952293396,
-0.1035802960395813,
-0.03017636016011238,
-0.1365763545036316,
0.07786741107702255,
-0.13869419693946838,
-0.31314802169799805,
-0.04082248732447624,
0.191089928150177,
-0.09568528085947037,
-0.2292437106370926,
0.14173446595668793,
-0.26979905366897583,
-0.21269668638706207,
0.2837013900279999,
-0.03090061992406845,
-0.00199059396982193,
-0.28788867592811584,
0.28141704201698303,
-0.26907801628112793,
-0.26919183135032654,
0.4438524544239044,
-0.04823879525065422,
0.1187167838215828,
-0.026986014097929,
0.09666085243225098,
0.27111315727233887,
0.4181256592273712,
0.33567050099372864,
0.15107648074626923,
-0.42119312286376953,
-0.544858992099762,
-0.6589451432228088,
0.3780207633972168,
0.003145746886730194,
-0.0991140604019165,
0.0402856320142746,
-0.08479447662830353,
0.32841846346855164,
-0.15694016218185425,
-0.17172254621982574,
-0.5048792362213135,
0.17946913838386536,
-0.2111613154411316,
-0.4244730472564697,
0.02241414785385132,
-0.02653275430202484,
-0.08751243352890015,
0.21197138726711273,
-0.3328474760055542,
0.030039004981517792,
0.2751343250274658,
-0.07008066028356552,
0.0189371295273304,
0.32692503929138184,
0.16333217918872833,
-0.21126028895378113,
0.044649090617895126,
-0.10202892124652863,
0.36257392168045044,
-0.06963295489549637,
-0.27884823083877563,
-0.1868252009153366,
-0.05712417885661125,
-0.21941515803337097,
0.3479246199131012,
-0.2516549825668335,
-0.03285742178559303,
-0.11009985953569412,
-0.0859874039888382,
0.00582085782662034,
-0.07126156240701675,
0.2512417435646057,
-0.10586448758840561,
-0.519166886806488,
0.17806319892406464,
-0.11427809298038483,
0.19453725218772888,
0.09727555513381958,
0.6413248777389526,
-0.15118408203125,
0.30110782384872437,
-0.41859060525894165,
-0.24046210944652557,
0.647101104259491,
0.04028576612472534,
-0.326809287071228,
-0.03895414248108864,
0.24715642631053925,
-0.4157928228378296,
-0.12887069582939148,
-0.3688119649887085,
0.12743064761161804,
0.1418898105621338,
0.13128146529197693,
-0.17549100518226624,
0.1347920298576355,
0.06843558698892593,
-0.12442770600318909,
-0.06943036615848541,
-0.013638541102409363,
0.2088598906993866,
0.029559453949332237,
0.15404857695102692,
0.03268042951822281
] |
https://github.com/huggingface/datasets/issues/5096 | Transfer some canonical datasets under an organization namespace | Next week I can take care of some of them :) In most cases we just need to send an email to ask them if they're ok with it.
Let's coordinate on slack ? | As discussed during our @huggingface/datasets meeting, we are planning to move some "canonical" dataset scripts under their corresponding organization namespace (if this does not exist).
On the contrary, if the dataset already exists under the organization namespace, we are deprecating the canonical one (and eventually delete it).
First, we should test it using a dummy dataset/organization.
TODO:
- [x] Test with a dummy dataset
- [x] Create dummy canonical dataset: https://huggingface.co/datasets/dummy_canonical_dataset
- [x] Create dummy organization: https://huggingface.co/dummy-canonical-org
- [x] Transfer dummy canonical dataset to dummy organization
- [ ] Transfer datasets
- [x] babi_qa => facebook
- [x] blbooks => TheBritishLibrary/blbooks
- [x] blbooksgenre => TheBritishLibrary/blbooksgenre
- [x] common_gen => allenai
- [x] commonsense_qa => tau
- [x] competition_math => hendrycks/competition_math
- [x] cord19 => allenai
- [x] emotion => dair-ai
- [ ] gem => GEM
- [x] hellaswag => Rowan
- [x] hendrycks_test => cais/mmlu
- [x] indonlu => indonlp
- [ ] multilingual_librispeech => facebook
- It already exists "facebook/multilingual_librispeech"
- [ ] oscar => oscar-corpus
- [x] peer_read => allenai
- [x] qasper => allenai
- [x] reddit => webis/tldr-17
- [x] russian_super_glue => russiannlp
- [x] rvl_cdip => aharley
- [x] s2orc => allenai
- [x] scicite => allenai
- [x] scifact => allenai
- [x] scitldr => allenai
- [x] swiss_judgment_prediction => rcds
- [x] the_pile => EleutherAI
- [ ] wmt14, wmt15, wmt16, wmt17, wmt18, wmt19,... => wmt
- [ ] Deprecate (and eventually remove) datasets that cannot be transferred because they already exist
- [x] banking77 => PolyAI
- [x] common_voice => mozilla-foundation
- [x] german_legal_entity_recognition => elenanereiss
- ...
EDIT: the list above is continuously being updated | 34 | Transfer some canonical datasets under an organization namespace
As discussed during our @huggingface/datasets meeting, we are planning to move some "canonical" dataset scripts under their corresponding organization namespace (if this does not exist).
On the contrary, if the dataset already exists under the organization namespace, we are deprecating the canonical one (and eventually delete it).
First, we should test it using a dummy dataset/organization.
TODO:
- [x] Test with a dummy dataset
- [x] Create dummy canonical dataset: https://huggingface.co/datasets/dummy_canonical_dataset
- [x] Create dummy organization: https://huggingface.co/dummy-canonical-org
- [x] Transfer dummy canonical dataset to dummy organization
- [ ] Transfer datasets
- [x] babi_qa => facebook
- [x] blbooks => TheBritishLibrary/blbooks
- [x] blbooksgenre => TheBritishLibrary/blbooksgenre
- [x] common_gen => allenai
- [x] commonsense_qa => tau
- [x] competition_math => hendrycks/competition_math
- [x] cord19 => allenai
- [x] emotion => dair-ai
- [ ] gem => GEM
- [x] hellaswag => Rowan
- [x] hendrycks_test => cais/mmlu
- [x] indonlu => indonlp
- [ ] multilingual_librispeech => facebook
- It already exists "facebook/multilingual_librispeech"
- [ ] oscar => oscar-corpus
- [x] peer_read => allenai
- [x] qasper => allenai
- [x] reddit => webis/tldr-17
- [x] russian_super_glue => russiannlp
- [x] rvl_cdip => aharley
- [x] s2orc => allenai
- [x] scicite => allenai
- [x] scifact => allenai
- [x] scitldr => allenai
- [x] swiss_judgment_prediction => rcds
- [x] the_pile => EleutherAI
- [ ] wmt14, wmt15, wmt16, wmt17, wmt18, wmt19,... => wmt
- [ ] Deprecate (and eventually remove) datasets that cannot be transferred because they already exist
- [x] banking77 => PolyAI
- [x] common_voice => mozilla-foundation
- [x] german_legal_entity_recognition => elenanereiss
- ...
EDIT: the list above is continuously being updated
Next week I can take care of some of them :) In most cases we just need to send an email to ask them if they're ok with it.
Let's coordinate on slack ? | [
0.03601277992129326,
0.3146805763244629,
-0.013221616856753826,
0.025197602808475494,
0.16879820823669434,
0.022613786160945892,
0.24629512429237366,
0.39038974046707153,
0.057000499218702316,
0.025375306606292725,
-0.312804639339447,
-0.06983106583356857,
-0.2716740369796753,
0.03336823731660843,
0.21916291117668152,
-0.02534719556570053,
0.28011876344680786,
-0.2540474534034729,
-0.11193116009235382,
0.000845007598400116,
-0.334025114774704,
0.09270244091749191,
-0.1180080771446228,
-0.08785231411457062,
0.07461937516927719,
0.1838786005973816,
-0.3534415662288666,
0.3029385507106781,
-0.2397867888212204,
-0.05576207488775253,
0.3588072955608368,
0.4938142001628876,
0.002233298495411873,
0.7967617511749268,
-0.00011061892291763797,
0.05353102833032608,
0.337501585483551,
-0.005180042237043381,
-0.06838157027959824,
-0.09670981764793396,
0.12705686688423157,
-0.006540786940604448,
-0.20506836473941803,
-0.21504434943199158,
0.03392563760280609,
-0.036264125257730484,
-0.052060432732105255,
-0.6274397373199463,
0.13704989850521088,
0.3337576985359192,
0.20203472673892975,
0.2210952192544937,
-0.32084187865257263,
-0.22245019674301147,
-0.15001672506332397,
0.216275155544281,
-0.07000303268432617,
0.17056141793727875,
0.12356714904308319,
-0.06079749017953873,
0.028144724667072296,
0.1554781049489975,
-0.18896369636058807,
-0.22749470174312592,
0.13131369650363922,
-0.15742798149585724,
-0.2253183126449585,
-0.04895826429128647,
0.1041027083992958,
0.23433607816696167,
0.4135802388191223,
-0.5283428430557251,
-0.2937052547931671,
-0.05991502106189728,
0.02108442783355713,
-0.3564753830432892,
-0.053699709475040436,
0.08972726762294769,
0.21978090703487396,
0.1358124315738678,
-0.22047863900661469,
0.14517632126808167,
-0.07529198378324509,
0.027146250009536743,
-0.105387382209301,
0.2928350865840912,
-0.11963139474391937,
-0.08330699056386948,
0.13971589505672455,
-0.15472698211669922,
0.09724917262792587,
-0.2597275972366333,
-0.004040375351905823,
-0.10250993072986603,
-0.054300229996442795,
-0.14230045676231384,
-0.1305103302001953,
0.48133155703544617,
0.45372119545936584,
0.2500794231891632,
-0.050663456320762634,
0.05952627956867218,
0.02258927747607231,
-0.13849735260009766,
-0.019990500062704086,
0.446463406085968,
0.06951696425676346,
-0.017177265137434006,
0.17367854714393616,
0.5844176411628723,
-0.13330399990081787,
0.14620982110500336,
-0.0731080174446106,
-0.19100940227508545,
-0.09826019406318665,
0.1389855146408081,
0.4809075593948364,
-0.19772037863731384,
-0.25550881028175354,
0.017606018111109734,
0.05676323175430298,
-0.06891253590583801,
0.18268997967243195,
0.32016122341156006,
0.12697674334049225,
0.19077077507972717,
0.07529476284980774,
0.42400306463241577,
-0.15422514081001282,
-0.11233601719141006,
-0.22916314005851746,
0.21584245562553406,
-0.32787495851516724,
-0.11086677759885788,
0.2646735906600952,
0.3332204818725586,
0.008367515169084072,
0.013774043880403042,
0.6366074085235596,
0.04000500589609146,
0.11430121958255768,
0.2182680070400238,
0.2352234423160553,
0.10662104189395905,
-0.20737294852733612,
0.0935727134346962,
0.2817547619342804,
0.03226589411497116,
-0.4001914858818054,
-0.009421579539775848,
0.22304490208625793,
-0.2509647309780121,
0.09635055065155029,
0.22948260605335236,
-0.34835100173950195,
0.031453683972358704,
-0.23221302032470703,
0.172567218542099,
-0.32518061995506287,
0.14287197589874268,
0.18556086719036102,
-0.045319221913814545,
-0.2501612901687622,
0.03734701871871948,
0.16590899229049683,
0.44462114572525024,
0.0506645105779171,
-0.05058513954281807,
-0.2055414617061615,
0.17334160208702087,
0.17369496822357178,
0.21928620338439941,
-0.14719262719154358,
-0.2735174298286438,
-0.29106953740119934,
-0.0730503648519516,
0.05119014531373978,
-0.4424796998500824,
-0.17234234511852264,
-0.13083159923553467,
-0.30119043588638306,
0.21863918006420135,
0.20813699066638947,
-0.18059948086738586,
-0.012016402557492256,
-0.33324024081230164,
-0.3061886429786682,
0.11232368648052216,
-0.1915210783481598,
0.049065396189689636,
-0.24579185247421265,
-0.05772656947374344,
0.0040602535009384155,
-0.04932241886854172,
0.0361291840672493,
-0.22652673721313477,
-0.16731920838356018,
0.02738182246685028,
0.06964106112718582,
-0.06394219398498535,
0.10986462235450745,
0.016251787543296814,
0.21052196621894836,
0.02001882717013359,
0.15811844170093536,
0.1001494899392128,
-0.5807812213897705,
0.15277674794197083,
0.1323746293783188,
0.1388634741306305,
0.27917957305908203,
-0.5364103317260742,
-0.3134549558162689,
-0.030428122729063034,
-0.14633890986442566,
-0.03112969920039177,
0.14048820734024048,
0.28166311979293823,
0.15273192524909973,
0.03628057613968849,
-0.27926939725875854,
0.13196569681167603,
-0.13000109791755676,
0.38821715116500854,
-0.30564194917678833,
0.32862114906311035,
-0.07588770985603333,
0.03723996505141258,
-0.051047876477241516,
0.25457069277763367,
0.10362055152654648,
-0.36441007256507874,
0.18185919523239136,
0.16089075803756714,
0.022484945133328438,
0.10776764899492264,
0.2749273478984833,
0.5534853935241699,
0.10793697088956833,
-0.4116390347480774,
0.3704579174518585,
0.40071263909339905,
-0.230751633644104,
0.023905552923679352,
-0.10351753979921341,
0.6089016199111938,
-0.22696103155612946,
0.1790727972984314,
0.03366365283727646,
-0.010421055369079113,
0.3171018958091736,
-0.3537808656692505,
-0.16970714926719666,
-0.18057245016098022,
0.2875348627567291,
0.20116539299488068,
0.23665012419223785,
0.15889345109462738,
-0.14994797110557556,
0.08600687235593796,
0.09506623446941376,
-0.2327404022216797,
-0.08551093190908432,
0.037203073501586914,
-0.18201658129692078,
-0.22795599699020386,
0.09812141209840775,
0.06888744235038757,
0.306840717792511,
0.22341646254062653,
0.19249331951141357,
0.10577192902565002,
0.07405052334070206,
-0.20582780241966248,
0.24629077315330505,
-0.039842650294303894,
-0.11717750132083893,
0.06537701189517975,
0.027718374505639076,
0.1007414385676384,
-0.35029950737953186,
-0.20460227131843567,
0.11624161154031754,
0.02367030829191208,
-0.2836807668209076,
-0.050492215901613235,
-0.19698940217494965,
-0.5736656188964844,
-0.31073087453842163,
0.0964297205209732,
-0.17335185408592224,
-0.34794771671295166,
0.07709766179323196,
0.14208504557609558,
-0.26182353496551514,
0.2650207579135895,
-0.061177562922239304,
0.4066627025604248,
-0.4737185537815094,
-0.01120767928659916,
-0.29622381925582886,
-0.14225177466869354,
-0.046021826565265656,
0.08038845658302307,
0.4786491394042969,
0.03217360004782677,
0.3983750641345978,
-0.19829745590686798,
0.09060139209032059,
-0.5316441059112549,
-0.5609970092773438,
0.06297193467617035,
-0.10595494508743286,
-0.09508319944143295,
-0.013065077364444733,
0.064992755651474,
0.019409101456403732,
-0.13517844676971436,
-0.053580548614263535,
-0.26359912753105164,
-0.22776688635349274,
0.21447345614433289,
-0.11187933385372162,
0.052342869341373444,
-0.12866708636283875,
-0.06865235418081284,
0.04673997312784195,
-0.1884835809469223,
0.2654454708099365,
-0.21053649485111237,
-0.2663511037826538,
0.38857176899909973,
-0.34617191553115845,
-0.02494734153151512,
0.03483462706208229,
-0.03618665039539337,
-0.07007887214422226,
-0.40345650911331177,
-0.023512374609708786,
0.012818824499845505,
-0.047233644872903824,
0.0800754576921463,
-0.14796976745128632,
0.3451424837112427,
-0.0314546637237072,
-0.08192158490419388,
-0.40935003757476807,
0.03352215513586998,
0.2154233157634735,
0.29856815934181213,
-0.12281142175197601,
0.35357969999313354,
0.021030493080615997,
-0.10679864138364792,
0.03203742951154709,
-0.27472445368766785,
-0.004452452063560486,
-0.02170763537287712,
-0.24322041869163513,
-0.06313621997833252,
-0.026209603995084763,
-0.005797281861305237,
0.519349992275238,
0.1798923760652542,
-0.22689567506313324,
0.05743204429745674,
0.04551420360803604,
0.3789563477039337,
0.08488240092992783,
-0.4390549063682556,
0.15371771156787872,
0.12996257841587067,
-0.12165699899196625,
0.489498496055603,
-0.14502978324890137,
0.15214495360851288,
0.2177964150905609,
0.1617741584777832,
-0.19729605317115784,
-0.4033031761646271,
0.0642189159989357,
-0.4244045615196228,
0.014416389167308807,
-0.042773421853780746,
-0.3315638601779938,
-0.051625803112983704,
-0.20929130911827087,
0.2664707601070404,
0.4571709632873535,
-0.16012132167816162,
-0.13317368924617767,
-0.8004539608955383,
0.38627222180366516,
-0.29133498668670654,
0.6160179376602173,
-0.24042758345603943,
0.08555655926465988,
0.09576888382434845,
-0.035996366292238235,
-0.25771647691726685,
0.07870051264762878,
0.3455878794193268,
-0.1860876977443695,
0.08278216421604156,
0.20608650147914886,
-0.1175706535577774,
-0.14060939848423004,
-0.06736011803150177,
-0.1506984978914261,
0.18053176999092102,
0.03173106908798218,
0.3459205627441406,
-0.2861994504928589,
-0.3775887191295624,
0.28617122769355774,
0.29870185256004333,
0.24967622756958008,
0.13720253109931946,
-0.17338621616363525,
-0.5493564605712891,
-0.1373220980167389,
0.2461465299129486,
0.03792273998260498,
0.01396092027425766,
-0.4668073356151581,
0.2833082973957062,
0.07727116346359253,
-0.26871728897094727,
0.5272123217582703,
-0.14347147941589355,
0.13126850128173828,
0.2335890829563141,
0.23403778672218323,
0.07560228556394577,
0.010336823761463165,
0.4027267396450043,
0.35962724685668945,
-0.28126540780067444,
-0.6468427777290344,
-0.3701677918434143,
0.3382805287837982,
0.41623687744140625,
0.44357630610466003,
0.09398677945137024,
0.10596156865358353,
-0.2877765893936157,
-0.058616116642951965,
-0.2761581540107727,
0.11762867867946625,
0.22723986208438873,
0.13536149263381958,
-0.37937647104263306,
-0.027213308960199356,
0.007713258266448975,
0.23551501333713531,
-0.07795865833759308,
0.3683994710445404,
0.41973942518234253,
-0.4234558343887329,
0.15315845608711243,
-0.007603466510772705,
1.0860503911972046,
-0.4420916438102722,
0.29685133695602417,
0.18279540538787842,
-0.034577563405036926,
0.4850858747959137,
-0.014001816511154175,
-0.10213195532560349,
-0.3185679316520691,
0.037244752049446106,
0.08955621719360352,
0.14957192540168762,
0.3196287751197815,
0.09452944993972778,
-0.5834870934486389,
0.26453110575675964,
-0.18411573767662048,
0.468787282705307,
0.12040126323699951,
0.28154605627059937,
-0.05534795671701431,
-0.22749356925487518,
-0.13542598485946655,
0.19500461220741272,
0.022262856364250183,
0.08336648344993591,
-0.06846834719181061,
0.17827315628528595,
-0.05900048092007637,
0.0456404834985733,
-0.12039109319448471,
0.09768553078174591,
-0.20930345356464386,
-0.16375777125358582,
-0.060117144137620926,
-0.15151354670524597,
0.27517804503440857,
0.23110251128673553,
0.9707485437393188,
0.14742015302181244,
-0.0513542965054512,
0.1522381603717804,
0.0011297240853309631,
0.04577213525772095,
0.2466040700674057,
-0.29108649492263794,
0.1228560358285904,
0.21794015169143677,
-0.09015149623155594,
-0.07650230079889297,
0.20066480338573456,
-0.09088201820850372,
-0.30377212166786194,
-0.1506374329328537,
0.1147153228521347,
-0.5170769691467285,
0.037725064903497696,
0.1330622434616089,
-0.24732071161270142,
-0.11287134885787964,
0.15653665363788605,
-0.009235702455043793,
-0.24040378630161285,
-0.04742448031902313,
-0.06646868586540222,
-0.3099612593650818,
-0.1461370289325714,
-0.037654586136341095,
-0.19239291548728943,
-0.11392451822757721,
0.1332247257232666,
-0.16311438381671906,
0.13090205192565918,
-0.265350878238678,
-0.06298109143972397,
0.5170079469680786,
-0.22547373175621033,
0.2012604922056198,
-0.01144181378185749,
-0.21671965718269348,
0.1953076869249344,
-0.08138018846511841,
0.13659752905368805,
-0.022847890853881836,
-0.013459812849760056,
-0.09562533348798752,
-0.1936817616224289,
0.351451575756073,
-0.00358392670750618,
0.3273860812187195,
-0.03908818960189819,
0.20870669186115265,
-0.17937316000461578,
-0.1807508021593094,
-0.3657854497432709,
0.29917165637016296,
-0.07942065596580505,
-0.046364374458789825,
0.22513942420482635,
-0.22081363201141357,
-0.10087288916110992,
-0.24764326214790344,
0.17064407467842102,
-0.13668186962604523,
-0.07781216502189636,
-0.2297201156616211,
-0.15544025599956512,
0.09269097447395325,
-0.03861110657453537,
-0.054090216755867004,
0.3240002393722534,
-0.04447963833808899,
0.06533923745155334,
-0.33395618200302124,
0.02466895803809166,
0.18843898177146912,
-0.04074040800333023,
0.08761154115200043,
0.48438918590545654,
-0.20625033974647522,
-0.09829389303922653,
0.04195170849561691,
0.1026872918009758,
0.216133713722229,
-0.23425406217575073,
0.15254810452461243,
-0.09598790854215622,
-0.2151220291852951,
0.085065096616745,
0.3822736144065857,
0.40276211500167847,
0.21170392632484436,
0.16860145330429077,
0.1083408072590828,
-0.046882517635822296,
0.18032023310661316,
0.523311972618103,
0.21708793938159943,
-0.2948913276195526,
0.016645239666104317,
0.11642065644264221,
0.14879068732261658,
-0.2131061851978302,
0.05475842207670212,
0.3760952055454254,
-0.13475467264652252,
0.10974240303039551,
0.3557569682598114,
0.4980614483356476,
0.24455448985099792,
0.3160834312438965,
-0.056076835840940475,
0.4652259647846222,
0.02598775178194046,
0.4534125328063965,
-0.0966496616601944,
-0.02192891389131546,
0.13968349993228912,
0.15249720215797424,
0.114403635263443,
0.27135688066482544,
-0.2967013120651245,
0.08782577514648438,
0.7978910803794861,
-0.15198954939842224,
0.2562093138694763,
0.1719617396593094,
-0.22245940566062927,
-0.010087620466947556,
0.21289923787117004,
0.055077698081731796,
0.3261830508708954,
-0.07316574454307556,
0.5840410590171814,
-0.35957071185112,
-0.28901049494743347,
0.015754805877804756,
0.13957136869430542,
0.02145630493760109,
-0.07379800081253052,
-0.12614236772060394,
-0.1473846286535263,
-0.2920483350753784,
-0.0949290543794632,
-0.22018858790397644,
-0.03435886651277542,
0.11216327548027039,
-0.118155837059021,
-0.19823987782001495,
-0.1644424945116043,
0.027861105278134346,
-0.020907841622829437,
0.11743424087762833,
-0.13826997578144073,
0.2289198338985443,
0.18642574548721313,
-0.0740322470664978,
0.26380008459091187,
0.5490747690200806,
0.3939657211303711,
-0.23110580444335938,
-0.22530820965766907,
0.08181723952293396,
-0.1035802960395813,
-0.03017636016011238,
-0.1365763545036316,
0.07786741107702255,
-0.13869419693946838,
-0.31314802169799805,
-0.04082248732447624,
0.191089928150177,
-0.09568528085947037,
-0.2292437106370926,
0.14173446595668793,
-0.26979905366897583,
-0.21269668638706207,
0.2837013900279999,
-0.03090061992406845,
-0.00199059396982193,
-0.28788867592811584,
0.28141704201698303,
-0.26907801628112793,
-0.26919183135032654,
0.4438524544239044,
-0.04823879525065422,
0.1187167838215828,
-0.026986014097929,
0.09666085243225098,
0.27111315727233887,
0.4181256592273712,
0.33567050099372864,
0.15107648074626923,
-0.42119312286376953,
-0.544858992099762,
-0.6589451432228088,
0.3780207633972168,
0.003145746886730194,
-0.0991140604019165,
0.0402856320142746,
-0.08479447662830353,
0.32841846346855164,
-0.15694016218185425,
-0.17172254621982574,
-0.5048792362213135,
0.17946913838386536,
-0.2111613154411316,
-0.4244730472564697,
0.02241414785385132,
-0.02653275430202484,
-0.08751243352890015,
0.21197138726711273,
-0.3328474760055542,
0.030039004981517792,
0.2751343250274658,
-0.07008066028356552,
0.0189371295273304,
0.32692503929138184,
0.16333217918872833,
-0.21126028895378113,
0.044649090617895126,
-0.10202892124652863,
0.36257392168045044,
-0.06963295489549637,
-0.27884823083877563,
-0.1868252009153366,
-0.05712417885661125,
-0.21941515803337097,
0.3479246199131012,
-0.2516549825668335,
-0.03285742178559303,
-0.11009985953569412,
-0.0859874039888382,
0.00582085782662034,
-0.07126156240701675,
0.2512417435646057,
-0.10586448758840561,
-0.519166886806488,
0.17806319892406464,
-0.11427809298038483,
0.19453725218772888,
0.09727555513381958,
0.6413248777389526,
-0.15118408203125,
0.30110782384872437,
-0.41859060525894165,
-0.24046210944652557,
0.647101104259491,
0.04028576612472534,
-0.326809287071228,
-0.03895414248108864,
0.24715642631053925,
-0.4157928228378296,
-0.12887069582939148,
-0.3688119649887085,
0.12743064761161804,
0.1418898105621338,
0.13128146529197693,
-0.17549100518226624,
0.1347920298576355,
0.06843558698892593,
-0.12442770600318909,
-0.06943036615848541,
-0.013638541102409363,
0.2088598906993866,
0.029559453949332237,
0.15404857695102692,
0.03268042951822281
] |
https://github.com/huggingface/datasets/issues/5096 | Transfer some canonical datasets under an organization namespace | I can also continuing working on this if we agree this has become a priority now. | As discussed during our @huggingface/datasets meeting, we are planning to move some "canonical" dataset scripts under their corresponding organization namespace (if this does not exist).
On the contrary, if the dataset already exists under the organization namespace, we are deprecating the canonical one (and eventually delete it).
First, we should test it using a dummy dataset/organization.
TODO:
- [x] Test with a dummy dataset
- [x] Create dummy canonical dataset: https://huggingface.co/datasets/dummy_canonical_dataset
- [x] Create dummy organization: https://huggingface.co/dummy-canonical-org
- [x] Transfer dummy canonical dataset to dummy organization
- [ ] Transfer datasets
- [x] babi_qa => facebook
- [x] blbooks => TheBritishLibrary/blbooks
- [x] blbooksgenre => TheBritishLibrary/blbooksgenre
- [x] common_gen => allenai
- [x] commonsense_qa => tau
- [x] competition_math => hendrycks/competition_math
- [x] cord19 => allenai
- [x] emotion => dair-ai
- [ ] gem => GEM
- [x] hellaswag => Rowan
- [x] hendrycks_test => cais/mmlu
- [x] indonlu => indonlp
- [ ] multilingual_librispeech => facebook
- It already exists "facebook/multilingual_librispeech"
- [ ] oscar => oscar-corpus
- [x] peer_read => allenai
- [x] qasper => allenai
- [x] reddit => webis/tldr-17
- [x] russian_super_glue => russiannlp
- [x] rvl_cdip => aharley
- [x] s2orc => allenai
- [x] scicite => allenai
- [x] scifact => allenai
- [x] scitldr => allenai
- [x] swiss_judgment_prediction => rcds
- [x] the_pile => EleutherAI
- [ ] wmt14, wmt15, wmt16, wmt17, wmt18, wmt19,... => wmt
- [ ] Deprecate (and eventually remove) datasets that cannot be transferred because they already exist
- [x] banking77 => PolyAI
- [x] common_voice => mozilla-foundation
- [x] german_legal_entity_recognition => elenanereiss
- ...
EDIT: the list above is continuously being updated | 16 | Transfer some canonical datasets under an organization namespace
As discussed during our @huggingface/datasets meeting, we are planning to move some "canonical" dataset scripts under their corresponding organization namespace (if this does not exist).
On the contrary, if the dataset already exists under the organization namespace, we are deprecating the canonical one (and eventually delete it).
First, we should test it using a dummy dataset/organization.
TODO:
- [x] Test with a dummy dataset
- [x] Create dummy canonical dataset: https://huggingface.co/datasets/dummy_canonical_dataset
- [x] Create dummy organization: https://huggingface.co/dummy-canonical-org
- [x] Transfer dummy canonical dataset to dummy organization
- [ ] Transfer datasets
- [x] babi_qa => facebook
- [x] blbooks => TheBritishLibrary/blbooks
- [x] blbooksgenre => TheBritishLibrary/blbooksgenre
- [x] common_gen => allenai
- [x] commonsense_qa => tau
- [x] competition_math => hendrycks/competition_math
- [x] cord19 => allenai
- [x] emotion => dair-ai
- [ ] gem => GEM
- [x] hellaswag => Rowan
- [x] hendrycks_test => cais/mmlu
- [x] indonlu => indonlp
- [ ] multilingual_librispeech => facebook
- It already exists "facebook/multilingual_librispeech"
- [ ] oscar => oscar-corpus
- [x] peer_read => allenai
- [x] qasper => allenai
- [x] reddit => webis/tldr-17
- [x] russian_super_glue => russiannlp
- [x] rvl_cdip => aharley
- [x] s2orc => allenai
- [x] scicite => allenai
- [x] scifact => allenai
- [x] scitldr => allenai
- [x] swiss_judgment_prediction => rcds
- [x] the_pile => EleutherAI
- [ ] wmt14, wmt15, wmt16, wmt17, wmt18, wmt19,... => wmt
- [ ] Deprecate (and eventually remove) datasets that cannot be transferred because they already exist
- [x] banking77 => PolyAI
- [x] common_voice => mozilla-foundation
- [x] german_legal_entity_recognition => elenanereiss
- ...
EDIT: the list above is continuously being updated
I can also continuing working on this if we agree this has become a priority now. | [
0.03601277992129326,
0.3146805763244629,
-0.013221616856753826,
0.025197602808475494,
0.16879820823669434,
0.022613786160945892,
0.24629512429237366,
0.39038974046707153,
0.057000499218702316,
0.025375306606292725,
-0.312804639339447,
-0.06983106583356857,
-0.2716740369796753,
0.03336823731660843,
0.21916291117668152,
-0.02534719556570053,
0.28011876344680786,
-0.2540474534034729,
-0.11193116009235382,
0.000845007598400116,
-0.334025114774704,
0.09270244091749191,
-0.1180080771446228,
-0.08785231411457062,
0.07461937516927719,
0.1838786005973816,
-0.3534415662288666,
0.3029385507106781,
-0.2397867888212204,
-0.05576207488775253,
0.3588072955608368,
0.4938142001628876,
0.002233298495411873,
0.7967617511749268,
-0.00011061892291763797,
0.05353102833032608,
0.337501585483551,
-0.005180042237043381,
-0.06838157027959824,
-0.09670981764793396,
0.12705686688423157,
-0.006540786940604448,
-0.20506836473941803,
-0.21504434943199158,
0.03392563760280609,
-0.036264125257730484,
-0.052060432732105255,
-0.6274397373199463,
0.13704989850521088,
0.3337576985359192,
0.20203472673892975,
0.2210952192544937,
-0.32084187865257263,
-0.22245019674301147,
-0.15001672506332397,
0.216275155544281,
-0.07000303268432617,
0.17056141793727875,
0.12356714904308319,
-0.06079749017953873,
0.028144724667072296,
0.1554781049489975,
-0.18896369636058807,
-0.22749470174312592,
0.13131369650363922,
-0.15742798149585724,
-0.2253183126449585,
-0.04895826429128647,
0.1041027083992958,
0.23433607816696167,
0.4135802388191223,
-0.5283428430557251,
-0.2937052547931671,
-0.05991502106189728,
0.02108442783355713,
-0.3564753830432892,
-0.053699709475040436,
0.08972726762294769,
0.21978090703487396,
0.1358124315738678,
-0.22047863900661469,
0.14517632126808167,
-0.07529198378324509,
0.027146250009536743,
-0.105387382209301,
0.2928350865840912,
-0.11963139474391937,
-0.08330699056386948,
0.13971589505672455,
-0.15472698211669922,
0.09724917262792587,
-0.2597275972366333,
-0.004040375351905823,
-0.10250993072986603,
-0.054300229996442795,
-0.14230045676231384,
-0.1305103302001953,
0.48133155703544617,
0.45372119545936584,
0.2500794231891632,
-0.050663456320762634,
0.05952627956867218,
0.02258927747607231,
-0.13849735260009766,
-0.019990500062704086,
0.446463406085968,
0.06951696425676346,
-0.017177265137434006,
0.17367854714393616,
0.5844176411628723,
-0.13330399990081787,
0.14620982110500336,
-0.0731080174446106,
-0.19100940227508545,
-0.09826019406318665,
0.1389855146408081,
0.4809075593948364,
-0.19772037863731384,
-0.25550881028175354,
0.017606018111109734,
0.05676323175430298,
-0.06891253590583801,
0.18268997967243195,
0.32016122341156006,
0.12697674334049225,
0.19077077507972717,
0.07529476284980774,
0.42400306463241577,
-0.15422514081001282,
-0.11233601719141006,
-0.22916314005851746,
0.21584245562553406,
-0.32787495851516724,
-0.11086677759885788,
0.2646735906600952,
0.3332204818725586,
0.008367515169084072,
0.013774043880403042,
0.6366074085235596,
0.04000500589609146,
0.11430121958255768,
0.2182680070400238,
0.2352234423160553,
0.10662104189395905,
-0.20737294852733612,
0.0935727134346962,
0.2817547619342804,
0.03226589411497116,
-0.4001914858818054,
-0.009421579539775848,
0.22304490208625793,
-0.2509647309780121,
0.09635055065155029,
0.22948260605335236,
-0.34835100173950195,
0.031453683972358704,
-0.23221302032470703,
0.172567218542099,
-0.32518061995506287,
0.14287197589874268,
0.18556086719036102,
-0.045319221913814545,
-0.2501612901687622,
0.03734701871871948,
0.16590899229049683,
0.44462114572525024,
0.0506645105779171,
-0.05058513954281807,
-0.2055414617061615,
0.17334160208702087,
0.17369496822357178,
0.21928620338439941,
-0.14719262719154358,
-0.2735174298286438,
-0.29106953740119934,
-0.0730503648519516,
0.05119014531373978,
-0.4424796998500824,
-0.17234234511852264,
-0.13083159923553467,
-0.30119043588638306,
0.21863918006420135,
0.20813699066638947,
-0.18059948086738586,
-0.012016402557492256,
-0.33324024081230164,
-0.3061886429786682,
0.11232368648052216,
-0.1915210783481598,
0.049065396189689636,
-0.24579185247421265,
-0.05772656947374344,
0.0040602535009384155,
-0.04932241886854172,
0.0361291840672493,
-0.22652673721313477,
-0.16731920838356018,
0.02738182246685028,
0.06964106112718582,
-0.06394219398498535,
0.10986462235450745,
0.016251787543296814,
0.21052196621894836,
0.02001882717013359,
0.15811844170093536,
0.1001494899392128,
-0.5807812213897705,
0.15277674794197083,
0.1323746293783188,
0.1388634741306305,
0.27917957305908203,
-0.5364103317260742,
-0.3134549558162689,
-0.030428122729063034,
-0.14633890986442566,
-0.03112969920039177,
0.14048820734024048,
0.28166311979293823,
0.15273192524909973,
0.03628057613968849,
-0.27926939725875854,
0.13196569681167603,
-0.13000109791755676,
0.38821715116500854,
-0.30564194917678833,
0.32862114906311035,
-0.07588770985603333,
0.03723996505141258,
-0.051047876477241516,
0.25457069277763367,
0.10362055152654648,
-0.36441007256507874,
0.18185919523239136,
0.16089075803756714,
0.022484945133328438,
0.10776764899492264,
0.2749273478984833,
0.5534853935241699,
0.10793697088956833,
-0.4116390347480774,
0.3704579174518585,
0.40071263909339905,
-0.230751633644104,
0.023905552923679352,
-0.10351753979921341,
0.6089016199111938,
-0.22696103155612946,
0.1790727972984314,
0.03366365283727646,
-0.010421055369079113,
0.3171018958091736,
-0.3537808656692505,
-0.16970714926719666,
-0.18057245016098022,
0.2875348627567291,
0.20116539299488068,
0.23665012419223785,
0.15889345109462738,
-0.14994797110557556,
0.08600687235593796,
0.09506623446941376,
-0.2327404022216797,
-0.08551093190908432,
0.037203073501586914,
-0.18201658129692078,
-0.22795599699020386,
0.09812141209840775,
0.06888744235038757,
0.306840717792511,
0.22341646254062653,
0.19249331951141357,
0.10577192902565002,
0.07405052334070206,
-0.20582780241966248,
0.24629077315330505,
-0.039842650294303894,
-0.11717750132083893,
0.06537701189517975,
0.027718374505639076,
0.1007414385676384,
-0.35029950737953186,
-0.20460227131843567,
0.11624161154031754,
0.02367030829191208,
-0.2836807668209076,
-0.050492215901613235,
-0.19698940217494965,
-0.5736656188964844,
-0.31073087453842163,
0.0964297205209732,
-0.17335185408592224,
-0.34794771671295166,
0.07709766179323196,
0.14208504557609558,
-0.26182353496551514,
0.2650207579135895,
-0.061177562922239304,
0.4066627025604248,
-0.4737185537815094,
-0.01120767928659916,
-0.29622381925582886,
-0.14225177466869354,
-0.046021826565265656,
0.08038845658302307,
0.4786491394042969,
0.03217360004782677,
0.3983750641345978,
-0.19829745590686798,
0.09060139209032059,
-0.5316441059112549,
-0.5609970092773438,
0.06297193467617035,
-0.10595494508743286,
-0.09508319944143295,
-0.013065077364444733,
0.064992755651474,
0.019409101456403732,
-0.13517844676971436,
-0.053580548614263535,
-0.26359912753105164,
-0.22776688635349274,
0.21447345614433289,
-0.11187933385372162,
0.052342869341373444,
-0.12866708636283875,
-0.06865235418081284,
0.04673997312784195,
-0.1884835809469223,
0.2654454708099365,
-0.21053649485111237,
-0.2663511037826538,
0.38857176899909973,
-0.34617191553115845,
-0.02494734153151512,
0.03483462706208229,
-0.03618665039539337,
-0.07007887214422226,
-0.40345650911331177,
-0.023512374609708786,
0.012818824499845505,
-0.047233644872903824,
0.0800754576921463,
-0.14796976745128632,
0.3451424837112427,
-0.0314546637237072,
-0.08192158490419388,
-0.40935003757476807,
0.03352215513586998,
0.2154233157634735,
0.29856815934181213,
-0.12281142175197601,
0.35357969999313354,
0.021030493080615997,
-0.10679864138364792,
0.03203742951154709,
-0.27472445368766785,
-0.004452452063560486,
-0.02170763537287712,
-0.24322041869163513,
-0.06313621997833252,
-0.026209603995084763,
-0.005797281861305237,
0.519349992275238,
0.1798923760652542,
-0.22689567506313324,
0.05743204429745674,
0.04551420360803604,
0.3789563477039337,
0.08488240092992783,
-0.4390549063682556,
0.15371771156787872,
0.12996257841587067,
-0.12165699899196625,
0.489498496055603,
-0.14502978324890137,
0.15214495360851288,
0.2177964150905609,
0.1617741584777832,
-0.19729605317115784,
-0.4033031761646271,
0.0642189159989357,
-0.4244045615196228,
0.014416389167308807,
-0.042773421853780746,
-0.3315638601779938,
-0.051625803112983704,
-0.20929130911827087,
0.2664707601070404,
0.4571709632873535,
-0.16012132167816162,
-0.13317368924617767,
-0.8004539608955383,
0.38627222180366516,
-0.29133498668670654,
0.6160179376602173,
-0.24042758345603943,
0.08555655926465988,
0.09576888382434845,
-0.035996366292238235,
-0.25771647691726685,
0.07870051264762878,
0.3455878794193268,
-0.1860876977443695,
0.08278216421604156,
0.20608650147914886,
-0.1175706535577774,
-0.14060939848423004,
-0.06736011803150177,
-0.1506984978914261,
0.18053176999092102,
0.03173106908798218,
0.3459205627441406,
-0.2861994504928589,
-0.3775887191295624,
0.28617122769355774,
0.29870185256004333,
0.24967622756958008,
0.13720253109931946,
-0.17338621616363525,
-0.5493564605712891,
-0.1373220980167389,
0.2461465299129486,
0.03792273998260498,
0.01396092027425766,
-0.4668073356151581,
0.2833082973957062,
0.07727116346359253,
-0.26871728897094727,
0.5272123217582703,
-0.14347147941589355,
0.13126850128173828,
0.2335890829563141,
0.23403778672218323,
0.07560228556394577,
0.010336823761463165,
0.4027267396450043,
0.35962724685668945,
-0.28126540780067444,
-0.6468427777290344,
-0.3701677918434143,
0.3382805287837982,
0.41623687744140625,
0.44357630610466003,
0.09398677945137024,
0.10596156865358353,
-0.2877765893936157,
-0.058616116642951965,
-0.2761581540107727,
0.11762867867946625,
0.22723986208438873,
0.13536149263381958,
-0.37937647104263306,
-0.027213308960199356,
0.007713258266448975,
0.23551501333713531,
-0.07795865833759308,
0.3683994710445404,
0.41973942518234253,
-0.4234558343887329,
0.15315845608711243,
-0.007603466510772705,
1.0860503911972046,
-0.4420916438102722,
0.29685133695602417,
0.18279540538787842,
-0.034577563405036926,
0.4850858747959137,
-0.014001816511154175,
-0.10213195532560349,
-0.3185679316520691,
0.037244752049446106,
0.08955621719360352,
0.14957192540168762,
0.3196287751197815,
0.09452944993972778,
-0.5834870934486389,
0.26453110575675964,
-0.18411573767662048,
0.468787282705307,
0.12040126323699951,
0.28154605627059937,
-0.05534795671701431,
-0.22749356925487518,
-0.13542598485946655,
0.19500461220741272,
0.022262856364250183,
0.08336648344993591,
-0.06846834719181061,
0.17827315628528595,
-0.05900048092007637,
0.0456404834985733,
-0.12039109319448471,
0.09768553078174591,
-0.20930345356464386,
-0.16375777125358582,
-0.060117144137620926,
-0.15151354670524597,
0.27517804503440857,
0.23110251128673553,
0.9707485437393188,
0.14742015302181244,
-0.0513542965054512,
0.1522381603717804,
0.0011297240853309631,
0.04577213525772095,
0.2466040700674057,
-0.29108649492263794,
0.1228560358285904,
0.21794015169143677,
-0.09015149623155594,
-0.07650230079889297,
0.20066480338573456,
-0.09088201820850372,
-0.30377212166786194,
-0.1506374329328537,
0.1147153228521347,
-0.5170769691467285,
0.037725064903497696,
0.1330622434616089,
-0.24732071161270142,
-0.11287134885787964,
0.15653665363788605,
-0.009235702455043793,
-0.24040378630161285,
-0.04742448031902313,
-0.06646868586540222,
-0.3099612593650818,
-0.1461370289325714,
-0.037654586136341095,
-0.19239291548728943,
-0.11392451822757721,
0.1332247257232666,
-0.16311438381671906,
0.13090205192565918,
-0.265350878238678,
-0.06298109143972397,
0.5170079469680786,
-0.22547373175621033,
0.2012604922056198,
-0.01144181378185749,
-0.21671965718269348,
0.1953076869249344,
-0.08138018846511841,
0.13659752905368805,
-0.022847890853881836,
-0.013459812849760056,
-0.09562533348798752,
-0.1936817616224289,
0.351451575756073,
-0.00358392670750618,
0.3273860812187195,
-0.03908818960189819,
0.20870669186115265,
-0.17937316000461578,
-0.1807508021593094,
-0.3657854497432709,
0.29917165637016296,
-0.07942065596580505,
-0.046364374458789825,
0.22513942420482635,
-0.22081363201141357,
-0.10087288916110992,
-0.24764326214790344,
0.17064407467842102,
-0.13668186962604523,
-0.07781216502189636,
-0.2297201156616211,
-0.15544025599956512,
0.09269097447395325,
-0.03861110657453537,
-0.054090216755867004,
0.3240002393722534,
-0.04447963833808899,
0.06533923745155334,
-0.33395618200302124,
0.02466895803809166,
0.18843898177146912,
-0.04074040800333023,
0.08761154115200043,
0.48438918590545654,
-0.20625033974647522,
-0.09829389303922653,
0.04195170849561691,
0.1026872918009758,
0.216133713722229,
-0.23425406217575073,
0.15254810452461243,
-0.09598790854215622,
-0.2151220291852951,
0.085065096616745,
0.3822736144065857,
0.40276211500167847,
0.21170392632484436,
0.16860145330429077,
0.1083408072590828,
-0.046882517635822296,
0.18032023310661316,
0.523311972618103,
0.21708793938159943,
-0.2948913276195526,
0.016645239666104317,
0.11642065644264221,
0.14879068732261658,
-0.2131061851978302,
0.05475842207670212,
0.3760952055454254,
-0.13475467264652252,
0.10974240303039551,
0.3557569682598114,
0.4980614483356476,
0.24455448985099792,
0.3160834312438965,
-0.056076835840940475,
0.4652259647846222,
0.02598775178194046,
0.4534125328063965,
-0.0966496616601944,
-0.02192891389131546,
0.13968349993228912,
0.15249720215797424,
0.114403635263443,
0.27135688066482544,
-0.2967013120651245,
0.08782577514648438,
0.7978910803794861,
-0.15198954939842224,
0.2562093138694763,
0.1719617396593094,
-0.22245940566062927,
-0.010087620466947556,
0.21289923787117004,
0.055077698081731796,
0.3261830508708954,
-0.07316574454307556,
0.5840410590171814,
-0.35957071185112,
-0.28901049494743347,
0.015754805877804756,
0.13957136869430542,
0.02145630493760109,
-0.07379800081253052,
-0.12614236772060394,
-0.1473846286535263,
-0.2920483350753784,
-0.0949290543794632,
-0.22018858790397644,
-0.03435886651277542,
0.11216327548027039,
-0.118155837059021,
-0.19823987782001495,
-0.1644424945116043,
0.027861105278134346,
-0.020907841622829437,
0.11743424087762833,
-0.13826997578144073,
0.2289198338985443,
0.18642574548721313,
-0.0740322470664978,
0.26380008459091187,
0.5490747690200806,
0.3939657211303711,
-0.23110580444335938,
-0.22530820965766907,
0.08181723952293396,
-0.1035802960395813,
-0.03017636016011238,
-0.1365763545036316,
0.07786741107702255,
-0.13869419693946838,
-0.31314802169799805,
-0.04082248732447624,
0.191089928150177,
-0.09568528085947037,
-0.2292437106370926,
0.14173446595668793,
-0.26979905366897583,
-0.21269668638706207,
0.2837013900279999,
-0.03090061992406845,
-0.00199059396982193,
-0.28788867592811584,
0.28141704201698303,
-0.26907801628112793,
-0.26919183135032654,
0.4438524544239044,
-0.04823879525065422,
0.1187167838215828,
-0.026986014097929,
0.09666085243225098,
0.27111315727233887,
0.4181256592273712,
0.33567050099372864,
0.15107648074626923,
-0.42119312286376953,
-0.544858992099762,
-0.6589451432228088,
0.3780207633972168,
0.003145746886730194,
-0.0991140604019165,
0.0402856320142746,
-0.08479447662830353,
0.32841846346855164,
-0.15694016218185425,
-0.17172254621982574,
-0.5048792362213135,
0.17946913838386536,
-0.2111613154411316,
-0.4244730472564697,
0.02241414785385132,
-0.02653275430202484,
-0.08751243352890015,
0.21197138726711273,
-0.3328474760055542,
0.030039004981517792,
0.2751343250274658,
-0.07008066028356552,
0.0189371295273304,
0.32692503929138184,
0.16333217918872833,
-0.21126028895378113,
0.044649090617895126,
-0.10202892124652863,
0.36257392168045044,
-0.06963295489549637,
-0.27884823083877563,
-0.1868252009153366,
-0.05712417885661125,
-0.21941515803337097,
0.3479246199131012,
-0.2516549825668335,
-0.03285742178559303,
-0.11009985953569412,
-0.0859874039888382,
0.00582085782662034,
-0.07126156240701675,
0.2512417435646057,
-0.10586448758840561,
-0.519166886806488,
0.17806319892406464,
-0.11427809298038483,
0.19453725218772888,
0.09727555513381958,
0.6413248777389526,
-0.15118408203125,
0.30110782384872437,
-0.41859060525894165,
-0.24046210944652557,
0.647101104259491,
0.04028576612472534,
-0.326809287071228,
-0.03895414248108864,
0.24715642631053925,
-0.4157928228378296,
-0.12887069582939148,
-0.3688119649887085,
0.12743064761161804,
0.1418898105621338,
0.13128146529197693,
-0.17549100518226624,
0.1347920298576355,
0.06843558698892593,
-0.12442770600318909,
-0.06943036615848541,
-0.013638541102409363,
0.2088598906993866,
0.029559453949332237,
0.15404857695102692,
0.03268042951822281
] |
https://github.com/huggingface/datasets/issues/5096 | Transfer some canonical datasets under an organization namespace | cool stuff!
this morning on my side i moved huggingface.co/ctrl (a not very used model) to its rightful entity | As discussed during our @huggingface/datasets meeting, we are planning to move some "canonical" dataset scripts under their corresponding organization namespace (if this does not exist).
On the contrary, if the dataset already exists under the organization namespace, we are deprecating the canonical one (and eventually delete it).
First, we should test it using a dummy dataset/organization.
TODO:
- [x] Test with a dummy dataset
- [x] Create dummy canonical dataset: https://huggingface.co/datasets/dummy_canonical_dataset
- [x] Create dummy organization: https://huggingface.co/dummy-canonical-org
- [x] Transfer dummy canonical dataset to dummy organization
- [ ] Transfer datasets
- [x] babi_qa => facebook
- [x] blbooks => TheBritishLibrary/blbooks
- [x] blbooksgenre => TheBritishLibrary/blbooksgenre
- [x] common_gen => allenai
- [x] commonsense_qa => tau
- [x] competition_math => hendrycks/competition_math
- [x] cord19 => allenai
- [x] emotion => dair-ai
- [ ] gem => GEM
- [x] hellaswag => Rowan
- [x] hendrycks_test => cais/mmlu
- [x] indonlu => indonlp
- [ ] multilingual_librispeech => facebook
- It already exists "facebook/multilingual_librispeech"
- [ ] oscar => oscar-corpus
- [x] peer_read => allenai
- [x] qasper => allenai
- [x] reddit => webis/tldr-17
- [x] russian_super_glue => russiannlp
- [x] rvl_cdip => aharley
- [x] s2orc => allenai
- [x] scicite => allenai
- [x] scifact => allenai
- [x] scitldr => allenai
- [x] swiss_judgment_prediction => rcds
- [x] the_pile => EleutherAI
- [ ] wmt14, wmt15, wmt16, wmt17, wmt18, wmt19,... => wmt
- [ ] Deprecate (and eventually remove) datasets that cannot be transferred because they already exist
- [x] banking77 => PolyAI
- [x] common_voice => mozilla-foundation
- [x] german_legal_entity_recognition => elenanereiss
- ...
EDIT: the list above is continuously being updated | 19 | Transfer some canonical datasets under an organization namespace
As discussed during our @huggingface/datasets meeting, we are planning to move some "canonical" dataset scripts under their corresponding organization namespace (if this does not exist).
On the contrary, if the dataset already exists under the organization namespace, we are deprecating the canonical one (and eventually delete it).
First, we should test it using a dummy dataset/organization.
TODO:
- [x] Test with a dummy dataset
- [x] Create dummy canonical dataset: https://huggingface.co/datasets/dummy_canonical_dataset
- [x] Create dummy organization: https://huggingface.co/dummy-canonical-org
- [x] Transfer dummy canonical dataset to dummy organization
- [ ] Transfer datasets
- [x] babi_qa => facebook
- [x] blbooks => TheBritishLibrary/blbooks
- [x] blbooksgenre => TheBritishLibrary/blbooksgenre
- [x] common_gen => allenai
- [x] commonsense_qa => tau
- [x] competition_math => hendrycks/competition_math
- [x] cord19 => allenai
- [x] emotion => dair-ai
- [ ] gem => GEM
- [x] hellaswag => Rowan
- [x] hendrycks_test => cais/mmlu
- [x] indonlu => indonlp
- [ ] multilingual_librispeech => facebook
- It already exists "facebook/multilingual_librispeech"
- [ ] oscar => oscar-corpus
- [x] peer_read => allenai
- [x] qasper => allenai
- [x] reddit => webis/tldr-17
- [x] russian_super_glue => russiannlp
- [x] rvl_cdip => aharley
- [x] s2orc => allenai
- [x] scicite => allenai
- [x] scifact => allenai
- [x] scitldr => allenai
- [x] swiss_judgment_prediction => rcds
- [x] the_pile => EleutherAI
- [ ] wmt14, wmt15, wmt16, wmt17, wmt18, wmt19,... => wmt
- [ ] Deprecate (and eventually remove) datasets that cannot be transferred because they already exist
- [x] banking77 => PolyAI
- [x] common_voice => mozilla-foundation
- [x] german_legal_entity_recognition => elenanereiss
- ...
EDIT: the list above is continuously being updated
cool stuff!
this morning on my side i moved huggingface.co/ctrl (a not very used model) to its rightful entity | [
0.03601277992129326,
0.3146805763244629,
-0.013221616856753826,
0.025197602808475494,
0.16879820823669434,
0.022613786160945892,
0.24629512429237366,
0.39038974046707153,
0.057000499218702316,
0.025375306606292725,
-0.312804639339447,
-0.06983106583356857,
-0.2716740369796753,
0.03336823731660843,
0.21916291117668152,
-0.02534719556570053,
0.28011876344680786,
-0.2540474534034729,
-0.11193116009235382,
0.000845007598400116,
-0.334025114774704,
0.09270244091749191,
-0.1180080771446228,
-0.08785231411457062,
0.07461937516927719,
0.1838786005973816,
-0.3534415662288666,
0.3029385507106781,
-0.2397867888212204,
-0.05576207488775253,
0.3588072955608368,
0.4938142001628876,
0.002233298495411873,
0.7967617511749268,
-0.00011061892291763797,
0.05353102833032608,
0.337501585483551,
-0.005180042237043381,
-0.06838157027959824,
-0.09670981764793396,
0.12705686688423157,
-0.006540786940604448,
-0.20506836473941803,
-0.21504434943199158,
0.03392563760280609,
-0.036264125257730484,
-0.052060432732105255,
-0.6274397373199463,
0.13704989850521088,
0.3337576985359192,
0.20203472673892975,
0.2210952192544937,
-0.32084187865257263,
-0.22245019674301147,
-0.15001672506332397,
0.216275155544281,
-0.07000303268432617,
0.17056141793727875,
0.12356714904308319,
-0.06079749017953873,
0.028144724667072296,
0.1554781049489975,
-0.18896369636058807,
-0.22749470174312592,
0.13131369650363922,
-0.15742798149585724,
-0.2253183126449585,
-0.04895826429128647,
0.1041027083992958,
0.23433607816696167,
0.4135802388191223,
-0.5283428430557251,
-0.2937052547931671,
-0.05991502106189728,
0.02108442783355713,
-0.3564753830432892,
-0.053699709475040436,
0.08972726762294769,
0.21978090703487396,
0.1358124315738678,
-0.22047863900661469,
0.14517632126808167,
-0.07529198378324509,
0.027146250009536743,
-0.105387382209301,
0.2928350865840912,
-0.11963139474391937,
-0.08330699056386948,
0.13971589505672455,
-0.15472698211669922,
0.09724917262792587,
-0.2597275972366333,
-0.004040375351905823,
-0.10250993072986603,
-0.054300229996442795,
-0.14230045676231384,
-0.1305103302001953,
0.48133155703544617,
0.45372119545936584,
0.2500794231891632,
-0.050663456320762634,
0.05952627956867218,
0.02258927747607231,
-0.13849735260009766,
-0.019990500062704086,
0.446463406085968,
0.06951696425676346,
-0.017177265137434006,
0.17367854714393616,
0.5844176411628723,
-0.13330399990081787,
0.14620982110500336,
-0.0731080174446106,
-0.19100940227508545,
-0.09826019406318665,
0.1389855146408081,
0.4809075593948364,
-0.19772037863731384,
-0.25550881028175354,
0.017606018111109734,
0.05676323175430298,
-0.06891253590583801,
0.18268997967243195,
0.32016122341156006,
0.12697674334049225,
0.19077077507972717,
0.07529476284980774,
0.42400306463241577,
-0.15422514081001282,
-0.11233601719141006,
-0.22916314005851746,
0.21584245562553406,
-0.32787495851516724,
-0.11086677759885788,
0.2646735906600952,
0.3332204818725586,
0.008367515169084072,
0.013774043880403042,
0.6366074085235596,
0.04000500589609146,
0.11430121958255768,
0.2182680070400238,
0.2352234423160553,
0.10662104189395905,
-0.20737294852733612,
0.0935727134346962,
0.2817547619342804,
0.03226589411497116,
-0.4001914858818054,
-0.009421579539775848,
0.22304490208625793,
-0.2509647309780121,
0.09635055065155029,
0.22948260605335236,
-0.34835100173950195,
0.031453683972358704,
-0.23221302032470703,
0.172567218542099,
-0.32518061995506287,
0.14287197589874268,
0.18556086719036102,
-0.045319221913814545,
-0.2501612901687622,
0.03734701871871948,
0.16590899229049683,
0.44462114572525024,
0.0506645105779171,
-0.05058513954281807,
-0.2055414617061615,
0.17334160208702087,
0.17369496822357178,
0.21928620338439941,
-0.14719262719154358,
-0.2735174298286438,
-0.29106953740119934,
-0.0730503648519516,
0.05119014531373978,
-0.4424796998500824,
-0.17234234511852264,
-0.13083159923553467,
-0.30119043588638306,
0.21863918006420135,
0.20813699066638947,
-0.18059948086738586,
-0.012016402557492256,
-0.33324024081230164,
-0.3061886429786682,
0.11232368648052216,
-0.1915210783481598,
0.049065396189689636,
-0.24579185247421265,
-0.05772656947374344,
0.0040602535009384155,
-0.04932241886854172,
0.0361291840672493,
-0.22652673721313477,
-0.16731920838356018,
0.02738182246685028,
0.06964106112718582,
-0.06394219398498535,
0.10986462235450745,
0.016251787543296814,
0.21052196621894836,
0.02001882717013359,
0.15811844170093536,
0.1001494899392128,
-0.5807812213897705,
0.15277674794197083,
0.1323746293783188,
0.1388634741306305,
0.27917957305908203,
-0.5364103317260742,
-0.3134549558162689,
-0.030428122729063034,
-0.14633890986442566,
-0.03112969920039177,
0.14048820734024048,
0.28166311979293823,
0.15273192524909973,
0.03628057613968849,
-0.27926939725875854,
0.13196569681167603,
-0.13000109791755676,
0.38821715116500854,
-0.30564194917678833,
0.32862114906311035,
-0.07588770985603333,
0.03723996505141258,
-0.051047876477241516,
0.25457069277763367,
0.10362055152654648,
-0.36441007256507874,
0.18185919523239136,
0.16089075803756714,
0.022484945133328438,
0.10776764899492264,
0.2749273478984833,
0.5534853935241699,
0.10793697088956833,
-0.4116390347480774,
0.3704579174518585,
0.40071263909339905,
-0.230751633644104,
0.023905552923679352,
-0.10351753979921341,
0.6089016199111938,
-0.22696103155612946,
0.1790727972984314,
0.03366365283727646,
-0.010421055369079113,
0.3171018958091736,
-0.3537808656692505,
-0.16970714926719666,
-0.18057245016098022,
0.2875348627567291,
0.20116539299488068,
0.23665012419223785,
0.15889345109462738,
-0.14994797110557556,
0.08600687235593796,
0.09506623446941376,
-0.2327404022216797,
-0.08551093190908432,
0.037203073501586914,
-0.18201658129692078,
-0.22795599699020386,
0.09812141209840775,
0.06888744235038757,
0.306840717792511,
0.22341646254062653,
0.19249331951141357,
0.10577192902565002,
0.07405052334070206,
-0.20582780241966248,
0.24629077315330505,
-0.039842650294303894,
-0.11717750132083893,
0.06537701189517975,
0.027718374505639076,
0.1007414385676384,
-0.35029950737953186,
-0.20460227131843567,
0.11624161154031754,
0.02367030829191208,
-0.2836807668209076,
-0.050492215901613235,
-0.19698940217494965,
-0.5736656188964844,
-0.31073087453842163,
0.0964297205209732,
-0.17335185408592224,
-0.34794771671295166,
0.07709766179323196,
0.14208504557609558,
-0.26182353496551514,
0.2650207579135895,
-0.061177562922239304,
0.4066627025604248,
-0.4737185537815094,
-0.01120767928659916,
-0.29622381925582886,
-0.14225177466869354,
-0.046021826565265656,
0.08038845658302307,
0.4786491394042969,
0.03217360004782677,
0.3983750641345978,
-0.19829745590686798,
0.09060139209032059,
-0.5316441059112549,
-0.5609970092773438,
0.06297193467617035,
-0.10595494508743286,
-0.09508319944143295,
-0.013065077364444733,
0.064992755651474,
0.019409101456403732,
-0.13517844676971436,
-0.053580548614263535,
-0.26359912753105164,
-0.22776688635349274,
0.21447345614433289,
-0.11187933385372162,
0.052342869341373444,
-0.12866708636283875,
-0.06865235418081284,
0.04673997312784195,
-0.1884835809469223,
0.2654454708099365,
-0.21053649485111237,
-0.2663511037826538,
0.38857176899909973,
-0.34617191553115845,
-0.02494734153151512,
0.03483462706208229,
-0.03618665039539337,
-0.07007887214422226,
-0.40345650911331177,
-0.023512374609708786,
0.012818824499845505,
-0.047233644872903824,
0.0800754576921463,
-0.14796976745128632,
0.3451424837112427,
-0.0314546637237072,
-0.08192158490419388,
-0.40935003757476807,
0.03352215513586998,
0.2154233157634735,
0.29856815934181213,
-0.12281142175197601,
0.35357969999313354,
0.021030493080615997,
-0.10679864138364792,
0.03203742951154709,
-0.27472445368766785,
-0.004452452063560486,
-0.02170763537287712,
-0.24322041869163513,
-0.06313621997833252,
-0.026209603995084763,
-0.005797281861305237,
0.519349992275238,
0.1798923760652542,
-0.22689567506313324,
0.05743204429745674,
0.04551420360803604,
0.3789563477039337,
0.08488240092992783,
-0.4390549063682556,
0.15371771156787872,
0.12996257841587067,
-0.12165699899196625,
0.489498496055603,
-0.14502978324890137,
0.15214495360851288,
0.2177964150905609,
0.1617741584777832,
-0.19729605317115784,
-0.4033031761646271,
0.0642189159989357,
-0.4244045615196228,
0.014416389167308807,
-0.042773421853780746,
-0.3315638601779938,
-0.051625803112983704,
-0.20929130911827087,
0.2664707601070404,
0.4571709632873535,
-0.16012132167816162,
-0.13317368924617767,
-0.8004539608955383,
0.38627222180366516,
-0.29133498668670654,
0.6160179376602173,
-0.24042758345603943,
0.08555655926465988,
0.09576888382434845,
-0.035996366292238235,
-0.25771647691726685,
0.07870051264762878,
0.3455878794193268,
-0.1860876977443695,
0.08278216421604156,
0.20608650147914886,
-0.1175706535577774,
-0.14060939848423004,
-0.06736011803150177,
-0.1506984978914261,
0.18053176999092102,
0.03173106908798218,
0.3459205627441406,
-0.2861994504928589,
-0.3775887191295624,
0.28617122769355774,
0.29870185256004333,
0.24967622756958008,
0.13720253109931946,
-0.17338621616363525,
-0.5493564605712891,
-0.1373220980167389,
0.2461465299129486,
0.03792273998260498,
0.01396092027425766,
-0.4668073356151581,
0.2833082973957062,
0.07727116346359253,
-0.26871728897094727,
0.5272123217582703,
-0.14347147941589355,
0.13126850128173828,
0.2335890829563141,
0.23403778672218323,
0.07560228556394577,
0.010336823761463165,
0.4027267396450043,
0.35962724685668945,
-0.28126540780067444,
-0.6468427777290344,
-0.3701677918434143,
0.3382805287837982,
0.41623687744140625,
0.44357630610466003,
0.09398677945137024,
0.10596156865358353,
-0.2877765893936157,
-0.058616116642951965,
-0.2761581540107727,
0.11762867867946625,
0.22723986208438873,
0.13536149263381958,
-0.37937647104263306,
-0.027213308960199356,
0.007713258266448975,
0.23551501333713531,
-0.07795865833759308,
0.3683994710445404,
0.41973942518234253,
-0.4234558343887329,
0.15315845608711243,
-0.007603466510772705,
1.0860503911972046,
-0.4420916438102722,
0.29685133695602417,
0.18279540538787842,
-0.034577563405036926,
0.4850858747959137,
-0.014001816511154175,
-0.10213195532560349,
-0.3185679316520691,
0.037244752049446106,
0.08955621719360352,
0.14957192540168762,
0.3196287751197815,
0.09452944993972778,
-0.5834870934486389,
0.26453110575675964,
-0.18411573767662048,
0.468787282705307,
0.12040126323699951,
0.28154605627059937,
-0.05534795671701431,
-0.22749356925487518,
-0.13542598485946655,
0.19500461220741272,
0.022262856364250183,
0.08336648344993591,
-0.06846834719181061,
0.17827315628528595,
-0.05900048092007637,
0.0456404834985733,
-0.12039109319448471,
0.09768553078174591,
-0.20930345356464386,
-0.16375777125358582,
-0.060117144137620926,
-0.15151354670524597,
0.27517804503440857,
0.23110251128673553,
0.9707485437393188,
0.14742015302181244,
-0.0513542965054512,
0.1522381603717804,
0.0011297240853309631,
0.04577213525772095,
0.2466040700674057,
-0.29108649492263794,
0.1228560358285904,
0.21794015169143677,
-0.09015149623155594,
-0.07650230079889297,
0.20066480338573456,
-0.09088201820850372,
-0.30377212166786194,
-0.1506374329328537,
0.1147153228521347,
-0.5170769691467285,
0.037725064903497696,
0.1330622434616089,
-0.24732071161270142,
-0.11287134885787964,
0.15653665363788605,
-0.009235702455043793,
-0.24040378630161285,
-0.04742448031902313,
-0.06646868586540222,
-0.3099612593650818,
-0.1461370289325714,
-0.037654586136341095,
-0.19239291548728943,
-0.11392451822757721,
0.1332247257232666,
-0.16311438381671906,
0.13090205192565918,
-0.265350878238678,
-0.06298109143972397,
0.5170079469680786,
-0.22547373175621033,
0.2012604922056198,
-0.01144181378185749,
-0.21671965718269348,
0.1953076869249344,
-0.08138018846511841,
0.13659752905368805,
-0.022847890853881836,
-0.013459812849760056,
-0.09562533348798752,
-0.1936817616224289,
0.351451575756073,
-0.00358392670750618,
0.3273860812187195,
-0.03908818960189819,
0.20870669186115265,
-0.17937316000461578,
-0.1807508021593094,
-0.3657854497432709,
0.29917165637016296,
-0.07942065596580505,
-0.046364374458789825,
0.22513942420482635,
-0.22081363201141357,
-0.10087288916110992,
-0.24764326214790344,
0.17064407467842102,
-0.13668186962604523,
-0.07781216502189636,
-0.2297201156616211,
-0.15544025599956512,
0.09269097447395325,
-0.03861110657453537,
-0.054090216755867004,
0.3240002393722534,
-0.04447963833808899,
0.06533923745155334,
-0.33395618200302124,
0.02466895803809166,
0.18843898177146912,
-0.04074040800333023,
0.08761154115200043,
0.48438918590545654,
-0.20625033974647522,
-0.09829389303922653,
0.04195170849561691,
0.1026872918009758,
0.216133713722229,
-0.23425406217575073,
0.15254810452461243,
-0.09598790854215622,
-0.2151220291852951,
0.085065096616745,
0.3822736144065857,
0.40276211500167847,
0.21170392632484436,
0.16860145330429077,
0.1083408072590828,
-0.046882517635822296,
0.18032023310661316,
0.523311972618103,
0.21708793938159943,
-0.2948913276195526,
0.016645239666104317,
0.11642065644264221,
0.14879068732261658,
-0.2131061851978302,
0.05475842207670212,
0.3760952055454254,
-0.13475467264652252,
0.10974240303039551,
0.3557569682598114,
0.4980614483356476,
0.24455448985099792,
0.3160834312438965,
-0.056076835840940475,
0.4652259647846222,
0.02598775178194046,
0.4534125328063965,
-0.0966496616601944,
-0.02192891389131546,
0.13968349993228912,
0.15249720215797424,
0.114403635263443,
0.27135688066482544,
-0.2967013120651245,
0.08782577514648438,
0.7978910803794861,
-0.15198954939842224,
0.2562093138694763,
0.1719617396593094,
-0.22245940566062927,
-0.010087620466947556,
0.21289923787117004,
0.055077698081731796,
0.3261830508708954,
-0.07316574454307556,
0.5840410590171814,
-0.35957071185112,
-0.28901049494743347,
0.015754805877804756,
0.13957136869430542,
0.02145630493760109,
-0.07379800081253052,
-0.12614236772060394,
-0.1473846286535263,
-0.2920483350753784,
-0.0949290543794632,
-0.22018858790397644,
-0.03435886651277542,
0.11216327548027039,
-0.118155837059021,
-0.19823987782001495,
-0.1644424945116043,
0.027861105278134346,
-0.020907841622829437,
0.11743424087762833,
-0.13826997578144073,
0.2289198338985443,
0.18642574548721313,
-0.0740322470664978,
0.26380008459091187,
0.5490747690200806,
0.3939657211303711,
-0.23110580444335938,
-0.22530820965766907,
0.08181723952293396,
-0.1035802960395813,
-0.03017636016011238,
-0.1365763545036316,
0.07786741107702255,
-0.13869419693946838,
-0.31314802169799805,
-0.04082248732447624,
0.191089928150177,
-0.09568528085947037,
-0.2292437106370926,
0.14173446595668793,
-0.26979905366897583,
-0.21269668638706207,
0.2837013900279999,
-0.03090061992406845,
-0.00199059396982193,
-0.28788867592811584,
0.28141704201698303,
-0.26907801628112793,
-0.26919183135032654,
0.4438524544239044,
-0.04823879525065422,
0.1187167838215828,
-0.026986014097929,
0.09666085243225098,
0.27111315727233887,
0.4181256592273712,
0.33567050099372864,
0.15107648074626923,
-0.42119312286376953,
-0.544858992099762,
-0.6589451432228088,
0.3780207633972168,
0.003145746886730194,
-0.0991140604019165,
0.0402856320142746,
-0.08479447662830353,
0.32841846346855164,
-0.15694016218185425,
-0.17172254621982574,
-0.5048792362213135,
0.17946913838386536,
-0.2111613154411316,
-0.4244730472564697,
0.02241414785385132,
-0.02653275430202484,
-0.08751243352890015,
0.21197138726711273,
-0.3328474760055542,
0.030039004981517792,
0.2751343250274658,
-0.07008066028356552,
0.0189371295273304,
0.32692503929138184,
0.16333217918872833,
-0.21126028895378113,
0.044649090617895126,
-0.10202892124652863,
0.36257392168045044,
-0.06963295489549637,
-0.27884823083877563,
-0.1868252009153366,
-0.05712417885661125,
-0.21941515803337097,
0.3479246199131012,
-0.2516549825668335,
-0.03285742178559303,
-0.11009985953569412,
-0.0859874039888382,
0.00582085782662034,
-0.07126156240701675,
0.2512417435646057,
-0.10586448758840561,
-0.519166886806488,
0.17806319892406464,
-0.11427809298038483,
0.19453725218772888,
0.09727555513381958,
0.6413248777389526,
-0.15118408203125,
0.30110782384872437,
-0.41859060525894165,
-0.24046210944652557,
0.647101104259491,
0.04028576612472534,
-0.326809287071228,
-0.03895414248108864,
0.24715642631053925,
-0.4157928228378296,
-0.12887069582939148,
-0.3688119649887085,
0.12743064761161804,
0.1418898105621338,
0.13128146529197693,
-0.17549100518226624,
0.1347920298576355,
0.06843558698892593,
-0.12442770600318909,
-0.06943036615848541,
-0.013638541102409363,
0.2088598906993866,
0.029559453949332237,
0.15404857695102692,
0.03268042951822281
] |
https://github.com/huggingface/datasets/issues/5096 | Transfer some canonical datasets under an organization namespace | As a previous step before transferring the datasets, we decided we should convert them to Parquet, so that the viewer does not stop working (the viewer does not support datasets with scripts).
Datasets converted to Parquet:
- [x] adversarial_qa
- [x] ai2_arc
- [x] americas_nli
- [x] anli
- [x] asset
- [x] beans
- [ ] bigbench
- [x] billsum
- [ ] blbooks: it was already transferred to: TheBritishLibrary/blbooks
- [ ] blbooksgenre: it was already transferred to: TheBritishLibrary/blbooksgenre
- [x] blimp
- [x] boolq
- [ ] c4
- [x] capes
- [ ] cc100
- [x] cc_news
- [x] cifar10
- [x] cifar100
- [x] civil_comments
- [x] clue
- [x] common_gen
- [x] commonsense_qa
- [ ] competition_math: it was already transferred to: hendrycks/competition_math
- [x] coqa
- [x] cos_e
- [ ] covost2: it requires manual download
- [x] cppe-5
- [x] dbpedia_14
- [x] discofuse
- [x] drop
- [x] duorc
- [x] exams
- [x] food101
- [x] glue
- [x] go_emotions
- [x] greek_legal_code
- [x] gsm8k
- [x] hate_speech_offensive
- [x] imdb
- [x] imppres
- [x] indic_glue
- [x] jfleg
- [x] kilt_tasks
- [x] klue
- [x] lambada
- [x] lex_glue
- [ ] librispeech_asr
- [x] mbpp
- [ ] mc4
- [x] medical_questions_pairs
- [x] medmcqa
- [x] ms_marco
- [ ] multi_eurlex
- [x] multi_nli
- [ ] narrativeqa
- [ ] news_commentary
- [x] nq_open
- [x] openai_humaneval
- [x] openbookqa
- [ ] opus_euconst
- [x] paws
- [x] paws-x
- [x] pubmed_qa
- [x] qasc
- [x] quail
- [x] quartz
- [ ] quickdraw
- [x] race
- [x] ropes
- [x] sciq
- [x] scitail
- [ ] snli
- [x] spider
- [x] squad
- [x] squad_v2
- [x] sst2
- [x] stsb_multi_mt
- [x] tiny_shakespeare
- [x] trivia_qa
- [x] truthful_qa
- [x] tweet_eval
- [x] web_questions
- [ ] wiki40b
- [x] wiki_lingua
- [x] wiki_qa
- [ ] wikiann
- [x] wikitext
- [x] wino_bias
- [x] xcopa
- [x] xcsr
- [x] xnli
- [x] xquad
- [x] xquad_r
- [ ] xtreme
- [x] yelp_review_full
| As discussed during our @huggingface/datasets meeting, we are planning to move some "canonical" dataset scripts under their corresponding organization namespace (if this does not exist).
On the contrary, if the dataset already exists under the organization namespace, we are deprecating the canonical one (and eventually delete it).
First, we should test it using a dummy dataset/organization.
TODO:
- [x] Test with a dummy dataset
- [x] Create dummy canonical dataset: https://huggingface.co/datasets/dummy_canonical_dataset
- [x] Create dummy organization: https://huggingface.co/dummy-canonical-org
- [x] Transfer dummy canonical dataset to dummy organization
- [ ] Transfer datasets
- [x] babi_qa => facebook
- [x] blbooks => TheBritishLibrary/blbooks
- [x] blbooksgenre => TheBritishLibrary/blbooksgenre
- [x] common_gen => allenai
- [x] commonsense_qa => tau
- [x] competition_math => hendrycks/competition_math
- [x] cord19 => allenai
- [x] emotion => dair-ai
- [ ] gem => GEM
- [x] hellaswag => Rowan
- [x] hendrycks_test => cais/mmlu
- [x] indonlu => indonlp
- [ ] multilingual_librispeech => facebook
- It already exists "facebook/multilingual_librispeech"
- [ ] oscar => oscar-corpus
- [x] peer_read => allenai
- [x] qasper => allenai
- [x] reddit => webis/tldr-17
- [x] russian_super_glue => russiannlp
- [x] rvl_cdip => aharley
- [x] s2orc => allenai
- [x] scicite => allenai
- [x] scifact => allenai
- [x] scitldr => allenai
- [x] swiss_judgment_prediction => rcds
- [x] the_pile => EleutherAI
- [ ] wmt14, wmt15, wmt16, wmt17, wmt18, wmt19,... => wmt
- [ ] Deprecate (and eventually remove) datasets that cannot be transferred because they already exist
- [x] banking77 => PolyAI
- [x] common_voice => mozilla-foundation
- [x] german_legal_entity_recognition => elenanereiss
- ...
EDIT: the list above is continuously being updated | 361 | Transfer some canonical datasets under an organization namespace
As discussed during our @huggingface/datasets meeting, we are planning to move some "canonical" dataset scripts under their corresponding organization namespace (if this does not exist).
On the contrary, if the dataset already exists under the organization namespace, we are deprecating the canonical one (and eventually delete it).
First, we should test it using a dummy dataset/organization.
TODO:
- [x] Test with a dummy dataset
- [x] Create dummy canonical dataset: https://huggingface.co/datasets/dummy_canonical_dataset
- [x] Create dummy organization: https://huggingface.co/dummy-canonical-org
- [x] Transfer dummy canonical dataset to dummy organization
- [ ] Transfer datasets
- [x] babi_qa => facebook
- [x] blbooks => TheBritishLibrary/blbooks
- [x] blbooksgenre => TheBritishLibrary/blbooksgenre
- [x] common_gen => allenai
- [x] commonsense_qa => tau
- [x] competition_math => hendrycks/competition_math
- [x] cord19 => allenai
- [x] emotion => dair-ai
- [ ] gem => GEM
- [x] hellaswag => Rowan
- [x] hendrycks_test => cais/mmlu
- [x] indonlu => indonlp
- [ ] multilingual_librispeech => facebook
- It already exists "facebook/multilingual_librispeech"
- [ ] oscar => oscar-corpus
- [x] peer_read => allenai
- [x] qasper => allenai
- [x] reddit => webis/tldr-17
- [x] russian_super_glue => russiannlp
- [x] rvl_cdip => aharley
- [x] s2orc => allenai
- [x] scicite => allenai
- [x] scifact => allenai
- [x] scitldr => allenai
- [x] swiss_judgment_prediction => rcds
- [x] the_pile => EleutherAI
- [ ] wmt14, wmt15, wmt16, wmt17, wmt18, wmt19,... => wmt
- [ ] Deprecate (and eventually remove) datasets that cannot be transferred because they already exist
- [x] banking77 => PolyAI
- [x] common_voice => mozilla-foundation
- [x] german_legal_entity_recognition => elenanereiss
- ...
EDIT: the list above is continuously being updated
As a previous step before transferring the datasets, we decided we should convert them to Parquet, so that the viewer does not stop working (the viewer does not support datasets with scripts).
Datasets converted to Parquet:
- [x] adversarial_qa
- [x] ai2_arc
- [x] americas_nli
- [x] anli
- [x] asset
- [x] beans
- [ ] bigbench
- [x] billsum
- [ ] blbooks: it was already transferred to: TheBritishLibrary/blbooks
- [ ] blbooksgenre: it was already transferred to: TheBritishLibrary/blbooksgenre
- [x] blimp
- [x] boolq
- [ ] c4
- [x] capes
- [ ] cc100
- [x] cc_news
- [x] cifar10
- [x] cifar100
- [x] civil_comments
- [x] clue
- [x] common_gen
- [x] commonsense_qa
- [ ] competition_math: it was already transferred to: hendrycks/competition_math
- [x] coqa
- [x] cos_e
- [ ] covost2: it requires manual download
- [x] cppe-5
- [x] dbpedia_14
- [x] discofuse
- [x] drop
- [x] duorc
- [x] exams
- [x] food101
- [x] glue
- [x] go_emotions
- [x] greek_legal_code
- [x] gsm8k
- [x] hate_speech_offensive
- [x] imdb
- [x] imppres
- [x] indic_glue
- [x] jfleg
- [x] kilt_tasks
- [x] klue
- [x] lambada
- [x] lex_glue
- [ ] librispeech_asr
- [x] mbpp
- [ ] mc4
- [x] medical_questions_pairs
- [x] medmcqa
- [x] ms_marco
- [ ] multi_eurlex
- [x] multi_nli
- [ ] narrativeqa
- [ ] news_commentary
- [x] nq_open
- [x] openai_humaneval
- [x] openbookqa
- [ ] opus_euconst
- [x] paws
- [x] paws-x
- [x] pubmed_qa
- [x] qasc
- [x] quail
- [x] quartz
- [ ] quickdraw
- [x] race
- [x] ropes
- [x] sciq
- [x] scitail
- [ ] snli
- [x] spider
- [x] squad
- [x] squad_v2
- [x] sst2
- [x] stsb_multi_mt
- [x] tiny_shakespeare
- [x] trivia_qa
- [x] truthful_qa
- [x] tweet_eval
- [x] web_questions
- [ ] wiki40b
- [x] wiki_lingua
- [x] wiki_qa
- [ ] wikiann
- [x] wikitext
- [x] wino_bias
- [x] xcopa
- [x] xcsr
- [x] xnli
- [x] xquad
- [x] xquad_r
- [ ] xtreme
- [x] yelp_review_full
| [
0.03601277992129326,
0.3146805763244629,
-0.013221616856753826,
0.025197602808475494,
0.16879820823669434,
0.022613786160945892,
0.24629512429237366,
0.39038974046707153,
0.057000499218702316,
0.025375306606292725,
-0.312804639339447,
-0.06983106583356857,
-0.2716740369796753,
0.03336823731660843,
0.21916291117668152,
-0.02534719556570053,
0.28011876344680786,
-0.2540474534034729,
-0.11193116009235382,
0.000845007598400116,
-0.334025114774704,
0.09270244091749191,
-0.1180080771446228,
-0.08785231411457062,
0.07461937516927719,
0.1838786005973816,
-0.3534415662288666,
0.3029385507106781,
-0.2397867888212204,
-0.05576207488775253,
0.3588072955608368,
0.4938142001628876,
0.002233298495411873,
0.7967617511749268,
-0.00011061892291763797,
0.05353102833032608,
0.337501585483551,
-0.005180042237043381,
-0.06838157027959824,
-0.09670981764793396,
0.12705686688423157,
-0.006540786940604448,
-0.20506836473941803,
-0.21504434943199158,
0.03392563760280609,
-0.036264125257730484,
-0.052060432732105255,
-0.6274397373199463,
0.13704989850521088,
0.3337576985359192,
0.20203472673892975,
0.2210952192544937,
-0.32084187865257263,
-0.22245019674301147,
-0.15001672506332397,
0.216275155544281,
-0.07000303268432617,
0.17056141793727875,
0.12356714904308319,
-0.06079749017953873,
0.028144724667072296,
0.1554781049489975,
-0.18896369636058807,
-0.22749470174312592,
0.13131369650363922,
-0.15742798149585724,
-0.2253183126449585,
-0.04895826429128647,
0.1041027083992958,
0.23433607816696167,
0.4135802388191223,
-0.5283428430557251,
-0.2937052547931671,
-0.05991502106189728,
0.02108442783355713,
-0.3564753830432892,
-0.053699709475040436,
0.08972726762294769,
0.21978090703487396,
0.1358124315738678,
-0.22047863900661469,
0.14517632126808167,
-0.07529198378324509,
0.027146250009536743,
-0.105387382209301,
0.2928350865840912,
-0.11963139474391937,
-0.08330699056386948,
0.13971589505672455,
-0.15472698211669922,
0.09724917262792587,
-0.2597275972366333,
-0.004040375351905823,
-0.10250993072986603,
-0.054300229996442795,
-0.14230045676231384,
-0.1305103302001953,
0.48133155703544617,
0.45372119545936584,
0.2500794231891632,
-0.050663456320762634,
0.05952627956867218,
0.02258927747607231,
-0.13849735260009766,
-0.019990500062704086,
0.446463406085968,
0.06951696425676346,
-0.017177265137434006,
0.17367854714393616,
0.5844176411628723,
-0.13330399990081787,
0.14620982110500336,
-0.0731080174446106,
-0.19100940227508545,
-0.09826019406318665,
0.1389855146408081,
0.4809075593948364,
-0.19772037863731384,
-0.25550881028175354,
0.017606018111109734,
0.05676323175430298,
-0.06891253590583801,
0.18268997967243195,
0.32016122341156006,
0.12697674334049225,
0.19077077507972717,
0.07529476284980774,
0.42400306463241577,
-0.15422514081001282,
-0.11233601719141006,
-0.22916314005851746,
0.21584245562553406,
-0.32787495851516724,
-0.11086677759885788,
0.2646735906600952,
0.3332204818725586,
0.008367515169084072,
0.013774043880403042,
0.6366074085235596,
0.04000500589609146,
0.11430121958255768,
0.2182680070400238,
0.2352234423160553,
0.10662104189395905,
-0.20737294852733612,
0.0935727134346962,
0.2817547619342804,
0.03226589411497116,
-0.4001914858818054,
-0.009421579539775848,
0.22304490208625793,
-0.2509647309780121,
0.09635055065155029,
0.22948260605335236,
-0.34835100173950195,
0.031453683972358704,
-0.23221302032470703,
0.172567218542099,
-0.32518061995506287,
0.14287197589874268,
0.18556086719036102,
-0.045319221913814545,
-0.2501612901687622,
0.03734701871871948,
0.16590899229049683,
0.44462114572525024,
0.0506645105779171,
-0.05058513954281807,
-0.2055414617061615,
0.17334160208702087,
0.17369496822357178,
0.21928620338439941,
-0.14719262719154358,
-0.2735174298286438,
-0.29106953740119934,
-0.0730503648519516,
0.05119014531373978,
-0.4424796998500824,
-0.17234234511852264,
-0.13083159923553467,
-0.30119043588638306,
0.21863918006420135,
0.20813699066638947,
-0.18059948086738586,
-0.012016402557492256,
-0.33324024081230164,
-0.3061886429786682,
0.11232368648052216,
-0.1915210783481598,
0.049065396189689636,
-0.24579185247421265,
-0.05772656947374344,
0.0040602535009384155,
-0.04932241886854172,
0.0361291840672493,
-0.22652673721313477,
-0.16731920838356018,
0.02738182246685028,
0.06964106112718582,
-0.06394219398498535,
0.10986462235450745,
0.016251787543296814,
0.21052196621894836,
0.02001882717013359,
0.15811844170093536,
0.1001494899392128,
-0.5807812213897705,
0.15277674794197083,
0.1323746293783188,
0.1388634741306305,
0.27917957305908203,
-0.5364103317260742,
-0.3134549558162689,
-0.030428122729063034,
-0.14633890986442566,
-0.03112969920039177,
0.14048820734024048,
0.28166311979293823,
0.15273192524909973,
0.03628057613968849,
-0.27926939725875854,
0.13196569681167603,
-0.13000109791755676,
0.38821715116500854,
-0.30564194917678833,
0.32862114906311035,
-0.07588770985603333,
0.03723996505141258,
-0.051047876477241516,
0.25457069277763367,
0.10362055152654648,
-0.36441007256507874,
0.18185919523239136,
0.16089075803756714,
0.022484945133328438,
0.10776764899492264,
0.2749273478984833,
0.5534853935241699,
0.10793697088956833,
-0.4116390347480774,
0.3704579174518585,
0.40071263909339905,
-0.230751633644104,
0.023905552923679352,
-0.10351753979921341,
0.6089016199111938,
-0.22696103155612946,
0.1790727972984314,
0.03366365283727646,
-0.010421055369079113,
0.3171018958091736,
-0.3537808656692505,
-0.16970714926719666,
-0.18057245016098022,
0.2875348627567291,
0.20116539299488068,
0.23665012419223785,
0.15889345109462738,
-0.14994797110557556,
0.08600687235593796,
0.09506623446941376,
-0.2327404022216797,
-0.08551093190908432,
0.037203073501586914,
-0.18201658129692078,
-0.22795599699020386,
0.09812141209840775,
0.06888744235038757,
0.306840717792511,
0.22341646254062653,
0.19249331951141357,
0.10577192902565002,
0.07405052334070206,
-0.20582780241966248,
0.24629077315330505,
-0.039842650294303894,
-0.11717750132083893,
0.06537701189517975,
0.027718374505639076,
0.1007414385676384,
-0.35029950737953186,
-0.20460227131843567,
0.11624161154031754,
0.02367030829191208,
-0.2836807668209076,
-0.050492215901613235,
-0.19698940217494965,
-0.5736656188964844,
-0.31073087453842163,
0.0964297205209732,
-0.17335185408592224,
-0.34794771671295166,
0.07709766179323196,
0.14208504557609558,
-0.26182353496551514,
0.2650207579135895,
-0.061177562922239304,
0.4066627025604248,
-0.4737185537815094,
-0.01120767928659916,
-0.29622381925582886,
-0.14225177466869354,
-0.046021826565265656,
0.08038845658302307,
0.4786491394042969,
0.03217360004782677,
0.3983750641345978,
-0.19829745590686798,
0.09060139209032059,
-0.5316441059112549,
-0.5609970092773438,
0.06297193467617035,
-0.10595494508743286,
-0.09508319944143295,
-0.013065077364444733,
0.064992755651474,
0.019409101456403732,
-0.13517844676971436,
-0.053580548614263535,
-0.26359912753105164,
-0.22776688635349274,
0.21447345614433289,
-0.11187933385372162,
0.052342869341373444,
-0.12866708636283875,
-0.06865235418081284,
0.04673997312784195,
-0.1884835809469223,
0.2654454708099365,
-0.21053649485111237,
-0.2663511037826538,
0.38857176899909973,
-0.34617191553115845,
-0.02494734153151512,
0.03483462706208229,
-0.03618665039539337,
-0.07007887214422226,
-0.40345650911331177,
-0.023512374609708786,
0.012818824499845505,
-0.047233644872903824,
0.0800754576921463,
-0.14796976745128632,
0.3451424837112427,
-0.0314546637237072,
-0.08192158490419388,
-0.40935003757476807,
0.03352215513586998,
0.2154233157634735,
0.29856815934181213,
-0.12281142175197601,
0.35357969999313354,
0.021030493080615997,
-0.10679864138364792,
0.03203742951154709,
-0.27472445368766785,
-0.004452452063560486,
-0.02170763537287712,
-0.24322041869163513,
-0.06313621997833252,
-0.026209603995084763,
-0.005797281861305237,
0.519349992275238,
0.1798923760652542,
-0.22689567506313324,
0.05743204429745674,
0.04551420360803604,
0.3789563477039337,
0.08488240092992783,
-0.4390549063682556,
0.15371771156787872,
0.12996257841587067,
-0.12165699899196625,
0.489498496055603,
-0.14502978324890137,
0.15214495360851288,
0.2177964150905609,
0.1617741584777832,
-0.19729605317115784,
-0.4033031761646271,
0.0642189159989357,
-0.4244045615196228,
0.014416389167308807,
-0.042773421853780746,
-0.3315638601779938,
-0.051625803112983704,
-0.20929130911827087,
0.2664707601070404,
0.4571709632873535,
-0.16012132167816162,
-0.13317368924617767,
-0.8004539608955383,
0.38627222180366516,
-0.29133498668670654,
0.6160179376602173,
-0.24042758345603943,
0.08555655926465988,
0.09576888382434845,
-0.035996366292238235,
-0.25771647691726685,
0.07870051264762878,
0.3455878794193268,
-0.1860876977443695,
0.08278216421604156,
0.20608650147914886,
-0.1175706535577774,
-0.14060939848423004,
-0.06736011803150177,
-0.1506984978914261,
0.18053176999092102,
0.03173106908798218,
0.3459205627441406,
-0.2861994504928589,
-0.3775887191295624,
0.28617122769355774,
0.29870185256004333,
0.24967622756958008,
0.13720253109931946,
-0.17338621616363525,
-0.5493564605712891,
-0.1373220980167389,
0.2461465299129486,
0.03792273998260498,
0.01396092027425766,
-0.4668073356151581,
0.2833082973957062,
0.07727116346359253,
-0.26871728897094727,
0.5272123217582703,
-0.14347147941589355,
0.13126850128173828,
0.2335890829563141,
0.23403778672218323,
0.07560228556394577,
0.010336823761463165,
0.4027267396450043,
0.35962724685668945,
-0.28126540780067444,
-0.6468427777290344,
-0.3701677918434143,
0.3382805287837982,
0.41623687744140625,
0.44357630610466003,
0.09398677945137024,
0.10596156865358353,
-0.2877765893936157,
-0.058616116642951965,
-0.2761581540107727,
0.11762867867946625,
0.22723986208438873,
0.13536149263381958,
-0.37937647104263306,
-0.027213308960199356,
0.007713258266448975,
0.23551501333713531,
-0.07795865833759308,
0.3683994710445404,
0.41973942518234253,
-0.4234558343887329,
0.15315845608711243,
-0.007603466510772705,
1.0860503911972046,
-0.4420916438102722,
0.29685133695602417,
0.18279540538787842,
-0.034577563405036926,
0.4850858747959137,
-0.014001816511154175,
-0.10213195532560349,
-0.3185679316520691,
0.037244752049446106,
0.08955621719360352,
0.14957192540168762,
0.3196287751197815,
0.09452944993972778,
-0.5834870934486389,
0.26453110575675964,
-0.18411573767662048,
0.468787282705307,
0.12040126323699951,
0.28154605627059937,
-0.05534795671701431,
-0.22749356925487518,
-0.13542598485946655,
0.19500461220741272,
0.022262856364250183,
0.08336648344993591,
-0.06846834719181061,
0.17827315628528595,
-0.05900048092007637,
0.0456404834985733,
-0.12039109319448471,
0.09768553078174591,
-0.20930345356464386,
-0.16375777125358582,
-0.060117144137620926,
-0.15151354670524597,
0.27517804503440857,
0.23110251128673553,
0.9707485437393188,
0.14742015302181244,
-0.0513542965054512,
0.1522381603717804,
0.0011297240853309631,
0.04577213525772095,
0.2466040700674057,
-0.29108649492263794,
0.1228560358285904,
0.21794015169143677,
-0.09015149623155594,
-0.07650230079889297,
0.20066480338573456,
-0.09088201820850372,
-0.30377212166786194,
-0.1506374329328537,
0.1147153228521347,
-0.5170769691467285,
0.037725064903497696,
0.1330622434616089,
-0.24732071161270142,
-0.11287134885787964,
0.15653665363788605,
-0.009235702455043793,
-0.24040378630161285,
-0.04742448031902313,
-0.06646868586540222,
-0.3099612593650818,
-0.1461370289325714,
-0.037654586136341095,
-0.19239291548728943,
-0.11392451822757721,
0.1332247257232666,
-0.16311438381671906,
0.13090205192565918,
-0.265350878238678,
-0.06298109143972397,
0.5170079469680786,
-0.22547373175621033,
0.2012604922056198,
-0.01144181378185749,
-0.21671965718269348,
0.1953076869249344,
-0.08138018846511841,
0.13659752905368805,
-0.022847890853881836,
-0.013459812849760056,
-0.09562533348798752,
-0.1936817616224289,
0.351451575756073,
-0.00358392670750618,
0.3273860812187195,
-0.03908818960189819,
0.20870669186115265,
-0.17937316000461578,
-0.1807508021593094,
-0.3657854497432709,
0.29917165637016296,
-0.07942065596580505,
-0.046364374458789825,
0.22513942420482635,
-0.22081363201141357,
-0.10087288916110992,
-0.24764326214790344,
0.17064407467842102,
-0.13668186962604523,
-0.07781216502189636,
-0.2297201156616211,
-0.15544025599956512,
0.09269097447395325,
-0.03861110657453537,
-0.054090216755867004,
0.3240002393722534,
-0.04447963833808899,
0.06533923745155334,
-0.33395618200302124,
0.02466895803809166,
0.18843898177146912,
-0.04074040800333023,
0.08761154115200043,
0.48438918590545654,
-0.20625033974647522,
-0.09829389303922653,
0.04195170849561691,
0.1026872918009758,
0.216133713722229,
-0.23425406217575073,
0.15254810452461243,
-0.09598790854215622,
-0.2151220291852951,
0.085065096616745,
0.3822736144065857,
0.40276211500167847,
0.21170392632484436,
0.16860145330429077,
0.1083408072590828,
-0.046882517635822296,
0.18032023310661316,
0.523311972618103,
0.21708793938159943,
-0.2948913276195526,
0.016645239666104317,
0.11642065644264221,
0.14879068732261658,
-0.2131061851978302,
0.05475842207670212,
0.3760952055454254,
-0.13475467264652252,
0.10974240303039551,
0.3557569682598114,
0.4980614483356476,
0.24455448985099792,
0.3160834312438965,
-0.056076835840940475,
0.4652259647846222,
0.02598775178194046,
0.4534125328063965,
-0.0966496616601944,
-0.02192891389131546,
0.13968349993228912,
0.15249720215797424,
0.114403635263443,
0.27135688066482544,
-0.2967013120651245,
0.08782577514648438,
0.7978910803794861,
-0.15198954939842224,
0.2562093138694763,
0.1719617396593094,
-0.22245940566062927,
-0.010087620466947556,
0.21289923787117004,
0.055077698081731796,
0.3261830508708954,
-0.07316574454307556,
0.5840410590171814,
-0.35957071185112,
-0.28901049494743347,
0.015754805877804756,
0.13957136869430542,
0.02145630493760109,
-0.07379800081253052,
-0.12614236772060394,
-0.1473846286535263,
-0.2920483350753784,
-0.0949290543794632,
-0.22018858790397644,
-0.03435886651277542,
0.11216327548027039,
-0.118155837059021,
-0.19823987782001495,
-0.1644424945116043,
0.027861105278134346,
-0.020907841622829437,
0.11743424087762833,
-0.13826997578144073,
0.2289198338985443,
0.18642574548721313,
-0.0740322470664978,
0.26380008459091187,
0.5490747690200806,
0.3939657211303711,
-0.23110580444335938,
-0.22530820965766907,
0.08181723952293396,
-0.1035802960395813,
-0.03017636016011238,
-0.1365763545036316,
0.07786741107702255,
-0.13869419693946838,
-0.31314802169799805,
-0.04082248732447624,
0.191089928150177,
-0.09568528085947037,
-0.2292437106370926,
0.14173446595668793,
-0.26979905366897583,
-0.21269668638706207,
0.2837013900279999,
-0.03090061992406845,
-0.00199059396982193,
-0.28788867592811584,
0.28141704201698303,
-0.26907801628112793,
-0.26919183135032654,
0.4438524544239044,
-0.04823879525065422,
0.1187167838215828,
-0.026986014097929,
0.09666085243225098,
0.27111315727233887,
0.4181256592273712,
0.33567050099372864,
0.15107648074626923,
-0.42119312286376953,
-0.544858992099762,
-0.6589451432228088,
0.3780207633972168,
0.003145746886730194,
-0.0991140604019165,
0.0402856320142746,
-0.08479447662830353,
0.32841846346855164,
-0.15694016218185425,
-0.17172254621982574,
-0.5048792362213135,
0.17946913838386536,
-0.2111613154411316,
-0.4244730472564697,
0.02241414785385132,
-0.02653275430202484,
-0.08751243352890015,
0.21197138726711273,
-0.3328474760055542,
0.030039004981517792,
0.2751343250274658,
-0.07008066028356552,
0.0189371295273304,
0.32692503929138184,
0.16333217918872833,
-0.21126028895378113,
0.044649090617895126,
-0.10202892124652863,
0.36257392168045044,
-0.06963295489549637,
-0.27884823083877563,
-0.1868252009153366,
-0.05712417885661125,
-0.21941515803337097,
0.3479246199131012,
-0.2516549825668335,
-0.03285742178559303,
-0.11009985953569412,
-0.0859874039888382,
0.00582085782662034,
-0.07126156240701675,
0.2512417435646057,
-0.10586448758840561,
-0.519166886806488,
0.17806319892406464,
-0.11427809298038483,
0.19453725218772888,
0.09727555513381958,
0.6413248777389526,
-0.15118408203125,
0.30110782384872437,
-0.41859060525894165,
-0.24046210944652557,
0.647101104259491,
0.04028576612472534,
-0.326809287071228,
-0.03895414248108864,
0.24715642631053925,
-0.4157928228378296,
-0.12887069582939148,
-0.3688119649887085,
0.12743064761161804,
0.1418898105621338,
0.13128146529197693,
-0.17549100518226624,
0.1347920298576355,
0.06843558698892593,
-0.12442770600318909,
-0.06943036615848541,
-0.013638541102409363,
0.2088598906993866,
0.029559453949332237,
0.15404857695102692,
0.03268042951822281
] |
https://github.com/huggingface/datasets/issues/5096 | Transfer some canonical datasets under an organization namespace | For `c4` and `mc4` I was thinking of adding the corresponding configs to `allenai/c4` and redirect `c4` and `mc4` to `allenai/c4`. I'll open a PR on `allenai/c4` if it's good for you | As discussed during our @huggingface/datasets meeting, we are planning to move some "canonical" dataset scripts under their corresponding organization namespace (if this does not exist).
On the contrary, if the dataset already exists under the organization namespace, we are deprecating the canonical one (and eventually delete it).
First, we should test it using a dummy dataset/organization.
TODO:
- [x] Test with a dummy dataset
- [x] Create dummy canonical dataset: https://huggingface.co/datasets/dummy_canonical_dataset
- [x] Create dummy organization: https://huggingface.co/dummy-canonical-org
- [x] Transfer dummy canonical dataset to dummy organization
- [ ] Transfer datasets
- [x] babi_qa => facebook
- [x] blbooks => TheBritishLibrary/blbooks
- [x] blbooksgenre => TheBritishLibrary/blbooksgenre
- [x] common_gen => allenai
- [x] commonsense_qa => tau
- [x] competition_math => hendrycks/competition_math
- [x] cord19 => allenai
- [x] emotion => dair-ai
- [ ] gem => GEM
- [x] hellaswag => Rowan
- [x] hendrycks_test => cais/mmlu
- [x] indonlu => indonlp
- [ ] multilingual_librispeech => facebook
- It already exists "facebook/multilingual_librispeech"
- [ ] oscar => oscar-corpus
- [x] peer_read => allenai
- [x] qasper => allenai
- [x] reddit => webis/tldr-17
- [x] russian_super_glue => russiannlp
- [x] rvl_cdip => aharley
- [x] s2orc => allenai
- [x] scicite => allenai
- [x] scifact => allenai
- [x] scitldr => allenai
- [x] swiss_judgment_prediction => rcds
- [x] the_pile => EleutherAI
- [ ] wmt14, wmt15, wmt16, wmt17, wmt18, wmt19,... => wmt
- [ ] Deprecate (and eventually remove) datasets that cannot be transferred because they already exist
- [x] banking77 => PolyAI
- [x] common_voice => mozilla-foundation
- [x] german_legal_entity_recognition => elenanereiss
- ...
EDIT: the list above is continuously being updated | 32 | Transfer some canonical datasets under an organization namespace
As discussed during our @huggingface/datasets meeting, we are planning to move some "canonical" dataset scripts under their corresponding organization namespace (if this does not exist).
On the contrary, if the dataset already exists under the organization namespace, we are deprecating the canonical one (and eventually delete it).
First, we should test it using a dummy dataset/organization.
TODO:
- [x] Test with a dummy dataset
- [x] Create dummy canonical dataset: https://huggingface.co/datasets/dummy_canonical_dataset
- [x] Create dummy organization: https://huggingface.co/dummy-canonical-org
- [x] Transfer dummy canonical dataset to dummy organization
- [ ] Transfer datasets
- [x] babi_qa => facebook
- [x] blbooks => TheBritishLibrary/blbooks
- [x] blbooksgenre => TheBritishLibrary/blbooksgenre
- [x] common_gen => allenai
- [x] commonsense_qa => tau
- [x] competition_math => hendrycks/competition_math
- [x] cord19 => allenai
- [x] emotion => dair-ai
- [ ] gem => GEM
- [x] hellaswag => Rowan
- [x] hendrycks_test => cais/mmlu
- [x] indonlu => indonlp
- [ ] multilingual_librispeech => facebook
- It already exists "facebook/multilingual_librispeech"
- [ ] oscar => oscar-corpus
- [x] peer_read => allenai
- [x] qasper => allenai
- [x] reddit => webis/tldr-17
- [x] russian_super_glue => russiannlp
- [x] rvl_cdip => aharley
- [x] s2orc => allenai
- [x] scicite => allenai
- [x] scifact => allenai
- [x] scitldr => allenai
- [x] swiss_judgment_prediction => rcds
- [x] the_pile => EleutherAI
- [ ] wmt14, wmt15, wmt16, wmt17, wmt18, wmt19,... => wmt
- [ ] Deprecate (and eventually remove) datasets that cannot be transferred because they already exist
- [x] banking77 => PolyAI
- [x] common_voice => mozilla-foundation
- [x] german_legal_entity_recognition => elenanereiss
- ...
EDIT: the list above is continuously being updated
For `c4` and `mc4` I was thinking of adding the corresponding configs to `allenai/c4` and redirect `c4` and `mc4` to `allenai/c4`. I'll open a PR on `allenai/c4` if it's good for you | [
0.03601277992129326,
0.3146805763244629,
-0.013221616856753826,
0.025197602808475494,
0.16879820823669434,
0.022613786160945892,
0.24629512429237366,
0.39038974046707153,
0.057000499218702316,
0.025375306606292725,
-0.312804639339447,
-0.06983106583356857,
-0.2716740369796753,
0.03336823731660843,
0.21916291117668152,
-0.02534719556570053,
0.28011876344680786,
-0.2540474534034729,
-0.11193116009235382,
0.000845007598400116,
-0.334025114774704,
0.09270244091749191,
-0.1180080771446228,
-0.08785231411457062,
0.07461937516927719,
0.1838786005973816,
-0.3534415662288666,
0.3029385507106781,
-0.2397867888212204,
-0.05576207488775253,
0.3588072955608368,
0.4938142001628876,
0.002233298495411873,
0.7967617511749268,
-0.00011061892291763797,
0.05353102833032608,
0.337501585483551,
-0.005180042237043381,
-0.06838157027959824,
-0.09670981764793396,
0.12705686688423157,
-0.006540786940604448,
-0.20506836473941803,
-0.21504434943199158,
0.03392563760280609,
-0.036264125257730484,
-0.052060432732105255,
-0.6274397373199463,
0.13704989850521088,
0.3337576985359192,
0.20203472673892975,
0.2210952192544937,
-0.32084187865257263,
-0.22245019674301147,
-0.15001672506332397,
0.216275155544281,
-0.07000303268432617,
0.17056141793727875,
0.12356714904308319,
-0.06079749017953873,
0.028144724667072296,
0.1554781049489975,
-0.18896369636058807,
-0.22749470174312592,
0.13131369650363922,
-0.15742798149585724,
-0.2253183126449585,
-0.04895826429128647,
0.1041027083992958,
0.23433607816696167,
0.4135802388191223,
-0.5283428430557251,
-0.2937052547931671,
-0.05991502106189728,
0.02108442783355713,
-0.3564753830432892,
-0.053699709475040436,
0.08972726762294769,
0.21978090703487396,
0.1358124315738678,
-0.22047863900661469,
0.14517632126808167,
-0.07529198378324509,
0.027146250009536743,
-0.105387382209301,
0.2928350865840912,
-0.11963139474391937,
-0.08330699056386948,
0.13971589505672455,
-0.15472698211669922,
0.09724917262792587,
-0.2597275972366333,
-0.004040375351905823,
-0.10250993072986603,
-0.054300229996442795,
-0.14230045676231384,
-0.1305103302001953,
0.48133155703544617,
0.45372119545936584,
0.2500794231891632,
-0.050663456320762634,
0.05952627956867218,
0.02258927747607231,
-0.13849735260009766,
-0.019990500062704086,
0.446463406085968,
0.06951696425676346,
-0.017177265137434006,
0.17367854714393616,
0.5844176411628723,
-0.13330399990081787,
0.14620982110500336,
-0.0731080174446106,
-0.19100940227508545,
-0.09826019406318665,
0.1389855146408081,
0.4809075593948364,
-0.19772037863731384,
-0.25550881028175354,
0.017606018111109734,
0.05676323175430298,
-0.06891253590583801,
0.18268997967243195,
0.32016122341156006,
0.12697674334049225,
0.19077077507972717,
0.07529476284980774,
0.42400306463241577,
-0.15422514081001282,
-0.11233601719141006,
-0.22916314005851746,
0.21584245562553406,
-0.32787495851516724,
-0.11086677759885788,
0.2646735906600952,
0.3332204818725586,
0.008367515169084072,
0.013774043880403042,
0.6366074085235596,
0.04000500589609146,
0.11430121958255768,
0.2182680070400238,
0.2352234423160553,
0.10662104189395905,
-0.20737294852733612,
0.0935727134346962,
0.2817547619342804,
0.03226589411497116,
-0.4001914858818054,
-0.009421579539775848,
0.22304490208625793,
-0.2509647309780121,
0.09635055065155029,
0.22948260605335236,
-0.34835100173950195,
0.031453683972358704,
-0.23221302032470703,
0.172567218542099,
-0.32518061995506287,
0.14287197589874268,
0.18556086719036102,
-0.045319221913814545,
-0.2501612901687622,
0.03734701871871948,
0.16590899229049683,
0.44462114572525024,
0.0506645105779171,
-0.05058513954281807,
-0.2055414617061615,
0.17334160208702087,
0.17369496822357178,
0.21928620338439941,
-0.14719262719154358,
-0.2735174298286438,
-0.29106953740119934,
-0.0730503648519516,
0.05119014531373978,
-0.4424796998500824,
-0.17234234511852264,
-0.13083159923553467,
-0.30119043588638306,
0.21863918006420135,
0.20813699066638947,
-0.18059948086738586,
-0.012016402557492256,
-0.33324024081230164,
-0.3061886429786682,
0.11232368648052216,
-0.1915210783481598,
0.049065396189689636,
-0.24579185247421265,
-0.05772656947374344,
0.0040602535009384155,
-0.04932241886854172,
0.0361291840672493,
-0.22652673721313477,
-0.16731920838356018,
0.02738182246685028,
0.06964106112718582,
-0.06394219398498535,
0.10986462235450745,
0.016251787543296814,
0.21052196621894836,
0.02001882717013359,
0.15811844170093536,
0.1001494899392128,
-0.5807812213897705,
0.15277674794197083,
0.1323746293783188,
0.1388634741306305,
0.27917957305908203,
-0.5364103317260742,
-0.3134549558162689,
-0.030428122729063034,
-0.14633890986442566,
-0.03112969920039177,
0.14048820734024048,
0.28166311979293823,
0.15273192524909973,
0.03628057613968849,
-0.27926939725875854,
0.13196569681167603,
-0.13000109791755676,
0.38821715116500854,
-0.30564194917678833,
0.32862114906311035,
-0.07588770985603333,
0.03723996505141258,
-0.051047876477241516,
0.25457069277763367,
0.10362055152654648,
-0.36441007256507874,
0.18185919523239136,
0.16089075803756714,
0.022484945133328438,
0.10776764899492264,
0.2749273478984833,
0.5534853935241699,
0.10793697088956833,
-0.4116390347480774,
0.3704579174518585,
0.40071263909339905,
-0.230751633644104,
0.023905552923679352,
-0.10351753979921341,
0.6089016199111938,
-0.22696103155612946,
0.1790727972984314,
0.03366365283727646,
-0.010421055369079113,
0.3171018958091736,
-0.3537808656692505,
-0.16970714926719666,
-0.18057245016098022,
0.2875348627567291,
0.20116539299488068,
0.23665012419223785,
0.15889345109462738,
-0.14994797110557556,
0.08600687235593796,
0.09506623446941376,
-0.2327404022216797,
-0.08551093190908432,
0.037203073501586914,
-0.18201658129692078,
-0.22795599699020386,
0.09812141209840775,
0.06888744235038757,
0.306840717792511,
0.22341646254062653,
0.19249331951141357,
0.10577192902565002,
0.07405052334070206,
-0.20582780241966248,
0.24629077315330505,
-0.039842650294303894,
-0.11717750132083893,
0.06537701189517975,
0.027718374505639076,
0.1007414385676384,
-0.35029950737953186,
-0.20460227131843567,
0.11624161154031754,
0.02367030829191208,
-0.2836807668209076,
-0.050492215901613235,
-0.19698940217494965,
-0.5736656188964844,
-0.31073087453842163,
0.0964297205209732,
-0.17335185408592224,
-0.34794771671295166,
0.07709766179323196,
0.14208504557609558,
-0.26182353496551514,
0.2650207579135895,
-0.061177562922239304,
0.4066627025604248,
-0.4737185537815094,
-0.01120767928659916,
-0.29622381925582886,
-0.14225177466869354,
-0.046021826565265656,
0.08038845658302307,
0.4786491394042969,
0.03217360004782677,
0.3983750641345978,
-0.19829745590686798,
0.09060139209032059,
-0.5316441059112549,
-0.5609970092773438,
0.06297193467617035,
-0.10595494508743286,
-0.09508319944143295,
-0.013065077364444733,
0.064992755651474,
0.019409101456403732,
-0.13517844676971436,
-0.053580548614263535,
-0.26359912753105164,
-0.22776688635349274,
0.21447345614433289,
-0.11187933385372162,
0.052342869341373444,
-0.12866708636283875,
-0.06865235418081284,
0.04673997312784195,
-0.1884835809469223,
0.2654454708099365,
-0.21053649485111237,
-0.2663511037826538,
0.38857176899909973,
-0.34617191553115845,
-0.02494734153151512,
0.03483462706208229,
-0.03618665039539337,
-0.07007887214422226,
-0.40345650911331177,
-0.023512374609708786,
0.012818824499845505,
-0.047233644872903824,
0.0800754576921463,
-0.14796976745128632,
0.3451424837112427,
-0.0314546637237072,
-0.08192158490419388,
-0.40935003757476807,
0.03352215513586998,
0.2154233157634735,
0.29856815934181213,
-0.12281142175197601,
0.35357969999313354,
0.021030493080615997,
-0.10679864138364792,
0.03203742951154709,
-0.27472445368766785,
-0.004452452063560486,
-0.02170763537287712,
-0.24322041869163513,
-0.06313621997833252,
-0.026209603995084763,
-0.005797281861305237,
0.519349992275238,
0.1798923760652542,
-0.22689567506313324,
0.05743204429745674,
0.04551420360803604,
0.3789563477039337,
0.08488240092992783,
-0.4390549063682556,
0.15371771156787872,
0.12996257841587067,
-0.12165699899196625,
0.489498496055603,
-0.14502978324890137,
0.15214495360851288,
0.2177964150905609,
0.1617741584777832,
-0.19729605317115784,
-0.4033031761646271,
0.0642189159989357,
-0.4244045615196228,
0.014416389167308807,
-0.042773421853780746,
-0.3315638601779938,
-0.051625803112983704,
-0.20929130911827087,
0.2664707601070404,
0.4571709632873535,
-0.16012132167816162,
-0.13317368924617767,
-0.8004539608955383,
0.38627222180366516,
-0.29133498668670654,
0.6160179376602173,
-0.24042758345603943,
0.08555655926465988,
0.09576888382434845,
-0.035996366292238235,
-0.25771647691726685,
0.07870051264762878,
0.3455878794193268,
-0.1860876977443695,
0.08278216421604156,
0.20608650147914886,
-0.1175706535577774,
-0.14060939848423004,
-0.06736011803150177,
-0.1506984978914261,
0.18053176999092102,
0.03173106908798218,
0.3459205627441406,
-0.2861994504928589,
-0.3775887191295624,
0.28617122769355774,
0.29870185256004333,
0.24967622756958008,
0.13720253109931946,
-0.17338621616363525,
-0.5493564605712891,
-0.1373220980167389,
0.2461465299129486,
0.03792273998260498,
0.01396092027425766,
-0.4668073356151581,
0.2833082973957062,
0.07727116346359253,
-0.26871728897094727,
0.5272123217582703,
-0.14347147941589355,
0.13126850128173828,
0.2335890829563141,
0.23403778672218323,
0.07560228556394577,
0.010336823761463165,
0.4027267396450043,
0.35962724685668945,
-0.28126540780067444,
-0.6468427777290344,
-0.3701677918434143,
0.3382805287837982,
0.41623687744140625,
0.44357630610466003,
0.09398677945137024,
0.10596156865358353,
-0.2877765893936157,
-0.058616116642951965,
-0.2761581540107727,
0.11762867867946625,
0.22723986208438873,
0.13536149263381958,
-0.37937647104263306,
-0.027213308960199356,
0.007713258266448975,
0.23551501333713531,
-0.07795865833759308,
0.3683994710445404,
0.41973942518234253,
-0.4234558343887329,
0.15315845608711243,
-0.007603466510772705,
1.0860503911972046,
-0.4420916438102722,
0.29685133695602417,
0.18279540538787842,
-0.034577563405036926,
0.4850858747959137,
-0.014001816511154175,
-0.10213195532560349,
-0.3185679316520691,
0.037244752049446106,
0.08955621719360352,
0.14957192540168762,
0.3196287751197815,
0.09452944993972778,
-0.5834870934486389,
0.26453110575675964,
-0.18411573767662048,
0.468787282705307,
0.12040126323699951,
0.28154605627059937,
-0.05534795671701431,
-0.22749356925487518,
-0.13542598485946655,
0.19500461220741272,
0.022262856364250183,
0.08336648344993591,
-0.06846834719181061,
0.17827315628528595,
-0.05900048092007637,
0.0456404834985733,
-0.12039109319448471,
0.09768553078174591,
-0.20930345356464386,
-0.16375777125358582,
-0.060117144137620926,
-0.15151354670524597,
0.27517804503440857,
0.23110251128673553,
0.9707485437393188,
0.14742015302181244,
-0.0513542965054512,
0.1522381603717804,
0.0011297240853309631,
0.04577213525772095,
0.2466040700674057,
-0.29108649492263794,
0.1228560358285904,
0.21794015169143677,
-0.09015149623155594,
-0.07650230079889297,
0.20066480338573456,
-0.09088201820850372,
-0.30377212166786194,
-0.1506374329328537,
0.1147153228521347,
-0.5170769691467285,
0.037725064903497696,
0.1330622434616089,
-0.24732071161270142,
-0.11287134885787964,
0.15653665363788605,
-0.009235702455043793,
-0.24040378630161285,
-0.04742448031902313,
-0.06646868586540222,
-0.3099612593650818,
-0.1461370289325714,
-0.037654586136341095,
-0.19239291548728943,
-0.11392451822757721,
0.1332247257232666,
-0.16311438381671906,
0.13090205192565918,
-0.265350878238678,
-0.06298109143972397,
0.5170079469680786,
-0.22547373175621033,
0.2012604922056198,
-0.01144181378185749,
-0.21671965718269348,
0.1953076869249344,
-0.08138018846511841,
0.13659752905368805,
-0.022847890853881836,
-0.013459812849760056,
-0.09562533348798752,
-0.1936817616224289,
0.351451575756073,
-0.00358392670750618,
0.3273860812187195,
-0.03908818960189819,
0.20870669186115265,
-0.17937316000461578,
-0.1807508021593094,
-0.3657854497432709,
0.29917165637016296,
-0.07942065596580505,
-0.046364374458789825,
0.22513942420482635,
-0.22081363201141357,
-0.10087288916110992,
-0.24764326214790344,
0.17064407467842102,
-0.13668186962604523,
-0.07781216502189636,
-0.2297201156616211,
-0.15544025599956512,
0.09269097447395325,
-0.03861110657453537,
-0.054090216755867004,
0.3240002393722534,
-0.04447963833808899,
0.06533923745155334,
-0.33395618200302124,
0.02466895803809166,
0.18843898177146912,
-0.04074040800333023,
0.08761154115200043,
0.48438918590545654,
-0.20625033974647522,
-0.09829389303922653,
0.04195170849561691,
0.1026872918009758,
0.216133713722229,
-0.23425406217575073,
0.15254810452461243,
-0.09598790854215622,
-0.2151220291852951,
0.085065096616745,
0.3822736144065857,
0.40276211500167847,
0.21170392632484436,
0.16860145330429077,
0.1083408072590828,
-0.046882517635822296,
0.18032023310661316,
0.523311972618103,
0.21708793938159943,
-0.2948913276195526,
0.016645239666104317,
0.11642065644264221,
0.14879068732261658,
-0.2131061851978302,
0.05475842207670212,
0.3760952055454254,
-0.13475467264652252,
0.10974240303039551,
0.3557569682598114,
0.4980614483356476,
0.24455448985099792,
0.3160834312438965,
-0.056076835840940475,
0.4652259647846222,
0.02598775178194046,
0.4534125328063965,
-0.0966496616601944,
-0.02192891389131546,
0.13968349993228912,
0.15249720215797424,
0.114403635263443,
0.27135688066482544,
-0.2967013120651245,
0.08782577514648438,
0.7978910803794861,
-0.15198954939842224,
0.2562093138694763,
0.1719617396593094,
-0.22245940566062927,
-0.010087620466947556,
0.21289923787117004,
0.055077698081731796,
0.3261830508708954,
-0.07316574454307556,
0.5840410590171814,
-0.35957071185112,
-0.28901049494743347,
0.015754805877804756,
0.13957136869430542,
0.02145630493760109,
-0.07379800081253052,
-0.12614236772060394,
-0.1473846286535263,
-0.2920483350753784,
-0.0949290543794632,
-0.22018858790397644,
-0.03435886651277542,
0.11216327548027039,
-0.118155837059021,
-0.19823987782001495,
-0.1644424945116043,
0.027861105278134346,
-0.020907841622829437,
0.11743424087762833,
-0.13826997578144073,
0.2289198338985443,
0.18642574548721313,
-0.0740322470664978,
0.26380008459091187,
0.5490747690200806,
0.3939657211303711,
-0.23110580444335938,
-0.22530820965766907,
0.08181723952293396,
-0.1035802960395813,
-0.03017636016011238,
-0.1365763545036316,
0.07786741107702255,
-0.13869419693946838,
-0.31314802169799805,
-0.04082248732447624,
0.191089928150177,
-0.09568528085947037,
-0.2292437106370926,
0.14173446595668793,
-0.26979905366897583,
-0.21269668638706207,
0.2837013900279999,
-0.03090061992406845,
-0.00199059396982193,
-0.28788867592811584,
0.28141704201698303,
-0.26907801628112793,
-0.26919183135032654,
0.4438524544239044,
-0.04823879525065422,
0.1187167838215828,
-0.026986014097929,
0.09666085243225098,
0.27111315727233887,
0.4181256592273712,
0.33567050099372864,
0.15107648074626923,
-0.42119312286376953,
-0.544858992099762,
-0.6589451432228088,
0.3780207633972168,
0.003145746886730194,
-0.0991140604019165,
0.0402856320142746,
-0.08479447662830353,
0.32841846346855164,
-0.15694016218185425,
-0.17172254621982574,
-0.5048792362213135,
0.17946913838386536,
-0.2111613154411316,
-0.4244730472564697,
0.02241414785385132,
-0.02653275430202484,
-0.08751243352890015,
0.21197138726711273,
-0.3328474760055542,
0.030039004981517792,
0.2751343250274658,
-0.07008066028356552,
0.0189371295273304,
0.32692503929138184,
0.16333217918872833,
-0.21126028895378113,
0.044649090617895126,
-0.10202892124652863,
0.36257392168045044,
-0.06963295489549637,
-0.27884823083877563,
-0.1868252009153366,
-0.05712417885661125,
-0.21941515803337097,
0.3479246199131012,
-0.2516549825668335,
-0.03285742178559303,
-0.11009985953569412,
-0.0859874039888382,
0.00582085782662034,
-0.07126156240701675,
0.2512417435646057,
-0.10586448758840561,
-0.519166886806488,
0.17806319892406464,
-0.11427809298038483,
0.19453725218772888,
0.09727555513381958,
0.6413248777389526,
-0.15118408203125,
0.30110782384872437,
-0.41859060525894165,
-0.24046210944652557,
0.647101104259491,
0.04028576612472534,
-0.326809287071228,
-0.03895414248108864,
0.24715642631053925,
-0.4157928228378296,
-0.12887069582939148,
-0.3688119649887085,
0.12743064761161804,
0.1418898105621338,
0.13128146529197693,
-0.17549100518226624,
0.1347920298576355,
0.06843558698892593,
-0.12442770600318909,
-0.06943036615848541,
-0.013638541102409363,
0.2088598906993866,
0.029559453949332237,
0.15404857695102692,
0.03268042951822281
] |
https://github.com/huggingface/datasets/issues/5096 | Transfer some canonical datasets under an organization namespace | @davanstrien and @lhoestq, I have shared with you this spreadsheet: https://docs.google.com/spreadsheets/d/1GvNTd1UxmtTvEFOK-Eq6E3Str4FUWQuWZsEN0WVFirs/edit?usp=sharing
This way we can take datasets by batches to contact the authors and transfer to the organizations. | As discussed during our @huggingface/datasets meeting, we are planning to move some "canonical" dataset scripts under their corresponding organization namespace (if this does not exist).
On the contrary, if the dataset already exists under the organization namespace, we are deprecating the canonical one (and eventually delete it).
First, we should test it using a dummy dataset/organization.
TODO:
- [x] Test with a dummy dataset
- [x] Create dummy canonical dataset: https://huggingface.co/datasets/dummy_canonical_dataset
- [x] Create dummy organization: https://huggingface.co/dummy-canonical-org
- [x] Transfer dummy canonical dataset to dummy organization
- [ ] Transfer datasets
- [x] babi_qa => facebook
- [x] blbooks => TheBritishLibrary/blbooks
- [x] blbooksgenre => TheBritishLibrary/blbooksgenre
- [x] common_gen => allenai
- [x] commonsense_qa => tau
- [x] competition_math => hendrycks/competition_math
- [x] cord19 => allenai
- [x] emotion => dair-ai
- [ ] gem => GEM
- [x] hellaswag => Rowan
- [x] hendrycks_test => cais/mmlu
- [x] indonlu => indonlp
- [ ] multilingual_librispeech => facebook
- It already exists "facebook/multilingual_librispeech"
- [ ] oscar => oscar-corpus
- [x] peer_read => allenai
- [x] qasper => allenai
- [x] reddit => webis/tldr-17
- [x] russian_super_glue => russiannlp
- [x] rvl_cdip => aharley
- [x] s2orc => allenai
- [x] scicite => allenai
- [x] scifact => allenai
- [x] scitldr => allenai
- [x] swiss_judgment_prediction => rcds
- [x] the_pile => EleutherAI
- [ ] wmt14, wmt15, wmt16, wmt17, wmt18, wmt19,... => wmt
- [ ] Deprecate (and eventually remove) datasets that cannot be transferred because they already exist
- [x] banking77 => PolyAI
- [x] common_voice => mozilla-foundation
- [x] german_legal_entity_recognition => elenanereiss
- ...
EDIT: the list above is continuously being updated | 28 | Transfer some canonical datasets under an organization namespace
As discussed during our @huggingface/datasets meeting, we are planning to move some "canonical" dataset scripts under their corresponding organization namespace (if this does not exist).
On the contrary, if the dataset already exists under the organization namespace, we are deprecating the canonical one (and eventually delete it).
First, we should test it using a dummy dataset/organization.
TODO:
- [x] Test with a dummy dataset
- [x] Create dummy canonical dataset: https://huggingface.co/datasets/dummy_canonical_dataset
- [x] Create dummy organization: https://huggingface.co/dummy-canonical-org
- [x] Transfer dummy canonical dataset to dummy organization
- [ ] Transfer datasets
- [x] babi_qa => facebook
- [x] blbooks => TheBritishLibrary/blbooks
- [x] blbooksgenre => TheBritishLibrary/blbooksgenre
- [x] common_gen => allenai
- [x] commonsense_qa => tau
- [x] competition_math => hendrycks/competition_math
- [x] cord19 => allenai
- [x] emotion => dair-ai
- [ ] gem => GEM
- [x] hellaswag => Rowan
- [x] hendrycks_test => cais/mmlu
- [x] indonlu => indonlp
- [ ] multilingual_librispeech => facebook
- It already exists "facebook/multilingual_librispeech"
- [ ] oscar => oscar-corpus
- [x] peer_read => allenai
- [x] qasper => allenai
- [x] reddit => webis/tldr-17
- [x] russian_super_glue => russiannlp
- [x] rvl_cdip => aharley
- [x] s2orc => allenai
- [x] scicite => allenai
- [x] scifact => allenai
- [x] scitldr => allenai
- [x] swiss_judgment_prediction => rcds
- [x] the_pile => EleutherAI
- [ ] wmt14, wmt15, wmt16, wmt17, wmt18, wmt19,... => wmt
- [ ] Deprecate (and eventually remove) datasets that cannot be transferred because they already exist
- [x] banking77 => PolyAI
- [x] common_voice => mozilla-foundation
- [x] german_legal_entity_recognition => elenanereiss
- ...
EDIT: the list above is continuously being updated
@davanstrien and @lhoestq, I have shared with you this spreadsheet: https://docs.google.com/spreadsheets/d/1GvNTd1UxmtTvEFOK-Eq6E3Str4FUWQuWZsEN0WVFirs/edit?usp=sharing
This way we can take datasets by batches to contact the authors and transfer to the organizations. | [
0.03601277992129326,
0.3146805763244629,
-0.013221616856753826,
0.025197602808475494,
0.16879820823669434,
0.022613786160945892,
0.24629512429237366,
0.39038974046707153,
0.057000499218702316,
0.025375306606292725,
-0.312804639339447,
-0.06983106583356857,
-0.2716740369796753,
0.03336823731660843,
0.21916291117668152,
-0.02534719556570053,
0.28011876344680786,
-0.2540474534034729,
-0.11193116009235382,
0.000845007598400116,
-0.334025114774704,
0.09270244091749191,
-0.1180080771446228,
-0.08785231411457062,
0.07461937516927719,
0.1838786005973816,
-0.3534415662288666,
0.3029385507106781,
-0.2397867888212204,
-0.05576207488775253,
0.3588072955608368,
0.4938142001628876,
0.002233298495411873,
0.7967617511749268,
-0.00011061892291763797,
0.05353102833032608,
0.337501585483551,
-0.005180042237043381,
-0.06838157027959824,
-0.09670981764793396,
0.12705686688423157,
-0.006540786940604448,
-0.20506836473941803,
-0.21504434943199158,
0.03392563760280609,
-0.036264125257730484,
-0.052060432732105255,
-0.6274397373199463,
0.13704989850521088,
0.3337576985359192,
0.20203472673892975,
0.2210952192544937,
-0.32084187865257263,
-0.22245019674301147,
-0.15001672506332397,
0.216275155544281,
-0.07000303268432617,
0.17056141793727875,
0.12356714904308319,
-0.06079749017953873,
0.028144724667072296,
0.1554781049489975,
-0.18896369636058807,
-0.22749470174312592,
0.13131369650363922,
-0.15742798149585724,
-0.2253183126449585,
-0.04895826429128647,
0.1041027083992958,
0.23433607816696167,
0.4135802388191223,
-0.5283428430557251,
-0.2937052547931671,
-0.05991502106189728,
0.02108442783355713,
-0.3564753830432892,
-0.053699709475040436,
0.08972726762294769,
0.21978090703487396,
0.1358124315738678,
-0.22047863900661469,
0.14517632126808167,
-0.07529198378324509,
0.027146250009536743,
-0.105387382209301,
0.2928350865840912,
-0.11963139474391937,
-0.08330699056386948,
0.13971589505672455,
-0.15472698211669922,
0.09724917262792587,
-0.2597275972366333,
-0.004040375351905823,
-0.10250993072986603,
-0.054300229996442795,
-0.14230045676231384,
-0.1305103302001953,
0.48133155703544617,
0.45372119545936584,
0.2500794231891632,
-0.050663456320762634,
0.05952627956867218,
0.02258927747607231,
-0.13849735260009766,
-0.019990500062704086,
0.446463406085968,
0.06951696425676346,
-0.017177265137434006,
0.17367854714393616,
0.5844176411628723,
-0.13330399990081787,
0.14620982110500336,
-0.0731080174446106,
-0.19100940227508545,
-0.09826019406318665,
0.1389855146408081,
0.4809075593948364,
-0.19772037863731384,
-0.25550881028175354,
0.017606018111109734,
0.05676323175430298,
-0.06891253590583801,
0.18268997967243195,
0.32016122341156006,
0.12697674334049225,
0.19077077507972717,
0.07529476284980774,
0.42400306463241577,
-0.15422514081001282,
-0.11233601719141006,
-0.22916314005851746,
0.21584245562553406,
-0.32787495851516724,
-0.11086677759885788,
0.2646735906600952,
0.3332204818725586,
0.008367515169084072,
0.013774043880403042,
0.6366074085235596,
0.04000500589609146,
0.11430121958255768,
0.2182680070400238,
0.2352234423160553,
0.10662104189395905,
-0.20737294852733612,
0.0935727134346962,
0.2817547619342804,
0.03226589411497116,
-0.4001914858818054,
-0.009421579539775848,
0.22304490208625793,
-0.2509647309780121,
0.09635055065155029,
0.22948260605335236,
-0.34835100173950195,
0.031453683972358704,
-0.23221302032470703,
0.172567218542099,
-0.32518061995506287,
0.14287197589874268,
0.18556086719036102,
-0.045319221913814545,
-0.2501612901687622,
0.03734701871871948,
0.16590899229049683,
0.44462114572525024,
0.0506645105779171,
-0.05058513954281807,
-0.2055414617061615,
0.17334160208702087,
0.17369496822357178,
0.21928620338439941,
-0.14719262719154358,
-0.2735174298286438,
-0.29106953740119934,
-0.0730503648519516,
0.05119014531373978,
-0.4424796998500824,
-0.17234234511852264,
-0.13083159923553467,
-0.30119043588638306,
0.21863918006420135,
0.20813699066638947,
-0.18059948086738586,
-0.012016402557492256,
-0.33324024081230164,
-0.3061886429786682,
0.11232368648052216,
-0.1915210783481598,
0.049065396189689636,
-0.24579185247421265,
-0.05772656947374344,
0.0040602535009384155,
-0.04932241886854172,
0.0361291840672493,
-0.22652673721313477,
-0.16731920838356018,
0.02738182246685028,
0.06964106112718582,
-0.06394219398498535,
0.10986462235450745,
0.016251787543296814,
0.21052196621894836,
0.02001882717013359,
0.15811844170093536,
0.1001494899392128,
-0.5807812213897705,
0.15277674794197083,
0.1323746293783188,
0.1388634741306305,
0.27917957305908203,
-0.5364103317260742,
-0.3134549558162689,
-0.030428122729063034,
-0.14633890986442566,
-0.03112969920039177,
0.14048820734024048,
0.28166311979293823,
0.15273192524909973,
0.03628057613968849,
-0.27926939725875854,
0.13196569681167603,
-0.13000109791755676,
0.38821715116500854,
-0.30564194917678833,
0.32862114906311035,
-0.07588770985603333,
0.03723996505141258,
-0.051047876477241516,
0.25457069277763367,
0.10362055152654648,
-0.36441007256507874,
0.18185919523239136,
0.16089075803756714,
0.022484945133328438,
0.10776764899492264,
0.2749273478984833,
0.5534853935241699,
0.10793697088956833,
-0.4116390347480774,
0.3704579174518585,
0.40071263909339905,
-0.230751633644104,
0.023905552923679352,
-0.10351753979921341,
0.6089016199111938,
-0.22696103155612946,
0.1790727972984314,
0.03366365283727646,
-0.010421055369079113,
0.3171018958091736,
-0.3537808656692505,
-0.16970714926719666,
-0.18057245016098022,
0.2875348627567291,
0.20116539299488068,
0.23665012419223785,
0.15889345109462738,
-0.14994797110557556,
0.08600687235593796,
0.09506623446941376,
-0.2327404022216797,
-0.08551093190908432,
0.037203073501586914,
-0.18201658129692078,
-0.22795599699020386,
0.09812141209840775,
0.06888744235038757,
0.306840717792511,
0.22341646254062653,
0.19249331951141357,
0.10577192902565002,
0.07405052334070206,
-0.20582780241966248,
0.24629077315330505,
-0.039842650294303894,
-0.11717750132083893,
0.06537701189517975,
0.027718374505639076,
0.1007414385676384,
-0.35029950737953186,
-0.20460227131843567,
0.11624161154031754,
0.02367030829191208,
-0.2836807668209076,
-0.050492215901613235,
-0.19698940217494965,
-0.5736656188964844,
-0.31073087453842163,
0.0964297205209732,
-0.17335185408592224,
-0.34794771671295166,
0.07709766179323196,
0.14208504557609558,
-0.26182353496551514,
0.2650207579135895,
-0.061177562922239304,
0.4066627025604248,
-0.4737185537815094,
-0.01120767928659916,
-0.29622381925582886,
-0.14225177466869354,
-0.046021826565265656,
0.08038845658302307,
0.4786491394042969,
0.03217360004782677,
0.3983750641345978,
-0.19829745590686798,
0.09060139209032059,
-0.5316441059112549,
-0.5609970092773438,
0.06297193467617035,
-0.10595494508743286,
-0.09508319944143295,
-0.013065077364444733,
0.064992755651474,
0.019409101456403732,
-0.13517844676971436,
-0.053580548614263535,
-0.26359912753105164,
-0.22776688635349274,
0.21447345614433289,
-0.11187933385372162,
0.052342869341373444,
-0.12866708636283875,
-0.06865235418081284,
0.04673997312784195,
-0.1884835809469223,
0.2654454708099365,
-0.21053649485111237,
-0.2663511037826538,
0.38857176899909973,
-0.34617191553115845,
-0.02494734153151512,
0.03483462706208229,
-0.03618665039539337,
-0.07007887214422226,
-0.40345650911331177,
-0.023512374609708786,
0.012818824499845505,
-0.047233644872903824,
0.0800754576921463,
-0.14796976745128632,
0.3451424837112427,
-0.0314546637237072,
-0.08192158490419388,
-0.40935003757476807,
0.03352215513586998,
0.2154233157634735,
0.29856815934181213,
-0.12281142175197601,
0.35357969999313354,
0.021030493080615997,
-0.10679864138364792,
0.03203742951154709,
-0.27472445368766785,
-0.004452452063560486,
-0.02170763537287712,
-0.24322041869163513,
-0.06313621997833252,
-0.026209603995084763,
-0.005797281861305237,
0.519349992275238,
0.1798923760652542,
-0.22689567506313324,
0.05743204429745674,
0.04551420360803604,
0.3789563477039337,
0.08488240092992783,
-0.4390549063682556,
0.15371771156787872,
0.12996257841587067,
-0.12165699899196625,
0.489498496055603,
-0.14502978324890137,
0.15214495360851288,
0.2177964150905609,
0.1617741584777832,
-0.19729605317115784,
-0.4033031761646271,
0.0642189159989357,
-0.4244045615196228,
0.014416389167308807,
-0.042773421853780746,
-0.3315638601779938,
-0.051625803112983704,
-0.20929130911827087,
0.2664707601070404,
0.4571709632873535,
-0.16012132167816162,
-0.13317368924617767,
-0.8004539608955383,
0.38627222180366516,
-0.29133498668670654,
0.6160179376602173,
-0.24042758345603943,
0.08555655926465988,
0.09576888382434845,
-0.035996366292238235,
-0.25771647691726685,
0.07870051264762878,
0.3455878794193268,
-0.1860876977443695,
0.08278216421604156,
0.20608650147914886,
-0.1175706535577774,
-0.14060939848423004,
-0.06736011803150177,
-0.1506984978914261,
0.18053176999092102,
0.03173106908798218,
0.3459205627441406,
-0.2861994504928589,
-0.3775887191295624,
0.28617122769355774,
0.29870185256004333,
0.24967622756958008,
0.13720253109931946,
-0.17338621616363525,
-0.5493564605712891,
-0.1373220980167389,
0.2461465299129486,
0.03792273998260498,
0.01396092027425766,
-0.4668073356151581,
0.2833082973957062,
0.07727116346359253,
-0.26871728897094727,
0.5272123217582703,
-0.14347147941589355,
0.13126850128173828,
0.2335890829563141,
0.23403778672218323,
0.07560228556394577,
0.010336823761463165,
0.4027267396450043,
0.35962724685668945,
-0.28126540780067444,
-0.6468427777290344,
-0.3701677918434143,
0.3382805287837982,
0.41623687744140625,
0.44357630610466003,
0.09398677945137024,
0.10596156865358353,
-0.2877765893936157,
-0.058616116642951965,
-0.2761581540107727,
0.11762867867946625,
0.22723986208438873,
0.13536149263381958,
-0.37937647104263306,
-0.027213308960199356,
0.007713258266448975,
0.23551501333713531,
-0.07795865833759308,
0.3683994710445404,
0.41973942518234253,
-0.4234558343887329,
0.15315845608711243,
-0.007603466510772705,
1.0860503911972046,
-0.4420916438102722,
0.29685133695602417,
0.18279540538787842,
-0.034577563405036926,
0.4850858747959137,
-0.014001816511154175,
-0.10213195532560349,
-0.3185679316520691,
0.037244752049446106,
0.08955621719360352,
0.14957192540168762,
0.3196287751197815,
0.09452944993972778,
-0.5834870934486389,
0.26453110575675964,
-0.18411573767662048,
0.468787282705307,
0.12040126323699951,
0.28154605627059937,
-0.05534795671701431,
-0.22749356925487518,
-0.13542598485946655,
0.19500461220741272,
0.022262856364250183,
0.08336648344993591,
-0.06846834719181061,
0.17827315628528595,
-0.05900048092007637,
0.0456404834985733,
-0.12039109319448471,
0.09768553078174591,
-0.20930345356464386,
-0.16375777125358582,
-0.060117144137620926,
-0.15151354670524597,
0.27517804503440857,
0.23110251128673553,
0.9707485437393188,
0.14742015302181244,
-0.0513542965054512,
0.1522381603717804,
0.0011297240853309631,
0.04577213525772095,
0.2466040700674057,
-0.29108649492263794,
0.1228560358285904,
0.21794015169143677,
-0.09015149623155594,
-0.07650230079889297,
0.20066480338573456,
-0.09088201820850372,
-0.30377212166786194,
-0.1506374329328537,
0.1147153228521347,
-0.5170769691467285,
0.037725064903497696,
0.1330622434616089,
-0.24732071161270142,
-0.11287134885787964,
0.15653665363788605,
-0.009235702455043793,
-0.24040378630161285,
-0.04742448031902313,
-0.06646868586540222,
-0.3099612593650818,
-0.1461370289325714,
-0.037654586136341095,
-0.19239291548728943,
-0.11392451822757721,
0.1332247257232666,
-0.16311438381671906,
0.13090205192565918,
-0.265350878238678,
-0.06298109143972397,
0.5170079469680786,
-0.22547373175621033,
0.2012604922056198,
-0.01144181378185749,
-0.21671965718269348,
0.1953076869249344,
-0.08138018846511841,
0.13659752905368805,
-0.022847890853881836,
-0.013459812849760056,
-0.09562533348798752,
-0.1936817616224289,
0.351451575756073,
-0.00358392670750618,
0.3273860812187195,
-0.03908818960189819,
0.20870669186115265,
-0.17937316000461578,
-0.1807508021593094,
-0.3657854497432709,
0.29917165637016296,
-0.07942065596580505,
-0.046364374458789825,
0.22513942420482635,
-0.22081363201141357,
-0.10087288916110992,
-0.24764326214790344,
0.17064407467842102,
-0.13668186962604523,
-0.07781216502189636,
-0.2297201156616211,
-0.15544025599956512,
0.09269097447395325,
-0.03861110657453537,
-0.054090216755867004,
0.3240002393722534,
-0.04447963833808899,
0.06533923745155334,
-0.33395618200302124,
0.02466895803809166,
0.18843898177146912,
-0.04074040800333023,
0.08761154115200043,
0.48438918590545654,
-0.20625033974647522,
-0.09829389303922653,
0.04195170849561691,
0.1026872918009758,
0.216133713722229,
-0.23425406217575073,
0.15254810452461243,
-0.09598790854215622,
-0.2151220291852951,
0.085065096616745,
0.3822736144065857,
0.40276211500167847,
0.21170392632484436,
0.16860145330429077,
0.1083408072590828,
-0.046882517635822296,
0.18032023310661316,
0.523311972618103,
0.21708793938159943,
-0.2948913276195526,
0.016645239666104317,
0.11642065644264221,
0.14879068732261658,
-0.2131061851978302,
0.05475842207670212,
0.3760952055454254,
-0.13475467264652252,
0.10974240303039551,
0.3557569682598114,
0.4980614483356476,
0.24455448985099792,
0.3160834312438965,
-0.056076835840940475,
0.4652259647846222,
0.02598775178194046,
0.4534125328063965,
-0.0966496616601944,
-0.02192891389131546,
0.13968349993228912,
0.15249720215797424,
0.114403635263443,
0.27135688066482544,
-0.2967013120651245,
0.08782577514648438,
0.7978910803794861,
-0.15198954939842224,
0.2562093138694763,
0.1719617396593094,
-0.22245940566062927,
-0.010087620466947556,
0.21289923787117004,
0.055077698081731796,
0.3261830508708954,
-0.07316574454307556,
0.5840410590171814,
-0.35957071185112,
-0.28901049494743347,
0.015754805877804756,
0.13957136869430542,
0.02145630493760109,
-0.07379800081253052,
-0.12614236772060394,
-0.1473846286535263,
-0.2920483350753784,
-0.0949290543794632,
-0.22018858790397644,
-0.03435886651277542,
0.11216327548027039,
-0.118155837059021,
-0.19823987782001495,
-0.1644424945116043,
0.027861105278134346,
-0.020907841622829437,
0.11743424087762833,
-0.13826997578144073,
0.2289198338985443,
0.18642574548721313,
-0.0740322470664978,
0.26380008459091187,
0.5490747690200806,
0.3939657211303711,
-0.23110580444335938,
-0.22530820965766907,
0.08181723952293396,
-0.1035802960395813,
-0.03017636016011238,
-0.1365763545036316,
0.07786741107702255,
-0.13869419693946838,
-0.31314802169799805,
-0.04082248732447624,
0.191089928150177,
-0.09568528085947037,
-0.2292437106370926,
0.14173446595668793,
-0.26979905366897583,
-0.21269668638706207,
0.2837013900279999,
-0.03090061992406845,
-0.00199059396982193,
-0.28788867592811584,
0.28141704201698303,
-0.26907801628112793,
-0.26919183135032654,
0.4438524544239044,
-0.04823879525065422,
0.1187167838215828,
-0.026986014097929,
0.09666085243225098,
0.27111315727233887,
0.4181256592273712,
0.33567050099372864,
0.15107648074626923,
-0.42119312286376953,
-0.544858992099762,
-0.6589451432228088,
0.3780207633972168,
0.003145746886730194,
-0.0991140604019165,
0.0402856320142746,
-0.08479447662830353,
0.32841846346855164,
-0.15694016218185425,
-0.17172254621982574,
-0.5048792362213135,
0.17946913838386536,
-0.2111613154411316,
-0.4244730472564697,
0.02241414785385132,
-0.02653275430202484,
-0.08751243352890015,
0.21197138726711273,
-0.3328474760055542,
0.030039004981517792,
0.2751343250274658,
-0.07008066028356552,
0.0189371295273304,
0.32692503929138184,
0.16333217918872833,
-0.21126028895378113,
0.044649090617895126,
-0.10202892124652863,
0.36257392168045044,
-0.06963295489549637,
-0.27884823083877563,
-0.1868252009153366,
-0.05712417885661125,
-0.21941515803337097,
0.3479246199131012,
-0.2516549825668335,
-0.03285742178559303,
-0.11009985953569412,
-0.0859874039888382,
0.00582085782662034,
-0.07126156240701675,
0.2512417435646057,
-0.10586448758840561,
-0.519166886806488,
0.17806319892406464,
-0.11427809298038483,
0.19453725218772888,
0.09727555513381958,
0.6413248777389526,
-0.15118408203125,
0.30110782384872437,
-0.41859060525894165,
-0.24046210944652557,
0.647101104259491,
0.04028576612472534,
-0.326809287071228,
-0.03895414248108864,
0.24715642631053925,
-0.4157928228378296,
-0.12887069582939148,
-0.3688119649887085,
0.12743064761161804,
0.1418898105621338,
0.13128146529197693,
-0.17549100518226624,
0.1347920298576355,
0.06843558698892593,
-0.12442770600318909,
-0.06943036615848541,
-0.013638541102409363,
0.2088598906993866,
0.029559453949332237,
0.15404857695102692,
0.03268042951822281
] |
https://github.com/huggingface/datasets/issues/5094 | Multiprocessing with `Dataset.map` and `PyTorch` results in deadlock | Hi ! Could it be an Out of Memory issue that could have killed one of the processes ? can you check your memory ? | ## Describe the bug
There seems to be an issue with using multiprocessing with `datasets.Dataset.map` (i.e. setting `num_proc` to a value greater than one) combined with a function that uses `torch` under the hood. The subprocesses that `datasets.Dataset.map` spawns [a this step](https://github.com/huggingface/datasets/blob/1b935dab9d2f171a8c6294269421fe967eb55e34/src/datasets/arrow_dataset.py#L2663) go into wait mode forever.
## Steps to reproduce the bug
The below code goes into deadlock when `NUMBER_OF_PROCESSES` is greater than one.
```python
NUMBER_OF_PROCESSES = 2
from transformers import AutoTokenizer, AutoModel
from datasets import load_dataset
dataset = load_dataset("glue", "mrpc", split="train")
tokenizer = AutoTokenizer.from_pretrained("sentence-transformers/all-MiniLM-L6-v2")
model = AutoModel.from_pretrained("sentence-transformers/all-MiniLM-L6-v2")
model.to("cpu")
def cls_pooling(model_output):
return model_output.last_hidden_state[:, 0]
def generate_embeddings_batched(examples):
sentences_batch = list(examples['sentence1'])
encoded_input = tokenizer(
sentences_batch, padding=True, truncation=True, return_tensors="pt"
)
encoded_input = {k: v.to("cpu") for k, v in encoded_input.items()}
model_output = model(**encoded_input)
embeddings = cls_pooling(model_output)
examples['embeddings'] = embeddings.detach().cpu().numpy() # 64, 384
return examples
embeddings_dataset = dataset.map(
generate_embeddings_batched,
batched=True,
batch_size=10,
num_proc=NUMBER_OF_PROCESSES
)
```
While debugging it I've seen that it gets "stuck" when calling `torch.nn.Embedding.forward` but some testing shows that the same happens with other functions from `torch.nn`.
## Environment info
- Platform: Linux-5.14.0-1052-oem-x86_64-with-glibc2.31
- Python version: 3.9.14
- PyArrow version: 9.0.0
- Pandas version: 1.5.0
Not sure if this is a HF problem, a PyTorch problem or something I'm doing wrong..
Thanks!
| 25 | Multiprocessing with `Dataset.map` and `PyTorch` results in deadlock
## Describe the bug
There seems to be an issue with using multiprocessing with `datasets.Dataset.map` (i.e. setting `num_proc` to a value greater than one) combined with a function that uses `torch` under the hood. The subprocesses that `datasets.Dataset.map` spawns [a this step](https://github.com/huggingface/datasets/blob/1b935dab9d2f171a8c6294269421fe967eb55e34/src/datasets/arrow_dataset.py#L2663) go into wait mode forever.
## Steps to reproduce the bug
The below code goes into deadlock when `NUMBER_OF_PROCESSES` is greater than one.
```python
NUMBER_OF_PROCESSES = 2
from transformers import AutoTokenizer, AutoModel
from datasets import load_dataset
dataset = load_dataset("glue", "mrpc", split="train")
tokenizer = AutoTokenizer.from_pretrained("sentence-transformers/all-MiniLM-L6-v2")
model = AutoModel.from_pretrained("sentence-transformers/all-MiniLM-L6-v2")
model.to("cpu")
def cls_pooling(model_output):
return model_output.last_hidden_state[:, 0]
def generate_embeddings_batched(examples):
sentences_batch = list(examples['sentence1'])
encoded_input = tokenizer(
sentences_batch, padding=True, truncation=True, return_tensors="pt"
)
encoded_input = {k: v.to("cpu") for k, v in encoded_input.items()}
model_output = model(**encoded_input)
embeddings = cls_pooling(model_output)
examples['embeddings'] = embeddings.detach().cpu().numpy() # 64, 384
return examples
embeddings_dataset = dataset.map(
generate_embeddings_batched,
batched=True,
batch_size=10,
num_proc=NUMBER_OF_PROCESSES
)
```
While debugging it I've seen that it gets "stuck" when calling `torch.nn.Embedding.forward` but some testing shows that the same happens with other functions from `torch.nn`.
## Environment info
- Platform: Linux-5.14.0-1052-oem-x86_64-with-glibc2.31
- Python version: 3.9.14
- PyArrow version: 9.0.0
- Pandas version: 1.5.0
Not sure if this is a HF problem, a PyTorch problem or something I'm doing wrong..
Thanks!
Hi ! Could it be an Out of Memory issue that could have killed one of the processes ? can you check your memory ? | [
-0.19728319346904755,
-0.5258713364601135,
-0.059857141226530075,
0.19121290743350983,
-0.03308035433292389,
-0.03727487847208977,
0.3879684805870056,
0.10255962610244751,
0.19705474376678467,
0.15648043155670166,
0.1593065857887268,
0.5224060416221619,
-0.1971760094165802,
-0.34866851568222046,
-0.30984288454055786,
0.00672561302781105,
0.12384426593780518,
-0.35253116488456726,
-0.04642243683338165,
0.09764261543750763,
-0.15816769003868103,
0.26773154735565186,
-0.16990752518177032,
-0.054510414600372314,
-0.7615679502487183,
0.06720700860023499,
0.08253856748342514,
-0.0023633167147636414,
0.2036450356245041,
-0.24507641792297363,
-0.16812686622142792,
0.15418265759944916,
-0.058848049491643906,
0.8481484651565552,
-0.00011896129581145942,
-0.1091778576374054,
0.2780541181564331,
0.20563127100467682,
0.01093040406703949,
-0.2291586548089981,
0.3251565098762512,
-0.025720171630382538,
0.16306909918785095,
-0.034114960581064224,
0.13139984011650085,
0.07892987132072449,
0.11396777629852295,
-0.7218788266181946,
0.30645331740379333,
0.14683747291564941,
0.12756921350955963,
0.5827531814575195,
-0.029711542651057243,
0.020966647192835808,
-0.2104896605014801,
-0.0050002411007881165,
-0.07171738892793655,
0.15186861157417297,
0.5983694791793823,
-0.2531331181526184,
-0.37854892015457153,
0.44758784770965576,
-0.12484809756278992,
-0.02141467109322548,
0.012464817613363266,
-0.11631786078214645,
-0.1307639181613922,
-0.74214768409729,
0.24704810976982117,
0.09432946145534515,
-0.2586125135421753,
-0.25411322712898254,
-0.1468227356672287,
-0.2539825737476349,
0.03562355786561966,
-0.17146922647953033,
0.0931064784526825,
0.16410021483898163,
-0.28115519881248474,
-0.07607473433017731,
-0.3438294231891632,
-0.05187489464879036,
0.13953672349452972,
-0.10562178492546082,
0.057263366878032684,
0.41724541783332825,
0.20500816404819489,
0.2839682400226593,
0.2434198260307312,
0.12929630279541016,
-0.0184665247797966,
-0.01704511046409607,
0.16135144233703613,
0.02039492502808571,
-0.5973533391952515,
0.11267419159412384,
0.20168471336364746,
-0.09189874678850174,
-0.007003717124462128,
-0.21409441530704498,
-0.010116730816662312,
0.11609016358852386,
0.14591500163078308,
0.10987505316734314,
0.39899635314941406,
-0.31718894839286804,
0.018270418047904968,
0.07181034982204437,
0.2054618000984192,
-0.3312462568283081,
-0.08371372520923615,
0.10557211190462112,
0.12287615239620209,
-0.3689732849597931,
0.2798476219177246,
0.16081392765045166,
0.11593791842460632,
-0.0066688172519207,
-0.0275504682213068,
0.15538062155246735,
-0.2550780177116394,
0.11779823154211044,
0.06784741580486298,
0.1721150279045105,
0.13410601019859314,
0.6897133588790894,
0.16588005423545837,
0.17131483554840088,
-0.485755980014801,
0.029595524072647095,
-0.05323448404669762,
-0.15932783484458923,
-0.3375268578529358,
0.09490395337343216,
0.17139573395252228,
-0.11264668405056,
0.05842554569244385,
0.4103654623031616,
0.46188366413116455,
-0.2101811170578003,
0.37107768654823303,
-0.300601989030838,
0.23612502217292786,
0.14609700441360474,
-0.08715368807315826,
0.2400803118944168,
-0.10769063234329224,
0.38669031858444214,
0.035049885511398315,
0.3083063066005707,
0.016420748084783554,
-0.1343061476945877,
-0.20859995484352112,
0.11937222629785538,
0.08320971578359604,
0.3459077775478363,
0.08964204043149948,
0.14199620485305786,
0.5798596143722534,
0.13193070888519287,
0.18659454584121704,
-0.4784564971923828,
-0.20855359733104706,
-0.06694753468036652,
0.13375802338123322,
0.3453560471534729,
0.11969953775405884,
0.09752066433429718,
0.04193601757287979,
0.015694625675678253,
-0.010526075959205627,
0.255352646112442,
-0.1328512728214264,
0.11517554521560669,
-0.04663532227277756,
0.1648816615343094,
-0.19056421518325806,
-0.28738391399383545,
-0.3479527533054352,
0.25245365500450134,
-0.33450931310653687,
0.11553498357534409,
0.09597177058458328,
0.2848915159702301,
0.08560378104448318,
0.12345002591609955,
0.437857985496521,
0.10185349732637405,
-0.10652031004428864,
0.22913774847984314,
-0.2130875140428543,
-0.019230011850595474,
0.05724150687456131,
0.08973921835422516,
0.22123299539089203,
-0.3161967992782593,
-0.38304030895233154,
-0.08010619133710861,
0.4298316240310669,
-0.03588595613837242,
0.034304216504096985,
0.3358994722366333,
-0.3085514307022095,
-0.04112705588340759,
0.08295167982578278,
-0.42112377285957336,
-0.5840059518814087,
0.2360517680644989,
0.08446457982063293,
0.18740639090538025,
-0.3531028628349304,
0.08271296322345734,
0.38109156489372253,
0.27939698100090027,
-0.23425160348415375,
-0.2797248065471649,
-0.015457600355148315,
-0.00445093959569931,
-0.2918185591697693,
-0.3499026894569397,
-0.0764317661523819,
0.4008371829986572,
0.3347691297531128,
-0.15005643665790558,
-0.3624480366706848,
0.21488866209983826,
-0.1342533528804779,
-0.45578664541244507,
-0.29391002655029297,
0.06479910761117935,
0.14287099242210388,
0.09160551428794861,
-0.17096862196922302,
0.2579115331172943,
0.14999359846115112,
0.11662435531616211,
-0.2063751220703125,
-0.11888884007930756,
0.25190749764442444,
-0.1659497767686844,
-0.13772618770599365,
0.14262838661670685,
-0.018337447196245193,
-0.11944236606359482,
0.09192194044589996,
0.3078451156616211,
0.12374264001846313,
0.3461223542690277,
-0.12948361039161682,
0.011080166324973106,
-0.14063520729541779,
0.12559151649475098,
-0.19415295124053955,
0.09803411364555359,
0.43549031019210815,
0.21469740569591522,
0.1837858408689499,
0.08839128911495209,
-0.2483357936143875,
0.14210480451583862,
0.177516907453537,
0.13421162962913513,
-0.18262949585914612,
-0.07960430532693863,
-0.07129605859518051,
0.052650898694992065,
0.10016792267560959,
-0.3027743995189667,
0.4516618847846985,
0.11814901232719421,
0.013969458639621735,
-0.06789060682058334,
-0.22531448304653168,
-0.12666884064674377,
-0.0660463497042656,
0.19669729471206665,
0.17183546721935272,
0.1772155612707138,
0.2936106324195862,
-0.10503654927015305,
-0.0336984358727932,
-0.2707268297672272,
0.025599433109164238,
-0.024471277371048927,
-0.20530366897583008,
0.27868714928627014,
-0.09404642879962921,
0.5213276743888855,
0.019990824162960052,
-0.07981099933385849,
-0.2054656744003296,
-0.2993314266204834,
-0.014471743255853653,
0.37930598855018616,
-0.19013366103172302,
0.32576826214790344,
-0.06756804883480072,
-0.2957773804664612,
-0.003110727295279503,
0.07801646739244461,
-0.004928715527057648,
-0.3113834261894226,
-0.05907192826271057,
-0.07129514962434769,
0.10118752717971802,
-0.0805199146270752,
0.2087545394897461,
0.3010319769382477,
-0.408439040184021,
-0.3572113513946533,
0.08309946209192276,
0.06302199512720108,
-0.24654869735240936,
0.09089983999729156,
-0.08429984748363495,
-0.11240984499454498,
0.02833835780620575,
-0.16216310858726501,
0.1483144462108612,
-0.38269826769828796,
0.022716106846928596,
0.08426787704229355,
0.07269490510225296,
-0.046181317418813705,
-0.3208022117614746,
-0.2381492555141449,
-0.2358032912015915,
-0.2659352719783783,
0.15800854563713074,
-0.35387155413627625,
0.1316913217306137,
-0.17704223096370697,
0.20771662890911102,
0.18096761405467987,
0.017398575320839882,
-0.21082700788974762,
-0.005960475653409958,
-0.06371927261352539,
0.1856509894132614,
-0.07864335924386978,
-0.3698170781135559,
-0.4100254774093628,
0.12839870154857635,
-0.12236501276493073,
0.35220181941986084,
-0.17087644338607788,
-0.050366275012493134,
-0.3920539617538452,
0.39019548892974854,
-0.2520071268081665,
-0.009723002091050148,
0.4477148950099945,
0.2500394880771637,
-0.1463022381067276,
-0.1259407103061676,
-0.08457336574792862,
0.33920368552207947,
-0.13329461216926575,
-0.000523984432220459,
-0.05256936699151993,
0.27146732807159424,
0.09986831247806549,
0.7712089419364929,
0.25723791122436523,
-0.470512717962265,
0.07876106351613998,
-0.06854259967803955,
0.051461052149534225,
-0.006358735263347626,
-0.40929412841796875,
-0.15169177949428558,
-0.29344311356544495,
0.053157418966293335,
-0.07502497732639313,
-0.06729425489902496,
-0.21354271471500397,
0.025861792266368866,
0.1844053417444229,
-0.1842370629310608,
-0.26099422574043274,
0.26365599036216736,
-0.3158262372016907,
0.14318139851093292,
-0.144866943359375,
0.20198997855186462,
-0.19570504128932953,
0.12164101749658585,
0.03732331842184067,
-0.2238241285085678,
0.18226054310798645,
-0.26394379138946533,
-0.09733547270298004,
0.17480561137199402,
-0.4854550361633301,
0.35495108366012573,
0.23028716444969177,
0.24372021853923798,
0.0190105177462101,
-0.14949682354927063,
0.07695247232913971,
-0.2988413870334625,
0.5705059170722961,
0.056466855108737946,
0.027905916795134544,
0.25224944949150085,
-0.14231662452220917,
-0.3355740010738373,
0.10954217612743378,
-0.22055582702159882,
0.5522512197494507,
0.5510736703872681,
0.36783406138420105,
-0.20740783214569092,
-0.2333364337682724,
-0.024870876222848892,
-0.09162258356809616,
-0.053929176181554794,
-0.30183425545692444,
-0.3276832401752472,
-0.0001867637038230896,
-0.36311256885528564,
0.319823294878006,
0.3426145613193512,
0.06729412078857422,
-0.28971242904663086,
-0.25564438104629517,
0.03799443691968918,
-0.14216700196266174,
0.11965333670377731,
-0.009150467813014984,
0.07953783869743347,
-0.10412028431892395,
0.35441476106643677,
0.2071307897567749,
0.29139578342437744,
0.1889011263847351,
0.037213392555713654,
-0.15146318078041077,
0.0017004907131195068,
0.4180834889411926,
0.013168622739613056,
0.33077049255371094,
0.48578739166259766,
0.07657559216022491,
0.25958165526390076,
0.15639935433864594,
0.23890870809555054,
-0.08471181243658066,
0.19786493480205536,
0.3870905041694641,
0.3589344918727875,
-0.18026882410049438,
-0.09487741440534592,
0.22512975335121155,
0.2301071733236313,
-0.05146852508187294,
0.454782634973526,
-0.40063410997390747,
-0.04947500675916672,
0.20249246060848236,
0.15789471566677094,
0.9495906233787537,
-0.2839590907096863,
0.10398143529891968,
-0.2181529402732849,
-0.10891106724739075,
0.22710582613945007,
-0.13888919353485107,
0.32213038206100464,
-0.21638891100883484,
-0.19451992213726044,
0.13172224164009094,
-0.271727055311203,
0.009718477725982666,
-0.030385509133338928,
-0.0422510951757431,
0.11875439435243607,
-0.2190864086151123,
-0.06527233123779297,
-0.026276012882590294,
0.33045557141304016,
-0.023067349568009377,
-0.3364054262638092,
0.16501469910144806,
0.052165158092975616,
0.109437495470047,
0.0708245262503624,
-0.15861043334007263,
-0.018540741875767708,
-0.015492398291826248,
-0.15750499069690704,
-0.4743001461029053,
0.21053284406661987,
-0.4147161543369293,
0.25145018100738525,
-0.1714542806148529,
-0.1868092119693756,
0.07863828539848328,
0.46313658356666565,
-0.11267757415771484,
0.041947465389966965,
-0.19964036345481873,
0.09070056676864624,
0.24642843008041382,
0.07344777137041092,
0.11610715091228485,
-0.29039666056632996,
0.0892849937081337,
-0.0618586502969265,
-0.3287564516067505,
-0.17039576172828674,
0.09025441855192184,
-0.1936764121055603,
0.21582618355751038,
0.26266342401504517,
0.37148112058639526,
0.20135365426540375,
0.049136653542518616,
0.18447893857955933,
-0.06297766417264938,
-0.288754940032959,
0.07371821254491806,
0.227534681558609,
-0.23415182530879974,
0.16772182285785675,
-0.4147428870201111,
-0.30677491426467896,
-0.07385571300983429,
0.5395992994308472,
0.13209930062294006,
-0.17416337132453918,
0.45730045437812805,
0.6134970784187317,
-0.17660361528396606,
-0.20923614501953125,
-0.14413292706012726,
0.1331983208656311,
-0.4807315468788147,
0.2579750716686249,
-0.20926670730113983,
-0.31037163734436035,
-0.22885364294052124,
-0.1031731367111206,
-0.036002472043037415,
-0.15614590048789978,
-0.134945347905159,
-0.18262948095798492,
-0.6286593079566956,
0.01715277135372162,
-0.3071392774581909,
0.2054428607225418,
0.0101059190928936,
0.11153194308280945,
0.09902308136224747,
0.27622973918914795,
-0.24787083268165588,
-0.16050386428833008,
-0.2209002673625946,
0.23328271508216858,
0.23499886691570282,
-0.2743026316165924,
0.016904864460229874,
-0.12282851338386536,
0.06345496326684952,
0.38331615924835205,
-0.12827186286449432,
-0.2074500024318695,
-0.1820686161518097,
0.09233739972114563,
-0.033082395792007446,
-0.10769683122634888,
0.027708750218153,
-0.059740349650382996,
0.04406633973121643,
-0.20097485184669495,
0.22689317166805267,
0.2389623522758484,
-0.048822931945323944,
-0.0268598310649395,
0.4763648211956024,
0.25179845094680786,
0.01645757257938385,
0.12107207626104355,
-0.08643239736557007,
0.021126262843608856,
0.034217897802591324,
0.17948515713214874,
0.4005492627620697,
0.04099665582180023,
-0.25935694575309753,
-0.043344005942344666,
0.42941510677337646,
0.24874672293663025,
-0.06622109562158585,
-0.0349632129073143,
-0.2750089764595032,
-0.058847568929195404,
0.4001520574092865,
0.24604617059230804,
-0.0907369926571846,
-0.22567032277584076,
0.12541067600250244,
0.1439819037914276,
-0.09209202975034714,
-0.05153887718915939,
0.042421117424964905,
-0.10232145339250565,
0.1283532977104187,
0.050166063010692596,
-0.029941502958536148,
0.19302091002464294,
-0.05830508470535278,
0.1605217456817627,
-0.043199699372053146,
-0.22476474940776825,
0.11279404163360596,
-0.09026309847831726,
0.11682315170764923,
0.26003509759902954,
0.3075765371322632,
-0.015686679631471634,
0.15014834702014923,
0.04062459617853165,
0.03064001351594925,
0.5096685886383057,
0.1909080445766449,
0.13086450099945068,
0.2767069935798645,
-0.13811910152435303,
-0.046777743846178055,
-0.11710235476493835,
-0.06075805425643921,
0.11108404397964478,
0.030793003737926483,
0.3569839298725128,
-0.13734565675258636,
-0.3564416468143463,
-0.028175996616482735,
0.496920645236969,
-0.3845931589603424,
-0.19953759014606476,
0.3168112635612488,
-0.08429098129272461,
-0.025843989104032516,
0.12919460237026215,
0.007914643734693527,
0.15000903606414795,
0.6482046842575073,
0.3030933737754822,
0.008896231651306152,
-0.2967342138290405,
-0.15280470252037048,
0.01551860012114048,
0.1568860113620758,
-0.16826410591602325,
0.09497679024934769,
0.21141619980335236,
-0.034725286066532135,
-0.17093080282211304,
0.36553624272346497,
0.38135573267936707,
0.4163321256637573,
-0.5854829549789429,
0.2824895977973938,
0.08928132057189941,
0.1384943574666977,
-0.1393260508775711,
0.20353049039840698,
-0.015878066420555115,
0.1636161208152771,
0.11780793964862823,
0.017744993790984154,
-0.24185234308242798,
-0.3011685311794281,
0.10457545518875122,
0.3058531582355499,
-0.0577675998210907,
0.590070366859436,
-0.09004402905702591,
-0.422812819480896,
0.16253335773944855,
0.03273493051528931,
-0.44333919882774353,
0.019984930753707886,
0.5114709138870239,
-0.21762166917324066,
-0.03171458840370178,
-0.19305819272994995,
0.06734070181846619,
-0.0009202044457197189,
0.5991978645324707,
0.0071578435599803925,
0.36813098192214966,
-0.3758774697780609,
0.1315527856349945,
-0.504106879234314,
0.31763532757759094,
-0.12045429646968842,
0.11296522617340088,
-0.08622407168149948,
0.003686029464006424,
0.05039214342832565,
0.27576518058776855,
0.19038695096969604,
-0.08182916790246964,
0.20726874470710754,
0.6258140802383423,
-0.5632984638214111,
0.2407679259777069,
-0.10236875712871552,
-0.1458204686641693,
0.2865296006202698,
-0.2619750499725342,
0.1248403936624527,
0.025317203253507614,
0.0562632754445076,
-0.28666794300079346,
-0.2561282515525818,
0.10333967208862305,
0.21538376808166504,
0.35982462763786316,
0.30889421701431274,
0.4705527424812317,
-0.08602692186832428,
-0.15151384472846985,
-0.24374747276306152,
0.1913519650697708,
-0.060843612998723984,
-0.23224863409996033,
0.17806123197078705,
0.3006881773471832,
-0.37245339155197144,
-0.1436084508895874,
-0.2598102390766144,
-0.05013251304626465,
-0.163955956697464,
-0.2613406479358673,
-0.15797801315784454,
-0.0015279920771718025,
0.03986936807632446,
0.1521962583065033,
-0.10803067684173584,
0.5081026554107666,
0.026623155921697617,
0.20063145458698273,
-0.45855915546417236,
-0.17322885990142822,
0.2991134226322174,
-0.5101873874664307,
-0.5165338516235352,
-0.44687554240226746,
0.28221696615219116,
-0.10886622220277786,
0.03174949064850807,
-0.5038966536521912,
-0.18216893076896667,
0.028981532901525497,
-0.035078853368759155,
-0.514165461063385,
0.10345630347728729,
-0.03927881643176079,
-0.35144102573394775,
-0.19990235567092896,
0.3479396104812622,
0.20716357231140137,
-0.16302619874477386,
0.1435500532388687,
-0.10130457580089569
] |
https://github.com/huggingface/datasets/issues/5094 | Multiprocessing with `Dataset.map` and `PyTorch` results in deadlock | Hi! I don't think it is a memory issue. I'm monitoring the main and spawn python processes and threads with `htop` and the memory does not peak. Besides, the example I've posted above should not be that demanding in terms of memory, right? (I have 32GB of RAM). | ## Describe the bug
There seems to be an issue with using multiprocessing with `datasets.Dataset.map` (i.e. setting `num_proc` to a value greater than one) combined with a function that uses `torch` under the hood. The subprocesses that `datasets.Dataset.map` spawns [a this step](https://github.com/huggingface/datasets/blob/1b935dab9d2f171a8c6294269421fe967eb55e34/src/datasets/arrow_dataset.py#L2663) go into wait mode forever.
## Steps to reproduce the bug
The below code goes into deadlock when `NUMBER_OF_PROCESSES` is greater than one.
```python
NUMBER_OF_PROCESSES = 2
from transformers import AutoTokenizer, AutoModel
from datasets import load_dataset
dataset = load_dataset("glue", "mrpc", split="train")
tokenizer = AutoTokenizer.from_pretrained("sentence-transformers/all-MiniLM-L6-v2")
model = AutoModel.from_pretrained("sentence-transformers/all-MiniLM-L6-v2")
model.to("cpu")
def cls_pooling(model_output):
return model_output.last_hidden_state[:, 0]
def generate_embeddings_batched(examples):
sentences_batch = list(examples['sentence1'])
encoded_input = tokenizer(
sentences_batch, padding=True, truncation=True, return_tensors="pt"
)
encoded_input = {k: v.to("cpu") for k, v in encoded_input.items()}
model_output = model(**encoded_input)
embeddings = cls_pooling(model_output)
examples['embeddings'] = embeddings.detach().cpu().numpy() # 64, 384
return examples
embeddings_dataset = dataset.map(
generate_embeddings_batched,
batched=True,
batch_size=10,
num_proc=NUMBER_OF_PROCESSES
)
```
While debugging it I've seen that it gets "stuck" when calling `torch.nn.Embedding.forward` but some testing shows that the same happens with other functions from `torch.nn`.
## Environment info
- Platform: Linux-5.14.0-1052-oem-x86_64-with-glibc2.31
- Python version: 3.9.14
- PyArrow version: 9.0.0
- Pandas version: 1.5.0
Not sure if this is a HF problem, a PyTorch problem or something I'm doing wrong..
Thanks!
| 48 | Multiprocessing with `Dataset.map` and `PyTorch` results in deadlock
## Describe the bug
There seems to be an issue with using multiprocessing with `datasets.Dataset.map` (i.e. setting `num_proc` to a value greater than one) combined with a function that uses `torch` under the hood. The subprocesses that `datasets.Dataset.map` spawns [a this step](https://github.com/huggingface/datasets/blob/1b935dab9d2f171a8c6294269421fe967eb55e34/src/datasets/arrow_dataset.py#L2663) go into wait mode forever.
## Steps to reproduce the bug
The below code goes into deadlock when `NUMBER_OF_PROCESSES` is greater than one.
```python
NUMBER_OF_PROCESSES = 2
from transformers import AutoTokenizer, AutoModel
from datasets import load_dataset
dataset = load_dataset("glue", "mrpc", split="train")
tokenizer = AutoTokenizer.from_pretrained("sentence-transformers/all-MiniLM-L6-v2")
model = AutoModel.from_pretrained("sentence-transformers/all-MiniLM-L6-v2")
model.to("cpu")
def cls_pooling(model_output):
return model_output.last_hidden_state[:, 0]
def generate_embeddings_batched(examples):
sentences_batch = list(examples['sentence1'])
encoded_input = tokenizer(
sentences_batch, padding=True, truncation=True, return_tensors="pt"
)
encoded_input = {k: v.to("cpu") for k, v in encoded_input.items()}
model_output = model(**encoded_input)
embeddings = cls_pooling(model_output)
examples['embeddings'] = embeddings.detach().cpu().numpy() # 64, 384
return examples
embeddings_dataset = dataset.map(
generate_embeddings_batched,
batched=True,
batch_size=10,
num_proc=NUMBER_OF_PROCESSES
)
```
While debugging it I've seen that it gets "stuck" when calling `torch.nn.Embedding.forward` but some testing shows that the same happens with other functions from `torch.nn`.
## Environment info
- Platform: Linux-5.14.0-1052-oem-x86_64-with-glibc2.31
- Python version: 3.9.14
- PyArrow version: 9.0.0
- Pandas version: 1.5.0
Not sure if this is a HF problem, a PyTorch problem or something I'm doing wrong..
Thanks!
Hi! I don't think it is a memory issue. I'm monitoring the main and spawn python processes and threads with `htop` and the memory does not peak. Besides, the example I've posted above should not be that demanding in terms of memory, right? (I have 32GB of RAM). | [
-0.19728319346904755,
-0.5258713364601135,
-0.059857141226530075,
0.19121290743350983,
-0.03308035433292389,
-0.03727487847208977,
0.3879684805870056,
0.10255962610244751,
0.19705474376678467,
0.15648043155670166,
0.1593065857887268,
0.5224060416221619,
-0.1971760094165802,
-0.34866851568222046,
-0.30984288454055786,
0.00672561302781105,
0.12384426593780518,
-0.35253116488456726,
-0.04642243683338165,
0.09764261543750763,
-0.15816769003868103,
0.26773154735565186,
-0.16990752518177032,
-0.054510414600372314,
-0.7615679502487183,
0.06720700860023499,
0.08253856748342514,
-0.0023633167147636414,
0.2036450356245041,
-0.24507641792297363,
-0.16812686622142792,
0.15418265759944916,
-0.058848049491643906,
0.8481484651565552,
-0.00011896129581145942,
-0.1091778576374054,
0.2780541181564331,
0.20563127100467682,
0.01093040406703949,
-0.2291586548089981,
0.3251565098762512,
-0.025720171630382538,
0.16306909918785095,
-0.034114960581064224,
0.13139984011650085,
0.07892987132072449,
0.11396777629852295,
-0.7218788266181946,
0.30645331740379333,
0.14683747291564941,
0.12756921350955963,
0.5827531814575195,
-0.029711542651057243,
0.020966647192835808,
-0.2104896605014801,
-0.0050002411007881165,
-0.07171738892793655,
0.15186861157417297,
0.5983694791793823,
-0.2531331181526184,
-0.37854892015457153,
0.44758784770965576,
-0.12484809756278992,
-0.02141467109322548,
0.012464817613363266,
-0.11631786078214645,
-0.1307639181613922,
-0.74214768409729,
0.24704810976982117,
0.09432946145534515,
-0.2586125135421753,
-0.25411322712898254,
-0.1468227356672287,
-0.2539825737476349,
0.03562355786561966,
-0.17146922647953033,
0.0931064784526825,
0.16410021483898163,
-0.28115519881248474,
-0.07607473433017731,
-0.3438294231891632,
-0.05187489464879036,
0.13953672349452972,
-0.10562178492546082,
0.057263366878032684,
0.41724541783332825,
0.20500816404819489,
0.2839682400226593,
0.2434198260307312,
0.12929630279541016,
-0.0184665247797966,
-0.01704511046409607,
0.16135144233703613,
0.02039492502808571,
-0.5973533391952515,
0.11267419159412384,
0.20168471336364746,
-0.09189874678850174,
-0.007003717124462128,
-0.21409441530704498,
-0.010116730816662312,
0.11609016358852386,
0.14591500163078308,
0.10987505316734314,
0.39899635314941406,
-0.31718894839286804,
0.018270418047904968,
0.07181034982204437,
0.2054618000984192,
-0.3312462568283081,
-0.08371372520923615,
0.10557211190462112,
0.12287615239620209,
-0.3689732849597931,
0.2798476219177246,
0.16081392765045166,
0.11593791842460632,
-0.0066688172519207,
-0.0275504682213068,
0.15538062155246735,
-0.2550780177116394,
0.11779823154211044,
0.06784741580486298,
0.1721150279045105,
0.13410601019859314,
0.6897133588790894,
0.16588005423545837,
0.17131483554840088,
-0.485755980014801,
0.029595524072647095,
-0.05323448404669762,
-0.15932783484458923,
-0.3375268578529358,
0.09490395337343216,
0.17139573395252228,
-0.11264668405056,
0.05842554569244385,
0.4103654623031616,
0.46188366413116455,
-0.2101811170578003,
0.37107768654823303,
-0.300601989030838,
0.23612502217292786,
0.14609700441360474,
-0.08715368807315826,
0.2400803118944168,
-0.10769063234329224,
0.38669031858444214,
0.035049885511398315,
0.3083063066005707,
0.016420748084783554,
-0.1343061476945877,
-0.20859995484352112,
0.11937222629785538,
0.08320971578359604,
0.3459077775478363,
0.08964204043149948,
0.14199620485305786,
0.5798596143722534,
0.13193070888519287,
0.18659454584121704,
-0.4784564971923828,
-0.20855359733104706,
-0.06694753468036652,
0.13375802338123322,
0.3453560471534729,
0.11969953775405884,
0.09752066433429718,
0.04193601757287979,
0.015694625675678253,
-0.010526075959205627,
0.255352646112442,
-0.1328512728214264,
0.11517554521560669,
-0.04663532227277756,
0.1648816615343094,
-0.19056421518325806,
-0.28738391399383545,
-0.3479527533054352,
0.25245365500450134,
-0.33450931310653687,
0.11553498357534409,
0.09597177058458328,
0.2848915159702301,
0.08560378104448318,
0.12345002591609955,
0.437857985496521,
0.10185349732637405,
-0.10652031004428864,
0.22913774847984314,
-0.2130875140428543,
-0.019230011850595474,
0.05724150687456131,
0.08973921835422516,
0.22123299539089203,
-0.3161967992782593,
-0.38304030895233154,
-0.08010619133710861,
0.4298316240310669,
-0.03588595613837242,
0.034304216504096985,
0.3358994722366333,
-0.3085514307022095,
-0.04112705588340759,
0.08295167982578278,
-0.42112377285957336,
-0.5840059518814087,
0.2360517680644989,
0.08446457982063293,
0.18740639090538025,
-0.3531028628349304,
0.08271296322345734,
0.38109156489372253,
0.27939698100090027,
-0.23425160348415375,
-0.2797248065471649,
-0.015457600355148315,
-0.00445093959569931,
-0.2918185591697693,
-0.3499026894569397,
-0.0764317661523819,
0.4008371829986572,
0.3347691297531128,
-0.15005643665790558,
-0.3624480366706848,
0.21488866209983826,
-0.1342533528804779,
-0.45578664541244507,
-0.29391002655029297,
0.06479910761117935,
0.14287099242210388,
0.09160551428794861,
-0.17096862196922302,
0.2579115331172943,
0.14999359846115112,
0.11662435531616211,
-0.2063751220703125,
-0.11888884007930756,
0.25190749764442444,
-0.1659497767686844,
-0.13772618770599365,
0.14262838661670685,
-0.018337447196245193,
-0.11944236606359482,
0.09192194044589996,
0.3078451156616211,
0.12374264001846313,
0.3461223542690277,
-0.12948361039161682,
0.011080166324973106,
-0.14063520729541779,
0.12559151649475098,
-0.19415295124053955,
0.09803411364555359,
0.43549031019210815,
0.21469740569591522,
0.1837858408689499,
0.08839128911495209,
-0.2483357936143875,
0.14210480451583862,
0.177516907453537,
0.13421162962913513,
-0.18262949585914612,
-0.07960430532693863,
-0.07129605859518051,
0.052650898694992065,
0.10016792267560959,
-0.3027743995189667,
0.4516618847846985,
0.11814901232719421,
0.013969458639621735,
-0.06789060682058334,
-0.22531448304653168,
-0.12666884064674377,
-0.0660463497042656,
0.19669729471206665,
0.17183546721935272,
0.1772155612707138,
0.2936106324195862,
-0.10503654927015305,
-0.0336984358727932,
-0.2707268297672272,
0.025599433109164238,
-0.024471277371048927,
-0.20530366897583008,
0.27868714928627014,
-0.09404642879962921,
0.5213276743888855,
0.019990824162960052,
-0.07981099933385849,
-0.2054656744003296,
-0.2993314266204834,
-0.014471743255853653,
0.37930598855018616,
-0.19013366103172302,
0.32576826214790344,
-0.06756804883480072,
-0.2957773804664612,
-0.003110727295279503,
0.07801646739244461,
-0.004928715527057648,
-0.3113834261894226,
-0.05907192826271057,
-0.07129514962434769,
0.10118752717971802,
-0.0805199146270752,
0.2087545394897461,
0.3010319769382477,
-0.408439040184021,
-0.3572113513946533,
0.08309946209192276,
0.06302199512720108,
-0.24654869735240936,
0.09089983999729156,
-0.08429984748363495,
-0.11240984499454498,
0.02833835780620575,
-0.16216310858726501,
0.1483144462108612,
-0.38269826769828796,
0.022716106846928596,
0.08426787704229355,
0.07269490510225296,
-0.046181317418813705,
-0.3208022117614746,
-0.2381492555141449,
-0.2358032912015915,
-0.2659352719783783,
0.15800854563713074,
-0.35387155413627625,
0.1316913217306137,
-0.17704223096370697,
0.20771662890911102,
0.18096761405467987,
0.017398575320839882,
-0.21082700788974762,
-0.005960475653409958,
-0.06371927261352539,
0.1856509894132614,
-0.07864335924386978,
-0.3698170781135559,
-0.4100254774093628,
0.12839870154857635,
-0.12236501276493073,
0.35220181941986084,
-0.17087644338607788,
-0.050366275012493134,
-0.3920539617538452,
0.39019548892974854,
-0.2520071268081665,
-0.009723002091050148,
0.4477148950099945,
0.2500394880771637,
-0.1463022381067276,
-0.1259407103061676,
-0.08457336574792862,
0.33920368552207947,
-0.13329461216926575,
-0.000523984432220459,
-0.05256936699151993,
0.27146732807159424,
0.09986831247806549,
0.7712089419364929,
0.25723791122436523,
-0.470512717962265,
0.07876106351613998,
-0.06854259967803955,
0.051461052149534225,
-0.006358735263347626,
-0.40929412841796875,
-0.15169177949428558,
-0.29344311356544495,
0.053157418966293335,
-0.07502497732639313,
-0.06729425489902496,
-0.21354271471500397,
0.025861792266368866,
0.1844053417444229,
-0.1842370629310608,
-0.26099422574043274,
0.26365599036216736,
-0.3158262372016907,
0.14318139851093292,
-0.144866943359375,
0.20198997855186462,
-0.19570504128932953,
0.12164101749658585,
0.03732331842184067,
-0.2238241285085678,
0.18226054310798645,
-0.26394379138946533,
-0.09733547270298004,
0.17480561137199402,
-0.4854550361633301,
0.35495108366012573,
0.23028716444969177,
0.24372021853923798,
0.0190105177462101,
-0.14949682354927063,
0.07695247232913971,
-0.2988413870334625,
0.5705059170722961,
0.056466855108737946,
0.027905916795134544,
0.25224944949150085,
-0.14231662452220917,
-0.3355740010738373,
0.10954217612743378,
-0.22055582702159882,
0.5522512197494507,
0.5510736703872681,
0.36783406138420105,
-0.20740783214569092,
-0.2333364337682724,
-0.024870876222848892,
-0.09162258356809616,
-0.053929176181554794,
-0.30183425545692444,
-0.3276832401752472,
-0.0001867637038230896,
-0.36311256885528564,
0.319823294878006,
0.3426145613193512,
0.06729412078857422,
-0.28971242904663086,
-0.25564438104629517,
0.03799443691968918,
-0.14216700196266174,
0.11965333670377731,
-0.009150467813014984,
0.07953783869743347,
-0.10412028431892395,
0.35441476106643677,
0.2071307897567749,
0.29139578342437744,
0.1889011263847351,
0.037213392555713654,
-0.15146318078041077,
0.0017004907131195068,
0.4180834889411926,
0.013168622739613056,
0.33077049255371094,
0.48578739166259766,
0.07657559216022491,
0.25958165526390076,
0.15639935433864594,
0.23890870809555054,
-0.08471181243658066,
0.19786493480205536,
0.3870905041694641,
0.3589344918727875,
-0.18026882410049438,
-0.09487741440534592,
0.22512975335121155,
0.2301071733236313,
-0.05146852508187294,
0.454782634973526,
-0.40063410997390747,
-0.04947500675916672,
0.20249246060848236,
0.15789471566677094,
0.9495906233787537,
-0.2839590907096863,
0.10398143529891968,
-0.2181529402732849,
-0.10891106724739075,
0.22710582613945007,
-0.13888919353485107,
0.32213038206100464,
-0.21638891100883484,
-0.19451992213726044,
0.13172224164009094,
-0.271727055311203,
0.009718477725982666,
-0.030385509133338928,
-0.0422510951757431,
0.11875439435243607,
-0.2190864086151123,
-0.06527233123779297,
-0.026276012882590294,
0.33045557141304016,
-0.023067349568009377,
-0.3364054262638092,
0.16501469910144806,
0.052165158092975616,
0.109437495470047,
0.0708245262503624,
-0.15861043334007263,
-0.018540741875767708,
-0.015492398291826248,
-0.15750499069690704,
-0.4743001461029053,
0.21053284406661987,
-0.4147161543369293,
0.25145018100738525,
-0.1714542806148529,
-0.1868092119693756,
0.07863828539848328,
0.46313658356666565,
-0.11267757415771484,
0.041947465389966965,
-0.19964036345481873,
0.09070056676864624,
0.24642843008041382,
0.07344777137041092,
0.11610715091228485,
-0.29039666056632996,
0.0892849937081337,
-0.0618586502969265,
-0.3287564516067505,
-0.17039576172828674,
0.09025441855192184,
-0.1936764121055603,
0.21582618355751038,
0.26266342401504517,
0.37148112058639526,
0.20135365426540375,
0.049136653542518616,
0.18447893857955933,
-0.06297766417264938,
-0.288754940032959,
0.07371821254491806,
0.227534681558609,
-0.23415182530879974,
0.16772182285785675,
-0.4147428870201111,
-0.30677491426467896,
-0.07385571300983429,
0.5395992994308472,
0.13209930062294006,
-0.17416337132453918,
0.45730045437812805,
0.6134970784187317,
-0.17660361528396606,
-0.20923614501953125,
-0.14413292706012726,
0.1331983208656311,
-0.4807315468788147,
0.2579750716686249,
-0.20926670730113983,
-0.31037163734436035,
-0.22885364294052124,
-0.1031731367111206,
-0.036002472043037415,
-0.15614590048789978,
-0.134945347905159,
-0.18262948095798492,
-0.6286593079566956,
0.01715277135372162,
-0.3071392774581909,
0.2054428607225418,
0.0101059190928936,
0.11153194308280945,
0.09902308136224747,
0.27622973918914795,
-0.24787083268165588,
-0.16050386428833008,
-0.2209002673625946,
0.23328271508216858,
0.23499886691570282,
-0.2743026316165924,
0.016904864460229874,
-0.12282851338386536,
0.06345496326684952,
0.38331615924835205,
-0.12827186286449432,
-0.2074500024318695,
-0.1820686161518097,
0.09233739972114563,
-0.033082395792007446,
-0.10769683122634888,
0.027708750218153,
-0.059740349650382996,
0.04406633973121643,
-0.20097485184669495,
0.22689317166805267,
0.2389623522758484,
-0.048822931945323944,
-0.0268598310649395,
0.4763648211956024,
0.25179845094680786,
0.01645757257938385,
0.12107207626104355,
-0.08643239736557007,
0.021126262843608856,
0.034217897802591324,
0.17948515713214874,
0.4005492627620697,
0.04099665582180023,
-0.25935694575309753,
-0.043344005942344666,
0.42941510677337646,
0.24874672293663025,
-0.06622109562158585,
-0.0349632129073143,
-0.2750089764595032,
-0.058847568929195404,
0.4001520574092865,
0.24604617059230804,
-0.0907369926571846,
-0.22567032277584076,
0.12541067600250244,
0.1439819037914276,
-0.09209202975034714,
-0.05153887718915939,
0.042421117424964905,
-0.10232145339250565,
0.1283532977104187,
0.050166063010692596,
-0.029941502958536148,
0.19302091002464294,
-0.05830508470535278,
0.1605217456817627,
-0.043199699372053146,
-0.22476474940776825,
0.11279404163360596,
-0.09026309847831726,
0.11682315170764923,
0.26003509759902954,
0.3075765371322632,
-0.015686679631471634,
0.15014834702014923,
0.04062459617853165,
0.03064001351594925,
0.5096685886383057,
0.1909080445766449,
0.13086450099945068,
0.2767069935798645,
-0.13811910152435303,
-0.046777743846178055,
-0.11710235476493835,
-0.06075805425643921,
0.11108404397964478,
0.030793003737926483,
0.3569839298725128,
-0.13734565675258636,
-0.3564416468143463,
-0.028175996616482735,
0.496920645236969,
-0.3845931589603424,
-0.19953759014606476,
0.3168112635612488,
-0.08429098129272461,
-0.025843989104032516,
0.12919460237026215,
0.007914643734693527,
0.15000903606414795,
0.6482046842575073,
0.3030933737754822,
0.008896231651306152,
-0.2967342138290405,
-0.15280470252037048,
0.01551860012114048,
0.1568860113620758,
-0.16826410591602325,
0.09497679024934769,
0.21141619980335236,
-0.034725286066532135,
-0.17093080282211304,
0.36553624272346497,
0.38135573267936707,
0.4163321256637573,
-0.5854829549789429,
0.2824895977973938,
0.08928132057189941,
0.1384943574666977,
-0.1393260508775711,
0.20353049039840698,
-0.015878066420555115,
0.1636161208152771,
0.11780793964862823,
0.017744993790984154,
-0.24185234308242798,
-0.3011685311794281,
0.10457545518875122,
0.3058531582355499,
-0.0577675998210907,
0.590070366859436,
-0.09004402905702591,
-0.422812819480896,
0.16253335773944855,
0.03273493051528931,
-0.44333919882774353,
0.019984930753707886,
0.5114709138870239,
-0.21762166917324066,
-0.03171458840370178,
-0.19305819272994995,
0.06734070181846619,
-0.0009202044457197189,
0.5991978645324707,
0.0071578435599803925,
0.36813098192214966,
-0.3758774697780609,
0.1315527856349945,
-0.504106879234314,
0.31763532757759094,
-0.12045429646968842,
0.11296522617340088,
-0.08622407168149948,
0.003686029464006424,
0.05039214342832565,
0.27576518058776855,
0.19038695096969604,
-0.08182916790246964,
0.20726874470710754,
0.6258140802383423,
-0.5632984638214111,
0.2407679259777069,
-0.10236875712871552,
-0.1458204686641693,
0.2865296006202698,
-0.2619750499725342,
0.1248403936624527,
0.025317203253507614,
0.0562632754445076,
-0.28666794300079346,
-0.2561282515525818,
0.10333967208862305,
0.21538376808166504,
0.35982462763786316,
0.30889421701431274,
0.4705527424812317,
-0.08602692186832428,
-0.15151384472846985,
-0.24374747276306152,
0.1913519650697708,
-0.060843612998723984,
-0.23224863409996033,
0.17806123197078705,
0.3006881773471832,
-0.37245339155197144,
-0.1436084508895874,
-0.2598102390766144,
-0.05013251304626465,
-0.163955956697464,
-0.2613406479358673,
-0.15797801315784454,
-0.0015279920771718025,
0.03986936807632446,
0.1521962583065033,
-0.10803067684173584,
0.5081026554107666,
0.026623155921697617,
0.20063145458698273,
-0.45855915546417236,
-0.17322885990142822,
0.2991134226322174,
-0.5101873874664307,
-0.5165338516235352,
-0.44687554240226746,
0.28221696615219116,
-0.10886622220277786,
0.03174949064850807,
-0.5038966536521912,
-0.18216893076896667,
0.028981532901525497,
-0.035078853368759155,
-0.514165461063385,
0.10345630347728729,
-0.03927881643176079,
-0.35144102573394775,
-0.19990235567092896,
0.3479396104812622,
0.20716357231140137,
-0.16302619874477386,
0.1435500532388687,
-0.10130457580089569
] |
https://github.com/huggingface/datasets/issues/5094 | Multiprocessing with `Dataset.map` and `PyTorch` results in deadlock | Indeed it should be fine. I couldn't reproduce the error though - I ran your script on my side and it works fine. What version of pytorch are you using ? | ## Describe the bug
There seems to be an issue with using multiprocessing with `datasets.Dataset.map` (i.e. setting `num_proc` to a value greater than one) combined with a function that uses `torch` under the hood. The subprocesses that `datasets.Dataset.map` spawns [a this step](https://github.com/huggingface/datasets/blob/1b935dab9d2f171a8c6294269421fe967eb55e34/src/datasets/arrow_dataset.py#L2663) go into wait mode forever.
## Steps to reproduce the bug
The below code goes into deadlock when `NUMBER_OF_PROCESSES` is greater than one.
```python
NUMBER_OF_PROCESSES = 2
from transformers import AutoTokenizer, AutoModel
from datasets import load_dataset
dataset = load_dataset("glue", "mrpc", split="train")
tokenizer = AutoTokenizer.from_pretrained("sentence-transformers/all-MiniLM-L6-v2")
model = AutoModel.from_pretrained("sentence-transformers/all-MiniLM-L6-v2")
model.to("cpu")
def cls_pooling(model_output):
return model_output.last_hidden_state[:, 0]
def generate_embeddings_batched(examples):
sentences_batch = list(examples['sentence1'])
encoded_input = tokenizer(
sentences_batch, padding=True, truncation=True, return_tensors="pt"
)
encoded_input = {k: v.to("cpu") for k, v in encoded_input.items()}
model_output = model(**encoded_input)
embeddings = cls_pooling(model_output)
examples['embeddings'] = embeddings.detach().cpu().numpy() # 64, 384
return examples
embeddings_dataset = dataset.map(
generate_embeddings_batched,
batched=True,
batch_size=10,
num_proc=NUMBER_OF_PROCESSES
)
```
While debugging it I've seen that it gets "stuck" when calling `torch.nn.Embedding.forward` but some testing shows that the same happens with other functions from `torch.nn`.
## Environment info
- Platform: Linux-5.14.0-1052-oem-x86_64-with-glibc2.31
- Python version: 3.9.14
- PyArrow version: 9.0.0
- Pandas version: 1.5.0
Not sure if this is a HF problem, a PyTorch problem or something I'm doing wrong..
Thanks!
| 31 | Multiprocessing with `Dataset.map` and `PyTorch` results in deadlock
## Describe the bug
There seems to be an issue with using multiprocessing with `datasets.Dataset.map` (i.e. setting `num_proc` to a value greater than one) combined with a function that uses `torch` under the hood. The subprocesses that `datasets.Dataset.map` spawns [a this step](https://github.com/huggingface/datasets/blob/1b935dab9d2f171a8c6294269421fe967eb55e34/src/datasets/arrow_dataset.py#L2663) go into wait mode forever.
## Steps to reproduce the bug
The below code goes into deadlock when `NUMBER_OF_PROCESSES` is greater than one.
```python
NUMBER_OF_PROCESSES = 2
from transformers import AutoTokenizer, AutoModel
from datasets import load_dataset
dataset = load_dataset("glue", "mrpc", split="train")
tokenizer = AutoTokenizer.from_pretrained("sentence-transformers/all-MiniLM-L6-v2")
model = AutoModel.from_pretrained("sentence-transformers/all-MiniLM-L6-v2")
model.to("cpu")
def cls_pooling(model_output):
return model_output.last_hidden_state[:, 0]
def generate_embeddings_batched(examples):
sentences_batch = list(examples['sentence1'])
encoded_input = tokenizer(
sentences_batch, padding=True, truncation=True, return_tensors="pt"
)
encoded_input = {k: v.to("cpu") for k, v in encoded_input.items()}
model_output = model(**encoded_input)
embeddings = cls_pooling(model_output)
examples['embeddings'] = embeddings.detach().cpu().numpy() # 64, 384
return examples
embeddings_dataset = dataset.map(
generate_embeddings_batched,
batched=True,
batch_size=10,
num_proc=NUMBER_OF_PROCESSES
)
```
While debugging it I've seen that it gets "stuck" when calling `torch.nn.Embedding.forward` but some testing shows that the same happens with other functions from `torch.nn`.
## Environment info
- Platform: Linux-5.14.0-1052-oem-x86_64-with-glibc2.31
- Python version: 3.9.14
- PyArrow version: 9.0.0
- Pandas version: 1.5.0
Not sure if this is a HF problem, a PyTorch problem or something I'm doing wrong..
Thanks!
Indeed it should be fine. I couldn't reproduce the error though - I ran your script on my side and it works fine. What version of pytorch are you using ? | [
-0.19728319346904755,
-0.5258713364601135,
-0.059857141226530075,
0.19121290743350983,
-0.03308035433292389,
-0.03727487847208977,
0.3879684805870056,
0.10255962610244751,
0.19705474376678467,
0.15648043155670166,
0.1593065857887268,
0.5224060416221619,
-0.1971760094165802,
-0.34866851568222046,
-0.30984288454055786,
0.00672561302781105,
0.12384426593780518,
-0.35253116488456726,
-0.04642243683338165,
0.09764261543750763,
-0.15816769003868103,
0.26773154735565186,
-0.16990752518177032,
-0.054510414600372314,
-0.7615679502487183,
0.06720700860023499,
0.08253856748342514,
-0.0023633167147636414,
0.2036450356245041,
-0.24507641792297363,
-0.16812686622142792,
0.15418265759944916,
-0.058848049491643906,
0.8481484651565552,
-0.00011896129581145942,
-0.1091778576374054,
0.2780541181564331,
0.20563127100467682,
0.01093040406703949,
-0.2291586548089981,
0.3251565098762512,
-0.025720171630382538,
0.16306909918785095,
-0.034114960581064224,
0.13139984011650085,
0.07892987132072449,
0.11396777629852295,
-0.7218788266181946,
0.30645331740379333,
0.14683747291564941,
0.12756921350955963,
0.5827531814575195,
-0.029711542651057243,
0.020966647192835808,
-0.2104896605014801,
-0.0050002411007881165,
-0.07171738892793655,
0.15186861157417297,
0.5983694791793823,
-0.2531331181526184,
-0.37854892015457153,
0.44758784770965576,
-0.12484809756278992,
-0.02141467109322548,
0.012464817613363266,
-0.11631786078214645,
-0.1307639181613922,
-0.74214768409729,
0.24704810976982117,
0.09432946145534515,
-0.2586125135421753,
-0.25411322712898254,
-0.1468227356672287,
-0.2539825737476349,
0.03562355786561966,
-0.17146922647953033,
0.0931064784526825,
0.16410021483898163,
-0.28115519881248474,
-0.07607473433017731,
-0.3438294231891632,
-0.05187489464879036,
0.13953672349452972,
-0.10562178492546082,
0.057263366878032684,
0.41724541783332825,
0.20500816404819489,
0.2839682400226593,
0.2434198260307312,
0.12929630279541016,
-0.0184665247797966,
-0.01704511046409607,
0.16135144233703613,
0.02039492502808571,
-0.5973533391952515,
0.11267419159412384,
0.20168471336364746,
-0.09189874678850174,
-0.007003717124462128,
-0.21409441530704498,
-0.010116730816662312,
0.11609016358852386,
0.14591500163078308,
0.10987505316734314,
0.39899635314941406,
-0.31718894839286804,
0.018270418047904968,
0.07181034982204437,
0.2054618000984192,
-0.3312462568283081,
-0.08371372520923615,
0.10557211190462112,
0.12287615239620209,
-0.3689732849597931,
0.2798476219177246,
0.16081392765045166,
0.11593791842460632,
-0.0066688172519207,
-0.0275504682213068,
0.15538062155246735,
-0.2550780177116394,
0.11779823154211044,
0.06784741580486298,
0.1721150279045105,
0.13410601019859314,
0.6897133588790894,
0.16588005423545837,
0.17131483554840088,
-0.485755980014801,
0.029595524072647095,
-0.05323448404669762,
-0.15932783484458923,
-0.3375268578529358,
0.09490395337343216,
0.17139573395252228,
-0.11264668405056,
0.05842554569244385,
0.4103654623031616,
0.46188366413116455,
-0.2101811170578003,
0.37107768654823303,
-0.300601989030838,
0.23612502217292786,
0.14609700441360474,
-0.08715368807315826,
0.2400803118944168,
-0.10769063234329224,
0.38669031858444214,
0.035049885511398315,
0.3083063066005707,
0.016420748084783554,
-0.1343061476945877,
-0.20859995484352112,
0.11937222629785538,
0.08320971578359604,
0.3459077775478363,
0.08964204043149948,
0.14199620485305786,
0.5798596143722534,
0.13193070888519287,
0.18659454584121704,
-0.4784564971923828,
-0.20855359733104706,
-0.06694753468036652,
0.13375802338123322,
0.3453560471534729,
0.11969953775405884,
0.09752066433429718,
0.04193601757287979,
0.015694625675678253,
-0.010526075959205627,
0.255352646112442,
-0.1328512728214264,
0.11517554521560669,
-0.04663532227277756,
0.1648816615343094,
-0.19056421518325806,
-0.28738391399383545,
-0.3479527533054352,
0.25245365500450134,
-0.33450931310653687,
0.11553498357534409,
0.09597177058458328,
0.2848915159702301,
0.08560378104448318,
0.12345002591609955,
0.437857985496521,
0.10185349732637405,
-0.10652031004428864,
0.22913774847984314,
-0.2130875140428543,
-0.019230011850595474,
0.05724150687456131,
0.08973921835422516,
0.22123299539089203,
-0.3161967992782593,
-0.38304030895233154,
-0.08010619133710861,
0.4298316240310669,
-0.03588595613837242,
0.034304216504096985,
0.3358994722366333,
-0.3085514307022095,
-0.04112705588340759,
0.08295167982578278,
-0.42112377285957336,
-0.5840059518814087,
0.2360517680644989,
0.08446457982063293,
0.18740639090538025,
-0.3531028628349304,
0.08271296322345734,
0.38109156489372253,
0.27939698100090027,
-0.23425160348415375,
-0.2797248065471649,
-0.015457600355148315,
-0.00445093959569931,
-0.2918185591697693,
-0.3499026894569397,
-0.0764317661523819,
0.4008371829986572,
0.3347691297531128,
-0.15005643665790558,
-0.3624480366706848,
0.21488866209983826,
-0.1342533528804779,
-0.45578664541244507,
-0.29391002655029297,
0.06479910761117935,
0.14287099242210388,
0.09160551428794861,
-0.17096862196922302,
0.2579115331172943,
0.14999359846115112,
0.11662435531616211,
-0.2063751220703125,
-0.11888884007930756,
0.25190749764442444,
-0.1659497767686844,
-0.13772618770599365,
0.14262838661670685,
-0.018337447196245193,
-0.11944236606359482,
0.09192194044589996,
0.3078451156616211,
0.12374264001846313,
0.3461223542690277,
-0.12948361039161682,
0.011080166324973106,
-0.14063520729541779,
0.12559151649475098,
-0.19415295124053955,
0.09803411364555359,
0.43549031019210815,
0.21469740569591522,
0.1837858408689499,
0.08839128911495209,
-0.2483357936143875,
0.14210480451583862,
0.177516907453537,
0.13421162962913513,
-0.18262949585914612,
-0.07960430532693863,
-0.07129605859518051,
0.052650898694992065,
0.10016792267560959,
-0.3027743995189667,
0.4516618847846985,
0.11814901232719421,
0.013969458639621735,
-0.06789060682058334,
-0.22531448304653168,
-0.12666884064674377,
-0.0660463497042656,
0.19669729471206665,
0.17183546721935272,
0.1772155612707138,
0.2936106324195862,
-0.10503654927015305,
-0.0336984358727932,
-0.2707268297672272,
0.025599433109164238,
-0.024471277371048927,
-0.20530366897583008,
0.27868714928627014,
-0.09404642879962921,
0.5213276743888855,
0.019990824162960052,
-0.07981099933385849,
-0.2054656744003296,
-0.2993314266204834,
-0.014471743255853653,
0.37930598855018616,
-0.19013366103172302,
0.32576826214790344,
-0.06756804883480072,
-0.2957773804664612,
-0.003110727295279503,
0.07801646739244461,
-0.004928715527057648,
-0.3113834261894226,
-0.05907192826271057,
-0.07129514962434769,
0.10118752717971802,
-0.0805199146270752,
0.2087545394897461,
0.3010319769382477,
-0.408439040184021,
-0.3572113513946533,
0.08309946209192276,
0.06302199512720108,
-0.24654869735240936,
0.09089983999729156,
-0.08429984748363495,
-0.11240984499454498,
0.02833835780620575,
-0.16216310858726501,
0.1483144462108612,
-0.38269826769828796,
0.022716106846928596,
0.08426787704229355,
0.07269490510225296,
-0.046181317418813705,
-0.3208022117614746,
-0.2381492555141449,
-0.2358032912015915,
-0.2659352719783783,
0.15800854563713074,
-0.35387155413627625,
0.1316913217306137,
-0.17704223096370697,
0.20771662890911102,
0.18096761405467987,
0.017398575320839882,
-0.21082700788974762,
-0.005960475653409958,
-0.06371927261352539,
0.1856509894132614,
-0.07864335924386978,
-0.3698170781135559,
-0.4100254774093628,
0.12839870154857635,
-0.12236501276493073,
0.35220181941986084,
-0.17087644338607788,
-0.050366275012493134,
-0.3920539617538452,
0.39019548892974854,
-0.2520071268081665,
-0.009723002091050148,
0.4477148950099945,
0.2500394880771637,
-0.1463022381067276,
-0.1259407103061676,
-0.08457336574792862,
0.33920368552207947,
-0.13329461216926575,
-0.000523984432220459,
-0.05256936699151993,
0.27146732807159424,
0.09986831247806549,
0.7712089419364929,
0.25723791122436523,
-0.470512717962265,
0.07876106351613998,
-0.06854259967803955,
0.051461052149534225,
-0.006358735263347626,
-0.40929412841796875,
-0.15169177949428558,
-0.29344311356544495,
0.053157418966293335,
-0.07502497732639313,
-0.06729425489902496,
-0.21354271471500397,
0.025861792266368866,
0.1844053417444229,
-0.1842370629310608,
-0.26099422574043274,
0.26365599036216736,
-0.3158262372016907,
0.14318139851093292,
-0.144866943359375,
0.20198997855186462,
-0.19570504128932953,
0.12164101749658585,
0.03732331842184067,
-0.2238241285085678,
0.18226054310798645,
-0.26394379138946533,
-0.09733547270298004,
0.17480561137199402,
-0.4854550361633301,
0.35495108366012573,
0.23028716444969177,
0.24372021853923798,
0.0190105177462101,
-0.14949682354927063,
0.07695247232913971,
-0.2988413870334625,
0.5705059170722961,
0.056466855108737946,
0.027905916795134544,
0.25224944949150085,
-0.14231662452220917,
-0.3355740010738373,
0.10954217612743378,
-0.22055582702159882,
0.5522512197494507,
0.5510736703872681,
0.36783406138420105,
-0.20740783214569092,
-0.2333364337682724,
-0.024870876222848892,
-0.09162258356809616,
-0.053929176181554794,
-0.30183425545692444,
-0.3276832401752472,
-0.0001867637038230896,
-0.36311256885528564,
0.319823294878006,
0.3426145613193512,
0.06729412078857422,
-0.28971242904663086,
-0.25564438104629517,
0.03799443691968918,
-0.14216700196266174,
0.11965333670377731,
-0.009150467813014984,
0.07953783869743347,
-0.10412028431892395,
0.35441476106643677,
0.2071307897567749,
0.29139578342437744,
0.1889011263847351,
0.037213392555713654,
-0.15146318078041077,
0.0017004907131195068,
0.4180834889411926,
0.013168622739613056,
0.33077049255371094,
0.48578739166259766,
0.07657559216022491,
0.25958165526390076,
0.15639935433864594,
0.23890870809555054,
-0.08471181243658066,
0.19786493480205536,
0.3870905041694641,
0.3589344918727875,
-0.18026882410049438,
-0.09487741440534592,
0.22512975335121155,
0.2301071733236313,
-0.05146852508187294,
0.454782634973526,
-0.40063410997390747,
-0.04947500675916672,
0.20249246060848236,
0.15789471566677094,
0.9495906233787537,
-0.2839590907096863,
0.10398143529891968,
-0.2181529402732849,
-0.10891106724739075,
0.22710582613945007,
-0.13888919353485107,
0.32213038206100464,
-0.21638891100883484,
-0.19451992213726044,
0.13172224164009094,
-0.271727055311203,
0.009718477725982666,
-0.030385509133338928,
-0.0422510951757431,
0.11875439435243607,
-0.2190864086151123,
-0.06527233123779297,
-0.026276012882590294,
0.33045557141304016,
-0.023067349568009377,
-0.3364054262638092,
0.16501469910144806,
0.052165158092975616,
0.109437495470047,
0.0708245262503624,
-0.15861043334007263,
-0.018540741875767708,
-0.015492398291826248,
-0.15750499069690704,
-0.4743001461029053,
0.21053284406661987,
-0.4147161543369293,
0.25145018100738525,
-0.1714542806148529,
-0.1868092119693756,
0.07863828539848328,
0.46313658356666565,
-0.11267757415771484,
0.041947465389966965,
-0.19964036345481873,
0.09070056676864624,
0.24642843008041382,
0.07344777137041092,
0.11610715091228485,
-0.29039666056632996,
0.0892849937081337,
-0.0618586502969265,
-0.3287564516067505,
-0.17039576172828674,
0.09025441855192184,
-0.1936764121055603,
0.21582618355751038,
0.26266342401504517,
0.37148112058639526,
0.20135365426540375,
0.049136653542518616,
0.18447893857955933,
-0.06297766417264938,
-0.288754940032959,
0.07371821254491806,
0.227534681558609,
-0.23415182530879974,
0.16772182285785675,
-0.4147428870201111,
-0.30677491426467896,
-0.07385571300983429,
0.5395992994308472,
0.13209930062294006,
-0.17416337132453918,
0.45730045437812805,
0.6134970784187317,
-0.17660361528396606,
-0.20923614501953125,
-0.14413292706012726,
0.1331983208656311,
-0.4807315468788147,
0.2579750716686249,
-0.20926670730113983,
-0.31037163734436035,
-0.22885364294052124,
-0.1031731367111206,
-0.036002472043037415,
-0.15614590048789978,
-0.134945347905159,
-0.18262948095798492,
-0.6286593079566956,
0.01715277135372162,
-0.3071392774581909,
0.2054428607225418,
0.0101059190928936,
0.11153194308280945,
0.09902308136224747,
0.27622973918914795,
-0.24787083268165588,
-0.16050386428833008,
-0.2209002673625946,
0.23328271508216858,
0.23499886691570282,
-0.2743026316165924,
0.016904864460229874,
-0.12282851338386536,
0.06345496326684952,
0.38331615924835205,
-0.12827186286449432,
-0.2074500024318695,
-0.1820686161518097,
0.09233739972114563,
-0.033082395792007446,
-0.10769683122634888,
0.027708750218153,
-0.059740349650382996,
0.04406633973121643,
-0.20097485184669495,
0.22689317166805267,
0.2389623522758484,
-0.048822931945323944,
-0.0268598310649395,
0.4763648211956024,
0.25179845094680786,
0.01645757257938385,
0.12107207626104355,
-0.08643239736557007,
0.021126262843608856,
0.034217897802591324,
0.17948515713214874,
0.4005492627620697,
0.04099665582180023,
-0.25935694575309753,
-0.043344005942344666,
0.42941510677337646,
0.24874672293663025,
-0.06622109562158585,
-0.0349632129073143,
-0.2750089764595032,
-0.058847568929195404,
0.4001520574092865,
0.24604617059230804,
-0.0907369926571846,
-0.22567032277584076,
0.12541067600250244,
0.1439819037914276,
-0.09209202975034714,
-0.05153887718915939,
0.042421117424964905,
-0.10232145339250565,
0.1283532977104187,
0.050166063010692596,
-0.029941502958536148,
0.19302091002464294,
-0.05830508470535278,
0.1605217456817627,
-0.043199699372053146,
-0.22476474940776825,
0.11279404163360596,
-0.09026309847831726,
0.11682315170764923,
0.26003509759902954,
0.3075765371322632,
-0.015686679631471634,
0.15014834702014923,
0.04062459617853165,
0.03064001351594925,
0.5096685886383057,
0.1909080445766449,
0.13086450099945068,
0.2767069935798645,
-0.13811910152435303,
-0.046777743846178055,
-0.11710235476493835,
-0.06075805425643921,
0.11108404397964478,
0.030793003737926483,
0.3569839298725128,
-0.13734565675258636,
-0.3564416468143463,
-0.028175996616482735,
0.496920645236969,
-0.3845931589603424,
-0.19953759014606476,
0.3168112635612488,
-0.08429098129272461,
-0.025843989104032516,
0.12919460237026215,
0.007914643734693527,
0.15000903606414795,
0.6482046842575073,
0.3030933737754822,
0.008896231651306152,
-0.2967342138290405,
-0.15280470252037048,
0.01551860012114048,
0.1568860113620758,
-0.16826410591602325,
0.09497679024934769,
0.21141619980335236,
-0.034725286066532135,
-0.17093080282211304,
0.36553624272346497,
0.38135573267936707,
0.4163321256637573,
-0.5854829549789429,
0.2824895977973938,
0.08928132057189941,
0.1384943574666977,
-0.1393260508775711,
0.20353049039840698,
-0.015878066420555115,
0.1636161208152771,
0.11780793964862823,
0.017744993790984154,
-0.24185234308242798,
-0.3011685311794281,
0.10457545518875122,
0.3058531582355499,
-0.0577675998210907,
0.590070366859436,
-0.09004402905702591,
-0.422812819480896,
0.16253335773944855,
0.03273493051528931,
-0.44333919882774353,
0.019984930753707886,
0.5114709138870239,
-0.21762166917324066,
-0.03171458840370178,
-0.19305819272994995,
0.06734070181846619,
-0.0009202044457197189,
0.5991978645324707,
0.0071578435599803925,
0.36813098192214966,
-0.3758774697780609,
0.1315527856349945,
-0.504106879234314,
0.31763532757759094,
-0.12045429646968842,
0.11296522617340088,
-0.08622407168149948,
0.003686029464006424,
0.05039214342832565,
0.27576518058776855,
0.19038695096969604,
-0.08182916790246964,
0.20726874470710754,
0.6258140802383423,
-0.5632984638214111,
0.2407679259777069,
-0.10236875712871552,
-0.1458204686641693,
0.2865296006202698,
-0.2619750499725342,
0.1248403936624527,
0.025317203253507614,
0.0562632754445076,
-0.28666794300079346,
-0.2561282515525818,
0.10333967208862305,
0.21538376808166504,
0.35982462763786316,
0.30889421701431274,
0.4705527424812317,
-0.08602692186832428,
-0.15151384472846985,
-0.24374747276306152,
0.1913519650697708,
-0.060843612998723984,
-0.23224863409996033,
0.17806123197078705,
0.3006881773471832,
-0.37245339155197144,
-0.1436084508895874,
-0.2598102390766144,
-0.05013251304626465,
-0.163955956697464,
-0.2613406479358673,
-0.15797801315784454,
-0.0015279920771718025,
0.03986936807632446,
0.1521962583065033,
-0.10803067684173584,
0.5081026554107666,
0.026623155921697617,
0.20063145458698273,
-0.45855915546417236,
-0.17322885990142822,
0.2991134226322174,
-0.5101873874664307,
-0.5165338516235352,
-0.44687554240226746,
0.28221696615219116,
-0.10886622220277786,
0.03174949064850807,
-0.5038966536521912,
-0.18216893076896667,
0.028981532901525497,
-0.035078853368759155,
-0.514165461063385,
0.10345630347728729,
-0.03927881643176079,
-0.35144102573394775,
-0.19990235567092896,
0.3479396104812622,
0.20716357231140137,
-0.16302619874477386,
0.1435500532388687,
-0.10130457580089569
] |
https://github.com/huggingface/datasets/issues/5094 | Multiprocessing with `Dataset.map` and `PyTorch` results in deadlock | I also tried on colab and it works fine 🤔
Maybe something is wrong with your installation of pytorch ? | ## Describe the bug
There seems to be an issue with using multiprocessing with `datasets.Dataset.map` (i.e. setting `num_proc` to a value greater than one) combined with a function that uses `torch` under the hood. The subprocesses that `datasets.Dataset.map` spawns [a this step](https://github.com/huggingface/datasets/blob/1b935dab9d2f171a8c6294269421fe967eb55e34/src/datasets/arrow_dataset.py#L2663) go into wait mode forever.
## Steps to reproduce the bug
The below code goes into deadlock when `NUMBER_OF_PROCESSES` is greater than one.
```python
NUMBER_OF_PROCESSES = 2
from transformers import AutoTokenizer, AutoModel
from datasets import load_dataset
dataset = load_dataset("glue", "mrpc", split="train")
tokenizer = AutoTokenizer.from_pretrained("sentence-transformers/all-MiniLM-L6-v2")
model = AutoModel.from_pretrained("sentence-transformers/all-MiniLM-L6-v2")
model.to("cpu")
def cls_pooling(model_output):
return model_output.last_hidden_state[:, 0]
def generate_embeddings_batched(examples):
sentences_batch = list(examples['sentence1'])
encoded_input = tokenizer(
sentences_batch, padding=True, truncation=True, return_tensors="pt"
)
encoded_input = {k: v.to("cpu") for k, v in encoded_input.items()}
model_output = model(**encoded_input)
embeddings = cls_pooling(model_output)
examples['embeddings'] = embeddings.detach().cpu().numpy() # 64, 384
return examples
embeddings_dataset = dataset.map(
generate_embeddings_batched,
batched=True,
batch_size=10,
num_proc=NUMBER_OF_PROCESSES
)
```
While debugging it I've seen that it gets "stuck" when calling `torch.nn.Embedding.forward` but some testing shows that the same happens with other functions from `torch.nn`.
## Environment info
- Platform: Linux-5.14.0-1052-oem-x86_64-with-glibc2.31
- Python version: 3.9.14
- PyArrow version: 9.0.0
- Pandas version: 1.5.0
Not sure if this is a HF problem, a PyTorch problem or something I'm doing wrong..
Thanks!
| 20 | Multiprocessing with `Dataset.map` and `PyTorch` results in deadlock
## Describe the bug
There seems to be an issue with using multiprocessing with `datasets.Dataset.map` (i.e. setting `num_proc` to a value greater than one) combined with a function that uses `torch` under the hood. The subprocesses that `datasets.Dataset.map` spawns [a this step](https://github.com/huggingface/datasets/blob/1b935dab9d2f171a8c6294269421fe967eb55e34/src/datasets/arrow_dataset.py#L2663) go into wait mode forever.
## Steps to reproduce the bug
The below code goes into deadlock when `NUMBER_OF_PROCESSES` is greater than one.
```python
NUMBER_OF_PROCESSES = 2
from transformers import AutoTokenizer, AutoModel
from datasets import load_dataset
dataset = load_dataset("glue", "mrpc", split="train")
tokenizer = AutoTokenizer.from_pretrained("sentence-transformers/all-MiniLM-L6-v2")
model = AutoModel.from_pretrained("sentence-transformers/all-MiniLM-L6-v2")
model.to("cpu")
def cls_pooling(model_output):
return model_output.last_hidden_state[:, 0]
def generate_embeddings_batched(examples):
sentences_batch = list(examples['sentence1'])
encoded_input = tokenizer(
sentences_batch, padding=True, truncation=True, return_tensors="pt"
)
encoded_input = {k: v.to("cpu") for k, v in encoded_input.items()}
model_output = model(**encoded_input)
embeddings = cls_pooling(model_output)
examples['embeddings'] = embeddings.detach().cpu().numpy() # 64, 384
return examples
embeddings_dataset = dataset.map(
generate_embeddings_batched,
batched=True,
batch_size=10,
num_proc=NUMBER_OF_PROCESSES
)
```
While debugging it I've seen that it gets "stuck" when calling `torch.nn.Embedding.forward` but some testing shows that the same happens with other functions from `torch.nn`.
## Environment info
- Platform: Linux-5.14.0-1052-oem-x86_64-with-glibc2.31
- Python version: 3.9.14
- PyArrow version: 9.0.0
- Pandas version: 1.5.0
Not sure if this is a HF problem, a PyTorch problem or something I'm doing wrong..
Thanks!
I also tried on colab and it works fine 🤔
Maybe something is wrong with your installation of pytorch ? | [
-0.19728319346904755,
-0.5258713364601135,
-0.059857141226530075,
0.19121290743350983,
-0.03308035433292389,
-0.03727487847208977,
0.3879684805870056,
0.10255962610244751,
0.19705474376678467,
0.15648043155670166,
0.1593065857887268,
0.5224060416221619,
-0.1971760094165802,
-0.34866851568222046,
-0.30984288454055786,
0.00672561302781105,
0.12384426593780518,
-0.35253116488456726,
-0.04642243683338165,
0.09764261543750763,
-0.15816769003868103,
0.26773154735565186,
-0.16990752518177032,
-0.054510414600372314,
-0.7615679502487183,
0.06720700860023499,
0.08253856748342514,
-0.0023633167147636414,
0.2036450356245041,
-0.24507641792297363,
-0.16812686622142792,
0.15418265759944916,
-0.058848049491643906,
0.8481484651565552,
-0.00011896129581145942,
-0.1091778576374054,
0.2780541181564331,
0.20563127100467682,
0.01093040406703949,
-0.2291586548089981,
0.3251565098762512,
-0.025720171630382538,
0.16306909918785095,
-0.034114960581064224,
0.13139984011650085,
0.07892987132072449,
0.11396777629852295,
-0.7218788266181946,
0.30645331740379333,
0.14683747291564941,
0.12756921350955963,
0.5827531814575195,
-0.029711542651057243,
0.020966647192835808,
-0.2104896605014801,
-0.0050002411007881165,
-0.07171738892793655,
0.15186861157417297,
0.5983694791793823,
-0.2531331181526184,
-0.37854892015457153,
0.44758784770965576,
-0.12484809756278992,
-0.02141467109322548,
0.012464817613363266,
-0.11631786078214645,
-0.1307639181613922,
-0.74214768409729,
0.24704810976982117,
0.09432946145534515,
-0.2586125135421753,
-0.25411322712898254,
-0.1468227356672287,
-0.2539825737476349,
0.03562355786561966,
-0.17146922647953033,
0.0931064784526825,
0.16410021483898163,
-0.28115519881248474,
-0.07607473433017731,
-0.3438294231891632,
-0.05187489464879036,
0.13953672349452972,
-0.10562178492546082,
0.057263366878032684,
0.41724541783332825,
0.20500816404819489,
0.2839682400226593,
0.2434198260307312,
0.12929630279541016,
-0.0184665247797966,
-0.01704511046409607,
0.16135144233703613,
0.02039492502808571,
-0.5973533391952515,
0.11267419159412384,
0.20168471336364746,
-0.09189874678850174,
-0.007003717124462128,
-0.21409441530704498,
-0.010116730816662312,
0.11609016358852386,
0.14591500163078308,
0.10987505316734314,
0.39899635314941406,
-0.31718894839286804,
0.018270418047904968,
0.07181034982204437,
0.2054618000984192,
-0.3312462568283081,
-0.08371372520923615,
0.10557211190462112,
0.12287615239620209,
-0.3689732849597931,
0.2798476219177246,
0.16081392765045166,
0.11593791842460632,
-0.0066688172519207,
-0.0275504682213068,
0.15538062155246735,
-0.2550780177116394,
0.11779823154211044,
0.06784741580486298,
0.1721150279045105,
0.13410601019859314,
0.6897133588790894,
0.16588005423545837,
0.17131483554840088,
-0.485755980014801,
0.029595524072647095,
-0.05323448404669762,
-0.15932783484458923,
-0.3375268578529358,
0.09490395337343216,
0.17139573395252228,
-0.11264668405056,
0.05842554569244385,
0.4103654623031616,
0.46188366413116455,
-0.2101811170578003,
0.37107768654823303,
-0.300601989030838,
0.23612502217292786,
0.14609700441360474,
-0.08715368807315826,
0.2400803118944168,
-0.10769063234329224,
0.38669031858444214,
0.035049885511398315,
0.3083063066005707,
0.016420748084783554,
-0.1343061476945877,
-0.20859995484352112,
0.11937222629785538,
0.08320971578359604,
0.3459077775478363,
0.08964204043149948,
0.14199620485305786,
0.5798596143722534,
0.13193070888519287,
0.18659454584121704,
-0.4784564971923828,
-0.20855359733104706,
-0.06694753468036652,
0.13375802338123322,
0.3453560471534729,
0.11969953775405884,
0.09752066433429718,
0.04193601757287979,
0.015694625675678253,
-0.010526075959205627,
0.255352646112442,
-0.1328512728214264,
0.11517554521560669,
-0.04663532227277756,
0.1648816615343094,
-0.19056421518325806,
-0.28738391399383545,
-0.3479527533054352,
0.25245365500450134,
-0.33450931310653687,
0.11553498357534409,
0.09597177058458328,
0.2848915159702301,
0.08560378104448318,
0.12345002591609955,
0.437857985496521,
0.10185349732637405,
-0.10652031004428864,
0.22913774847984314,
-0.2130875140428543,
-0.019230011850595474,
0.05724150687456131,
0.08973921835422516,
0.22123299539089203,
-0.3161967992782593,
-0.38304030895233154,
-0.08010619133710861,
0.4298316240310669,
-0.03588595613837242,
0.034304216504096985,
0.3358994722366333,
-0.3085514307022095,
-0.04112705588340759,
0.08295167982578278,
-0.42112377285957336,
-0.5840059518814087,
0.2360517680644989,
0.08446457982063293,
0.18740639090538025,
-0.3531028628349304,
0.08271296322345734,
0.38109156489372253,
0.27939698100090027,
-0.23425160348415375,
-0.2797248065471649,
-0.015457600355148315,
-0.00445093959569931,
-0.2918185591697693,
-0.3499026894569397,
-0.0764317661523819,
0.4008371829986572,
0.3347691297531128,
-0.15005643665790558,
-0.3624480366706848,
0.21488866209983826,
-0.1342533528804779,
-0.45578664541244507,
-0.29391002655029297,
0.06479910761117935,
0.14287099242210388,
0.09160551428794861,
-0.17096862196922302,
0.2579115331172943,
0.14999359846115112,
0.11662435531616211,
-0.2063751220703125,
-0.11888884007930756,
0.25190749764442444,
-0.1659497767686844,
-0.13772618770599365,
0.14262838661670685,
-0.018337447196245193,
-0.11944236606359482,
0.09192194044589996,
0.3078451156616211,
0.12374264001846313,
0.3461223542690277,
-0.12948361039161682,
0.011080166324973106,
-0.14063520729541779,
0.12559151649475098,
-0.19415295124053955,
0.09803411364555359,
0.43549031019210815,
0.21469740569591522,
0.1837858408689499,
0.08839128911495209,
-0.2483357936143875,
0.14210480451583862,
0.177516907453537,
0.13421162962913513,
-0.18262949585914612,
-0.07960430532693863,
-0.07129605859518051,
0.052650898694992065,
0.10016792267560959,
-0.3027743995189667,
0.4516618847846985,
0.11814901232719421,
0.013969458639621735,
-0.06789060682058334,
-0.22531448304653168,
-0.12666884064674377,
-0.0660463497042656,
0.19669729471206665,
0.17183546721935272,
0.1772155612707138,
0.2936106324195862,
-0.10503654927015305,
-0.0336984358727932,
-0.2707268297672272,
0.025599433109164238,
-0.024471277371048927,
-0.20530366897583008,
0.27868714928627014,
-0.09404642879962921,
0.5213276743888855,
0.019990824162960052,
-0.07981099933385849,
-0.2054656744003296,
-0.2993314266204834,
-0.014471743255853653,
0.37930598855018616,
-0.19013366103172302,
0.32576826214790344,
-0.06756804883480072,
-0.2957773804664612,
-0.003110727295279503,
0.07801646739244461,
-0.004928715527057648,
-0.3113834261894226,
-0.05907192826271057,
-0.07129514962434769,
0.10118752717971802,
-0.0805199146270752,
0.2087545394897461,
0.3010319769382477,
-0.408439040184021,
-0.3572113513946533,
0.08309946209192276,
0.06302199512720108,
-0.24654869735240936,
0.09089983999729156,
-0.08429984748363495,
-0.11240984499454498,
0.02833835780620575,
-0.16216310858726501,
0.1483144462108612,
-0.38269826769828796,
0.022716106846928596,
0.08426787704229355,
0.07269490510225296,
-0.046181317418813705,
-0.3208022117614746,
-0.2381492555141449,
-0.2358032912015915,
-0.2659352719783783,
0.15800854563713074,
-0.35387155413627625,
0.1316913217306137,
-0.17704223096370697,
0.20771662890911102,
0.18096761405467987,
0.017398575320839882,
-0.21082700788974762,
-0.005960475653409958,
-0.06371927261352539,
0.1856509894132614,
-0.07864335924386978,
-0.3698170781135559,
-0.4100254774093628,
0.12839870154857635,
-0.12236501276493073,
0.35220181941986084,
-0.17087644338607788,
-0.050366275012493134,
-0.3920539617538452,
0.39019548892974854,
-0.2520071268081665,
-0.009723002091050148,
0.4477148950099945,
0.2500394880771637,
-0.1463022381067276,
-0.1259407103061676,
-0.08457336574792862,
0.33920368552207947,
-0.13329461216926575,
-0.000523984432220459,
-0.05256936699151993,
0.27146732807159424,
0.09986831247806549,
0.7712089419364929,
0.25723791122436523,
-0.470512717962265,
0.07876106351613998,
-0.06854259967803955,
0.051461052149534225,
-0.006358735263347626,
-0.40929412841796875,
-0.15169177949428558,
-0.29344311356544495,
0.053157418966293335,
-0.07502497732639313,
-0.06729425489902496,
-0.21354271471500397,
0.025861792266368866,
0.1844053417444229,
-0.1842370629310608,
-0.26099422574043274,
0.26365599036216736,
-0.3158262372016907,
0.14318139851093292,
-0.144866943359375,
0.20198997855186462,
-0.19570504128932953,
0.12164101749658585,
0.03732331842184067,
-0.2238241285085678,
0.18226054310798645,
-0.26394379138946533,
-0.09733547270298004,
0.17480561137199402,
-0.4854550361633301,
0.35495108366012573,
0.23028716444969177,
0.24372021853923798,
0.0190105177462101,
-0.14949682354927063,
0.07695247232913971,
-0.2988413870334625,
0.5705059170722961,
0.056466855108737946,
0.027905916795134544,
0.25224944949150085,
-0.14231662452220917,
-0.3355740010738373,
0.10954217612743378,
-0.22055582702159882,
0.5522512197494507,
0.5510736703872681,
0.36783406138420105,
-0.20740783214569092,
-0.2333364337682724,
-0.024870876222848892,
-0.09162258356809616,
-0.053929176181554794,
-0.30183425545692444,
-0.3276832401752472,
-0.0001867637038230896,
-0.36311256885528564,
0.319823294878006,
0.3426145613193512,
0.06729412078857422,
-0.28971242904663086,
-0.25564438104629517,
0.03799443691968918,
-0.14216700196266174,
0.11965333670377731,
-0.009150467813014984,
0.07953783869743347,
-0.10412028431892395,
0.35441476106643677,
0.2071307897567749,
0.29139578342437744,
0.1889011263847351,
0.037213392555713654,
-0.15146318078041077,
0.0017004907131195068,
0.4180834889411926,
0.013168622739613056,
0.33077049255371094,
0.48578739166259766,
0.07657559216022491,
0.25958165526390076,
0.15639935433864594,
0.23890870809555054,
-0.08471181243658066,
0.19786493480205536,
0.3870905041694641,
0.3589344918727875,
-0.18026882410049438,
-0.09487741440534592,
0.22512975335121155,
0.2301071733236313,
-0.05146852508187294,
0.454782634973526,
-0.40063410997390747,
-0.04947500675916672,
0.20249246060848236,
0.15789471566677094,
0.9495906233787537,
-0.2839590907096863,
0.10398143529891968,
-0.2181529402732849,
-0.10891106724739075,
0.22710582613945007,
-0.13888919353485107,
0.32213038206100464,
-0.21638891100883484,
-0.19451992213726044,
0.13172224164009094,
-0.271727055311203,
0.009718477725982666,
-0.030385509133338928,
-0.0422510951757431,
0.11875439435243607,
-0.2190864086151123,
-0.06527233123779297,
-0.026276012882590294,
0.33045557141304016,
-0.023067349568009377,
-0.3364054262638092,
0.16501469910144806,
0.052165158092975616,
0.109437495470047,
0.0708245262503624,
-0.15861043334007263,
-0.018540741875767708,
-0.015492398291826248,
-0.15750499069690704,
-0.4743001461029053,
0.21053284406661987,
-0.4147161543369293,
0.25145018100738525,
-0.1714542806148529,
-0.1868092119693756,
0.07863828539848328,
0.46313658356666565,
-0.11267757415771484,
0.041947465389966965,
-0.19964036345481873,
0.09070056676864624,
0.24642843008041382,
0.07344777137041092,
0.11610715091228485,
-0.29039666056632996,
0.0892849937081337,
-0.0618586502969265,
-0.3287564516067505,
-0.17039576172828674,
0.09025441855192184,
-0.1936764121055603,
0.21582618355751038,
0.26266342401504517,
0.37148112058639526,
0.20135365426540375,
0.049136653542518616,
0.18447893857955933,
-0.06297766417264938,
-0.288754940032959,
0.07371821254491806,
0.227534681558609,
-0.23415182530879974,
0.16772182285785675,
-0.4147428870201111,
-0.30677491426467896,
-0.07385571300983429,
0.5395992994308472,
0.13209930062294006,
-0.17416337132453918,
0.45730045437812805,
0.6134970784187317,
-0.17660361528396606,
-0.20923614501953125,
-0.14413292706012726,
0.1331983208656311,
-0.4807315468788147,
0.2579750716686249,
-0.20926670730113983,
-0.31037163734436035,
-0.22885364294052124,
-0.1031731367111206,
-0.036002472043037415,
-0.15614590048789978,
-0.134945347905159,
-0.18262948095798492,
-0.6286593079566956,
0.01715277135372162,
-0.3071392774581909,
0.2054428607225418,
0.0101059190928936,
0.11153194308280945,
0.09902308136224747,
0.27622973918914795,
-0.24787083268165588,
-0.16050386428833008,
-0.2209002673625946,
0.23328271508216858,
0.23499886691570282,
-0.2743026316165924,
0.016904864460229874,
-0.12282851338386536,
0.06345496326684952,
0.38331615924835205,
-0.12827186286449432,
-0.2074500024318695,
-0.1820686161518097,
0.09233739972114563,
-0.033082395792007446,
-0.10769683122634888,
0.027708750218153,
-0.059740349650382996,
0.04406633973121643,
-0.20097485184669495,
0.22689317166805267,
0.2389623522758484,
-0.048822931945323944,
-0.0268598310649395,
0.4763648211956024,
0.25179845094680786,
0.01645757257938385,
0.12107207626104355,
-0.08643239736557007,
0.021126262843608856,
0.034217897802591324,
0.17948515713214874,
0.4005492627620697,
0.04099665582180023,
-0.25935694575309753,
-0.043344005942344666,
0.42941510677337646,
0.24874672293663025,
-0.06622109562158585,
-0.0349632129073143,
-0.2750089764595032,
-0.058847568929195404,
0.4001520574092865,
0.24604617059230804,
-0.0907369926571846,
-0.22567032277584076,
0.12541067600250244,
0.1439819037914276,
-0.09209202975034714,
-0.05153887718915939,
0.042421117424964905,
-0.10232145339250565,
0.1283532977104187,
0.050166063010692596,
-0.029941502958536148,
0.19302091002464294,
-0.05830508470535278,
0.1605217456817627,
-0.043199699372053146,
-0.22476474940776825,
0.11279404163360596,
-0.09026309847831726,
0.11682315170764923,
0.26003509759902954,
0.3075765371322632,
-0.015686679631471634,
0.15014834702014923,
0.04062459617853165,
0.03064001351594925,
0.5096685886383057,
0.1909080445766449,
0.13086450099945068,
0.2767069935798645,
-0.13811910152435303,
-0.046777743846178055,
-0.11710235476493835,
-0.06075805425643921,
0.11108404397964478,
0.030793003737926483,
0.3569839298725128,
-0.13734565675258636,
-0.3564416468143463,
-0.028175996616482735,
0.496920645236969,
-0.3845931589603424,
-0.19953759014606476,
0.3168112635612488,
-0.08429098129272461,
-0.025843989104032516,
0.12919460237026215,
0.007914643734693527,
0.15000903606414795,
0.6482046842575073,
0.3030933737754822,
0.008896231651306152,
-0.2967342138290405,
-0.15280470252037048,
0.01551860012114048,
0.1568860113620758,
-0.16826410591602325,
0.09497679024934769,
0.21141619980335236,
-0.034725286066532135,
-0.17093080282211304,
0.36553624272346497,
0.38135573267936707,
0.4163321256637573,
-0.5854829549789429,
0.2824895977973938,
0.08928132057189941,
0.1384943574666977,
-0.1393260508775711,
0.20353049039840698,
-0.015878066420555115,
0.1636161208152771,
0.11780793964862823,
0.017744993790984154,
-0.24185234308242798,
-0.3011685311794281,
0.10457545518875122,
0.3058531582355499,
-0.0577675998210907,
0.590070366859436,
-0.09004402905702591,
-0.422812819480896,
0.16253335773944855,
0.03273493051528931,
-0.44333919882774353,
0.019984930753707886,
0.5114709138870239,
-0.21762166917324066,
-0.03171458840370178,
-0.19305819272994995,
0.06734070181846619,
-0.0009202044457197189,
0.5991978645324707,
0.0071578435599803925,
0.36813098192214966,
-0.3758774697780609,
0.1315527856349945,
-0.504106879234314,
0.31763532757759094,
-0.12045429646968842,
0.11296522617340088,
-0.08622407168149948,
0.003686029464006424,
0.05039214342832565,
0.27576518058776855,
0.19038695096969604,
-0.08182916790246964,
0.20726874470710754,
0.6258140802383423,
-0.5632984638214111,
0.2407679259777069,
-0.10236875712871552,
-0.1458204686641693,
0.2865296006202698,
-0.2619750499725342,
0.1248403936624527,
0.025317203253507614,
0.0562632754445076,
-0.28666794300079346,
-0.2561282515525818,
0.10333967208862305,
0.21538376808166504,
0.35982462763786316,
0.30889421701431274,
0.4705527424812317,
-0.08602692186832428,
-0.15151384472846985,
-0.24374747276306152,
0.1913519650697708,
-0.060843612998723984,
-0.23224863409996033,
0.17806123197078705,
0.3006881773471832,
-0.37245339155197144,
-0.1436084508895874,
-0.2598102390766144,
-0.05013251304626465,
-0.163955956697464,
-0.2613406479358673,
-0.15797801315784454,
-0.0015279920771718025,
0.03986936807632446,
0.1521962583065033,
-0.10803067684173584,
0.5081026554107666,
0.026623155921697617,
0.20063145458698273,
-0.45855915546417236,
-0.17322885990142822,
0.2991134226322174,
-0.5101873874664307,
-0.5165338516235352,
-0.44687554240226746,
0.28221696615219116,
-0.10886622220277786,
0.03174949064850807,
-0.5038966536521912,
-0.18216893076896667,
0.028981532901525497,
-0.035078853368759155,
-0.514165461063385,
0.10345630347728729,
-0.03927881643176079,
-0.35144102573394775,
-0.19990235567092896,
0.3479396104812622,
0.20716357231140137,
-0.16302619874477386,
0.1435500532388687,
-0.10130457580089569
] |
https://github.com/huggingface/datasets/issues/5094 | Multiprocessing with `Dataset.map` and `PyTorch` results in deadlock | Oh actually I just saw that you're using python 3.9
This could be related to https://github.com/huggingface/datasets/issues/4113
We'll fix that as soon as we can, in the meantime you can try to use use single process, or use an older version of python maybe ? | ## Describe the bug
There seems to be an issue with using multiprocessing with `datasets.Dataset.map` (i.e. setting `num_proc` to a value greater than one) combined with a function that uses `torch` under the hood. The subprocesses that `datasets.Dataset.map` spawns [a this step](https://github.com/huggingface/datasets/blob/1b935dab9d2f171a8c6294269421fe967eb55e34/src/datasets/arrow_dataset.py#L2663) go into wait mode forever.
## Steps to reproduce the bug
The below code goes into deadlock when `NUMBER_OF_PROCESSES` is greater than one.
```python
NUMBER_OF_PROCESSES = 2
from transformers import AutoTokenizer, AutoModel
from datasets import load_dataset
dataset = load_dataset("glue", "mrpc", split="train")
tokenizer = AutoTokenizer.from_pretrained("sentence-transformers/all-MiniLM-L6-v2")
model = AutoModel.from_pretrained("sentence-transformers/all-MiniLM-L6-v2")
model.to("cpu")
def cls_pooling(model_output):
return model_output.last_hidden_state[:, 0]
def generate_embeddings_batched(examples):
sentences_batch = list(examples['sentence1'])
encoded_input = tokenizer(
sentences_batch, padding=True, truncation=True, return_tensors="pt"
)
encoded_input = {k: v.to("cpu") for k, v in encoded_input.items()}
model_output = model(**encoded_input)
embeddings = cls_pooling(model_output)
examples['embeddings'] = embeddings.detach().cpu().numpy() # 64, 384
return examples
embeddings_dataset = dataset.map(
generate_embeddings_batched,
batched=True,
batch_size=10,
num_proc=NUMBER_OF_PROCESSES
)
```
While debugging it I've seen that it gets "stuck" when calling `torch.nn.Embedding.forward` but some testing shows that the same happens with other functions from `torch.nn`.
## Environment info
- Platform: Linux-5.14.0-1052-oem-x86_64-with-glibc2.31
- Python version: 3.9.14
- PyArrow version: 9.0.0
- Pandas version: 1.5.0
Not sure if this is a HF problem, a PyTorch problem or something I'm doing wrong..
Thanks!
| 44 | Multiprocessing with `Dataset.map` and `PyTorch` results in deadlock
## Describe the bug
There seems to be an issue with using multiprocessing with `datasets.Dataset.map` (i.e. setting `num_proc` to a value greater than one) combined with a function that uses `torch` under the hood. The subprocesses that `datasets.Dataset.map` spawns [a this step](https://github.com/huggingface/datasets/blob/1b935dab9d2f171a8c6294269421fe967eb55e34/src/datasets/arrow_dataset.py#L2663) go into wait mode forever.
## Steps to reproduce the bug
The below code goes into deadlock when `NUMBER_OF_PROCESSES` is greater than one.
```python
NUMBER_OF_PROCESSES = 2
from transformers import AutoTokenizer, AutoModel
from datasets import load_dataset
dataset = load_dataset("glue", "mrpc", split="train")
tokenizer = AutoTokenizer.from_pretrained("sentence-transformers/all-MiniLM-L6-v2")
model = AutoModel.from_pretrained("sentence-transformers/all-MiniLM-L6-v2")
model.to("cpu")
def cls_pooling(model_output):
return model_output.last_hidden_state[:, 0]
def generate_embeddings_batched(examples):
sentences_batch = list(examples['sentence1'])
encoded_input = tokenizer(
sentences_batch, padding=True, truncation=True, return_tensors="pt"
)
encoded_input = {k: v.to("cpu") for k, v in encoded_input.items()}
model_output = model(**encoded_input)
embeddings = cls_pooling(model_output)
examples['embeddings'] = embeddings.detach().cpu().numpy() # 64, 384
return examples
embeddings_dataset = dataset.map(
generate_embeddings_batched,
batched=True,
batch_size=10,
num_proc=NUMBER_OF_PROCESSES
)
```
While debugging it I've seen that it gets "stuck" when calling `torch.nn.Embedding.forward` but some testing shows that the same happens with other functions from `torch.nn`.
## Environment info
- Platform: Linux-5.14.0-1052-oem-x86_64-with-glibc2.31
- Python version: 3.9.14
- PyArrow version: 9.0.0
- Pandas version: 1.5.0
Not sure if this is a HF problem, a PyTorch problem or something I'm doing wrong..
Thanks!
Oh actually I just saw that you're using python 3.9
This could be related to https://github.com/huggingface/datasets/issues/4113
We'll fix that as soon as we can, in the meantime you can try to use use single process, or use an older version of python maybe ? | [
-0.19728319346904755,
-0.5258713364601135,
-0.059857141226530075,
0.19121290743350983,
-0.03308035433292389,
-0.03727487847208977,
0.3879684805870056,
0.10255962610244751,
0.19705474376678467,
0.15648043155670166,
0.1593065857887268,
0.5224060416221619,
-0.1971760094165802,
-0.34866851568222046,
-0.30984288454055786,
0.00672561302781105,
0.12384426593780518,
-0.35253116488456726,
-0.04642243683338165,
0.09764261543750763,
-0.15816769003868103,
0.26773154735565186,
-0.16990752518177032,
-0.054510414600372314,
-0.7615679502487183,
0.06720700860023499,
0.08253856748342514,
-0.0023633167147636414,
0.2036450356245041,
-0.24507641792297363,
-0.16812686622142792,
0.15418265759944916,
-0.058848049491643906,
0.8481484651565552,
-0.00011896129581145942,
-0.1091778576374054,
0.2780541181564331,
0.20563127100467682,
0.01093040406703949,
-0.2291586548089981,
0.3251565098762512,
-0.025720171630382538,
0.16306909918785095,
-0.034114960581064224,
0.13139984011650085,
0.07892987132072449,
0.11396777629852295,
-0.7218788266181946,
0.30645331740379333,
0.14683747291564941,
0.12756921350955963,
0.5827531814575195,
-0.029711542651057243,
0.020966647192835808,
-0.2104896605014801,
-0.0050002411007881165,
-0.07171738892793655,
0.15186861157417297,
0.5983694791793823,
-0.2531331181526184,
-0.37854892015457153,
0.44758784770965576,
-0.12484809756278992,
-0.02141467109322548,
0.012464817613363266,
-0.11631786078214645,
-0.1307639181613922,
-0.74214768409729,
0.24704810976982117,
0.09432946145534515,
-0.2586125135421753,
-0.25411322712898254,
-0.1468227356672287,
-0.2539825737476349,
0.03562355786561966,
-0.17146922647953033,
0.0931064784526825,
0.16410021483898163,
-0.28115519881248474,
-0.07607473433017731,
-0.3438294231891632,
-0.05187489464879036,
0.13953672349452972,
-0.10562178492546082,
0.057263366878032684,
0.41724541783332825,
0.20500816404819489,
0.2839682400226593,
0.2434198260307312,
0.12929630279541016,
-0.0184665247797966,
-0.01704511046409607,
0.16135144233703613,
0.02039492502808571,
-0.5973533391952515,
0.11267419159412384,
0.20168471336364746,
-0.09189874678850174,
-0.007003717124462128,
-0.21409441530704498,
-0.010116730816662312,
0.11609016358852386,
0.14591500163078308,
0.10987505316734314,
0.39899635314941406,
-0.31718894839286804,
0.018270418047904968,
0.07181034982204437,
0.2054618000984192,
-0.3312462568283081,
-0.08371372520923615,
0.10557211190462112,
0.12287615239620209,
-0.3689732849597931,
0.2798476219177246,
0.16081392765045166,
0.11593791842460632,
-0.0066688172519207,
-0.0275504682213068,
0.15538062155246735,
-0.2550780177116394,
0.11779823154211044,
0.06784741580486298,
0.1721150279045105,
0.13410601019859314,
0.6897133588790894,
0.16588005423545837,
0.17131483554840088,
-0.485755980014801,
0.029595524072647095,
-0.05323448404669762,
-0.15932783484458923,
-0.3375268578529358,
0.09490395337343216,
0.17139573395252228,
-0.11264668405056,
0.05842554569244385,
0.4103654623031616,
0.46188366413116455,
-0.2101811170578003,
0.37107768654823303,
-0.300601989030838,
0.23612502217292786,
0.14609700441360474,
-0.08715368807315826,
0.2400803118944168,
-0.10769063234329224,
0.38669031858444214,
0.035049885511398315,
0.3083063066005707,
0.016420748084783554,
-0.1343061476945877,
-0.20859995484352112,
0.11937222629785538,
0.08320971578359604,
0.3459077775478363,
0.08964204043149948,
0.14199620485305786,
0.5798596143722534,
0.13193070888519287,
0.18659454584121704,
-0.4784564971923828,
-0.20855359733104706,
-0.06694753468036652,
0.13375802338123322,
0.3453560471534729,
0.11969953775405884,
0.09752066433429718,
0.04193601757287979,
0.015694625675678253,
-0.010526075959205627,
0.255352646112442,
-0.1328512728214264,
0.11517554521560669,
-0.04663532227277756,
0.1648816615343094,
-0.19056421518325806,
-0.28738391399383545,
-0.3479527533054352,
0.25245365500450134,
-0.33450931310653687,
0.11553498357534409,
0.09597177058458328,
0.2848915159702301,
0.08560378104448318,
0.12345002591609955,
0.437857985496521,
0.10185349732637405,
-0.10652031004428864,
0.22913774847984314,
-0.2130875140428543,
-0.019230011850595474,
0.05724150687456131,
0.08973921835422516,
0.22123299539089203,
-0.3161967992782593,
-0.38304030895233154,
-0.08010619133710861,
0.4298316240310669,
-0.03588595613837242,
0.034304216504096985,
0.3358994722366333,
-0.3085514307022095,
-0.04112705588340759,
0.08295167982578278,
-0.42112377285957336,
-0.5840059518814087,
0.2360517680644989,
0.08446457982063293,
0.18740639090538025,
-0.3531028628349304,
0.08271296322345734,
0.38109156489372253,
0.27939698100090027,
-0.23425160348415375,
-0.2797248065471649,
-0.015457600355148315,
-0.00445093959569931,
-0.2918185591697693,
-0.3499026894569397,
-0.0764317661523819,
0.4008371829986572,
0.3347691297531128,
-0.15005643665790558,
-0.3624480366706848,
0.21488866209983826,
-0.1342533528804779,
-0.45578664541244507,
-0.29391002655029297,
0.06479910761117935,
0.14287099242210388,
0.09160551428794861,
-0.17096862196922302,
0.2579115331172943,
0.14999359846115112,
0.11662435531616211,
-0.2063751220703125,
-0.11888884007930756,
0.25190749764442444,
-0.1659497767686844,
-0.13772618770599365,
0.14262838661670685,
-0.018337447196245193,
-0.11944236606359482,
0.09192194044589996,
0.3078451156616211,
0.12374264001846313,
0.3461223542690277,
-0.12948361039161682,
0.011080166324973106,
-0.14063520729541779,
0.12559151649475098,
-0.19415295124053955,
0.09803411364555359,
0.43549031019210815,
0.21469740569591522,
0.1837858408689499,
0.08839128911495209,
-0.2483357936143875,
0.14210480451583862,
0.177516907453537,
0.13421162962913513,
-0.18262949585914612,
-0.07960430532693863,
-0.07129605859518051,
0.052650898694992065,
0.10016792267560959,
-0.3027743995189667,
0.4516618847846985,
0.11814901232719421,
0.013969458639621735,
-0.06789060682058334,
-0.22531448304653168,
-0.12666884064674377,
-0.0660463497042656,
0.19669729471206665,
0.17183546721935272,
0.1772155612707138,
0.2936106324195862,
-0.10503654927015305,
-0.0336984358727932,
-0.2707268297672272,
0.025599433109164238,
-0.024471277371048927,
-0.20530366897583008,
0.27868714928627014,
-0.09404642879962921,
0.5213276743888855,
0.019990824162960052,
-0.07981099933385849,
-0.2054656744003296,
-0.2993314266204834,
-0.014471743255853653,
0.37930598855018616,
-0.19013366103172302,
0.32576826214790344,
-0.06756804883480072,
-0.2957773804664612,
-0.003110727295279503,
0.07801646739244461,
-0.004928715527057648,
-0.3113834261894226,
-0.05907192826271057,
-0.07129514962434769,
0.10118752717971802,
-0.0805199146270752,
0.2087545394897461,
0.3010319769382477,
-0.408439040184021,
-0.3572113513946533,
0.08309946209192276,
0.06302199512720108,
-0.24654869735240936,
0.09089983999729156,
-0.08429984748363495,
-0.11240984499454498,
0.02833835780620575,
-0.16216310858726501,
0.1483144462108612,
-0.38269826769828796,
0.022716106846928596,
0.08426787704229355,
0.07269490510225296,
-0.046181317418813705,
-0.3208022117614746,
-0.2381492555141449,
-0.2358032912015915,
-0.2659352719783783,
0.15800854563713074,
-0.35387155413627625,
0.1316913217306137,
-0.17704223096370697,
0.20771662890911102,
0.18096761405467987,
0.017398575320839882,
-0.21082700788974762,
-0.005960475653409958,
-0.06371927261352539,
0.1856509894132614,
-0.07864335924386978,
-0.3698170781135559,
-0.4100254774093628,
0.12839870154857635,
-0.12236501276493073,
0.35220181941986084,
-0.17087644338607788,
-0.050366275012493134,
-0.3920539617538452,
0.39019548892974854,
-0.2520071268081665,
-0.009723002091050148,
0.4477148950099945,
0.2500394880771637,
-0.1463022381067276,
-0.1259407103061676,
-0.08457336574792862,
0.33920368552207947,
-0.13329461216926575,
-0.000523984432220459,
-0.05256936699151993,
0.27146732807159424,
0.09986831247806549,
0.7712089419364929,
0.25723791122436523,
-0.470512717962265,
0.07876106351613998,
-0.06854259967803955,
0.051461052149534225,
-0.006358735263347626,
-0.40929412841796875,
-0.15169177949428558,
-0.29344311356544495,
0.053157418966293335,
-0.07502497732639313,
-0.06729425489902496,
-0.21354271471500397,
0.025861792266368866,
0.1844053417444229,
-0.1842370629310608,
-0.26099422574043274,
0.26365599036216736,
-0.3158262372016907,
0.14318139851093292,
-0.144866943359375,
0.20198997855186462,
-0.19570504128932953,
0.12164101749658585,
0.03732331842184067,
-0.2238241285085678,
0.18226054310798645,
-0.26394379138946533,
-0.09733547270298004,
0.17480561137199402,
-0.4854550361633301,
0.35495108366012573,
0.23028716444969177,
0.24372021853923798,
0.0190105177462101,
-0.14949682354927063,
0.07695247232913971,
-0.2988413870334625,
0.5705059170722961,
0.056466855108737946,
0.027905916795134544,
0.25224944949150085,
-0.14231662452220917,
-0.3355740010738373,
0.10954217612743378,
-0.22055582702159882,
0.5522512197494507,
0.5510736703872681,
0.36783406138420105,
-0.20740783214569092,
-0.2333364337682724,
-0.024870876222848892,
-0.09162258356809616,
-0.053929176181554794,
-0.30183425545692444,
-0.3276832401752472,
-0.0001867637038230896,
-0.36311256885528564,
0.319823294878006,
0.3426145613193512,
0.06729412078857422,
-0.28971242904663086,
-0.25564438104629517,
0.03799443691968918,
-0.14216700196266174,
0.11965333670377731,
-0.009150467813014984,
0.07953783869743347,
-0.10412028431892395,
0.35441476106643677,
0.2071307897567749,
0.29139578342437744,
0.1889011263847351,
0.037213392555713654,
-0.15146318078041077,
0.0017004907131195068,
0.4180834889411926,
0.013168622739613056,
0.33077049255371094,
0.48578739166259766,
0.07657559216022491,
0.25958165526390076,
0.15639935433864594,
0.23890870809555054,
-0.08471181243658066,
0.19786493480205536,
0.3870905041694641,
0.3589344918727875,
-0.18026882410049438,
-0.09487741440534592,
0.22512975335121155,
0.2301071733236313,
-0.05146852508187294,
0.454782634973526,
-0.40063410997390747,
-0.04947500675916672,
0.20249246060848236,
0.15789471566677094,
0.9495906233787537,
-0.2839590907096863,
0.10398143529891968,
-0.2181529402732849,
-0.10891106724739075,
0.22710582613945007,
-0.13888919353485107,
0.32213038206100464,
-0.21638891100883484,
-0.19451992213726044,
0.13172224164009094,
-0.271727055311203,
0.009718477725982666,
-0.030385509133338928,
-0.0422510951757431,
0.11875439435243607,
-0.2190864086151123,
-0.06527233123779297,
-0.026276012882590294,
0.33045557141304016,
-0.023067349568009377,
-0.3364054262638092,
0.16501469910144806,
0.052165158092975616,
0.109437495470047,
0.0708245262503624,
-0.15861043334007263,
-0.018540741875767708,
-0.015492398291826248,
-0.15750499069690704,
-0.4743001461029053,
0.21053284406661987,
-0.4147161543369293,
0.25145018100738525,
-0.1714542806148529,
-0.1868092119693756,
0.07863828539848328,
0.46313658356666565,
-0.11267757415771484,
0.041947465389966965,
-0.19964036345481873,
0.09070056676864624,
0.24642843008041382,
0.07344777137041092,
0.11610715091228485,
-0.29039666056632996,
0.0892849937081337,
-0.0618586502969265,
-0.3287564516067505,
-0.17039576172828674,
0.09025441855192184,
-0.1936764121055603,
0.21582618355751038,
0.26266342401504517,
0.37148112058639526,
0.20135365426540375,
0.049136653542518616,
0.18447893857955933,
-0.06297766417264938,
-0.288754940032959,
0.07371821254491806,
0.227534681558609,
-0.23415182530879974,
0.16772182285785675,
-0.4147428870201111,
-0.30677491426467896,
-0.07385571300983429,
0.5395992994308472,
0.13209930062294006,
-0.17416337132453918,
0.45730045437812805,
0.6134970784187317,
-0.17660361528396606,
-0.20923614501953125,
-0.14413292706012726,
0.1331983208656311,
-0.4807315468788147,
0.2579750716686249,
-0.20926670730113983,
-0.31037163734436035,
-0.22885364294052124,
-0.1031731367111206,
-0.036002472043037415,
-0.15614590048789978,
-0.134945347905159,
-0.18262948095798492,
-0.6286593079566956,
0.01715277135372162,
-0.3071392774581909,
0.2054428607225418,
0.0101059190928936,
0.11153194308280945,
0.09902308136224747,
0.27622973918914795,
-0.24787083268165588,
-0.16050386428833008,
-0.2209002673625946,
0.23328271508216858,
0.23499886691570282,
-0.2743026316165924,
0.016904864460229874,
-0.12282851338386536,
0.06345496326684952,
0.38331615924835205,
-0.12827186286449432,
-0.2074500024318695,
-0.1820686161518097,
0.09233739972114563,
-0.033082395792007446,
-0.10769683122634888,
0.027708750218153,
-0.059740349650382996,
0.04406633973121643,
-0.20097485184669495,
0.22689317166805267,
0.2389623522758484,
-0.048822931945323944,
-0.0268598310649395,
0.4763648211956024,
0.25179845094680786,
0.01645757257938385,
0.12107207626104355,
-0.08643239736557007,
0.021126262843608856,
0.034217897802591324,
0.17948515713214874,
0.4005492627620697,
0.04099665582180023,
-0.25935694575309753,
-0.043344005942344666,
0.42941510677337646,
0.24874672293663025,
-0.06622109562158585,
-0.0349632129073143,
-0.2750089764595032,
-0.058847568929195404,
0.4001520574092865,
0.24604617059230804,
-0.0907369926571846,
-0.22567032277584076,
0.12541067600250244,
0.1439819037914276,
-0.09209202975034714,
-0.05153887718915939,
0.042421117424964905,
-0.10232145339250565,
0.1283532977104187,
0.050166063010692596,
-0.029941502958536148,
0.19302091002464294,
-0.05830508470535278,
0.1605217456817627,
-0.043199699372053146,
-0.22476474940776825,
0.11279404163360596,
-0.09026309847831726,
0.11682315170764923,
0.26003509759902954,
0.3075765371322632,
-0.015686679631471634,
0.15014834702014923,
0.04062459617853165,
0.03064001351594925,
0.5096685886383057,
0.1909080445766449,
0.13086450099945068,
0.2767069935798645,
-0.13811910152435303,
-0.046777743846178055,
-0.11710235476493835,
-0.06075805425643921,
0.11108404397964478,
0.030793003737926483,
0.3569839298725128,
-0.13734565675258636,
-0.3564416468143463,
-0.028175996616482735,
0.496920645236969,
-0.3845931589603424,
-0.19953759014606476,
0.3168112635612488,
-0.08429098129272461,
-0.025843989104032516,
0.12919460237026215,
0.007914643734693527,
0.15000903606414795,
0.6482046842575073,
0.3030933737754822,
0.008896231651306152,
-0.2967342138290405,
-0.15280470252037048,
0.01551860012114048,
0.1568860113620758,
-0.16826410591602325,
0.09497679024934769,
0.21141619980335236,
-0.034725286066532135,
-0.17093080282211304,
0.36553624272346497,
0.38135573267936707,
0.4163321256637573,
-0.5854829549789429,
0.2824895977973938,
0.08928132057189941,
0.1384943574666977,
-0.1393260508775711,
0.20353049039840698,
-0.015878066420555115,
0.1636161208152771,
0.11780793964862823,
0.017744993790984154,
-0.24185234308242798,
-0.3011685311794281,
0.10457545518875122,
0.3058531582355499,
-0.0577675998210907,
0.590070366859436,
-0.09004402905702591,
-0.422812819480896,
0.16253335773944855,
0.03273493051528931,
-0.44333919882774353,
0.019984930753707886,
0.5114709138870239,
-0.21762166917324066,
-0.03171458840370178,
-0.19305819272994995,
0.06734070181846619,
-0.0009202044457197189,
0.5991978645324707,
0.0071578435599803925,
0.36813098192214966,
-0.3758774697780609,
0.1315527856349945,
-0.504106879234314,
0.31763532757759094,
-0.12045429646968842,
0.11296522617340088,
-0.08622407168149948,
0.003686029464006424,
0.05039214342832565,
0.27576518058776855,
0.19038695096969604,
-0.08182916790246964,
0.20726874470710754,
0.6258140802383423,
-0.5632984638214111,
0.2407679259777069,
-0.10236875712871552,
-0.1458204686641693,
0.2865296006202698,
-0.2619750499725342,
0.1248403936624527,
0.025317203253507614,
0.0562632754445076,
-0.28666794300079346,
-0.2561282515525818,
0.10333967208862305,
0.21538376808166504,
0.35982462763786316,
0.30889421701431274,
0.4705527424812317,
-0.08602692186832428,
-0.15151384472846985,
-0.24374747276306152,
0.1913519650697708,
-0.060843612998723984,
-0.23224863409996033,
0.17806123197078705,
0.3006881773471832,
-0.37245339155197144,
-0.1436084508895874,
-0.2598102390766144,
-0.05013251304626465,
-0.163955956697464,
-0.2613406479358673,
-0.15797801315784454,
-0.0015279920771718025,
0.03986936807632446,
0.1521962583065033,
-0.10803067684173584,
0.5081026554107666,
0.026623155921697617,
0.20063145458698273,
-0.45855915546417236,
-0.17322885990142822,
0.2991134226322174,
-0.5101873874664307,
-0.5165338516235352,
-0.44687554240226746,
0.28221696615219116,
-0.10886622220277786,
0.03174949064850807,
-0.5038966536521912,
-0.18216893076896667,
0.028981532901525497,
-0.035078853368759155,
-0.514165461063385,
0.10345630347728729,
-0.03927881643176079,
-0.35144102573394775,
-0.19990235567092896,
0.3479396104812622,
0.20716357231140137,
-0.16302619874477386,
0.1435500532388687,
-0.10130457580089569
] |
https://github.com/huggingface/datasets/issues/5094 | Multiprocessing with `Dataset.map` and `PyTorch` results in deadlock | I tried with python 3.7 and the issue persists. In collab, which also uses 3.7 I don't get the issue, so yes I guess is something on mu side... will post it here if I manage to fix it | ## Describe the bug
There seems to be an issue with using multiprocessing with `datasets.Dataset.map` (i.e. setting `num_proc` to a value greater than one) combined with a function that uses `torch` under the hood. The subprocesses that `datasets.Dataset.map` spawns [a this step](https://github.com/huggingface/datasets/blob/1b935dab9d2f171a8c6294269421fe967eb55e34/src/datasets/arrow_dataset.py#L2663) go into wait mode forever.
## Steps to reproduce the bug
The below code goes into deadlock when `NUMBER_OF_PROCESSES` is greater than one.
```python
NUMBER_OF_PROCESSES = 2
from transformers import AutoTokenizer, AutoModel
from datasets import load_dataset
dataset = load_dataset("glue", "mrpc", split="train")
tokenizer = AutoTokenizer.from_pretrained("sentence-transformers/all-MiniLM-L6-v2")
model = AutoModel.from_pretrained("sentence-transformers/all-MiniLM-L6-v2")
model.to("cpu")
def cls_pooling(model_output):
return model_output.last_hidden_state[:, 0]
def generate_embeddings_batched(examples):
sentences_batch = list(examples['sentence1'])
encoded_input = tokenizer(
sentences_batch, padding=True, truncation=True, return_tensors="pt"
)
encoded_input = {k: v.to("cpu") for k, v in encoded_input.items()}
model_output = model(**encoded_input)
embeddings = cls_pooling(model_output)
examples['embeddings'] = embeddings.detach().cpu().numpy() # 64, 384
return examples
embeddings_dataset = dataset.map(
generate_embeddings_batched,
batched=True,
batch_size=10,
num_proc=NUMBER_OF_PROCESSES
)
```
While debugging it I've seen that it gets "stuck" when calling `torch.nn.Embedding.forward` but some testing shows that the same happens with other functions from `torch.nn`.
## Environment info
- Platform: Linux-5.14.0-1052-oem-x86_64-with-glibc2.31
- Python version: 3.9.14
- PyArrow version: 9.0.0
- Pandas version: 1.5.0
Not sure if this is a HF problem, a PyTorch problem or something I'm doing wrong..
Thanks!
| 39 | Multiprocessing with `Dataset.map` and `PyTorch` results in deadlock
## Describe the bug
There seems to be an issue with using multiprocessing with `datasets.Dataset.map` (i.e. setting `num_proc` to a value greater than one) combined with a function that uses `torch` under the hood. The subprocesses that `datasets.Dataset.map` spawns [a this step](https://github.com/huggingface/datasets/blob/1b935dab9d2f171a8c6294269421fe967eb55e34/src/datasets/arrow_dataset.py#L2663) go into wait mode forever.
## Steps to reproduce the bug
The below code goes into deadlock when `NUMBER_OF_PROCESSES` is greater than one.
```python
NUMBER_OF_PROCESSES = 2
from transformers import AutoTokenizer, AutoModel
from datasets import load_dataset
dataset = load_dataset("glue", "mrpc", split="train")
tokenizer = AutoTokenizer.from_pretrained("sentence-transformers/all-MiniLM-L6-v2")
model = AutoModel.from_pretrained("sentence-transformers/all-MiniLM-L6-v2")
model.to("cpu")
def cls_pooling(model_output):
return model_output.last_hidden_state[:, 0]
def generate_embeddings_batched(examples):
sentences_batch = list(examples['sentence1'])
encoded_input = tokenizer(
sentences_batch, padding=True, truncation=True, return_tensors="pt"
)
encoded_input = {k: v.to("cpu") for k, v in encoded_input.items()}
model_output = model(**encoded_input)
embeddings = cls_pooling(model_output)
examples['embeddings'] = embeddings.detach().cpu().numpy() # 64, 384
return examples
embeddings_dataset = dataset.map(
generate_embeddings_batched,
batched=True,
batch_size=10,
num_proc=NUMBER_OF_PROCESSES
)
```
While debugging it I've seen that it gets "stuck" when calling `torch.nn.Embedding.forward` but some testing shows that the same happens with other functions from `torch.nn`.
## Environment info
- Platform: Linux-5.14.0-1052-oem-x86_64-with-glibc2.31
- Python version: 3.9.14
- PyArrow version: 9.0.0
- Pandas version: 1.5.0
Not sure if this is a HF problem, a PyTorch problem or something I'm doing wrong..
Thanks!
I tried with python 3.7 and the issue persists. In collab, which also uses 3.7 I don't get the issue, so yes I guess is something on mu side... will post it here if I manage to fix it | [
-0.19728319346904755,
-0.5258713364601135,
-0.059857141226530075,
0.19121290743350983,
-0.03308035433292389,
-0.03727487847208977,
0.3879684805870056,
0.10255962610244751,
0.19705474376678467,
0.15648043155670166,
0.1593065857887268,
0.5224060416221619,
-0.1971760094165802,
-0.34866851568222046,
-0.30984288454055786,
0.00672561302781105,
0.12384426593780518,
-0.35253116488456726,
-0.04642243683338165,
0.09764261543750763,
-0.15816769003868103,
0.26773154735565186,
-0.16990752518177032,
-0.054510414600372314,
-0.7615679502487183,
0.06720700860023499,
0.08253856748342514,
-0.0023633167147636414,
0.2036450356245041,
-0.24507641792297363,
-0.16812686622142792,
0.15418265759944916,
-0.058848049491643906,
0.8481484651565552,
-0.00011896129581145942,
-0.1091778576374054,
0.2780541181564331,
0.20563127100467682,
0.01093040406703949,
-0.2291586548089981,
0.3251565098762512,
-0.025720171630382538,
0.16306909918785095,
-0.034114960581064224,
0.13139984011650085,
0.07892987132072449,
0.11396777629852295,
-0.7218788266181946,
0.30645331740379333,
0.14683747291564941,
0.12756921350955963,
0.5827531814575195,
-0.029711542651057243,
0.020966647192835808,
-0.2104896605014801,
-0.0050002411007881165,
-0.07171738892793655,
0.15186861157417297,
0.5983694791793823,
-0.2531331181526184,
-0.37854892015457153,
0.44758784770965576,
-0.12484809756278992,
-0.02141467109322548,
0.012464817613363266,
-0.11631786078214645,
-0.1307639181613922,
-0.74214768409729,
0.24704810976982117,
0.09432946145534515,
-0.2586125135421753,
-0.25411322712898254,
-0.1468227356672287,
-0.2539825737476349,
0.03562355786561966,
-0.17146922647953033,
0.0931064784526825,
0.16410021483898163,
-0.28115519881248474,
-0.07607473433017731,
-0.3438294231891632,
-0.05187489464879036,
0.13953672349452972,
-0.10562178492546082,
0.057263366878032684,
0.41724541783332825,
0.20500816404819489,
0.2839682400226593,
0.2434198260307312,
0.12929630279541016,
-0.0184665247797966,
-0.01704511046409607,
0.16135144233703613,
0.02039492502808571,
-0.5973533391952515,
0.11267419159412384,
0.20168471336364746,
-0.09189874678850174,
-0.007003717124462128,
-0.21409441530704498,
-0.010116730816662312,
0.11609016358852386,
0.14591500163078308,
0.10987505316734314,
0.39899635314941406,
-0.31718894839286804,
0.018270418047904968,
0.07181034982204437,
0.2054618000984192,
-0.3312462568283081,
-0.08371372520923615,
0.10557211190462112,
0.12287615239620209,
-0.3689732849597931,
0.2798476219177246,
0.16081392765045166,
0.11593791842460632,
-0.0066688172519207,
-0.0275504682213068,
0.15538062155246735,
-0.2550780177116394,
0.11779823154211044,
0.06784741580486298,
0.1721150279045105,
0.13410601019859314,
0.6897133588790894,
0.16588005423545837,
0.17131483554840088,
-0.485755980014801,
0.029595524072647095,
-0.05323448404669762,
-0.15932783484458923,
-0.3375268578529358,
0.09490395337343216,
0.17139573395252228,
-0.11264668405056,
0.05842554569244385,
0.4103654623031616,
0.46188366413116455,
-0.2101811170578003,
0.37107768654823303,
-0.300601989030838,
0.23612502217292786,
0.14609700441360474,
-0.08715368807315826,
0.2400803118944168,
-0.10769063234329224,
0.38669031858444214,
0.035049885511398315,
0.3083063066005707,
0.016420748084783554,
-0.1343061476945877,
-0.20859995484352112,
0.11937222629785538,
0.08320971578359604,
0.3459077775478363,
0.08964204043149948,
0.14199620485305786,
0.5798596143722534,
0.13193070888519287,
0.18659454584121704,
-0.4784564971923828,
-0.20855359733104706,
-0.06694753468036652,
0.13375802338123322,
0.3453560471534729,
0.11969953775405884,
0.09752066433429718,
0.04193601757287979,
0.015694625675678253,
-0.010526075959205627,
0.255352646112442,
-0.1328512728214264,
0.11517554521560669,
-0.04663532227277756,
0.1648816615343094,
-0.19056421518325806,
-0.28738391399383545,
-0.3479527533054352,
0.25245365500450134,
-0.33450931310653687,
0.11553498357534409,
0.09597177058458328,
0.2848915159702301,
0.08560378104448318,
0.12345002591609955,
0.437857985496521,
0.10185349732637405,
-0.10652031004428864,
0.22913774847984314,
-0.2130875140428543,
-0.019230011850595474,
0.05724150687456131,
0.08973921835422516,
0.22123299539089203,
-0.3161967992782593,
-0.38304030895233154,
-0.08010619133710861,
0.4298316240310669,
-0.03588595613837242,
0.034304216504096985,
0.3358994722366333,
-0.3085514307022095,
-0.04112705588340759,
0.08295167982578278,
-0.42112377285957336,
-0.5840059518814087,
0.2360517680644989,
0.08446457982063293,
0.18740639090538025,
-0.3531028628349304,
0.08271296322345734,
0.38109156489372253,
0.27939698100090027,
-0.23425160348415375,
-0.2797248065471649,
-0.015457600355148315,
-0.00445093959569931,
-0.2918185591697693,
-0.3499026894569397,
-0.0764317661523819,
0.4008371829986572,
0.3347691297531128,
-0.15005643665790558,
-0.3624480366706848,
0.21488866209983826,
-0.1342533528804779,
-0.45578664541244507,
-0.29391002655029297,
0.06479910761117935,
0.14287099242210388,
0.09160551428794861,
-0.17096862196922302,
0.2579115331172943,
0.14999359846115112,
0.11662435531616211,
-0.2063751220703125,
-0.11888884007930756,
0.25190749764442444,
-0.1659497767686844,
-0.13772618770599365,
0.14262838661670685,
-0.018337447196245193,
-0.11944236606359482,
0.09192194044589996,
0.3078451156616211,
0.12374264001846313,
0.3461223542690277,
-0.12948361039161682,
0.011080166324973106,
-0.14063520729541779,
0.12559151649475098,
-0.19415295124053955,
0.09803411364555359,
0.43549031019210815,
0.21469740569591522,
0.1837858408689499,
0.08839128911495209,
-0.2483357936143875,
0.14210480451583862,
0.177516907453537,
0.13421162962913513,
-0.18262949585914612,
-0.07960430532693863,
-0.07129605859518051,
0.052650898694992065,
0.10016792267560959,
-0.3027743995189667,
0.4516618847846985,
0.11814901232719421,
0.013969458639621735,
-0.06789060682058334,
-0.22531448304653168,
-0.12666884064674377,
-0.0660463497042656,
0.19669729471206665,
0.17183546721935272,
0.1772155612707138,
0.2936106324195862,
-0.10503654927015305,
-0.0336984358727932,
-0.2707268297672272,
0.025599433109164238,
-0.024471277371048927,
-0.20530366897583008,
0.27868714928627014,
-0.09404642879962921,
0.5213276743888855,
0.019990824162960052,
-0.07981099933385849,
-0.2054656744003296,
-0.2993314266204834,
-0.014471743255853653,
0.37930598855018616,
-0.19013366103172302,
0.32576826214790344,
-0.06756804883480072,
-0.2957773804664612,
-0.003110727295279503,
0.07801646739244461,
-0.004928715527057648,
-0.3113834261894226,
-0.05907192826271057,
-0.07129514962434769,
0.10118752717971802,
-0.0805199146270752,
0.2087545394897461,
0.3010319769382477,
-0.408439040184021,
-0.3572113513946533,
0.08309946209192276,
0.06302199512720108,
-0.24654869735240936,
0.09089983999729156,
-0.08429984748363495,
-0.11240984499454498,
0.02833835780620575,
-0.16216310858726501,
0.1483144462108612,
-0.38269826769828796,
0.022716106846928596,
0.08426787704229355,
0.07269490510225296,
-0.046181317418813705,
-0.3208022117614746,
-0.2381492555141449,
-0.2358032912015915,
-0.2659352719783783,
0.15800854563713074,
-0.35387155413627625,
0.1316913217306137,
-0.17704223096370697,
0.20771662890911102,
0.18096761405467987,
0.017398575320839882,
-0.21082700788974762,
-0.005960475653409958,
-0.06371927261352539,
0.1856509894132614,
-0.07864335924386978,
-0.3698170781135559,
-0.4100254774093628,
0.12839870154857635,
-0.12236501276493073,
0.35220181941986084,
-0.17087644338607788,
-0.050366275012493134,
-0.3920539617538452,
0.39019548892974854,
-0.2520071268081665,
-0.009723002091050148,
0.4477148950099945,
0.2500394880771637,
-0.1463022381067276,
-0.1259407103061676,
-0.08457336574792862,
0.33920368552207947,
-0.13329461216926575,
-0.000523984432220459,
-0.05256936699151993,
0.27146732807159424,
0.09986831247806549,
0.7712089419364929,
0.25723791122436523,
-0.470512717962265,
0.07876106351613998,
-0.06854259967803955,
0.051461052149534225,
-0.006358735263347626,
-0.40929412841796875,
-0.15169177949428558,
-0.29344311356544495,
0.053157418966293335,
-0.07502497732639313,
-0.06729425489902496,
-0.21354271471500397,
0.025861792266368866,
0.1844053417444229,
-0.1842370629310608,
-0.26099422574043274,
0.26365599036216736,
-0.3158262372016907,
0.14318139851093292,
-0.144866943359375,
0.20198997855186462,
-0.19570504128932953,
0.12164101749658585,
0.03732331842184067,
-0.2238241285085678,
0.18226054310798645,
-0.26394379138946533,
-0.09733547270298004,
0.17480561137199402,
-0.4854550361633301,
0.35495108366012573,
0.23028716444969177,
0.24372021853923798,
0.0190105177462101,
-0.14949682354927063,
0.07695247232913971,
-0.2988413870334625,
0.5705059170722961,
0.056466855108737946,
0.027905916795134544,
0.25224944949150085,
-0.14231662452220917,
-0.3355740010738373,
0.10954217612743378,
-0.22055582702159882,
0.5522512197494507,
0.5510736703872681,
0.36783406138420105,
-0.20740783214569092,
-0.2333364337682724,
-0.024870876222848892,
-0.09162258356809616,
-0.053929176181554794,
-0.30183425545692444,
-0.3276832401752472,
-0.0001867637038230896,
-0.36311256885528564,
0.319823294878006,
0.3426145613193512,
0.06729412078857422,
-0.28971242904663086,
-0.25564438104629517,
0.03799443691968918,
-0.14216700196266174,
0.11965333670377731,
-0.009150467813014984,
0.07953783869743347,
-0.10412028431892395,
0.35441476106643677,
0.2071307897567749,
0.29139578342437744,
0.1889011263847351,
0.037213392555713654,
-0.15146318078041077,
0.0017004907131195068,
0.4180834889411926,
0.013168622739613056,
0.33077049255371094,
0.48578739166259766,
0.07657559216022491,
0.25958165526390076,
0.15639935433864594,
0.23890870809555054,
-0.08471181243658066,
0.19786493480205536,
0.3870905041694641,
0.3589344918727875,
-0.18026882410049438,
-0.09487741440534592,
0.22512975335121155,
0.2301071733236313,
-0.05146852508187294,
0.454782634973526,
-0.40063410997390747,
-0.04947500675916672,
0.20249246060848236,
0.15789471566677094,
0.9495906233787537,
-0.2839590907096863,
0.10398143529891968,
-0.2181529402732849,
-0.10891106724739075,
0.22710582613945007,
-0.13888919353485107,
0.32213038206100464,
-0.21638891100883484,
-0.19451992213726044,
0.13172224164009094,
-0.271727055311203,
0.009718477725982666,
-0.030385509133338928,
-0.0422510951757431,
0.11875439435243607,
-0.2190864086151123,
-0.06527233123779297,
-0.026276012882590294,
0.33045557141304016,
-0.023067349568009377,
-0.3364054262638092,
0.16501469910144806,
0.052165158092975616,
0.109437495470047,
0.0708245262503624,
-0.15861043334007263,
-0.018540741875767708,
-0.015492398291826248,
-0.15750499069690704,
-0.4743001461029053,
0.21053284406661987,
-0.4147161543369293,
0.25145018100738525,
-0.1714542806148529,
-0.1868092119693756,
0.07863828539848328,
0.46313658356666565,
-0.11267757415771484,
0.041947465389966965,
-0.19964036345481873,
0.09070056676864624,
0.24642843008041382,
0.07344777137041092,
0.11610715091228485,
-0.29039666056632996,
0.0892849937081337,
-0.0618586502969265,
-0.3287564516067505,
-0.17039576172828674,
0.09025441855192184,
-0.1936764121055603,
0.21582618355751038,
0.26266342401504517,
0.37148112058639526,
0.20135365426540375,
0.049136653542518616,
0.18447893857955933,
-0.06297766417264938,
-0.288754940032959,
0.07371821254491806,
0.227534681558609,
-0.23415182530879974,
0.16772182285785675,
-0.4147428870201111,
-0.30677491426467896,
-0.07385571300983429,
0.5395992994308472,
0.13209930062294006,
-0.17416337132453918,
0.45730045437812805,
0.6134970784187317,
-0.17660361528396606,
-0.20923614501953125,
-0.14413292706012726,
0.1331983208656311,
-0.4807315468788147,
0.2579750716686249,
-0.20926670730113983,
-0.31037163734436035,
-0.22885364294052124,
-0.1031731367111206,
-0.036002472043037415,
-0.15614590048789978,
-0.134945347905159,
-0.18262948095798492,
-0.6286593079566956,
0.01715277135372162,
-0.3071392774581909,
0.2054428607225418,
0.0101059190928936,
0.11153194308280945,
0.09902308136224747,
0.27622973918914795,
-0.24787083268165588,
-0.16050386428833008,
-0.2209002673625946,
0.23328271508216858,
0.23499886691570282,
-0.2743026316165924,
0.016904864460229874,
-0.12282851338386536,
0.06345496326684952,
0.38331615924835205,
-0.12827186286449432,
-0.2074500024318695,
-0.1820686161518097,
0.09233739972114563,
-0.033082395792007446,
-0.10769683122634888,
0.027708750218153,
-0.059740349650382996,
0.04406633973121643,
-0.20097485184669495,
0.22689317166805267,
0.2389623522758484,
-0.048822931945323944,
-0.0268598310649395,
0.4763648211956024,
0.25179845094680786,
0.01645757257938385,
0.12107207626104355,
-0.08643239736557007,
0.021126262843608856,
0.034217897802591324,
0.17948515713214874,
0.4005492627620697,
0.04099665582180023,
-0.25935694575309753,
-0.043344005942344666,
0.42941510677337646,
0.24874672293663025,
-0.06622109562158585,
-0.0349632129073143,
-0.2750089764595032,
-0.058847568929195404,
0.4001520574092865,
0.24604617059230804,
-0.0907369926571846,
-0.22567032277584076,
0.12541067600250244,
0.1439819037914276,
-0.09209202975034714,
-0.05153887718915939,
0.042421117424964905,
-0.10232145339250565,
0.1283532977104187,
0.050166063010692596,
-0.029941502958536148,
0.19302091002464294,
-0.05830508470535278,
0.1605217456817627,
-0.043199699372053146,
-0.22476474940776825,
0.11279404163360596,
-0.09026309847831726,
0.11682315170764923,
0.26003509759902954,
0.3075765371322632,
-0.015686679631471634,
0.15014834702014923,
0.04062459617853165,
0.03064001351594925,
0.5096685886383057,
0.1909080445766449,
0.13086450099945068,
0.2767069935798645,
-0.13811910152435303,
-0.046777743846178055,
-0.11710235476493835,
-0.06075805425643921,
0.11108404397964478,
0.030793003737926483,
0.3569839298725128,
-0.13734565675258636,
-0.3564416468143463,
-0.028175996616482735,
0.496920645236969,
-0.3845931589603424,
-0.19953759014606476,
0.3168112635612488,
-0.08429098129272461,
-0.025843989104032516,
0.12919460237026215,
0.007914643734693527,
0.15000903606414795,
0.6482046842575073,
0.3030933737754822,
0.008896231651306152,
-0.2967342138290405,
-0.15280470252037048,
0.01551860012114048,
0.1568860113620758,
-0.16826410591602325,
0.09497679024934769,
0.21141619980335236,
-0.034725286066532135,
-0.17093080282211304,
0.36553624272346497,
0.38135573267936707,
0.4163321256637573,
-0.5854829549789429,
0.2824895977973938,
0.08928132057189941,
0.1384943574666977,
-0.1393260508775711,
0.20353049039840698,
-0.015878066420555115,
0.1636161208152771,
0.11780793964862823,
0.017744993790984154,
-0.24185234308242798,
-0.3011685311794281,
0.10457545518875122,
0.3058531582355499,
-0.0577675998210907,
0.590070366859436,
-0.09004402905702591,
-0.422812819480896,
0.16253335773944855,
0.03273493051528931,
-0.44333919882774353,
0.019984930753707886,
0.5114709138870239,
-0.21762166917324066,
-0.03171458840370178,
-0.19305819272994995,
0.06734070181846619,
-0.0009202044457197189,
0.5991978645324707,
0.0071578435599803925,
0.36813098192214966,
-0.3758774697780609,
0.1315527856349945,
-0.504106879234314,
0.31763532757759094,
-0.12045429646968842,
0.11296522617340088,
-0.08622407168149948,
0.003686029464006424,
0.05039214342832565,
0.27576518058776855,
0.19038695096969604,
-0.08182916790246964,
0.20726874470710754,
0.6258140802383423,
-0.5632984638214111,
0.2407679259777069,
-0.10236875712871552,
-0.1458204686641693,
0.2865296006202698,
-0.2619750499725342,
0.1248403936624527,
0.025317203253507614,
0.0562632754445076,
-0.28666794300079346,
-0.2561282515525818,
0.10333967208862305,
0.21538376808166504,
0.35982462763786316,
0.30889421701431274,
0.4705527424812317,
-0.08602692186832428,
-0.15151384472846985,
-0.24374747276306152,
0.1913519650697708,
-0.060843612998723984,
-0.23224863409996033,
0.17806123197078705,
0.3006881773471832,
-0.37245339155197144,
-0.1436084508895874,
-0.2598102390766144,
-0.05013251304626465,
-0.163955956697464,
-0.2613406479358673,
-0.15797801315784454,
-0.0015279920771718025,
0.03986936807632446,
0.1521962583065033,
-0.10803067684173584,
0.5081026554107666,
0.026623155921697617,
0.20063145458698273,
-0.45855915546417236,
-0.17322885990142822,
0.2991134226322174,
-0.5101873874664307,
-0.5165338516235352,
-0.44687554240226746,
0.28221696615219116,
-0.10886622220277786,
0.03174949064850807,
-0.5038966536521912,
-0.18216893076896667,
0.028981532901525497,
-0.035078853368759155,
-0.514165461063385,
0.10345630347728729,
-0.03927881643176079,
-0.35144102573394775,
-0.19990235567092896,
0.3479396104812622,
0.20716357231140137,
-0.16302619874477386,
0.1435500532388687,
-0.10130457580089569
] |
https://github.com/huggingface/datasets/issues/5094 | Multiprocessing with `Dataset.map` and `PyTorch` results in deadlock | Hi! Which version of transformers are you using? I test the code on Colab (so python 3.7) with transformers 4.23.1, torch 1.12.1 and pyarrow 9.0.0 (also 6.x), it worked without stuck. | ## Describe the bug
There seems to be an issue with using multiprocessing with `datasets.Dataset.map` (i.e. setting `num_proc` to a value greater than one) combined with a function that uses `torch` under the hood. The subprocesses that `datasets.Dataset.map` spawns [a this step](https://github.com/huggingface/datasets/blob/1b935dab9d2f171a8c6294269421fe967eb55e34/src/datasets/arrow_dataset.py#L2663) go into wait mode forever.
## Steps to reproduce the bug
The below code goes into deadlock when `NUMBER_OF_PROCESSES` is greater than one.
```python
NUMBER_OF_PROCESSES = 2
from transformers import AutoTokenizer, AutoModel
from datasets import load_dataset
dataset = load_dataset("glue", "mrpc", split="train")
tokenizer = AutoTokenizer.from_pretrained("sentence-transformers/all-MiniLM-L6-v2")
model = AutoModel.from_pretrained("sentence-transformers/all-MiniLM-L6-v2")
model.to("cpu")
def cls_pooling(model_output):
return model_output.last_hidden_state[:, 0]
def generate_embeddings_batched(examples):
sentences_batch = list(examples['sentence1'])
encoded_input = tokenizer(
sentences_batch, padding=True, truncation=True, return_tensors="pt"
)
encoded_input = {k: v.to("cpu") for k, v in encoded_input.items()}
model_output = model(**encoded_input)
embeddings = cls_pooling(model_output)
examples['embeddings'] = embeddings.detach().cpu().numpy() # 64, 384
return examples
embeddings_dataset = dataset.map(
generate_embeddings_batched,
batched=True,
batch_size=10,
num_proc=NUMBER_OF_PROCESSES
)
```
While debugging it I've seen that it gets "stuck" when calling `torch.nn.Embedding.forward` but some testing shows that the same happens with other functions from `torch.nn`.
## Environment info
- Platform: Linux-5.14.0-1052-oem-x86_64-with-glibc2.31
- Python version: 3.9.14
- PyArrow version: 9.0.0
- Pandas version: 1.5.0
Not sure if this is a HF problem, a PyTorch problem or something I'm doing wrong..
Thanks!
| 31 | Multiprocessing with `Dataset.map` and `PyTorch` results in deadlock
## Describe the bug
There seems to be an issue with using multiprocessing with `datasets.Dataset.map` (i.e. setting `num_proc` to a value greater than one) combined with a function that uses `torch` under the hood. The subprocesses that `datasets.Dataset.map` spawns [a this step](https://github.com/huggingface/datasets/blob/1b935dab9d2f171a8c6294269421fe967eb55e34/src/datasets/arrow_dataset.py#L2663) go into wait mode forever.
## Steps to reproduce the bug
The below code goes into deadlock when `NUMBER_OF_PROCESSES` is greater than one.
```python
NUMBER_OF_PROCESSES = 2
from transformers import AutoTokenizer, AutoModel
from datasets import load_dataset
dataset = load_dataset("glue", "mrpc", split="train")
tokenizer = AutoTokenizer.from_pretrained("sentence-transformers/all-MiniLM-L6-v2")
model = AutoModel.from_pretrained("sentence-transformers/all-MiniLM-L6-v2")
model.to("cpu")
def cls_pooling(model_output):
return model_output.last_hidden_state[:, 0]
def generate_embeddings_batched(examples):
sentences_batch = list(examples['sentence1'])
encoded_input = tokenizer(
sentences_batch, padding=True, truncation=True, return_tensors="pt"
)
encoded_input = {k: v.to("cpu") for k, v in encoded_input.items()}
model_output = model(**encoded_input)
embeddings = cls_pooling(model_output)
examples['embeddings'] = embeddings.detach().cpu().numpy() # 64, 384
return examples
embeddings_dataset = dataset.map(
generate_embeddings_batched,
batched=True,
batch_size=10,
num_proc=NUMBER_OF_PROCESSES
)
```
While debugging it I've seen that it gets "stuck" when calling `torch.nn.Embedding.forward` but some testing shows that the same happens with other functions from `torch.nn`.
## Environment info
- Platform: Linux-5.14.0-1052-oem-x86_64-with-glibc2.31
- Python version: 3.9.14
- PyArrow version: 9.0.0
- Pandas version: 1.5.0
Not sure if this is a HF problem, a PyTorch problem or something I'm doing wrong..
Thanks!
Hi! Which version of transformers are you using? I test the code on Colab (so python 3.7) with transformers 4.23.1, torch 1.12.1 and pyarrow 9.0.0 (also 6.x), it worked without stuck. | [
-0.19728319346904755,
-0.5258713364601135,
-0.059857141226530075,
0.19121290743350983,
-0.03308035433292389,
-0.03727487847208977,
0.3879684805870056,
0.10255962610244751,
0.19705474376678467,
0.15648043155670166,
0.1593065857887268,
0.5224060416221619,
-0.1971760094165802,
-0.34866851568222046,
-0.30984288454055786,
0.00672561302781105,
0.12384426593780518,
-0.35253116488456726,
-0.04642243683338165,
0.09764261543750763,
-0.15816769003868103,
0.26773154735565186,
-0.16990752518177032,
-0.054510414600372314,
-0.7615679502487183,
0.06720700860023499,
0.08253856748342514,
-0.0023633167147636414,
0.2036450356245041,
-0.24507641792297363,
-0.16812686622142792,
0.15418265759944916,
-0.058848049491643906,
0.8481484651565552,
-0.00011896129581145942,
-0.1091778576374054,
0.2780541181564331,
0.20563127100467682,
0.01093040406703949,
-0.2291586548089981,
0.3251565098762512,
-0.025720171630382538,
0.16306909918785095,
-0.034114960581064224,
0.13139984011650085,
0.07892987132072449,
0.11396777629852295,
-0.7218788266181946,
0.30645331740379333,
0.14683747291564941,
0.12756921350955963,
0.5827531814575195,
-0.029711542651057243,
0.020966647192835808,
-0.2104896605014801,
-0.0050002411007881165,
-0.07171738892793655,
0.15186861157417297,
0.5983694791793823,
-0.2531331181526184,
-0.37854892015457153,
0.44758784770965576,
-0.12484809756278992,
-0.02141467109322548,
0.012464817613363266,
-0.11631786078214645,
-0.1307639181613922,
-0.74214768409729,
0.24704810976982117,
0.09432946145534515,
-0.2586125135421753,
-0.25411322712898254,
-0.1468227356672287,
-0.2539825737476349,
0.03562355786561966,
-0.17146922647953033,
0.0931064784526825,
0.16410021483898163,
-0.28115519881248474,
-0.07607473433017731,
-0.3438294231891632,
-0.05187489464879036,
0.13953672349452972,
-0.10562178492546082,
0.057263366878032684,
0.41724541783332825,
0.20500816404819489,
0.2839682400226593,
0.2434198260307312,
0.12929630279541016,
-0.0184665247797966,
-0.01704511046409607,
0.16135144233703613,
0.02039492502808571,
-0.5973533391952515,
0.11267419159412384,
0.20168471336364746,
-0.09189874678850174,
-0.007003717124462128,
-0.21409441530704498,
-0.010116730816662312,
0.11609016358852386,
0.14591500163078308,
0.10987505316734314,
0.39899635314941406,
-0.31718894839286804,
0.018270418047904968,
0.07181034982204437,
0.2054618000984192,
-0.3312462568283081,
-0.08371372520923615,
0.10557211190462112,
0.12287615239620209,
-0.3689732849597931,
0.2798476219177246,
0.16081392765045166,
0.11593791842460632,
-0.0066688172519207,
-0.0275504682213068,
0.15538062155246735,
-0.2550780177116394,
0.11779823154211044,
0.06784741580486298,
0.1721150279045105,
0.13410601019859314,
0.6897133588790894,
0.16588005423545837,
0.17131483554840088,
-0.485755980014801,
0.029595524072647095,
-0.05323448404669762,
-0.15932783484458923,
-0.3375268578529358,
0.09490395337343216,
0.17139573395252228,
-0.11264668405056,
0.05842554569244385,
0.4103654623031616,
0.46188366413116455,
-0.2101811170578003,
0.37107768654823303,
-0.300601989030838,
0.23612502217292786,
0.14609700441360474,
-0.08715368807315826,
0.2400803118944168,
-0.10769063234329224,
0.38669031858444214,
0.035049885511398315,
0.3083063066005707,
0.016420748084783554,
-0.1343061476945877,
-0.20859995484352112,
0.11937222629785538,
0.08320971578359604,
0.3459077775478363,
0.08964204043149948,
0.14199620485305786,
0.5798596143722534,
0.13193070888519287,
0.18659454584121704,
-0.4784564971923828,
-0.20855359733104706,
-0.06694753468036652,
0.13375802338123322,
0.3453560471534729,
0.11969953775405884,
0.09752066433429718,
0.04193601757287979,
0.015694625675678253,
-0.010526075959205627,
0.255352646112442,
-0.1328512728214264,
0.11517554521560669,
-0.04663532227277756,
0.1648816615343094,
-0.19056421518325806,
-0.28738391399383545,
-0.3479527533054352,
0.25245365500450134,
-0.33450931310653687,
0.11553498357534409,
0.09597177058458328,
0.2848915159702301,
0.08560378104448318,
0.12345002591609955,
0.437857985496521,
0.10185349732637405,
-0.10652031004428864,
0.22913774847984314,
-0.2130875140428543,
-0.019230011850595474,
0.05724150687456131,
0.08973921835422516,
0.22123299539089203,
-0.3161967992782593,
-0.38304030895233154,
-0.08010619133710861,
0.4298316240310669,
-0.03588595613837242,
0.034304216504096985,
0.3358994722366333,
-0.3085514307022095,
-0.04112705588340759,
0.08295167982578278,
-0.42112377285957336,
-0.5840059518814087,
0.2360517680644989,
0.08446457982063293,
0.18740639090538025,
-0.3531028628349304,
0.08271296322345734,
0.38109156489372253,
0.27939698100090027,
-0.23425160348415375,
-0.2797248065471649,
-0.015457600355148315,
-0.00445093959569931,
-0.2918185591697693,
-0.3499026894569397,
-0.0764317661523819,
0.4008371829986572,
0.3347691297531128,
-0.15005643665790558,
-0.3624480366706848,
0.21488866209983826,
-0.1342533528804779,
-0.45578664541244507,
-0.29391002655029297,
0.06479910761117935,
0.14287099242210388,
0.09160551428794861,
-0.17096862196922302,
0.2579115331172943,
0.14999359846115112,
0.11662435531616211,
-0.2063751220703125,
-0.11888884007930756,
0.25190749764442444,
-0.1659497767686844,
-0.13772618770599365,
0.14262838661670685,
-0.018337447196245193,
-0.11944236606359482,
0.09192194044589996,
0.3078451156616211,
0.12374264001846313,
0.3461223542690277,
-0.12948361039161682,
0.011080166324973106,
-0.14063520729541779,
0.12559151649475098,
-0.19415295124053955,
0.09803411364555359,
0.43549031019210815,
0.21469740569591522,
0.1837858408689499,
0.08839128911495209,
-0.2483357936143875,
0.14210480451583862,
0.177516907453537,
0.13421162962913513,
-0.18262949585914612,
-0.07960430532693863,
-0.07129605859518051,
0.052650898694992065,
0.10016792267560959,
-0.3027743995189667,
0.4516618847846985,
0.11814901232719421,
0.013969458639621735,
-0.06789060682058334,
-0.22531448304653168,
-0.12666884064674377,
-0.0660463497042656,
0.19669729471206665,
0.17183546721935272,
0.1772155612707138,
0.2936106324195862,
-0.10503654927015305,
-0.0336984358727932,
-0.2707268297672272,
0.025599433109164238,
-0.024471277371048927,
-0.20530366897583008,
0.27868714928627014,
-0.09404642879962921,
0.5213276743888855,
0.019990824162960052,
-0.07981099933385849,
-0.2054656744003296,
-0.2993314266204834,
-0.014471743255853653,
0.37930598855018616,
-0.19013366103172302,
0.32576826214790344,
-0.06756804883480072,
-0.2957773804664612,
-0.003110727295279503,
0.07801646739244461,
-0.004928715527057648,
-0.3113834261894226,
-0.05907192826271057,
-0.07129514962434769,
0.10118752717971802,
-0.0805199146270752,
0.2087545394897461,
0.3010319769382477,
-0.408439040184021,
-0.3572113513946533,
0.08309946209192276,
0.06302199512720108,
-0.24654869735240936,
0.09089983999729156,
-0.08429984748363495,
-0.11240984499454498,
0.02833835780620575,
-0.16216310858726501,
0.1483144462108612,
-0.38269826769828796,
0.022716106846928596,
0.08426787704229355,
0.07269490510225296,
-0.046181317418813705,
-0.3208022117614746,
-0.2381492555141449,
-0.2358032912015915,
-0.2659352719783783,
0.15800854563713074,
-0.35387155413627625,
0.1316913217306137,
-0.17704223096370697,
0.20771662890911102,
0.18096761405467987,
0.017398575320839882,
-0.21082700788974762,
-0.005960475653409958,
-0.06371927261352539,
0.1856509894132614,
-0.07864335924386978,
-0.3698170781135559,
-0.4100254774093628,
0.12839870154857635,
-0.12236501276493073,
0.35220181941986084,
-0.17087644338607788,
-0.050366275012493134,
-0.3920539617538452,
0.39019548892974854,
-0.2520071268081665,
-0.009723002091050148,
0.4477148950099945,
0.2500394880771637,
-0.1463022381067276,
-0.1259407103061676,
-0.08457336574792862,
0.33920368552207947,
-0.13329461216926575,
-0.000523984432220459,
-0.05256936699151993,
0.27146732807159424,
0.09986831247806549,
0.7712089419364929,
0.25723791122436523,
-0.470512717962265,
0.07876106351613998,
-0.06854259967803955,
0.051461052149534225,
-0.006358735263347626,
-0.40929412841796875,
-0.15169177949428558,
-0.29344311356544495,
0.053157418966293335,
-0.07502497732639313,
-0.06729425489902496,
-0.21354271471500397,
0.025861792266368866,
0.1844053417444229,
-0.1842370629310608,
-0.26099422574043274,
0.26365599036216736,
-0.3158262372016907,
0.14318139851093292,
-0.144866943359375,
0.20198997855186462,
-0.19570504128932953,
0.12164101749658585,
0.03732331842184067,
-0.2238241285085678,
0.18226054310798645,
-0.26394379138946533,
-0.09733547270298004,
0.17480561137199402,
-0.4854550361633301,
0.35495108366012573,
0.23028716444969177,
0.24372021853923798,
0.0190105177462101,
-0.14949682354927063,
0.07695247232913971,
-0.2988413870334625,
0.5705059170722961,
0.056466855108737946,
0.027905916795134544,
0.25224944949150085,
-0.14231662452220917,
-0.3355740010738373,
0.10954217612743378,
-0.22055582702159882,
0.5522512197494507,
0.5510736703872681,
0.36783406138420105,
-0.20740783214569092,
-0.2333364337682724,
-0.024870876222848892,
-0.09162258356809616,
-0.053929176181554794,
-0.30183425545692444,
-0.3276832401752472,
-0.0001867637038230896,
-0.36311256885528564,
0.319823294878006,
0.3426145613193512,
0.06729412078857422,
-0.28971242904663086,
-0.25564438104629517,
0.03799443691968918,
-0.14216700196266174,
0.11965333670377731,
-0.009150467813014984,
0.07953783869743347,
-0.10412028431892395,
0.35441476106643677,
0.2071307897567749,
0.29139578342437744,
0.1889011263847351,
0.037213392555713654,
-0.15146318078041077,
0.0017004907131195068,
0.4180834889411926,
0.013168622739613056,
0.33077049255371094,
0.48578739166259766,
0.07657559216022491,
0.25958165526390076,
0.15639935433864594,
0.23890870809555054,
-0.08471181243658066,
0.19786493480205536,
0.3870905041694641,
0.3589344918727875,
-0.18026882410049438,
-0.09487741440534592,
0.22512975335121155,
0.2301071733236313,
-0.05146852508187294,
0.454782634973526,
-0.40063410997390747,
-0.04947500675916672,
0.20249246060848236,
0.15789471566677094,
0.9495906233787537,
-0.2839590907096863,
0.10398143529891968,
-0.2181529402732849,
-0.10891106724739075,
0.22710582613945007,
-0.13888919353485107,
0.32213038206100464,
-0.21638891100883484,
-0.19451992213726044,
0.13172224164009094,
-0.271727055311203,
0.009718477725982666,
-0.030385509133338928,
-0.0422510951757431,
0.11875439435243607,
-0.2190864086151123,
-0.06527233123779297,
-0.026276012882590294,
0.33045557141304016,
-0.023067349568009377,
-0.3364054262638092,
0.16501469910144806,
0.052165158092975616,
0.109437495470047,
0.0708245262503624,
-0.15861043334007263,
-0.018540741875767708,
-0.015492398291826248,
-0.15750499069690704,
-0.4743001461029053,
0.21053284406661987,
-0.4147161543369293,
0.25145018100738525,
-0.1714542806148529,
-0.1868092119693756,
0.07863828539848328,
0.46313658356666565,
-0.11267757415771484,
0.041947465389966965,
-0.19964036345481873,
0.09070056676864624,
0.24642843008041382,
0.07344777137041092,
0.11610715091228485,
-0.29039666056632996,
0.0892849937081337,
-0.0618586502969265,
-0.3287564516067505,
-0.17039576172828674,
0.09025441855192184,
-0.1936764121055603,
0.21582618355751038,
0.26266342401504517,
0.37148112058639526,
0.20135365426540375,
0.049136653542518616,
0.18447893857955933,
-0.06297766417264938,
-0.288754940032959,
0.07371821254491806,
0.227534681558609,
-0.23415182530879974,
0.16772182285785675,
-0.4147428870201111,
-0.30677491426467896,
-0.07385571300983429,
0.5395992994308472,
0.13209930062294006,
-0.17416337132453918,
0.45730045437812805,
0.6134970784187317,
-0.17660361528396606,
-0.20923614501953125,
-0.14413292706012726,
0.1331983208656311,
-0.4807315468788147,
0.2579750716686249,
-0.20926670730113983,
-0.31037163734436035,
-0.22885364294052124,
-0.1031731367111206,
-0.036002472043037415,
-0.15614590048789978,
-0.134945347905159,
-0.18262948095798492,
-0.6286593079566956,
0.01715277135372162,
-0.3071392774581909,
0.2054428607225418,
0.0101059190928936,
0.11153194308280945,
0.09902308136224747,
0.27622973918914795,
-0.24787083268165588,
-0.16050386428833008,
-0.2209002673625946,
0.23328271508216858,
0.23499886691570282,
-0.2743026316165924,
0.016904864460229874,
-0.12282851338386536,
0.06345496326684952,
0.38331615924835205,
-0.12827186286449432,
-0.2074500024318695,
-0.1820686161518097,
0.09233739972114563,
-0.033082395792007446,
-0.10769683122634888,
0.027708750218153,
-0.059740349650382996,
0.04406633973121643,
-0.20097485184669495,
0.22689317166805267,
0.2389623522758484,
-0.048822931945323944,
-0.0268598310649395,
0.4763648211956024,
0.25179845094680786,
0.01645757257938385,
0.12107207626104355,
-0.08643239736557007,
0.021126262843608856,
0.034217897802591324,
0.17948515713214874,
0.4005492627620697,
0.04099665582180023,
-0.25935694575309753,
-0.043344005942344666,
0.42941510677337646,
0.24874672293663025,
-0.06622109562158585,
-0.0349632129073143,
-0.2750089764595032,
-0.058847568929195404,
0.4001520574092865,
0.24604617059230804,
-0.0907369926571846,
-0.22567032277584076,
0.12541067600250244,
0.1439819037914276,
-0.09209202975034714,
-0.05153887718915939,
0.042421117424964905,
-0.10232145339250565,
0.1283532977104187,
0.050166063010692596,
-0.029941502958536148,
0.19302091002464294,
-0.05830508470535278,
0.1605217456817627,
-0.043199699372053146,
-0.22476474940776825,
0.11279404163360596,
-0.09026309847831726,
0.11682315170764923,
0.26003509759902954,
0.3075765371322632,
-0.015686679631471634,
0.15014834702014923,
0.04062459617853165,
0.03064001351594925,
0.5096685886383057,
0.1909080445766449,
0.13086450099945068,
0.2767069935798645,
-0.13811910152435303,
-0.046777743846178055,
-0.11710235476493835,
-0.06075805425643921,
0.11108404397964478,
0.030793003737926483,
0.3569839298725128,
-0.13734565675258636,
-0.3564416468143463,
-0.028175996616482735,
0.496920645236969,
-0.3845931589603424,
-0.19953759014606476,
0.3168112635612488,
-0.08429098129272461,
-0.025843989104032516,
0.12919460237026215,
0.007914643734693527,
0.15000903606414795,
0.6482046842575073,
0.3030933737754822,
0.008896231651306152,
-0.2967342138290405,
-0.15280470252037048,
0.01551860012114048,
0.1568860113620758,
-0.16826410591602325,
0.09497679024934769,
0.21141619980335236,
-0.034725286066532135,
-0.17093080282211304,
0.36553624272346497,
0.38135573267936707,
0.4163321256637573,
-0.5854829549789429,
0.2824895977973938,
0.08928132057189941,
0.1384943574666977,
-0.1393260508775711,
0.20353049039840698,
-0.015878066420555115,
0.1636161208152771,
0.11780793964862823,
0.017744993790984154,
-0.24185234308242798,
-0.3011685311794281,
0.10457545518875122,
0.3058531582355499,
-0.0577675998210907,
0.590070366859436,
-0.09004402905702591,
-0.422812819480896,
0.16253335773944855,
0.03273493051528931,
-0.44333919882774353,
0.019984930753707886,
0.5114709138870239,
-0.21762166917324066,
-0.03171458840370178,
-0.19305819272994995,
0.06734070181846619,
-0.0009202044457197189,
0.5991978645324707,
0.0071578435599803925,
0.36813098192214966,
-0.3758774697780609,
0.1315527856349945,
-0.504106879234314,
0.31763532757759094,
-0.12045429646968842,
0.11296522617340088,
-0.08622407168149948,
0.003686029464006424,
0.05039214342832565,
0.27576518058776855,
0.19038695096969604,
-0.08182916790246964,
0.20726874470710754,
0.6258140802383423,
-0.5632984638214111,
0.2407679259777069,
-0.10236875712871552,
-0.1458204686641693,
0.2865296006202698,
-0.2619750499725342,
0.1248403936624527,
0.025317203253507614,
0.0562632754445076,
-0.28666794300079346,
-0.2561282515525818,
0.10333967208862305,
0.21538376808166504,
0.35982462763786316,
0.30889421701431274,
0.4705527424812317,
-0.08602692186832428,
-0.15151384472846985,
-0.24374747276306152,
0.1913519650697708,
-0.060843612998723984,
-0.23224863409996033,
0.17806123197078705,
0.3006881773471832,
-0.37245339155197144,
-0.1436084508895874,
-0.2598102390766144,
-0.05013251304626465,
-0.163955956697464,
-0.2613406479358673,
-0.15797801315784454,
-0.0015279920771718025,
0.03986936807632446,
0.1521962583065033,
-0.10803067684173584,
0.5081026554107666,
0.026623155921697617,
0.20063145458698273,
-0.45855915546417236,
-0.17322885990142822,
0.2991134226322174,
-0.5101873874664307,
-0.5165338516235352,
-0.44687554240226746,
0.28221696615219116,
-0.10886622220277786,
0.03174949064850807,
-0.5038966536521912,
-0.18216893076896667,
0.028981532901525497,
-0.035078853368759155,
-0.514165461063385,
0.10345630347728729,
-0.03927881643176079,
-0.35144102573394775,
-0.19990235567092896,
0.3479396104812622,
0.20716357231140137,
-0.16302619874477386,
0.1435500532388687,
-0.10130457580089569
] |
https://github.com/huggingface/datasets/issues/5094 | Multiprocessing with `Dataset.map` and `PyTorch` results in deadlock | Hi, I have the same problem in use **datasets.IterableDatasetDict.map()**
my pytorch is 2.0.0a0+gitc263bd4
my python is 3.8.16(default, Jun 12 2023, 17:37:21)
work on aarch64 in 16 node, each node with 4*nVidia-A100-40G
every node have 4 process execute code as ↓
```
from datasets import load_dataset, interleave_datasets, IterableDatasetDict, concatenate_datasets
```
...
```
model_args.cache_dir = '/home/scx/.cache'
for dataset_name in data_args.datasets_name:
train_datasets.append(
load_dataset(
dataset_name,
cache_dir=model_args.cache_dir,
use_auth_token=True if model_args.use_auth_token else None,
streaming=data_args.streaming,
split='train'
).select_columns('text')
)
valid_datasets.append(
load_dataset(
dataset_name,
cache_dir=model_args.cache_dir,
use_auth_token=True if model_args.use_auth_token else None,
streaming=data_args.streaming,
split='validation'
).select_columns('text')
)
train_dataset = interleave_datasets(train_datasets,
probabilities=data_args.datasets_probabilities,
seed=training_args.seed,
stopping_strategy='all_exhausted')
raw_datasets = IterableDatasetDict({'train': train_dataset, 'validation': valid_dataset})
```
...
```
tokenized_datasets = None
with training_args.main_process_first(desc="dataset map tokenization"):
if not data_args.streaming:
tokenized_datasets = raw_datasets.map(
tokenize_function,
batched=True,
num_proc=data_args.preprocessing_num_workers,
load_from_cache_file=not data_args.overwrite_cache,
desc="Running tokenizer on dataset",
remove_columns=column_names,
)
else:
#TODO 20230722
logger.info('{}: {}'.format(__file__, 'tokenized_datasets = raw_datasets.map('))
logger.info('len raw_datasets: {}'.format(len(raw_datasets.items())))
logger.info('raw_datasets:{}'.format(raw_datasets.items()))
tokenized_datasets = raw_datasets.map(
tokenize_function,
batched=True,
batch_size=1000,
remove_columns=column_names
)
logger.info('map ok!')
logger.info('show train: {}'.format(next(iter(tokenized_datasets['train']))))
logger.info('ok')
# ### RAW CODE ###
# tokenized_datasets = raw_datasets.map(
# tokenize_function,
# batched=True,
# batch_size=1000,
# remove_columns=column_names
# )
#TODO 20230722
logger.info("Finish tokenization")
```
the output of my code is
```
07/22/2023 21:57:09 - INFO - __main__ - /demo/run_blue_space.py: tokenized_datasets = raw_datasets.map(
07/22/2023 21:57:09 - INFO - __main__ - len raw_datasets: 2
07/22/2023 21:57:09 - INFO - __main__ - raw_datasets:dict_items([('train', <datasets.iterable_dataset.IterableDataset object at 0x4005ee301190>), ('validation', <datasets.iterable_dataset.IterableDataset object at 0x4005ee5427f0>)])
07/22/2023 21:57:09 - INFO - __main__ - map ok!
07/22/2023 22:01:07 - INFO - __main__ - show train: {'input_ids': [14608, 26797, 31891, 34260, 12227, 33207, 5, 5, 31632, 26797, 31891, 34260, 12227, 33207, 7398, 28561, 31236, 31177, 31253, 33558, 31556, 31377, 72, 20732, 32383, 32295, 14027, 31178, 53, 61, 53, 55, 31189, 31146, 31321, 31235, 53, 61, 56, 58, 31189, 31145, 72, 53, 61, 58, 54, 31189, 54, 31245, 53, 60, 31224, 31896, 31178, 28561, 29331, 20732, 31888, 32637, 4426, 2824, 72, 53, 61, 60, 55, 31189, 53, 54, 31245, 53, 31224, 31896, 31178, 28561, 29331, 26137, 20732, 4426, 2824, 73, 54, 52, 52, 52, 31189, 61, 31245, 59, 31224, 31896, 31178, 29331, 28561, 20732, 4426, 2824, 73, 5], 'attention_mask': [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]}
07/22/2023 22:01:07 - INFO - __main__ - ok
```
| ## Describe the bug
There seems to be an issue with using multiprocessing with `datasets.Dataset.map` (i.e. setting `num_proc` to a value greater than one) combined with a function that uses `torch` under the hood. The subprocesses that `datasets.Dataset.map` spawns [a this step](https://github.com/huggingface/datasets/blob/1b935dab9d2f171a8c6294269421fe967eb55e34/src/datasets/arrow_dataset.py#L2663) go into wait mode forever.
## Steps to reproduce the bug
The below code goes into deadlock when `NUMBER_OF_PROCESSES` is greater than one.
```python
NUMBER_OF_PROCESSES = 2
from transformers import AutoTokenizer, AutoModel
from datasets import load_dataset
dataset = load_dataset("glue", "mrpc", split="train")
tokenizer = AutoTokenizer.from_pretrained("sentence-transformers/all-MiniLM-L6-v2")
model = AutoModel.from_pretrained("sentence-transformers/all-MiniLM-L6-v2")
model.to("cpu")
def cls_pooling(model_output):
return model_output.last_hidden_state[:, 0]
def generate_embeddings_batched(examples):
sentences_batch = list(examples['sentence1'])
encoded_input = tokenizer(
sentences_batch, padding=True, truncation=True, return_tensors="pt"
)
encoded_input = {k: v.to("cpu") for k, v in encoded_input.items()}
model_output = model(**encoded_input)
embeddings = cls_pooling(model_output)
examples['embeddings'] = embeddings.detach().cpu().numpy() # 64, 384
return examples
embeddings_dataset = dataset.map(
generate_embeddings_batched,
batched=True,
batch_size=10,
num_proc=NUMBER_OF_PROCESSES
)
```
While debugging it I've seen that it gets "stuck" when calling `torch.nn.Embedding.forward` but some testing shows that the same happens with other functions from `torch.nn`.
## Environment info
- Platform: Linux-5.14.0-1052-oem-x86_64-with-glibc2.31
- Python version: 3.9.14
- PyArrow version: 9.0.0
- Pandas version: 1.5.0
Not sure if this is a HF problem, a PyTorch problem or something I'm doing wrong..
Thanks!
| 447 | Multiprocessing with `Dataset.map` and `PyTorch` results in deadlock
## Describe the bug
There seems to be an issue with using multiprocessing with `datasets.Dataset.map` (i.e. setting `num_proc` to a value greater than one) combined with a function that uses `torch` under the hood. The subprocesses that `datasets.Dataset.map` spawns [a this step](https://github.com/huggingface/datasets/blob/1b935dab9d2f171a8c6294269421fe967eb55e34/src/datasets/arrow_dataset.py#L2663) go into wait mode forever.
## Steps to reproduce the bug
The below code goes into deadlock when `NUMBER_OF_PROCESSES` is greater than one.
```python
NUMBER_OF_PROCESSES = 2
from transformers import AutoTokenizer, AutoModel
from datasets import load_dataset
dataset = load_dataset("glue", "mrpc", split="train")
tokenizer = AutoTokenizer.from_pretrained("sentence-transformers/all-MiniLM-L6-v2")
model = AutoModel.from_pretrained("sentence-transformers/all-MiniLM-L6-v2")
model.to("cpu")
def cls_pooling(model_output):
return model_output.last_hidden_state[:, 0]
def generate_embeddings_batched(examples):
sentences_batch = list(examples['sentence1'])
encoded_input = tokenizer(
sentences_batch, padding=True, truncation=True, return_tensors="pt"
)
encoded_input = {k: v.to("cpu") for k, v in encoded_input.items()}
model_output = model(**encoded_input)
embeddings = cls_pooling(model_output)
examples['embeddings'] = embeddings.detach().cpu().numpy() # 64, 384
return examples
embeddings_dataset = dataset.map(
generate_embeddings_batched,
batched=True,
batch_size=10,
num_proc=NUMBER_OF_PROCESSES
)
```
While debugging it I've seen that it gets "stuck" when calling `torch.nn.Embedding.forward` but some testing shows that the same happens with other functions from `torch.nn`.
## Environment info
- Platform: Linux-5.14.0-1052-oem-x86_64-with-glibc2.31
- Python version: 3.9.14
- PyArrow version: 9.0.0
- Pandas version: 1.5.0
Not sure if this is a HF problem, a PyTorch problem or something I'm doing wrong..
Thanks!
Hi, I have the same problem in use **datasets.IterableDatasetDict.map()**
my pytorch is 2.0.0a0+gitc263bd4
my python is 3.8.16(default, Jun 12 2023, 17:37:21)
work on aarch64 in 16 node, each node with 4*nVidia-A100-40G
every node have 4 process execute code as ↓
```
from datasets import load_dataset, interleave_datasets, IterableDatasetDict, concatenate_datasets
```
...
```
model_args.cache_dir = '/home/scx/.cache'
for dataset_name in data_args.datasets_name:
train_datasets.append(
load_dataset(
dataset_name,
cache_dir=model_args.cache_dir,
use_auth_token=True if model_args.use_auth_token else None,
streaming=data_args.streaming,
split='train'
).select_columns('text')
)
valid_datasets.append(
load_dataset(
dataset_name,
cache_dir=model_args.cache_dir,
use_auth_token=True if model_args.use_auth_token else None,
streaming=data_args.streaming,
split='validation'
).select_columns('text')
)
train_dataset = interleave_datasets(train_datasets,
probabilities=data_args.datasets_probabilities,
seed=training_args.seed,
stopping_strategy='all_exhausted')
raw_datasets = IterableDatasetDict({'train': train_dataset, 'validation': valid_dataset})
```
...
```
tokenized_datasets = None
with training_args.main_process_first(desc="dataset map tokenization"):
if not data_args.streaming:
tokenized_datasets = raw_datasets.map(
tokenize_function,
batched=True,
num_proc=data_args.preprocessing_num_workers,
load_from_cache_file=not data_args.overwrite_cache,
desc="Running tokenizer on dataset",
remove_columns=column_names,
)
else:
#TODO 20230722
logger.info('{}: {}'.format(__file__, 'tokenized_datasets = raw_datasets.map('))
logger.info('len raw_datasets: {}'.format(len(raw_datasets.items())))
logger.info('raw_datasets:{}'.format(raw_datasets.items()))
tokenized_datasets = raw_datasets.map(
tokenize_function,
batched=True,
batch_size=1000,
remove_columns=column_names
)
logger.info('map ok!')
logger.info('show train: {}'.format(next(iter(tokenized_datasets['train']))))
logger.info('ok')
# ### RAW CODE ###
# tokenized_datasets = raw_datasets.map(
# tokenize_function,
# batched=True,
# batch_size=1000,
# remove_columns=column_names
# )
#TODO 20230722
logger.info("Finish tokenization")
```
the output of my code is
```
07/22/2023 21:57:09 - INFO - __main__ - /demo/run_blue_space.py: tokenized_datasets = raw_datasets.map(
07/22/2023 21:57:09 - INFO - __main__ - len raw_datasets: 2
07/22/2023 21:57:09 - INFO - __main__ - raw_datasets:dict_items([('train', <datasets.iterable_dataset.IterableDataset object at 0x4005ee301190>), ('validation', <datasets.iterable_dataset.IterableDataset object at 0x4005ee5427f0>)])
07/22/2023 21:57:09 - INFO - __main__ - map ok!
07/22/2023 22:01:07 - INFO - __main__ - show train: {'input_ids': [14608, 26797, 31891, 34260, 12227, 33207, 5, 5, 31632, 26797, 31891, 34260, 12227, 33207, 7398, 28561, 31236, 31177, 31253, 33558, 31556, 31377, 72, 20732, 32383, 32295, 14027, 31178, 53, 61, 53, 55, 31189, 31146, 31321, 31235, 53, 61, 56, 58, 31189, 31145, 72, 53, 61, 58, 54, 31189, 54, 31245, 53, 60, 31224, 31896, 31178, 28561, 29331, 20732, 31888, 32637, 4426, 2824, 72, 53, 61, 60, 55, 31189, 53, 54, 31245, 53, 31224, 31896, 31178, 28561, 29331, 26137, 20732, 4426, 2824, 73, 54, 52, 52, 52, 31189, 61, 31245, 59, 31224, 31896, 31178, 29331, 28561, 20732, 4426, 2824, 73, 5], 'attention_mask': [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]}
07/22/2023 22:01:07 - INFO - __main__ - ok
```
| [
-0.19728319346904755,
-0.5258713364601135,
-0.059857141226530075,
0.19121290743350983,
-0.03308035433292389,
-0.03727487847208977,
0.3879684805870056,
0.10255962610244751,
0.19705474376678467,
0.15648043155670166,
0.1593065857887268,
0.5224060416221619,
-0.1971760094165802,
-0.34866851568222046,
-0.30984288454055786,
0.00672561302781105,
0.12384426593780518,
-0.35253116488456726,
-0.04642243683338165,
0.09764261543750763,
-0.15816769003868103,
0.26773154735565186,
-0.16990752518177032,
-0.054510414600372314,
-0.7615679502487183,
0.06720700860023499,
0.08253856748342514,
-0.0023633167147636414,
0.2036450356245041,
-0.24507641792297363,
-0.16812686622142792,
0.15418265759944916,
-0.058848049491643906,
0.8481484651565552,
-0.00011896129581145942,
-0.1091778576374054,
0.2780541181564331,
0.20563127100467682,
0.01093040406703949,
-0.2291586548089981,
0.3251565098762512,
-0.025720171630382538,
0.16306909918785095,
-0.034114960581064224,
0.13139984011650085,
0.07892987132072449,
0.11396777629852295,
-0.7218788266181946,
0.30645331740379333,
0.14683747291564941,
0.12756921350955963,
0.5827531814575195,
-0.029711542651057243,
0.020966647192835808,
-0.2104896605014801,
-0.0050002411007881165,
-0.07171738892793655,
0.15186861157417297,
0.5983694791793823,
-0.2531331181526184,
-0.37854892015457153,
0.44758784770965576,
-0.12484809756278992,
-0.02141467109322548,
0.012464817613363266,
-0.11631786078214645,
-0.1307639181613922,
-0.74214768409729,
0.24704810976982117,
0.09432946145534515,
-0.2586125135421753,
-0.25411322712898254,
-0.1468227356672287,
-0.2539825737476349,
0.03562355786561966,
-0.17146922647953033,
0.0931064784526825,
0.16410021483898163,
-0.28115519881248474,
-0.07607473433017731,
-0.3438294231891632,
-0.05187489464879036,
0.13953672349452972,
-0.10562178492546082,
0.057263366878032684,
0.41724541783332825,
0.20500816404819489,
0.2839682400226593,
0.2434198260307312,
0.12929630279541016,
-0.0184665247797966,
-0.01704511046409607,
0.16135144233703613,
0.02039492502808571,
-0.5973533391952515,
0.11267419159412384,
0.20168471336364746,
-0.09189874678850174,
-0.007003717124462128,
-0.21409441530704498,
-0.010116730816662312,
0.11609016358852386,
0.14591500163078308,
0.10987505316734314,
0.39899635314941406,
-0.31718894839286804,
0.018270418047904968,
0.07181034982204437,
0.2054618000984192,
-0.3312462568283081,
-0.08371372520923615,
0.10557211190462112,
0.12287615239620209,
-0.3689732849597931,
0.2798476219177246,
0.16081392765045166,
0.11593791842460632,
-0.0066688172519207,
-0.0275504682213068,
0.15538062155246735,
-0.2550780177116394,
0.11779823154211044,
0.06784741580486298,
0.1721150279045105,
0.13410601019859314,
0.6897133588790894,
0.16588005423545837,
0.17131483554840088,
-0.485755980014801,
0.029595524072647095,
-0.05323448404669762,
-0.15932783484458923,
-0.3375268578529358,
0.09490395337343216,
0.17139573395252228,
-0.11264668405056,
0.05842554569244385,
0.4103654623031616,
0.46188366413116455,
-0.2101811170578003,
0.37107768654823303,
-0.300601989030838,
0.23612502217292786,
0.14609700441360474,
-0.08715368807315826,
0.2400803118944168,
-0.10769063234329224,
0.38669031858444214,
0.035049885511398315,
0.3083063066005707,
0.016420748084783554,
-0.1343061476945877,
-0.20859995484352112,
0.11937222629785538,
0.08320971578359604,
0.3459077775478363,
0.08964204043149948,
0.14199620485305786,
0.5798596143722534,
0.13193070888519287,
0.18659454584121704,
-0.4784564971923828,
-0.20855359733104706,
-0.06694753468036652,
0.13375802338123322,
0.3453560471534729,
0.11969953775405884,
0.09752066433429718,
0.04193601757287979,
0.015694625675678253,
-0.010526075959205627,
0.255352646112442,
-0.1328512728214264,
0.11517554521560669,
-0.04663532227277756,
0.1648816615343094,
-0.19056421518325806,
-0.28738391399383545,
-0.3479527533054352,
0.25245365500450134,
-0.33450931310653687,
0.11553498357534409,
0.09597177058458328,
0.2848915159702301,
0.08560378104448318,
0.12345002591609955,
0.437857985496521,
0.10185349732637405,
-0.10652031004428864,
0.22913774847984314,
-0.2130875140428543,
-0.019230011850595474,
0.05724150687456131,
0.08973921835422516,
0.22123299539089203,
-0.3161967992782593,
-0.38304030895233154,
-0.08010619133710861,
0.4298316240310669,
-0.03588595613837242,
0.034304216504096985,
0.3358994722366333,
-0.3085514307022095,
-0.04112705588340759,
0.08295167982578278,
-0.42112377285957336,
-0.5840059518814087,
0.2360517680644989,
0.08446457982063293,
0.18740639090538025,
-0.3531028628349304,
0.08271296322345734,
0.38109156489372253,
0.27939698100090027,
-0.23425160348415375,
-0.2797248065471649,
-0.015457600355148315,
-0.00445093959569931,
-0.2918185591697693,
-0.3499026894569397,
-0.0764317661523819,
0.4008371829986572,
0.3347691297531128,
-0.15005643665790558,
-0.3624480366706848,
0.21488866209983826,
-0.1342533528804779,
-0.45578664541244507,
-0.29391002655029297,
0.06479910761117935,
0.14287099242210388,
0.09160551428794861,
-0.17096862196922302,
0.2579115331172943,
0.14999359846115112,
0.11662435531616211,
-0.2063751220703125,
-0.11888884007930756,
0.25190749764442444,
-0.1659497767686844,
-0.13772618770599365,
0.14262838661670685,
-0.018337447196245193,
-0.11944236606359482,
0.09192194044589996,
0.3078451156616211,
0.12374264001846313,
0.3461223542690277,
-0.12948361039161682,
0.011080166324973106,
-0.14063520729541779,
0.12559151649475098,
-0.19415295124053955,
0.09803411364555359,
0.43549031019210815,
0.21469740569591522,
0.1837858408689499,
0.08839128911495209,
-0.2483357936143875,
0.14210480451583862,
0.177516907453537,
0.13421162962913513,
-0.18262949585914612,
-0.07960430532693863,
-0.07129605859518051,
0.052650898694992065,
0.10016792267560959,
-0.3027743995189667,
0.4516618847846985,
0.11814901232719421,
0.013969458639621735,
-0.06789060682058334,
-0.22531448304653168,
-0.12666884064674377,
-0.0660463497042656,
0.19669729471206665,
0.17183546721935272,
0.1772155612707138,
0.2936106324195862,
-0.10503654927015305,
-0.0336984358727932,
-0.2707268297672272,
0.025599433109164238,
-0.024471277371048927,
-0.20530366897583008,
0.27868714928627014,
-0.09404642879962921,
0.5213276743888855,
0.019990824162960052,
-0.07981099933385849,
-0.2054656744003296,
-0.2993314266204834,
-0.014471743255853653,
0.37930598855018616,
-0.19013366103172302,
0.32576826214790344,
-0.06756804883480072,
-0.2957773804664612,
-0.003110727295279503,
0.07801646739244461,
-0.004928715527057648,
-0.3113834261894226,
-0.05907192826271057,
-0.07129514962434769,
0.10118752717971802,
-0.0805199146270752,
0.2087545394897461,
0.3010319769382477,
-0.408439040184021,
-0.3572113513946533,
0.08309946209192276,
0.06302199512720108,
-0.24654869735240936,
0.09089983999729156,
-0.08429984748363495,
-0.11240984499454498,
0.02833835780620575,
-0.16216310858726501,
0.1483144462108612,
-0.38269826769828796,
0.022716106846928596,
0.08426787704229355,
0.07269490510225296,
-0.046181317418813705,
-0.3208022117614746,
-0.2381492555141449,
-0.2358032912015915,
-0.2659352719783783,
0.15800854563713074,
-0.35387155413627625,
0.1316913217306137,
-0.17704223096370697,
0.20771662890911102,
0.18096761405467987,
0.017398575320839882,
-0.21082700788974762,
-0.005960475653409958,
-0.06371927261352539,
0.1856509894132614,
-0.07864335924386978,
-0.3698170781135559,
-0.4100254774093628,
0.12839870154857635,
-0.12236501276493073,
0.35220181941986084,
-0.17087644338607788,
-0.050366275012493134,
-0.3920539617538452,
0.39019548892974854,
-0.2520071268081665,
-0.009723002091050148,
0.4477148950099945,
0.2500394880771637,
-0.1463022381067276,
-0.1259407103061676,
-0.08457336574792862,
0.33920368552207947,
-0.13329461216926575,
-0.000523984432220459,
-0.05256936699151993,
0.27146732807159424,
0.09986831247806549,
0.7712089419364929,
0.25723791122436523,
-0.470512717962265,
0.07876106351613998,
-0.06854259967803955,
0.051461052149534225,
-0.006358735263347626,
-0.40929412841796875,
-0.15169177949428558,
-0.29344311356544495,
0.053157418966293335,
-0.07502497732639313,
-0.06729425489902496,
-0.21354271471500397,
0.025861792266368866,
0.1844053417444229,
-0.1842370629310608,
-0.26099422574043274,
0.26365599036216736,
-0.3158262372016907,
0.14318139851093292,
-0.144866943359375,
0.20198997855186462,
-0.19570504128932953,
0.12164101749658585,
0.03732331842184067,
-0.2238241285085678,
0.18226054310798645,
-0.26394379138946533,
-0.09733547270298004,
0.17480561137199402,
-0.4854550361633301,
0.35495108366012573,
0.23028716444969177,
0.24372021853923798,
0.0190105177462101,
-0.14949682354927063,
0.07695247232913971,
-0.2988413870334625,
0.5705059170722961,
0.056466855108737946,
0.027905916795134544,
0.25224944949150085,
-0.14231662452220917,
-0.3355740010738373,
0.10954217612743378,
-0.22055582702159882,
0.5522512197494507,
0.5510736703872681,
0.36783406138420105,
-0.20740783214569092,
-0.2333364337682724,
-0.024870876222848892,
-0.09162258356809616,
-0.053929176181554794,
-0.30183425545692444,
-0.3276832401752472,
-0.0001867637038230896,
-0.36311256885528564,
0.319823294878006,
0.3426145613193512,
0.06729412078857422,
-0.28971242904663086,
-0.25564438104629517,
0.03799443691968918,
-0.14216700196266174,
0.11965333670377731,
-0.009150467813014984,
0.07953783869743347,
-0.10412028431892395,
0.35441476106643677,
0.2071307897567749,
0.29139578342437744,
0.1889011263847351,
0.037213392555713654,
-0.15146318078041077,
0.0017004907131195068,
0.4180834889411926,
0.013168622739613056,
0.33077049255371094,
0.48578739166259766,
0.07657559216022491,
0.25958165526390076,
0.15639935433864594,
0.23890870809555054,
-0.08471181243658066,
0.19786493480205536,
0.3870905041694641,
0.3589344918727875,
-0.18026882410049438,
-0.09487741440534592,
0.22512975335121155,
0.2301071733236313,
-0.05146852508187294,
0.454782634973526,
-0.40063410997390747,
-0.04947500675916672,
0.20249246060848236,
0.15789471566677094,
0.9495906233787537,
-0.2839590907096863,
0.10398143529891968,
-0.2181529402732849,
-0.10891106724739075,
0.22710582613945007,
-0.13888919353485107,
0.32213038206100464,
-0.21638891100883484,
-0.19451992213726044,
0.13172224164009094,
-0.271727055311203,
0.009718477725982666,
-0.030385509133338928,
-0.0422510951757431,
0.11875439435243607,
-0.2190864086151123,
-0.06527233123779297,
-0.026276012882590294,
0.33045557141304016,
-0.023067349568009377,
-0.3364054262638092,
0.16501469910144806,
0.052165158092975616,
0.109437495470047,
0.0708245262503624,
-0.15861043334007263,
-0.018540741875767708,
-0.015492398291826248,
-0.15750499069690704,
-0.4743001461029053,
0.21053284406661987,
-0.4147161543369293,
0.25145018100738525,
-0.1714542806148529,
-0.1868092119693756,
0.07863828539848328,
0.46313658356666565,
-0.11267757415771484,
0.041947465389966965,
-0.19964036345481873,
0.09070056676864624,
0.24642843008041382,
0.07344777137041092,
0.11610715091228485,
-0.29039666056632996,
0.0892849937081337,
-0.0618586502969265,
-0.3287564516067505,
-0.17039576172828674,
0.09025441855192184,
-0.1936764121055603,
0.21582618355751038,
0.26266342401504517,
0.37148112058639526,
0.20135365426540375,
0.049136653542518616,
0.18447893857955933,
-0.06297766417264938,
-0.288754940032959,
0.07371821254491806,
0.227534681558609,
-0.23415182530879974,
0.16772182285785675,
-0.4147428870201111,
-0.30677491426467896,
-0.07385571300983429,
0.5395992994308472,
0.13209930062294006,
-0.17416337132453918,
0.45730045437812805,
0.6134970784187317,
-0.17660361528396606,
-0.20923614501953125,
-0.14413292706012726,
0.1331983208656311,
-0.4807315468788147,
0.2579750716686249,
-0.20926670730113983,
-0.31037163734436035,
-0.22885364294052124,
-0.1031731367111206,
-0.036002472043037415,
-0.15614590048789978,
-0.134945347905159,
-0.18262948095798492,
-0.6286593079566956,
0.01715277135372162,
-0.3071392774581909,
0.2054428607225418,
0.0101059190928936,
0.11153194308280945,
0.09902308136224747,
0.27622973918914795,
-0.24787083268165588,
-0.16050386428833008,
-0.2209002673625946,
0.23328271508216858,
0.23499886691570282,
-0.2743026316165924,
0.016904864460229874,
-0.12282851338386536,
0.06345496326684952,
0.38331615924835205,
-0.12827186286449432,
-0.2074500024318695,
-0.1820686161518097,
0.09233739972114563,
-0.033082395792007446,
-0.10769683122634888,
0.027708750218153,
-0.059740349650382996,
0.04406633973121643,
-0.20097485184669495,
0.22689317166805267,
0.2389623522758484,
-0.048822931945323944,
-0.0268598310649395,
0.4763648211956024,
0.25179845094680786,
0.01645757257938385,
0.12107207626104355,
-0.08643239736557007,
0.021126262843608856,
0.034217897802591324,
0.17948515713214874,
0.4005492627620697,
0.04099665582180023,
-0.25935694575309753,
-0.043344005942344666,
0.42941510677337646,
0.24874672293663025,
-0.06622109562158585,
-0.0349632129073143,
-0.2750089764595032,
-0.058847568929195404,
0.4001520574092865,
0.24604617059230804,
-0.0907369926571846,
-0.22567032277584076,
0.12541067600250244,
0.1439819037914276,
-0.09209202975034714,
-0.05153887718915939,
0.042421117424964905,
-0.10232145339250565,
0.1283532977104187,
0.050166063010692596,
-0.029941502958536148,
0.19302091002464294,
-0.05830508470535278,
0.1605217456817627,
-0.043199699372053146,
-0.22476474940776825,
0.11279404163360596,
-0.09026309847831726,
0.11682315170764923,
0.26003509759902954,
0.3075765371322632,
-0.015686679631471634,
0.15014834702014923,
0.04062459617853165,
0.03064001351594925,
0.5096685886383057,
0.1909080445766449,
0.13086450099945068,
0.2767069935798645,
-0.13811910152435303,
-0.046777743846178055,
-0.11710235476493835,
-0.06075805425643921,
0.11108404397964478,
0.030793003737926483,
0.3569839298725128,
-0.13734565675258636,
-0.3564416468143463,
-0.028175996616482735,
0.496920645236969,
-0.3845931589603424,
-0.19953759014606476,
0.3168112635612488,
-0.08429098129272461,
-0.025843989104032516,
0.12919460237026215,
0.007914643734693527,
0.15000903606414795,
0.6482046842575073,
0.3030933737754822,
0.008896231651306152,
-0.2967342138290405,
-0.15280470252037048,
0.01551860012114048,
0.1568860113620758,
-0.16826410591602325,
0.09497679024934769,
0.21141619980335236,
-0.034725286066532135,
-0.17093080282211304,
0.36553624272346497,
0.38135573267936707,
0.4163321256637573,
-0.5854829549789429,
0.2824895977973938,
0.08928132057189941,
0.1384943574666977,
-0.1393260508775711,
0.20353049039840698,
-0.015878066420555115,
0.1636161208152771,
0.11780793964862823,
0.017744993790984154,
-0.24185234308242798,
-0.3011685311794281,
0.10457545518875122,
0.3058531582355499,
-0.0577675998210907,
0.590070366859436,
-0.09004402905702591,
-0.422812819480896,
0.16253335773944855,
0.03273493051528931,
-0.44333919882774353,
0.019984930753707886,
0.5114709138870239,
-0.21762166917324066,
-0.03171458840370178,
-0.19305819272994995,
0.06734070181846619,
-0.0009202044457197189,
0.5991978645324707,
0.0071578435599803925,
0.36813098192214966,
-0.3758774697780609,
0.1315527856349945,
-0.504106879234314,
0.31763532757759094,
-0.12045429646968842,
0.11296522617340088,
-0.08622407168149948,
0.003686029464006424,
0.05039214342832565,
0.27576518058776855,
0.19038695096969604,
-0.08182916790246964,
0.20726874470710754,
0.6258140802383423,
-0.5632984638214111,
0.2407679259777069,
-0.10236875712871552,
-0.1458204686641693,
0.2865296006202698,
-0.2619750499725342,
0.1248403936624527,
0.025317203253507614,
0.0562632754445076,
-0.28666794300079346,
-0.2561282515525818,
0.10333967208862305,
0.21538376808166504,
0.35982462763786316,
0.30889421701431274,
0.4705527424812317,
-0.08602692186832428,
-0.15151384472846985,
-0.24374747276306152,
0.1913519650697708,
-0.060843612998723984,
-0.23224863409996033,
0.17806123197078705,
0.3006881773471832,
-0.37245339155197144,
-0.1436084508895874,
-0.2598102390766144,
-0.05013251304626465,
-0.163955956697464,
-0.2613406479358673,
-0.15797801315784454,
-0.0015279920771718025,
0.03986936807632446,
0.1521962583065033,
-0.10803067684173584,
0.5081026554107666,
0.026623155921697617,
0.20063145458698273,
-0.45855915546417236,
-0.17322885990142822,
0.2991134226322174,
-0.5101873874664307,
-0.5165338516235352,
-0.44687554240226746,
0.28221696615219116,
-0.10886622220277786,
0.03174949064850807,
-0.5038966536521912,
-0.18216893076896667,
0.028981532901525497,
-0.035078853368759155,
-0.514165461063385,
0.10345630347728729,
-0.03927881643176079,
-0.35144102573394775,
-0.19990235567092896,
0.3479396104812622,
0.20716357231140137,
-0.16302619874477386,
0.1435500532388687,
-0.10130457580089569
] |
https://github.com/huggingface/datasets/issues/5094 | Multiprocessing with `Dataset.map` and `PyTorch` results in deadlock | @bio-punk `IterableDatasetDict.map` does not support multiprocessing (only `DatasetDict.map` and `Dataset.map` do), so please open a new issue as this doesn't seem to be related to the original issue. | ## Describe the bug
There seems to be an issue with using multiprocessing with `datasets.Dataset.map` (i.e. setting `num_proc` to a value greater than one) combined with a function that uses `torch` under the hood. The subprocesses that `datasets.Dataset.map` spawns [a this step](https://github.com/huggingface/datasets/blob/1b935dab9d2f171a8c6294269421fe967eb55e34/src/datasets/arrow_dataset.py#L2663) go into wait mode forever.
## Steps to reproduce the bug
The below code goes into deadlock when `NUMBER_OF_PROCESSES` is greater than one.
```python
NUMBER_OF_PROCESSES = 2
from transformers import AutoTokenizer, AutoModel
from datasets import load_dataset
dataset = load_dataset("glue", "mrpc", split="train")
tokenizer = AutoTokenizer.from_pretrained("sentence-transformers/all-MiniLM-L6-v2")
model = AutoModel.from_pretrained("sentence-transformers/all-MiniLM-L6-v2")
model.to("cpu")
def cls_pooling(model_output):
return model_output.last_hidden_state[:, 0]
def generate_embeddings_batched(examples):
sentences_batch = list(examples['sentence1'])
encoded_input = tokenizer(
sentences_batch, padding=True, truncation=True, return_tensors="pt"
)
encoded_input = {k: v.to("cpu") for k, v in encoded_input.items()}
model_output = model(**encoded_input)
embeddings = cls_pooling(model_output)
examples['embeddings'] = embeddings.detach().cpu().numpy() # 64, 384
return examples
embeddings_dataset = dataset.map(
generate_embeddings_batched,
batched=True,
batch_size=10,
num_proc=NUMBER_OF_PROCESSES
)
```
While debugging it I've seen that it gets "stuck" when calling `torch.nn.Embedding.forward` but some testing shows that the same happens with other functions from `torch.nn`.
## Environment info
- Platform: Linux-5.14.0-1052-oem-x86_64-with-glibc2.31
- Python version: 3.9.14
- PyArrow version: 9.0.0
- Pandas version: 1.5.0
Not sure if this is a HF problem, a PyTorch problem or something I'm doing wrong..
Thanks!
| 28 | Multiprocessing with `Dataset.map` and `PyTorch` results in deadlock
## Describe the bug
There seems to be an issue with using multiprocessing with `datasets.Dataset.map` (i.e. setting `num_proc` to a value greater than one) combined with a function that uses `torch` under the hood. The subprocesses that `datasets.Dataset.map` spawns [a this step](https://github.com/huggingface/datasets/blob/1b935dab9d2f171a8c6294269421fe967eb55e34/src/datasets/arrow_dataset.py#L2663) go into wait mode forever.
## Steps to reproduce the bug
The below code goes into deadlock when `NUMBER_OF_PROCESSES` is greater than one.
```python
NUMBER_OF_PROCESSES = 2
from transformers import AutoTokenizer, AutoModel
from datasets import load_dataset
dataset = load_dataset("glue", "mrpc", split="train")
tokenizer = AutoTokenizer.from_pretrained("sentence-transformers/all-MiniLM-L6-v2")
model = AutoModel.from_pretrained("sentence-transformers/all-MiniLM-L6-v2")
model.to("cpu")
def cls_pooling(model_output):
return model_output.last_hidden_state[:, 0]
def generate_embeddings_batched(examples):
sentences_batch = list(examples['sentence1'])
encoded_input = tokenizer(
sentences_batch, padding=True, truncation=True, return_tensors="pt"
)
encoded_input = {k: v.to("cpu") for k, v in encoded_input.items()}
model_output = model(**encoded_input)
embeddings = cls_pooling(model_output)
examples['embeddings'] = embeddings.detach().cpu().numpy() # 64, 384
return examples
embeddings_dataset = dataset.map(
generate_embeddings_batched,
batched=True,
batch_size=10,
num_proc=NUMBER_OF_PROCESSES
)
```
While debugging it I've seen that it gets "stuck" when calling `torch.nn.Embedding.forward` but some testing shows that the same happens with other functions from `torch.nn`.
## Environment info
- Platform: Linux-5.14.0-1052-oem-x86_64-with-glibc2.31
- Python version: 3.9.14
- PyArrow version: 9.0.0
- Pandas version: 1.5.0
Not sure if this is a HF problem, a PyTorch problem or something I'm doing wrong..
Thanks!
@bio-punk `IterableDatasetDict.map` does not support multiprocessing (only `DatasetDict.map` and `Dataset.map` do), so please open a new issue as this doesn't seem to be related to the original issue. | [
-0.19728319346904755,
-0.5258713364601135,
-0.059857141226530075,
0.19121290743350983,
-0.03308035433292389,
-0.03727487847208977,
0.3879684805870056,
0.10255962610244751,
0.19705474376678467,
0.15648043155670166,
0.1593065857887268,
0.5224060416221619,
-0.1971760094165802,
-0.34866851568222046,
-0.30984288454055786,
0.00672561302781105,
0.12384426593780518,
-0.35253116488456726,
-0.04642243683338165,
0.09764261543750763,
-0.15816769003868103,
0.26773154735565186,
-0.16990752518177032,
-0.054510414600372314,
-0.7615679502487183,
0.06720700860023499,
0.08253856748342514,
-0.0023633167147636414,
0.2036450356245041,
-0.24507641792297363,
-0.16812686622142792,
0.15418265759944916,
-0.058848049491643906,
0.8481484651565552,
-0.00011896129581145942,
-0.1091778576374054,
0.2780541181564331,
0.20563127100467682,
0.01093040406703949,
-0.2291586548089981,
0.3251565098762512,
-0.025720171630382538,
0.16306909918785095,
-0.034114960581064224,
0.13139984011650085,
0.07892987132072449,
0.11396777629852295,
-0.7218788266181946,
0.30645331740379333,
0.14683747291564941,
0.12756921350955963,
0.5827531814575195,
-0.029711542651057243,
0.020966647192835808,
-0.2104896605014801,
-0.0050002411007881165,
-0.07171738892793655,
0.15186861157417297,
0.5983694791793823,
-0.2531331181526184,
-0.37854892015457153,
0.44758784770965576,
-0.12484809756278992,
-0.02141467109322548,
0.012464817613363266,
-0.11631786078214645,
-0.1307639181613922,
-0.74214768409729,
0.24704810976982117,
0.09432946145534515,
-0.2586125135421753,
-0.25411322712898254,
-0.1468227356672287,
-0.2539825737476349,
0.03562355786561966,
-0.17146922647953033,
0.0931064784526825,
0.16410021483898163,
-0.28115519881248474,
-0.07607473433017731,
-0.3438294231891632,
-0.05187489464879036,
0.13953672349452972,
-0.10562178492546082,
0.057263366878032684,
0.41724541783332825,
0.20500816404819489,
0.2839682400226593,
0.2434198260307312,
0.12929630279541016,
-0.0184665247797966,
-0.01704511046409607,
0.16135144233703613,
0.02039492502808571,
-0.5973533391952515,
0.11267419159412384,
0.20168471336364746,
-0.09189874678850174,
-0.007003717124462128,
-0.21409441530704498,
-0.010116730816662312,
0.11609016358852386,
0.14591500163078308,
0.10987505316734314,
0.39899635314941406,
-0.31718894839286804,
0.018270418047904968,
0.07181034982204437,
0.2054618000984192,
-0.3312462568283081,
-0.08371372520923615,
0.10557211190462112,
0.12287615239620209,
-0.3689732849597931,
0.2798476219177246,
0.16081392765045166,
0.11593791842460632,
-0.0066688172519207,
-0.0275504682213068,
0.15538062155246735,
-0.2550780177116394,
0.11779823154211044,
0.06784741580486298,
0.1721150279045105,
0.13410601019859314,
0.6897133588790894,
0.16588005423545837,
0.17131483554840088,
-0.485755980014801,
0.029595524072647095,
-0.05323448404669762,
-0.15932783484458923,
-0.3375268578529358,
0.09490395337343216,
0.17139573395252228,
-0.11264668405056,
0.05842554569244385,
0.4103654623031616,
0.46188366413116455,
-0.2101811170578003,
0.37107768654823303,
-0.300601989030838,
0.23612502217292786,
0.14609700441360474,
-0.08715368807315826,
0.2400803118944168,
-0.10769063234329224,
0.38669031858444214,
0.035049885511398315,
0.3083063066005707,
0.016420748084783554,
-0.1343061476945877,
-0.20859995484352112,
0.11937222629785538,
0.08320971578359604,
0.3459077775478363,
0.08964204043149948,
0.14199620485305786,
0.5798596143722534,
0.13193070888519287,
0.18659454584121704,
-0.4784564971923828,
-0.20855359733104706,
-0.06694753468036652,
0.13375802338123322,
0.3453560471534729,
0.11969953775405884,
0.09752066433429718,
0.04193601757287979,
0.015694625675678253,
-0.010526075959205627,
0.255352646112442,
-0.1328512728214264,
0.11517554521560669,
-0.04663532227277756,
0.1648816615343094,
-0.19056421518325806,
-0.28738391399383545,
-0.3479527533054352,
0.25245365500450134,
-0.33450931310653687,
0.11553498357534409,
0.09597177058458328,
0.2848915159702301,
0.08560378104448318,
0.12345002591609955,
0.437857985496521,
0.10185349732637405,
-0.10652031004428864,
0.22913774847984314,
-0.2130875140428543,
-0.019230011850595474,
0.05724150687456131,
0.08973921835422516,
0.22123299539089203,
-0.3161967992782593,
-0.38304030895233154,
-0.08010619133710861,
0.4298316240310669,
-0.03588595613837242,
0.034304216504096985,
0.3358994722366333,
-0.3085514307022095,
-0.04112705588340759,
0.08295167982578278,
-0.42112377285957336,
-0.5840059518814087,
0.2360517680644989,
0.08446457982063293,
0.18740639090538025,
-0.3531028628349304,
0.08271296322345734,
0.38109156489372253,
0.27939698100090027,
-0.23425160348415375,
-0.2797248065471649,
-0.015457600355148315,
-0.00445093959569931,
-0.2918185591697693,
-0.3499026894569397,
-0.0764317661523819,
0.4008371829986572,
0.3347691297531128,
-0.15005643665790558,
-0.3624480366706848,
0.21488866209983826,
-0.1342533528804779,
-0.45578664541244507,
-0.29391002655029297,
0.06479910761117935,
0.14287099242210388,
0.09160551428794861,
-0.17096862196922302,
0.2579115331172943,
0.14999359846115112,
0.11662435531616211,
-0.2063751220703125,
-0.11888884007930756,
0.25190749764442444,
-0.1659497767686844,
-0.13772618770599365,
0.14262838661670685,
-0.018337447196245193,
-0.11944236606359482,
0.09192194044589996,
0.3078451156616211,
0.12374264001846313,
0.3461223542690277,
-0.12948361039161682,
0.011080166324973106,
-0.14063520729541779,
0.12559151649475098,
-0.19415295124053955,
0.09803411364555359,
0.43549031019210815,
0.21469740569591522,
0.1837858408689499,
0.08839128911495209,
-0.2483357936143875,
0.14210480451583862,
0.177516907453537,
0.13421162962913513,
-0.18262949585914612,
-0.07960430532693863,
-0.07129605859518051,
0.052650898694992065,
0.10016792267560959,
-0.3027743995189667,
0.4516618847846985,
0.11814901232719421,
0.013969458639621735,
-0.06789060682058334,
-0.22531448304653168,
-0.12666884064674377,
-0.0660463497042656,
0.19669729471206665,
0.17183546721935272,
0.1772155612707138,
0.2936106324195862,
-0.10503654927015305,
-0.0336984358727932,
-0.2707268297672272,
0.025599433109164238,
-0.024471277371048927,
-0.20530366897583008,
0.27868714928627014,
-0.09404642879962921,
0.5213276743888855,
0.019990824162960052,
-0.07981099933385849,
-0.2054656744003296,
-0.2993314266204834,
-0.014471743255853653,
0.37930598855018616,
-0.19013366103172302,
0.32576826214790344,
-0.06756804883480072,
-0.2957773804664612,
-0.003110727295279503,
0.07801646739244461,
-0.004928715527057648,
-0.3113834261894226,
-0.05907192826271057,
-0.07129514962434769,
0.10118752717971802,
-0.0805199146270752,
0.2087545394897461,
0.3010319769382477,
-0.408439040184021,
-0.3572113513946533,
0.08309946209192276,
0.06302199512720108,
-0.24654869735240936,
0.09089983999729156,
-0.08429984748363495,
-0.11240984499454498,
0.02833835780620575,
-0.16216310858726501,
0.1483144462108612,
-0.38269826769828796,
0.022716106846928596,
0.08426787704229355,
0.07269490510225296,
-0.046181317418813705,
-0.3208022117614746,
-0.2381492555141449,
-0.2358032912015915,
-0.2659352719783783,
0.15800854563713074,
-0.35387155413627625,
0.1316913217306137,
-0.17704223096370697,
0.20771662890911102,
0.18096761405467987,
0.017398575320839882,
-0.21082700788974762,
-0.005960475653409958,
-0.06371927261352539,
0.1856509894132614,
-0.07864335924386978,
-0.3698170781135559,
-0.4100254774093628,
0.12839870154857635,
-0.12236501276493073,
0.35220181941986084,
-0.17087644338607788,
-0.050366275012493134,
-0.3920539617538452,
0.39019548892974854,
-0.2520071268081665,
-0.009723002091050148,
0.4477148950099945,
0.2500394880771637,
-0.1463022381067276,
-0.1259407103061676,
-0.08457336574792862,
0.33920368552207947,
-0.13329461216926575,
-0.000523984432220459,
-0.05256936699151993,
0.27146732807159424,
0.09986831247806549,
0.7712089419364929,
0.25723791122436523,
-0.470512717962265,
0.07876106351613998,
-0.06854259967803955,
0.051461052149534225,
-0.006358735263347626,
-0.40929412841796875,
-0.15169177949428558,
-0.29344311356544495,
0.053157418966293335,
-0.07502497732639313,
-0.06729425489902496,
-0.21354271471500397,
0.025861792266368866,
0.1844053417444229,
-0.1842370629310608,
-0.26099422574043274,
0.26365599036216736,
-0.3158262372016907,
0.14318139851093292,
-0.144866943359375,
0.20198997855186462,
-0.19570504128932953,
0.12164101749658585,
0.03732331842184067,
-0.2238241285085678,
0.18226054310798645,
-0.26394379138946533,
-0.09733547270298004,
0.17480561137199402,
-0.4854550361633301,
0.35495108366012573,
0.23028716444969177,
0.24372021853923798,
0.0190105177462101,
-0.14949682354927063,
0.07695247232913971,
-0.2988413870334625,
0.5705059170722961,
0.056466855108737946,
0.027905916795134544,
0.25224944949150085,
-0.14231662452220917,
-0.3355740010738373,
0.10954217612743378,
-0.22055582702159882,
0.5522512197494507,
0.5510736703872681,
0.36783406138420105,
-0.20740783214569092,
-0.2333364337682724,
-0.024870876222848892,
-0.09162258356809616,
-0.053929176181554794,
-0.30183425545692444,
-0.3276832401752472,
-0.0001867637038230896,
-0.36311256885528564,
0.319823294878006,
0.3426145613193512,
0.06729412078857422,
-0.28971242904663086,
-0.25564438104629517,
0.03799443691968918,
-0.14216700196266174,
0.11965333670377731,
-0.009150467813014984,
0.07953783869743347,
-0.10412028431892395,
0.35441476106643677,
0.2071307897567749,
0.29139578342437744,
0.1889011263847351,
0.037213392555713654,
-0.15146318078041077,
0.0017004907131195068,
0.4180834889411926,
0.013168622739613056,
0.33077049255371094,
0.48578739166259766,
0.07657559216022491,
0.25958165526390076,
0.15639935433864594,
0.23890870809555054,
-0.08471181243658066,
0.19786493480205536,
0.3870905041694641,
0.3589344918727875,
-0.18026882410049438,
-0.09487741440534592,
0.22512975335121155,
0.2301071733236313,
-0.05146852508187294,
0.454782634973526,
-0.40063410997390747,
-0.04947500675916672,
0.20249246060848236,
0.15789471566677094,
0.9495906233787537,
-0.2839590907096863,
0.10398143529891968,
-0.2181529402732849,
-0.10891106724739075,
0.22710582613945007,
-0.13888919353485107,
0.32213038206100464,
-0.21638891100883484,
-0.19451992213726044,
0.13172224164009094,
-0.271727055311203,
0.009718477725982666,
-0.030385509133338928,
-0.0422510951757431,
0.11875439435243607,
-0.2190864086151123,
-0.06527233123779297,
-0.026276012882590294,
0.33045557141304016,
-0.023067349568009377,
-0.3364054262638092,
0.16501469910144806,
0.052165158092975616,
0.109437495470047,
0.0708245262503624,
-0.15861043334007263,
-0.018540741875767708,
-0.015492398291826248,
-0.15750499069690704,
-0.4743001461029053,
0.21053284406661987,
-0.4147161543369293,
0.25145018100738525,
-0.1714542806148529,
-0.1868092119693756,
0.07863828539848328,
0.46313658356666565,
-0.11267757415771484,
0.041947465389966965,
-0.19964036345481873,
0.09070056676864624,
0.24642843008041382,
0.07344777137041092,
0.11610715091228485,
-0.29039666056632996,
0.0892849937081337,
-0.0618586502969265,
-0.3287564516067505,
-0.17039576172828674,
0.09025441855192184,
-0.1936764121055603,
0.21582618355751038,
0.26266342401504517,
0.37148112058639526,
0.20135365426540375,
0.049136653542518616,
0.18447893857955933,
-0.06297766417264938,
-0.288754940032959,
0.07371821254491806,
0.227534681558609,
-0.23415182530879974,
0.16772182285785675,
-0.4147428870201111,
-0.30677491426467896,
-0.07385571300983429,
0.5395992994308472,
0.13209930062294006,
-0.17416337132453918,
0.45730045437812805,
0.6134970784187317,
-0.17660361528396606,
-0.20923614501953125,
-0.14413292706012726,
0.1331983208656311,
-0.4807315468788147,
0.2579750716686249,
-0.20926670730113983,
-0.31037163734436035,
-0.22885364294052124,
-0.1031731367111206,
-0.036002472043037415,
-0.15614590048789978,
-0.134945347905159,
-0.18262948095798492,
-0.6286593079566956,
0.01715277135372162,
-0.3071392774581909,
0.2054428607225418,
0.0101059190928936,
0.11153194308280945,
0.09902308136224747,
0.27622973918914795,
-0.24787083268165588,
-0.16050386428833008,
-0.2209002673625946,
0.23328271508216858,
0.23499886691570282,
-0.2743026316165924,
0.016904864460229874,
-0.12282851338386536,
0.06345496326684952,
0.38331615924835205,
-0.12827186286449432,
-0.2074500024318695,
-0.1820686161518097,
0.09233739972114563,
-0.033082395792007446,
-0.10769683122634888,
0.027708750218153,
-0.059740349650382996,
0.04406633973121643,
-0.20097485184669495,
0.22689317166805267,
0.2389623522758484,
-0.048822931945323944,
-0.0268598310649395,
0.4763648211956024,
0.25179845094680786,
0.01645757257938385,
0.12107207626104355,
-0.08643239736557007,
0.021126262843608856,
0.034217897802591324,
0.17948515713214874,
0.4005492627620697,
0.04099665582180023,
-0.25935694575309753,
-0.043344005942344666,
0.42941510677337646,
0.24874672293663025,
-0.06622109562158585,
-0.0349632129073143,
-0.2750089764595032,
-0.058847568929195404,
0.4001520574092865,
0.24604617059230804,
-0.0907369926571846,
-0.22567032277584076,
0.12541067600250244,
0.1439819037914276,
-0.09209202975034714,
-0.05153887718915939,
0.042421117424964905,
-0.10232145339250565,
0.1283532977104187,
0.050166063010692596,
-0.029941502958536148,
0.19302091002464294,
-0.05830508470535278,
0.1605217456817627,
-0.043199699372053146,
-0.22476474940776825,
0.11279404163360596,
-0.09026309847831726,
0.11682315170764923,
0.26003509759902954,
0.3075765371322632,
-0.015686679631471634,
0.15014834702014923,
0.04062459617853165,
0.03064001351594925,
0.5096685886383057,
0.1909080445766449,
0.13086450099945068,
0.2767069935798645,
-0.13811910152435303,
-0.046777743846178055,
-0.11710235476493835,
-0.06075805425643921,
0.11108404397964478,
0.030793003737926483,
0.3569839298725128,
-0.13734565675258636,
-0.3564416468143463,
-0.028175996616482735,
0.496920645236969,
-0.3845931589603424,
-0.19953759014606476,
0.3168112635612488,
-0.08429098129272461,
-0.025843989104032516,
0.12919460237026215,
0.007914643734693527,
0.15000903606414795,
0.6482046842575073,
0.3030933737754822,
0.008896231651306152,
-0.2967342138290405,
-0.15280470252037048,
0.01551860012114048,
0.1568860113620758,
-0.16826410591602325,
0.09497679024934769,
0.21141619980335236,
-0.034725286066532135,
-0.17093080282211304,
0.36553624272346497,
0.38135573267936707,
0.4163321256637573,
-0.5854829549789429,
0.2824895977973938,
0.08928132057189941,
0.1384943574666977,
-0.1393260508775711,
0.20353049039840698,
-0.015878066420555115,
0.1636161208152771,
0.11780793964862823,
0.017744993790984154,
-0.24185234308242798,
-0.3011685311794281,
0.10457545518875122,
0.3058531582355499,
-0.0577675998210907,
0.590070366859436,
-0.09004402905702591,
-0.422812819480896,
0.16253335773944855,
0.03273493051528931,
-0.44333919882774353,
0.019984930753707886,
0.5114709138870239,
-0.21762166917324066,
-0.03171458840370178,
-0.19305819272994995,
0.06734070181846619,
-0.0009202044457197189,
0.5991978645324707,
0.0071578435599803925,
0.36813098192214966,
-0.3758774697780609,
0.1315527856349945,
-0.504106879234314,
0.31763532757759094,
-0.12045429646968842,
0.11296522617340088,
-0.08622407168149948,
0.003686029464006424,
0.05039214342832565,
0.27576518058776855,
0.19038695096969604,
-0.08182916790246964,
0.20726874470710754,
0.6258140802383423,
-0.5632984638214111,
0.2407679259777069,
-0.10236875712871552,
-0.1458204686641693,
0.2865296006202698,
-0.2619750499725342,
0.1248403936624527,
0.025317203253507614,
0.0562632754445076,
-0.28666794300079346,
-0.2561282515525818,
0.10333967208862305,
0.21538376808166504,
0.35982462763786316,
0.30889421701431274,
0.4705527424812317,
-0.08602692186832428,
-0.15151384472846985,
-0.24374747276306152,
0.1913519650697708,
-0.060843612998723984,
-0.23224863409996033,
0.17806123197078705,
0.3006881773471832,
-0.37245339155197144,
-0.1436084508895874,
-0.2598102390766144,
-0.05013251304626465,
-0.163955956697464,
-0.2613406479358673,
-0.15797801315784454,
-0.0015279920771718025,
0.03986936807632446,
0.1521962583065033,
-0.10803067684173584,
0.5081026554107666,
0.026623155921697617,
0.20063145458698273,
-0.45855915546417236,
-0.17322885990142822,
0.2991134226322174,
-0.5101873874664307,
-0.5165338516235352,
-0.44687554240226746,
0.28221696615219116,
-0.10886622220277786,
0.03174949064850807,
-0.5038966536521912,
-0.18216893076896667,
0.028981532901525497,
-0.035078853368759155,
-0.514165461063385,
0.10345630347728729,
-0.03927881643176079,
-0.35144102573394775,
-0.19990235567092896,
0.3479396104812622,
0.20716357231140137,
-0.16302619874477386,
0.1435500532388687,
-0.10130457580089569
] |
https://github.com/huggingface/datasets/issues/5093 | Mismatch between tutoriel and doc | Hi, thanks for reporting! This line should be replaced with
```python
dataset = dataset.map(lambda examples: tokenizer(examples["text"], return_tensors="np"), batched=True)
```
for it to work (the `return_tensors` part inside the `tokenizer` call). | ## Describe the bug
In the "Process text data" tutorial, [`map` has `return_tensors` as kwarg](https://huggingface.co/docs/datasets/main/en/nlp_process#map). It does not seem to appear in the [function documentation](https://huggingface.co/docs/datasets/main/en/package_reference/main_classes#datasets.Dataset.map), nor to work.
## Steps to reproduce the bug
MWE:
```python
from transformers import AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained("bert-base-cased")
from datasets import load_dataset
dataset = load_dataset("lhoestq/demo1", split="train")
dataset = dataset.map(lambda examples: tokenizer(examples["review"]), batched=True, return_tensors="pt")
```
## Expected results
return_tensors to be a valid kwarg :smiley:
## Actual results
```python
>> TypeError: map() got an unexpected keyword argument 'return_tensors'
```
## Environment info
- `datasets` version: 2.3.2
- Platform: Linux-5.14.0-1052-oem-x86_64-with-glibc2.29
- Python version: 3.8.10
- PyArrow version: 8.0.0
- Pandas version: 1.4.3
| 30 | Mismatch between tutoriel and doc
## Describe the bug
In the "Process text data" tutorial, [`map` has `return_tensors` as kwarg](https://huggingface.co/docs/datasets/main/en/nlp_process#map). It does not seem to appear in the [function documentation](https://huggingface.co/docs/datasets/main/en/package_reference/main_classes#datasets.Dataset.map), nor to work.
## Steps to reproduce the bug
MWE:
```python
from transformers import AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained("bert-base-cased")
from datasets import load_dataset
dataset = load_dataset("lhoestq/demo1", split="train")
dataset = dataset.map(lambda examples: tokenizer(examples["review"]), batched=True, return_tensors="pt")
```
## Expected results
return_tensors to be a valid kwarg :smiley:
## Actual results
```python
>> TypeError: map() got an unexpected keyword argument 'return_tensors'
```
## Environment info
- `datasets` version: 2.3.2
- Platform: Linux-5.14.0-1052-oem-x86_64-with-glibc2.29
- Python version: 3.8.10
- PyArrow version: 8.0.0
- Pandas version: 1.4.3
Hi, thanks for reporting! This line should be replaced with
```python
dataset = dataset.map(lambda examples: tokenizer(examples["text"], return_tensors="np"), batched=True)
```
for it to work (the `return_tensors` part inside the `tokenizer` call). | [
0.10698115825653076,
-0.3805322051048279,
0.052491601556539536,
0.1246366798877716,
0.06381569802761078,
-0.14597555994987488,
0.31472423672676086,
0.05504531040787697,
0.07469674944877625,
0.090373694896698,
0.13363100588321686,
0.794468879699707,
-0.037477411329746246,
-0.06233193725347519,
0.287117600440979,
-0.17624488472938538,
0.24336522817611694,
0.08833780884742737,
0.10513231158256531,
-0.18897907435894012,
-0.25909507274627686,
0.39258140325546265,
-0.2513195276260376,
0.6361404657363892,
-0.17599312961101532,
-0.2020197957754135,
0.035766489803791046,
-0.20307621359825134,
-0.19737796485424042,
-0.4556015431880951,
0.3655167818069458,
-0.23721808195114136,
-0.01908845640718937,
0.42636239528656006,
-0.00012430954666342586,
-0.09575365483760834,
0.42710500955581665,
0.03195452690124512,
0.17971490323543549,
-0.3281988501548767,
0.2473224401473999,
0.0771714299917221,
0.12889724969863892,
-0.30968132615089417,
0.20746490359306335,
0.01893475465476513,
0.17241576313972473,
0.036552466452121735,
0.5938147902488708,
0.4149346351623535,
0.07766974717378616,
0.32052215933799744,
0.23852987587451935,
0.06641604006290436,
0.0291912704706192,
0.15672770142555237,
0.1051013246178627,
0.0592280738055706,
0.10624346137046814,
-0.3927096724510193,
-0.09543397277593613,
0.3305557072162628,
-0.2612336277961731,
-0.3218337595462799,
0.26121875643730164,
0.2830769121646881,
0.07386519014835358,
-0.4783969223499298,
0.010159201920032501,
-0.06866658478975296,
0.20938265323638916,
-0.31734052300453186,
-0.20638355612754822,
-0.2750518023967743,
-0.0972147285938263,
-0.08392546325922012,
0.15739475190639496,
-0.1690722554922104,
-0.3096146285533905,
-0.16168871521949768,
-0.32385045289993286,
-0.09412247687578201,
-0.037844445556402206,
0.1666504591703415,
-0.04441540688276291,
0.3428182899951935,
0.008059687912464142,
0.2852606177330017,
0.17372770607471466,
0.08303022384643555,
-0.1498107761144638,
-0.024441082030534744,
0.21451878547668457,
0.5518585443496704,
-0.12524570524692535,
-0.31729656457901,
0.32340025901794434,
-0.3471398651599884,
0.24374529719352722,
-0.3725043535232544,
-0.26135480403900146,
-0.14206230640411377,
-0.3229331970214844,
0.17948299646377563,
0.10151611268520355,
0.37028735876083374,
0.21065297722816467,
0.2549261450767517,
0.06333569437265396,
-0.12534014880657196,
-0.09547479450702667,
-0.12098751217126846,
-0.12183062732219696,
-0.08423186838626862,
-0.01957385614514351,
0.041280295699834824,
0.06869932264089584,
0.03409207984805107,
-0.2936760187149048,
0.23255109786987305,
-0.26973095536231995,
-0.006095354910939932,
-0.1741766482591629,
0.13232780992984772,
-0.027141541242599487,
0.08157983422279358,
0.1905909925699234,
0.14382052421569824,
-0.17705538868904114,
0.012789123691618443,
-0.13105905055999756,
0.07715530693531036,
-0.3883993327617645,
0.11074618250131607,
-0.1642114818096161,
0.10555955767631531,
0.35586610436439514,
0.16928081214427948,
0.1072196364402771,
-0.09098084270954132,
-0.17059454321861267,
0.10763987898826599,
0.14273709058761597,
-0.06341265141963959,
-0.243887796998024,
0.33510565757751465,
0.27920040488243103,
-0.05819996818900108,
-0.23170480132102966,
0.07794173061847687,
-0.4599822759628296,
-0.19765587151050568,
0.002787206321954727,
0.02835143357515335,
0.026506219059228897,
-0.04377371817827225,
-0.43177494406700134,
0.21541044116020203,
0.2960303723812103,
0.02224598452448845,
0.12437696754932404,
-0.17949724197387695,
-0.3869803845882416,
-0.17950782179832458,
0.20219819247722626,
0.18153242766857147,
0.08826091885566711,
-0.347525030374527,
-0.09345266968011856,
0.24131585657596588,
0.3578110933303833,
0.430036336183548,
-0.26853060722351074,
0.617055356502533,
-0.3009413480758667,
0.7043729424476624,
0.33231121301651,
-0.38370028138160706,
-0.22381465137004852,
0.20390963554382324,
-0.07607986778020859,
0.01077650673687458,
-0.18855419754981995,
-0.34037917852401733,
0.07702010124921799,
0.24482615292072296,
0.24857264757156372,
0.03095513954758644,
-0.07285197079181671,
0.2417604625225067,
-0.15741020441055298,
-0.3497454822063446,
0.49163931608200073,
-0.31069818139076233,
0.23696498572826385,
0.33396369218826294,
-0.11736709624528885,
0.24688704311847687,
0.4084548056125641,
0.007224947214126587,
-0.04214535653591156,
0.05609136074781418,
0.21431778371334076,
0.07499007880687714,
0.06618012487888336,
-0.0582951083779335,
0.04028555750846863,
-0.008711550384759903,
-0.19273275136947632,
0.3154758810997009,
-0.1721300333738327,
-0.13972316682338715,
-0.19893699884414673,
0.12500396370887756,
0.10251645743846893,
-0.3321220576763153,
0.09996743500232697,
-0.15587212145328522,
-0.0743865817785263,
0.40111207962036133,
-0.13573205471038818,
-0.08388411998748779,
0.06891749054193497,
0.10595501214265823,
-0.2830963134765625,
0.09444723278284073,
-0.11164470762014389,
-0.26050126552581787,
-0.11575347930192947,
0.12407828122377396,
0.2884141504764557,
0.2305658608675003,
-0.06896455585956573,
0.07377912849187851,
-0.08696693181991577,
0.3645073175430298,
-0.27251163125038147,
0.0008328557014465332,
0.11625245958566666,
-0.12219034135341644,
-0.2712137997150421,
0.22897717356681824,
0.12761373817920685,
-0.014704212546348572,
0.38107460737228394,
0.25646936893463135,
0.2894790768623352,
0.08980989456176758,
0.06324519962072372,
0.1611461043357849,
-0.12836511433124542,
-0.016323573887348175,
-0.2040627896785736,
0.015607431530952454,
0.10263446718454361,
-0.08891500532627106,
0.2648777961730957,
-0.11027604341506958,
-0.14438965916633606,
0.02920905500650406,
0.730557382106781,
-0.02207350917160511,
0.024098701775074005,
0.17739635705947876,
-0.24597856402397156,
-0.25417831540107727,
0.031088966876268387,
-0.23557671904563904,
0.4851188659667969,
0.026642706245183945,
-0.056696947664022446,
0.10520947724580765,
-0.348870187997818,
0.02529805526137352,
0.22948357462882996,
0.1825367510318756,
0.14965921640396118,
0.067112997174263,
0.0028090872801840305,
0.10492713749408722,
-0.19737258553504944,
-0.04790049046278,
-0.13454468548297882,
0.1413223147392273,
-0.31187090277671814,
0.07875215262174606,
0.06813457608222961,
-0.181135356426239,
-0.2283143401145935,
-0.19329848885536194,
-0.1769053041934967,
-0.33015650510787964,
-0.06460477411746979,
0.037892576307058334,
-0.020189594477415085,
0.3256611227989197,
0.1211470365524292,
0.15874555706977844,
0.016643116250634193,
0.06983806937932968,
-0.32266923785209656,
-0.3254775404930115,
-0.27826911211013794,
-0.12465636432170868,
-0.12729685008525848,
-0.2967003285884857,
0.16214051842689514,
-0.08494508266448975,
-0.15189754962921143,
-0.14159175753593445,
-0.5190672874450684,
0.3333234488964081,
-0.1897626668214798,
0.16685980558395386,
0.4306507408618927,
0.1692633330821991,
-0.4567973017692566,
-0.4481055438518524,
0.23581312596797943,
-0.45329514145851135,
-0.44389161467552185,
-0.028011217713356018,
0.09158898144960403,
-0.016556885093450546,
-0.2812030613422394,
-0.3838353455066681,
0.07162883132696152,
-0.16928213834762573,
0.378329336643219,
-0.21750213205814362,
0.10123896598815918,
0.22963447868824005,
0.006650702096521854,
0.4002445638179779,
-0.2940061688423157,
-0.012695098295807838,
-0.32626813650131226,
-0.24880370497703552,
0.18338121473789215,
-0.1864602416753769,
-0.2609199285507202,
-0.33796846866607666,
-0.0318666435778141,
0.28354525566101074,
-0.07997668534517288,
-0.3351476192474365,
-0.2490645945072174,
-0.14153234660625458,
0.16662520170211792,
-0.06656062602996826,
0.2070687860250473,
0.2654772102832794,
-0.006861334200948477,
0.0740765780210495,
-0.23427465558052063,
-0.21281012892723083,
0.2842710018157959,
0.17501801252365112,
0.07248944044113159,
0.19081664085388184,
0.5232598185539246,
0.2409476637840271,
0.7239766716957092,
0.3678017854690552,
-0.31867507100105286,
0.0504460334777832,
-0.21528251469135284,
0.03601818159222603,
-0.14099422097206116,
-0.292349636554718,
-0.13041825592517853,
-0.23324081301689148,
0.04029381275177002,
0.17233818769454956,
-0.19389188289642334,
-0.1870538890361786,
0.07978006452322006,
-0.07793183624744415,
-0.35815611481666565,
-0.421388179063797,
0.045048654079437256,
-0.021186374127864838,
0.12985168397426605,
0.0031342916190624237,
0.09358005970716476,
-0.40395283699035645,
-0.0522024929523468,
0.25834938883781433,
0.11052563041448593,
0.5816437602043152,
0.1600307822227478,
-0.3783417046070099,
-0.32418015599250793,
-0.7919130921363831,
0.17578834295272827,
0.15968452394008636,
0.22588995099067688,
-0.02829105406999588,
0.014711100608110428,
-0.026322975754737854,
0.2125363051891327,
0.7596040368080139,
-0.022630004212260246,
-0.18147073686122894,
-0.023479197174310684,
-0.11007875949144363,
-0.2678583562374115,
-0.022347668185830116,
-0.11451254785060883,
0.06882920116186142,
0.38841554522514343,
0.7061563730239868,
-0.42475301027297974,
0.0340169332921505,
-0.22319462895393372,
-0.2507565915584564,
-0.131891131401062,
0.1207992359995842,
-0.18503007292747498,
-0.21738889813423157,
-0.30420294404029846,
0.1900058090686798,
0.33345896005630493,
0.11804966628551483,
-0.01808313839137554,
0.1816611886024475,
0.2044888734817505,
0.14626812934875488,
0.0013964846730232239,
-0.05080699920654297,
0.41264230012893677,
-0.13601650297641754,
-0.1090162843465805,
0.3291618227958679,
0.2918561100959778,
-0.18028110265731812,
0.05021626502275467,
-0.09668530523777008,
-0.2789785861968994,
-0.058291442692279816,
-0.12705089151859283,
0.3382924199104309,
0.4023979604244232,
-0.06769062578678131,
0.2861557602882385,
0.12402766197919846,
0.014650985598564148,
-0.2537791430950165,
0.3827517628669739,
0.46448591351509094,
0.16124169528484344,
-0.09436462074518204,
-0.2913106083869934,
0.30822259187698364,
0.11120302975177765,
-0.275046706199646,
0.4152824878692627,
0.12625452876091003,
-0.5049138069152832,
0.4944162964820862,
0.19430507719516754,
1.1819988489151,
0.1677178144454956,
0.39016443490982056,
0.22214984893798828,
0.14457419514656067,
0.6449830532073975,
-0.11355306953191757,
0.08663063496351242,
-0.4614798128604889,
0.13086548447608948,
-0.07085882872343063,
-0.17306199669837952,
-0.14290305972099304,
0.09403024613857269,
-0.2859235107898712,
0.15896300971508026,
0.32499921321868896,
0.3865105211734772,
0.06714493036270142,
0.14017857611179352,
0.244240403175354,
-0.14645904302597046,
-0.09416089951992035,
-0.0752689316868782,
0.19049163162708282,
0.4575863182544708,
-0.12529373168945312,
-0.19718743860721588,
-0.15174397826194763,
-0.5736111998558044,
-0.38941532373428345,
0.07916635274887085,
-0.4354749023914337,
0.3375505208969116,
0.3447886109352112,
0.047933489084243774,
0.19817908108234406,
0.6580462455749512,
0.395757794380188,
0.017349164932966232,
-0.35818400979042053,
-0.07729379832744598,
-0.06345946341753006,
0.22770176827907562,
0.1611562818288803,
-0.0991695299744606,
0.3011822998523712,
-0.035139299929142,
-0.0793234258890152,
-0.021511323750019073,
-0.11591421067714691,
-0.24652424454689026,
-0.5618495941162109,
-0.05941574275493622,
-0.04383515566587448,
-0.3040584623813629,
-0.08831164240837097,
-0.0685596764087677,
-0.08157539367675781,
-0.1541338413953781,
-0.03202906623482704,
0.10368421673774719,
-0.18318650126457214,
0.1614309400320053,
0.06527198851108551,
-0.3152275085449219,
0.04357365518808365,
0.3181259036064148,
-0.12042685598134995,
-0.1647455394268036,
0.44883593916893005,
-0.08458685874938965,
-0.18691378831863403,
-0.0108133964240551,
-0.17107021808624268,
0.39701351523399353,
-0.5193279981613159,
0.15005184710025787,
-0.2447969913482666,
-0.022696539759635925,
-0.19075433909893036,
0.1348131150007248,
0.07386314123868942,
-0.027172677218914032,
0.0373123399913311,
-0.28678274154663086,
-0.3008757531642914,
0.47099411487579346,
-0.3235507011413574,
0.14021345973014832,
0.2933920919895172,
0.36420726776123047,
0.11454497277736664,
-0.14534340798854828,
-0.19939211010932922,
0.017101744189858437,
0.030372118577361107,
0.269829660654068,
0.12678194046020508,
0.02617747336626053,
0.07883279770612717,
-0.06110092252492905,
-0.0798981785774231,
0.4592167139053345,
0.03636914864182472,
-0.025282228365540504,
-0.34212493896484375,
0.1653343290090561,
0.18661275506019592,
-0.12298955768346786,
0.254893958568573,
0.22616146504878998,
0.04383385181427002,
-0.1657869666814804,
0.09368829429149628,
0.21098873019218445,
-0.025947630405426025,
0.40944749116897583,
0.013119325041770935,
0.3758472204208374,
-0.015764648094773293,
-0.12339451909065247,
-0.06139032542705536,
0.12992240488529205,
0.09975849092006683,
0.24773098528385162,
0.044396303594112396,
-0.06069387495517731,
0.14451813697814941,
0.11201824247837067,
0.24990980327129364,
0.1571388691663742,
0.19195261597633362,
-0.19400246441364288,
-0.11040227115154266,
-0.2434794157743454,
0.1071532666683197,
0.08632125705480576,
-0.5105283856391907,
-0.19286306202411652,
0.4760497212409973,
0.08510635048151016,
-0.09313846379518509,
-0.10052945464849472,
0.293033242225647,
-0.18692009150981903,
-0.00713469460606575,
0.0066300854086875916,
0.15671028196811676,
0.23858463764190674,
-0.18196417391300201,
-0.034365326166152954,
0.3701702654361725,
-0.18886971473693848,
0.13604523241519928,
0.28554683923721313,
-0.22551977634429932,
0.2460646629333496,
0.2710247337818146,
0.20605970919132233,
0.004946582019329071,
0.31422585248947144,
0.14382295310497284,
0.16530881822109222,
-0.11622834950685501,
0.030966883525252342,
0.40332067012786865,
0.02836768329143524,
-0.29918259382247925,
0.15730082988739014,
-0.21894025802612305,
0.41916143894195557,
0.029197480529546738,
0.3293476998806,
0.1048169657588005,
-0.07174070924520493,
-0.036646321415901184,
0.21369199454784393,
-0.4761497974395752,
-0.2704299986362457,
-0.25563931465148926,
-0.08848746120929718,
-0.10963090509176254,
0.009833201766014099,
-0.0604126863181591,
-0.08991663157939911,
0.32504352927207947,
-0.12927092611789703,
-0.06727863848209381,
-0.0003630295395851135,
-0.3002312183380127,
0.04422101005911827,
0.27266839146614075,
-0.24020791053771973,
0.01068151742219925,
-0.35685479640960693,
-0.1675582230091095,
-0.09358806908130646,
0.3777884840965271,
0.4765031635761261,
0.3932989537715912,
-0.20728647708892822,
-0.01906723529100418,
0.12569226324558258,
0.0592663511633873,
-0.031410954892635345,
0.32650020718574524,
0.1301971822977066,
-0.09910544753074646,
0.04586793854832649,
-0.0020888186991214752,
-0.0973220244050026,
-0.2018023431301117,
0.11779244244098663,
0.3665122091770172,
0.04615646228194237,
0.3697965443134308,
-0.2309792935848236,
-0.22347113490104675,
0.05188487842679024,
0.26693612337112427,
-0.2699187994003296,
0.2576843500137329,
0.3474949300289154,
0.3416065275669098,
0.23560959100723267,
-0.312186062335968,
0.051145367324352264,
0.09876976907253265,
0.21090848743915558,
0.4436470568180084,
0.1473315954208374,
-0.23979905247688293,
-0.0801345556974411,
-0.4109618067741394,
0.179511159658432,
0.42553508281707764,
0.055153436958789825,
0.01620348170399666,
-0.20789660513401031,
0.03395968675613403,
0.1016666516661644,
0.019848287105560303,
-0.194863423705101,
-0.24068006873130798,
0.20236295461654663,
0.03667621687054634,
-0.1634463518857956,
-0.10010285675525665,
0.06759153306484222,
0.11535109579563141,
-0.06560467928647995,
0.24206943809986115,
-0.1788586974143982,
-0.016277208924293518,
-0.2812250852584839,
0.27695590257644653,
0.0016434621065855026,
0.31515029072761536,
0.2508598268032074,
0.5172704458236694,
0.4530221223831177,
-0.34267640113830566,
-0.08960753679275513,
0.011986039578914642,
-0.13849696516990662,
-0.36206215620040894,
-0.025625519454479218,
-0.22486650943756104,
0.19928491115570068,
-0.1368865966796875,
-0.32935479283332825,
-0.45377275347709656,
-0.005602494813501835,
0.2867869734764099,
-0.396408349275589,
-0.5354598760604858,
0.1451309323310852,
-0.11624616384506226,
-0.28394338488578796,
0.04311682656407356,
0.6012517809867859,
-0.0036478377878665924,
0.26250123977661133,
-0.2262706309556961,
-0.42797428369522095,
0.3658362030982971,
-0.9366374015808105,
-0.31687644124031067,
-0.15923777222633362,
0.030284002423286438,
0.3197912573814392,
-0.3044278919696808,
-0.838429868221283,
-0.26675841212272644,
0.1875549852848053,
0.0879775732755661,
-0.35482144355773926,
0.033363766968250275,
0.09526653587818146,
0.10464739799499512,
-0.10779356956481934,
0.3949325978755951,
0.27000606060028076,
-0.17941516637802124,
0.3270125091075897,
-0.3813375234603882
] |
https://github.com/huggingface/datasets/issues/5088 | load_datasets("json", ...) don't read local .json.gz properly | Hi @junwang-wish, thanks for reporting.
Unfortunately, I'm not able to reproduce the bug. Which version of `datasets` are you using? Does the problem persist if you update `datasets`?
```shell
pip install -U datasets
``` | ## Describe the bug
I have a local file `*.json.gz` and it can be read by `pandas.read_json(lines=True)`, but cannot be read by `load_datasets("json")` (resulting in 0 lines)
## Steps to reproduce the bug
```python
fpath = '/data/junwang/.cache/general/57b6f2314cbe0bc45dda5b78f0871df2/test.json.gz'
ds_panda = DatasetDict(
test=Dataset.from_pandas(
pd.read_json(fpath, lines=True)
)
)
ds_direct = load_dataset(
'json', data_files={
'test': fpath
}, features=Features(
text_input=Value(dtype="string", id=None),
text_output=Value(dtype="string", id=None)
)
)
len(ds_panda['test']), len(ds_direct['test'])
```
## Expected results
Lines of `ds_panda['test']` and `ds_direct['test']` should match.
## Actual results
```
Using custom data configuration default-c0ef2598760968aa
Downloading and preparing dataset json/default to /data/junwang/.cache/huggingface/datasets/json/default-c0ef2598760968aa/0.0.0/e6070c77f18f01a5ad4551a8b7edfba20b8438b7cad4d94e6ad9378022ce4aab...
Dataset json downloaded and prepared to /data/junwang/.cache/huggingface/datasets/json/default-c0ef2598760968aa/0.0.0/e6070c77f18f01a5ad4551a8b7edfba20b8438b7cad4d94e6ad9378022ce4aab. Subsequent calls will reuse this data.
(62087, 0)
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version:
- Platform: Ubuntu 18.04.4 LTS
- Python version: 3.8.13
- PyArrow version: 9.0.0
| 34 | load_datasets("json", ...) don't read local .json.gz properly
## Describe the bug
I have a local file `*.json.gz` and it can be read by `pandas.read_json(lines=True)`, but cannot be read by `load_datasets("json")` (resulting in 0 lines)
## Steps to reproduce the bug
```python
fpath = '/data/junwang/.cache/general/57b6f2314cbe0bc45dda5b78f0871df2/test.json.gz'
ds_panda = DatasetDict(
test=Dataset.from_pandas(
pd.read_json(fpath, lines=True)
)
)
ds_direct = load_dataset(
'json', data_files={
'test': fpath
}, features=Features(
text_input=Value(dtype="string", id=None),
text_output=Value(dtype="string", id=None)
)
)
len(ds_panda['test']), len(ds_direct['test'])
```
## Expected results
Lines of `ds_panda['test']` and `ds_direct['test']` should match.
## Actual results
```
Using custom data configuration default-c0ef2598760968aa
Downloading and preparing dataset json/default to /data/junwang/.cache/huggingface/datasets/json/default-c0ef2598760968aa/0.0.0/e6070c77f18f01a5ad4551a8b7edfba20b8438b7cad4d94e6ad9378022ce4aab...
Dataset json downloaded and prepared to /data/junwang/.cache/huggingface/datasets/json/default-c0ef2598760968aa/0.0.0/e6070c77f18f01a5ad4551a8b7edfba20b8438b7cad4d94e6ad9378022ce4aab. Subsequent calls will reuse this data.
(62087, 0)
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version:
- Platform: Ubuntu 18.04.4 LTS
- Python version: 3.8.13
- PyArrow version: 9.0.0
Hi @junwang-wish, thanks for reporting.
Unfortunately, I'm not able to reproduce the bug. Which version of `datasets` are you using? Does the problem persist if you update `datasets`?
```shell
pip install -U datasets
``` | [
-0.003829054534435272,
-0.047457046806812286,
-0.05098037049174309,
0.4958299398422241,
0.2805570960044861,
0.06093590706586838,
0.3618413209915161,
0.34863904118537903,
0.5576652884483337,
0.03365106135606766,
-0.1139461100101471,
0.4106937646865845,
0.14960357546806335,
-0.038502249866724014,
-0.04585804045200348,
-0.052276529371738434,
0.04582826420664787,
0.13454589247703552,
0.18831588327884674,
-0.26813679933547974,
-0.295661985874176,
0.3107275068759918,
-0.037511248141527176,
0.05337155610322952,
-0.029809381812810898,
-0.0235630851238966,
-0.05392635613679886,
0.32063838839530945,
0.03802972286939621,
-0.2531926929950714,
0.27721208333969116,
0.08087223768234253,
0.04866950958967209,
0.5948470830917358,
-0.00011657576396828517,
0.20776455104351044,
0.4393162131309509,
-0.12780214846134186,
-0.06946559995412827,
-0.1689596027135849,
-0.4169912040233612,
-0.4438118636608124,
0.27859625220298767,
-0.20925825834274292,
0.09493755549192429,
-0.3522743284702301,
-0.2979210615158081,
-0.7535613179206848,
0.4676865339279175,
0.15837593376636505,
0.15167544782161713,
0.01030733808875084,
-0.020857732743024826,
0.1251136213541031,
0.127682626247406,
0.18863242864608765,
0.014025000855326653,
0.5332828760147095,
0.01776992529630661,
0.07427212595939636,
-0.07273315638303757,
-0.04155047610402107,
-0.3858986794948578,
-0.0990327000617981,
0.09130209684371948,
0.13968829810619354,
0.13521894812583923,
0.09227973222732544,
0.1889893114566803,
0.27084076404571533,
0.7185280323028564,
-0.3609732687473297,
-0.5663487911224365,
-0.45188578963279724,
-0.20285193622112274,
0.24929900467395782,
0.17590411007404327,
0.21617266535758972,
-0.12390433251857758,
0.2884554862976074,
-0.13084669411182404,
0.08400791883468628,
-0.05904466658830643,
0.06193971633911133,
-0.15046127140522003,
-0.051902249455451965,
-0.024855222553014755,
-0.020658642053604126,
-0.21795843541622162,
0.044491518288850784,
0.28763940930366516,
-0.39719799160957336,
-0.1644202172756195,
0.2165779024362564,
-0.047132235020399094,
0.13429683446884155,
0.19526627659797668,
-0.3975170850753784,
0.17803826928138733,
0.03551435470581055,
0.45708271861076355,
0.24525058269500732,
-0.1872396320104599,
0.20232391357421875,
0.42253363132476807,
0.43971335887908936,
0.24769380688667297,
0.10947348922491074,
0.22683317959308624,
-0.056495197117328644,
-0.1611114889383316,
-0.04681038856506348,
-0.011012245900928974,
-0.2995707094669342,
0.12202967703342438,
-0.1886376142501831,
0.1738482564687729,
-0.2851097285747528,
0.054435402154922485,
0.24039247632026672,
-0.4047977030277252,
-0.05306227132678032,
0.037031207233667374,
0.15711209177970886,
-0.10370049625635147,
0.556236743927002,
0.08917529881000519,
0.3383234739303589,
0.01593373902142048,
0.14085933566093445,
-0.2845539152622223,
-0.21981360018253326,
0.17374533414840698,
0.02635500207543373,
0.18395927548408508,
-0.02000316232442856,
0.45643365383148193,
0.037693917751312256,
-0.1776365339756012,
-0.2572305202484131,
-0.0714314728975296,
-0.190030038356781,
-0.02214892953634262,
0.3195631206035614,
0.15790311992168427,
0.2664468586444855,
0.0958733931183815,
-0.17179787158966064,
-0.23352470993995667,
0.2672664523124695,
-0.12295099347829819,
-0.2064988762140274,
0.14070908725261688,
0.13450172543525696,
-0.3906632661819458,
0.08886944502592087,
-0.19367992877960205,
-0.036186959594488144,
0.020900502800941467,
-0.01516682654619217,
-0.06121893972158432,
-0.06644102185964584,
-0.01209566742181778,
-0.2940875291824341,
0.16736140847206116,
0.44181472063064575,
-0.575510561466217,
0.042852431535720825,
-0.02006002515554428,
-0.10716128349304199,
0.425009161233902,
0.2484571784734726,
-0.12049918621778488,
0.19895870983600616,
-0.1410643607378006,
0.08078466355800629,
0.3934568464756012,
-0.47798091173171997,
-0.29151952266693115,
0.8923336863517761,
0.0574704110622406,
0.5172370672225952,
0.11133310198783875,
-0.16239945590496063,
-0.3495943248271942,
0.29432976245880127,
0.37474316358566284,
0.2810593843460083,
0.15814179182052612,
0.20935402810573578,
-0.42846447229385376,
-0.20997942984104156,
0.1168096661567688,
0.17548276484012604,
0.0024511702358722687,
0.21198996901512146,
0.16728593409061432,
-0.12470931559801102,
0.46548697352409363,
0.12908807396888733,
-0.021187832579016685,
0.4665984511375427,
0.07007358223199844,
-0.011321231722831726,
0.1822868287563324,
0.2355288863182068,
-0.5699739456176758,
0.2422923743724823,
-0.353186696767807,
-0.24486681818962097,
-0.29094427824020386,
-0.1562376320362091,
-0.1942671537399292,
-0.05005544424057007,
-0.16266842186450958,
-0.07656124234199524,
0.11096365749835968,
0.36738231778144836,
0.05811520293354988,
0.20869940519332886,
0.024835195392370224,
0.493735134601593,
0.004856342449784279,
-0.03155742958188057,
-0.26760968565940857,
0.26460516452789307,
0.0966234877705574,
-0.09386979043483734,
0.10458607971668243,
-0.04825960099697113,
0.2818028926849365,
-0.19720470905303955,
-0.3327758312225342,
0.279530793428421,
0.036526817828416824,
0.26596370339393616,
-0.12725481390953064,
-0.15448693931102753,
-0.029938826337456703,
0.1675499826669693,
0.14740394055843353,
0.09585928916931152,
0.21312084794044495,
-0.0639682412147522,
-0.4033500850200653,
0.4964956045150757,
-0.267508327960968,
0.1624840945005417,
-0.20350833237171173,
-0.30087414383888245,
0.3311518430709839,
0.017040442675352097,
-0.15143528580665588,
-0.11405875533819199,
0.1137290745973587,
0.21258299052715302,
0.11771227419376373,
0.3921520709991455,
-0.48413172364234924,
0.007295653223991394,
0.4338069558143616,
-0.21364077925682068,
-0.04922715574502945,
-0.12464556843042374,
-0.050172023475170135,
-0.17919325828552246,
0.3040243089199066,
0.185703307390213,
0.3856220245361328,
0.24724699556827545,
0.2780143618583679,
0.06877949833869934,
-0.12882333993911743,
-0.22137406468391418,
0.014366872608661652,
0.22484099864959717,
0.0402095764875412,
0.3112909197807312,
0.020099051296710968,
0.002279951237142086,
-0.25426602363586426,
0.09012249112129211,
0.09588729590177536,
0.22183483839035034,
-0.3730548918247223,
0.20281679928302765,
-0.55129075050354,
0.013851430267095566,
-0.19041505455970764,
-0.20029045641422272,
-0.13253913819789886,
-0.3375953733921051,
-0.3206472396850586,
0.1449737250804901,
-0.09430413693189621,
-0.041106805205345154,
-0.26168540120124817,
0.12432035058736801,
0.10740505158901215,
-0.62494295835495,
-0.45077091455459595,
-0.16779455542564392,
-0.4074415862560272,
-0.08444271981716156,
0.3857674300670624,
0.20885564386844635,
-0.15773475170135498,
-0.22328893840312958,
-0.21856732666492462,
0.2964610755443573,
0.19261646270751953,
-0.008905045688152313,
0.0596245601773262,
0.35004809498786926,
-0.2425384819507599,
0.1646992564201355,
0.0057823546230793,
-0.01605566218495369,
0.15586736798286438,
-0.009156356565654278,
-0.24764610826969147,
-0.15253625810146332,
0.1652977466583252,
-0.1294085830450058,
-0.23401762545108795,
-0.33236241340637207,
-0.09667766839265823,
-0.5214059948921204,
0.32306015491485596,
0.09255604445934296,
0.1762116402387619,
0.14593270421028137,
0.11491535604000092,
0.16564494371414185,
0.3463287353515625,
0.16591176390647888,
-0.12034904211759567,
-0.5970844030380249,
0.3689182996749878,
-0.24494625627994537,
-0.19356364011764526,
-0.11533084511756897,
-0.24628996849060059,
0.19069497287273407,
-0.008194593712687492,
-0.4344508647918701,
0.09787900745868683,
-0.0659043937921524,
0.22379055619239807,
-0.052926674485206604,
-0.17931796610355377,
-0.02390885353088379,
-0.08753465116024017,
0.08936754614114761,
-0.20616212487220764,
-0.17826053500175476,
0.15160571038722992,
0.08937889337539673,
-0.13909417390823364,
0.1571885645389557,
0.45421579480171204,
-0.19583530724048615,
-0.058385059237480164,
0.05152824893593788,
0.2626791000366211,
0.290971577167511,
-0.11451362818479538,
0.24538585543632507,
-0.2096801996231079,
-0.17191293835639954,
-0.1279638558626175,
0.08395424485206604,
-0.09844236075878143,
0.16177329421043396,
0.1528988778591156,
-0.24629457294940948,
-0.2413356602191925,
-0.18254195153713226,
-0.656822919845581,
-0.18142294883728027,
-0.005589716136455536,
-0.3202100992202759,
-0.18439728021621704,
0.018438875675201416,
0.2604571282863617,
-0.16064561903476715,
0.14861848950386047,
0.05464360490441322,
0.297473669052124,
0.11971665918827057,
0.20463211834430695,
-0.3960880637168884,
0.11193729192018509,
-0.11787048727273941,
0.24808108806610107,
0.005096144042909145,
0.5360294580459595,
-0.003193974494934082,
-0.0907062441110611,
0.14104098081588745,
-0.21553254127502441,
0.7217608690261841,
-0.16258805990219116,
0.05606254190206528,
0.45939767360687256,
-0.2104516327381134,
-0.6044759750366211,
0.0068401917815208435,
0.16700825095176697,
0.163481667637825,
0.15119455754756927,
0.5760692358016968,
0.010013818740844727,
-0.12852796912193298,
-0.199859619140625,
0.22270208597183228,
-0.20243985950946808,
-0.3445548117160797,
-0.2850557863712311,
-0.2255185842514038,
-0.06808165460824966,
-0.18655729293823242,
-0.01301996223628521,
0.3293658494949341,
-0.07060129195451736,
-0.29556605219841003,
-0.06765270233154297,
-0.1669779121875763,
0.03569912165403366,
0.21972084045410156,
0.26520466804504395,
0.09674964100122452,
0.2483375072479248,
0.19769306480884552,
0.38740116357803345,
0.05574551224708557,
0.7442405223846436,
0.02215111255645752,
-0.07527551054954529,
0.0715954601764679,
-0.2758868932723999,
0.09052912890911102,
0.1520586609840393,
0.06058786064386368,
-0.14565959572792053,
0.0786779522895813,
-0.30975592136383057,
-0.007917880080640316,
0.17530210316181183,
0.09506867080926895,
-0.1101246252655983,
-0.24201136827468872,
-0.7129291296005249,
0.4532376825809479,
0.04256545379757881,
-0.1564187854528427,
0.22509713470935822,
-0.314547061920166,
-0.24959595501422882,
0.4461992383003235,
-0.20859691500663757,
0.6061732769012451,
-0.15666300058364868,
-0.12191739678382874,
0.35867613554000854,
-0.5138266682624817,
0.3590756356716156,
-0.27303314208984375,
0.0318363681435585,
-0.2504296898841858,
0.16733793914318085,
0.11540688574314117,
-0.16573502123355865,
0.38962459564208984,
0.27483442425727844,
0.1986050009727478,
0.05173221603035927,
-0.10322946310043335,
-0.15574897825717926,
-0.06028471887111664,
0.1018591970205307,
0.05972234159708023,
-0.10146069526672363,
-0.4556279480457306,
0.10696296393871307,
0.07534274458885193,
0.1735319048166275,
0.19548049569129944,
-0.2303793728351593,
-0.4078677296638489,
-0.04251899570226669,
-0.022688239812850952,
0.13747638463974,
0.1728813499212265,
-0.02934347838163376,
0.22740992903709412,
-0.44155335426330566,
-0.24593546986579895,
0.23020602762699127,
0.17787271738052368,
0.08191925287246704,
-0.22164836525917053,
-0.060138385742902756,
-0.16961556673049927,
0.1673530638217926,
-0.14272302389144897,
0.12135112285614014,
0.3365158140659332,
0.025261402130126953,
-0.3567972779273987,
-0.1456911861896515,
-0.37911495566368103,
-0.21542876958847046,
-0.0415683388710022,
0.058471567928791046,
-0.024526894092559814,
-0.07932896167039871,
-0.2772124707698822,
-0.1435740739107132,
0.4257153272628784,
-0.13877972960472107,
0.11398179829120636,
0.15977632999420166,
0.05687544122338295,
0.016552645713090897,
-0.30301472544670105,
-0.3575962781906128,
-0.1820593774318695,
0.5093300938606262,
0.1579972505569458,
0.19293631613254547,
0.20821057260036469,
0.051727574318647385,
-0.0917121171951294,
-0.12951228022575378,
0.22224277257919312,
0.43575263023376465,
0.04484778642654419,
-0.02967696636915207,
-0.19301387667655945,
-0.17349722981452942,
-0.18097087740898132,
-0.0118543840944767,
0.13120406866073608,
-0.04070050269365311,
0.26184797286987305,
-0.47149819135665894,
-0.5265726447105408,
-0.03309409320354462,
0.2197704017162323,
0.22014586627483368,
0.31547755002975464,
-0.0958251953125,
0.047110967338085175,
0.0677097737789154,
-0.21542978286743164,
0.07108258455991745,
-0.265773743391037,
-0.10031750798225403,
-0.0827963650226593,
0.09622743725776672,
0.17655304074287415,
-0.21771293878555298,
0.16637001931667328,
-0.005675528198480606,
0.036491118371486664,
-0.2181805670261383,
-0.20833350718021393,
0.10005585849285126,
0.05669660121202469,
-0.09008181095123291,
0.012907550670206547,
-0.16415482759475708,
-0.06938615441322327,
-0.09660550951957703,
0.22162257134914398,
0.3820699155330658,
0.0998723953962326,
0.34956294298171997,
-0.024878475815057755,
0.12121809273958206,
-0.19032777845859528,
0.21290600299835205,
-0.1822245717048645,
0.038529518991708755,
0.010642947629094124,
0.1102013885974884,
-0.03325848653912544,
0.06849268078804016,
-0.13725897669792175,
-0.2449645698070526,
-0.20538412034511566,
0.2365856170654297,
0.3251399099826813,
-0.4228181838989258,
0.13782836496829987,
0.2811325788497925,
0.18970689177513123,
0.23583592474460602,
-0.1883537918329239,
0.2029823362827301,
0.1614997386932373,
0.1202753335237503,
-0.14308062195777893,
-0.3692331314086914,
0.3591672480106354,
0.01825961098074913,
-0.047489412128925323,
0.16837820410728455,
0.16701962053775787,
-0.30886417627334595,
-0.05932968854904175,
-0.042409881949424744,
0.6978723406791687,
0.3786400556564331,
0.021902740001678467,
0.3855205178260803,
-0.08557263016700745,
0.07778576016426086,
-0.10935928672552109,
0.29708191752433777,
0.15544775128364563,
0.43132126331329346,
0.17803767323493958,
-0.23016701638698578,
-0.19477617740631104,
0.37139031291007996,
-0.34400510787963867,
-0.6303634643554688,
0.09000054746866226,
0.23044642806053162,
-0.3169172406196594,
0.14261728525161743,
0.15093384683132172,
0.21870118379592896,
-0.10499969869852066,
-0.012989329174160957,
0.045141346752643585,
0.002377033233642578,
-0.11669724434614182,
-0.1491565853357315,
-0.3154759407043457,
-0.2567765712738037,
-0.1229582130908966,
-0.004172287881374359,
-0.002565443515777588,
-0.12481231987476349,
-0.17708009481430054,
0.012987770140171051,
-0.26370447874069214,
-0.1881130486726761,
0.19694426655769348,
-0.06286247074604034,
-0.1170174703001976,
-0.24851134419441223,
0.12015005201101303,
-0.037689611315727234,
-0.186481773853302,
0.12389025092124939,
-0.052910901606082916,
0.20666256546974182,
0.3140786290168762,
0.19103668630123138,
-0.13717608153820038,
0.07811672985553741,
-0.1366894692182541,
-0.3925939202308655,
0.27610448002815247,
-0.09510670602321625,
0.03019079379737377,
0.343414306640625,
0.1417294144630432,
-0.07332893460988998,
0.4109914004802704,
0.21131999790668488,
0.28252267837524414,
-0.20496603846549988,
0.5985872745513916,
-0.2963593006134033,
-0.14777803421020508,
-0.023272361606359482,
-0.169569194316864,
-0.1603003591299057,
-0.4015321433544159,
-0.10544362664222717,
0.24352000653743744,
0.3292621672153473,
0.04410884529352188,
0.03935043513774872,
-0.04350447282195091,
0.23911897838115692,
0.17169950902462006,
0.111626997590065,
0.09292072057723999,
0.13991998136043549,
-0.52388596534729,
0.23166444897651672,
0.0432528592646122,
0.24007266759872437,
0.2969348132610321,
0.03336472064256668,
-0.02729303389787674,
-0.052347347140312195,
-0.27240878343582153,
0.41071417927742004,
0.027236182242631912,
0.07510995864868164,
-0.39709100127220154,
-0.28138452768325806,
-0.18267931044101715,
-0.05553693324327469,
0.03104386478662491,
-0.37132254242897034,
0.25876832008361816,
-0.3185615539550781,
0.07854069024324417,
0.1069905161857605,
-0.049984775483608246,
0.05643482878804207,
0.05782030150294304,
0.3877177834510803,
0.26081380248069763,
0.21906910836696625,
-0.06399135291576385,
0.037638984620571136,
-0.3323194086551666,
-0.1498623937368393,
-0.12460045516490936,
0.21963384747505188,
-0.20414668321609497,
0.4002670347690582,
-0.3165942430496216,
-0.07076209783554077,
-0.23043178021907806,
-0.02287115529179573,
-0.08583433926105499,
-0.1036146730184555,
-0.06213773041963577,
0.08615586906671524,
-0.25220057368278503,
0.06722668558359146,
0.2920839786529541,
0.027475574985146523,
0.031087668612599373,
0.10092348605394363,
-0.1776500642299652,
0.13351953029632568,
0.42405903339385986,
-0.3454294800758362,
-0.12810468673706055,
0.12736108899116516,
-0.02181798219680786,
0.06836385279893875,
-0.06323550641536713,
0.036552295088768005,
0.08193998783826828,
0.4876803755760193,
-0.2314940094947815,
0.031183745712041855,
-0.015322184190154076,
-0.004090910777449608,
0.04823056235909462,
-0.0944947600364685,
-0.3028230369091034,
0.160832941532135,
-0.13041910529136658,
0.06731218099594116,
-0.20159709453582764
] |
https://github.com/huggingface/datasets/issues/5088 | load_datasets("json", ...) don't read local .json.gz properly | Thanks @albertvillanova I updated `datasets` from `2.5.1` to `2.5.2` and tested copying the `json.gz` to a different directory and my mind was blown:
```python
fpath = '/data/junwang/.cache/general/57b6f2314cbe0bc45dda5b78f0871df2/test.json.gz'
ds_panda = DatasetDict(
test=Dataset.from_pandas(
pd.read_json(fpath, lines=True)
)
)
ds_direct = load_dataset(
'json', data_files={
'test': fpath
}, features=Features(
text_input=Value(dtype="string", id=None),
text_output=Value(dtype="string", id=None)
)
)
len(ds_panda['test']), len(ds_direct['test'])
```
produces
```python
Using custom data configuration default-0e6cf24134163e8b
Found cached dataset json (/data/junwang/.cache/huggingface/datasets/json/default-0e6cf24134163e8b/0.0.0/e6070c77f18f01a5ad4551a8b7edfba20b8438b7cad4d94e6ad9378022ce4aab)
(1, 0)
```
but then I ran below command to see if the same file in a different directory leads to same discrepancy
```shell
cp /data/junwang/.cache/general/57b6f2314cbe0bc45dda5b78f0871df2/test.json.gz tmp_test.json.gz
```
and so I ran
```python
fpath = 'tmp_test.json.gz'
ds_panda = DatasetDict(
test=Dataset.from_pandas(
pd.read_json(fpath, lines=True)
)
)
ds_direct = load_dataset(
'json', data_files={
'test': fpath
}, features=Features(
text_input=Value(dtype="string", id=None),
text_output=Value(dtype="string", id=None)
)
)
len(ds_panda['test']), len(ds_direct['test'])
```
and behold, I get
```python
Using custom data configuration default-f679b32ab0008520
Downloading and preparing dataset json/default to /data/junwang/.cache/huggingface/datasets/json/default-f679b32ab0008520/0.0.0/e6070c77f18f01a5ad4551a8b7edfba20b8438b7cad4d94e6ad9378022ce4aab...
Dataset json downloaded and prepared to /data/junwang/.cache/huggingface/datasets/json/default-f679b32ab0008520/0.0.0/e6070c77f18f01a5ad4551a8b7edfba20b8438b7cad4d94e6ad9378022ce4aab. Subsequent calls will reuse this data.
(1, 1)
```
They match now !
This problem happens regardless of the shell I use (VScode jupyter extension or plain old Python REPL).
I attached the `json.gz` here for reference: [test.json.gz](https://github.com/huggingface/datasets/files/9734843/test.json.gz)
| ## Describe the bug
I have a local file `*.json.gz` and it can be read by `pandas.read_json(lines=True)`, but cannot be read by `load_datasets("json")` (resulting in 0 lines)
## Steps to reproduce the bug
```python
fpath = '/data/junwang/.cache/general/57b6f2314cbe0bc45dda5b78f0871df2/test.json.gz'
ds_panda = DatasetDict(
test=Dataset.from_pandas(
pd.read_json(fpath, lines=True)
)
)
ds_direct = load_dataset(
'json', data_files={
'test': fpath
}, features=Features(
text_input=Value(dtype="string", id=None),
text_output=Value(dtype="string", id=None)
)
)
len(ds_panda['test']), len(ds_direct['test'])
```
## Expected results
Lines of `ds_panda['test']` and `ds_direct['test']` should match.
## Actual results
```
Using custom data configuration default-c0ef2598760968aa
Downloading and preparing dataset json/default to /data/junwang/.cache/huggingface/datasets/json/default-c0ef2598760968aa/0.0.0/e6070c77f18f01a5ad4551a8b7edfba20b8438b7cad4d94e6ad9378022ce4aab...
Dataset json downloaded and prepared to /data/junwang/.cache/huggingface/datasets/json/default-c0ef2598760968aa/0.0.0/e6070c77f18f01a5ad4551a8b7edfba20b8438b7cad4d94e6ad9378022ce4aab. Subsequent calls will reuse this data.
(62087, 0)
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version:
- Platform: Ubuntu 18.04.4 LTS
- Python version: 3.8.13
- PyArrow version: 9.0.0
| 189 | load_datasets("json", ...) don't read local .json.gz properly
## Describe the bug
I have a local file `*.json.gz` and it can be read by `pandas.read_json(lines=True)`, but cannot be read by `load_datasets("json")` (resulting in 0 lines)
## Steps to reproduce the bug
```python
fpath = '/data/junwang/.cache/general/57b6f2314cbe0bc45dda5b78f0871df2/test.json.gz'
ds_panda = DatasetDict(
test=Dataset.from_pandas(
pd.read_json(fpath, lines=True)
)
)
ds_direct = load_dataset(
'json', data_files={
'test': fpath
}, features=Features(
text_input=Value(dtype="string", id=None),
text_output=Value(dtype="string", id=None)
)
)
len(ds_panda['test']), len(ds_direct['test'])
```
## Expected results
Lines of `ds_panda['test']` and `ds_direct['test']` should match.
## Actual results
```
Using custom data configuration default-c0ef2598760968aa
Downloading and preparing dataset json/default to /data/junwang/.cache/huggingface/datasets/json/default-c0ef2598760968aa/0.0.0/e6070c77f18f01a5ad4551a8b7edfba20b8438b7cad4d94e6ad9378022ce4aab...
Dataset json downloaded and prepared to /data/junwang/.cache/huggingface/datasets/json/default-c0ef2598760968aa/0.0.0/e6070c77f18f01a5ad4551a8b7edfba20b8438b7cad4d94e6ad9378022ce4aab. Subsequent calls will reuse this data.
(62087, 0)
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version:
- Platform: Ubuntu 18.04.4 LTS
- Python version: 3.8.13
- PyArrow version: 9.0.0
Thanks @albertvillanova I updated `datasets` from `2.5.1` to `2.5.2` and tested copying the `json.gz` to a different directory and my mind was blown:
```python
fpath = '/data/junwang/.cache/general/57b6f2314cbe0bc45dda5b78f0871df2/test.json.gz'
ds_panda = DatasetDict(
test=Dataset.from_pandas(
pd.read_json(fpath, lines=True)
)
)
ds_direct = load_dataset(
'json', data_files={
'test': fpath
}, features=Features(
text_input=Value(dtype="string", id=None),
text_output=Value(dtype="string", id=None)
)
)
len(ds_panda['test']), len(ds_direct['test'])
```
produces
```python
Using custom data configuration default-0e6cf24134163e8b
Found cached dataset json (/data/junwang/.cache/huggingface/datasets/json/default-0e6cf24134163e8b/0.0.0/e6070c77f18f01a5ad4551a8b7edfba20b8438b7cad4d94e6ad9378022ce4aab)
(1, 0)
```
but then I ran below command to see if the same file in a different directory leads to same discrepancy
```shell
cp /data/junwang/.cache/general/57b6f2314cbe0bc45dda5b78f0871df2/test.json.gz tmp_test.json.gz
```
and so I ran
```python
fpath = 'tmp_test.json.gz'
ds_panda = DatasetDict(
test=Dataset.from_pandas(
pd.read_json(fpath, lines=True)
)
)
ds_direct = load_dataset(
'json', data_files={
'test': fpath
}, features=Features(
text_input=Value(dtype="string", id=None),
text_output=Value(dtype="string", id=None)
)
)
len(ds_panda['test']), len(ds_direct['test'])
```
and behold, I get
```python
Using custom data configuration default-f679b32ab0008520
Downloading and preparing dataset json/default to /data/junwang/.cache/huggingface/datasets/json/default-f679b32ab0008520/0.0.0/e6070c77f18f01a5ad4551a8b7edfba20b8438b7cad4d94e6ad9378022ce4aab...
Dataset json downloaded and prepared to /data/junwang/.cache/huggingface/datasets/json/default-f679b32ab0008520/0.0.0/e6070c77f18f01a5ad4551a8b7edfba20b8438b7cad4d94e6ad9378022ce4aab. Subsequent calls will reuse this data.
(1, 1)
```
They match now !
This problem happens regardless of the shell I use (VScode jupyter extension or plain old Python REPL).
I attached the `json.gz` here for reference: [test.json.gz](https://github.com/huggingface/datasets/files/9734843/test.json.gz)
| [
-0.003829054534435272,
-0.047457046806812286,
-0.05098037049174309,
0.4958299398422241,
0.2805570960044861,
0.06093590706586838,
0.3618413209915161,
0.34863904118537903,
0.5576652884483337,
0.03365106135606766,
-0.1139461100101471,
0.4106937646865845,
0.14960357546806335,
-0.038502249866724014,
-0.04585804045200348,
-0.052276529371738434,
0.04582826420664787,
0.13454589247703552,
0.18831588327884674,
-0.26813679933547974,
-0.295661985874176,
0.3107275068759918,
-0.037511248141527176,
0.05337155610322952,
-0.029809381812810898,
-0.0235630851238966,
-0.05392635613679886,
0.32063838839530945,
0.03802972286939621,
-0.2531926929950714,
0.27721208333969116,
0.08087223768234253,
0.04866950958967209,
0.5948470830917358,
-0.00011657576396828517,
0.20776455104351044,
0.4393162131309509,
-0.12780214846134186,
-0.06946559995412827,
-0.1689596027135849,
-0.4169912040233612,
-0.4438118636608124,
0.27859625220298767,
-0.20925825834274292,
0.09493755549192429,
-0.3522743284702301,
-0.2979210615158081,
-0.7535613179206848,
0.4676865339279175,
0.15837593376636505,
0.15167544782161713,
0.01030733808875084,
-0.020857732743024826,
0.1251136213541031,
0.127682626247406,
0.18863242864608765,
0.014025000855326653,
0.5332828760147095,
0.01776992529630661,
0.07427212595939636,
-0.07273315638303757,
-0.04155047610402107,
-0.3858986794948578,
-0.0990327000617981,
0.09130209684371948,
0.13968829810619354,
0.13521894812583923,
0.09227973222732544,
0.1889893114566803,
0.27084076404571533,
0.7185280323028564,
-0.3609732687473297,
-0.5663487911224365,
-0.45188578963279724,
-0.20285193622112274,
0.24929900467395782,
0.17590411007404327,
0.21617266535758972,
-0.12390433251857758,
0.2884554862976074,
-0.13084669411182404,
0.08400791883468628,
-0.05904466658830643,
0.06193971633911133,
-0.15046127140522003,
-0.051902249455451965,
-0.024855222553014755,
-0.020658642053604126,
-0.21795843541622162,
0.044491518288850784,
0.28763940930366516,
-0.39719799160957336,
-0.1644202172756195,
0.2165779024362564,
-0.047132235020399094,
0.13429683446884155,
0.19526627659797668,
-0.3975170850753784,
0.17803826928138733,
0.03551435470581055,
0.45708271861076355,
0.24525058269500732,
-0.1872396320104599,
0.20232391357421875,
0.42253363132476807,
0.43971335887908936,
0.24769380688667297,
0.10947348922491074,
0.22683317959308624,
-0.056495197117328644,
-0.1611114889383316,
-0.04681038856506348,
-0.011012245900928974,
-0.2995707094669342,
0.12202967703342438,
-0.1886376142501831,
0.1738482564687729,
-0.2851097285747528,
0.054435402154922485,
0.24039247632026672,
-0.4047977030277252,
-0.05306227132678032,
0.037031207233667374,
0.15711209177970886,
-0.10370049625635147,
0.556236743927002,
0.08917529881000519,
0.3383234739303589,
0.01593373902142048,
0.14085933566093445,
-0.2845539152622223,
-0.21981360018253326,
0.17374533414840698,
0.02635500207543373,
0.18395927548408508,
-0.02000316232442856,
0.45643365383148193,
0.037693917751312256,
-0.1776365339756012,
-0.2572305202484131,
-0.0714314728975296,
-0.190030038356781,
-0.02214892953634262,
0.3195631206035614,
0.15790311992168427,
0.2664468586444855,
0.0958733931183815,
-0.17179787158966064,
-0.23352470993995667,
0.2672664523124695,
-0.12295099347829819,
-0.2064988762140274,
0.14070908725261688,
0.13450172543525696,
-0.3906632661819458,
0.08886944502592087,
-0.19367992877960205,
-0.036186959594488144,
0.020900502800941467,
-0.01516682654619217,
-0.06121893972158432,
-0.06644102185964584,
-0.01209566742181778,
-0.2940875291824341,
0.16736140847206116,
0.44181472063064575,
-0.575510561466217,
0.042852431535720825,
-0.02006002515554428,
-0.10716128349304199,
0.425009161233902,
0.2484571784734726,
-0.12049918621778488,
0.19895870983600616,
-0.1410643607378006,
0.08078466355800629,
0.3934568464756012,
-0.47798091173171997,
-0.29151952266693115,
0.8923336863517761,
0.0574704110622406,
0.5172370672225952,
0.11133310198783875,
-0.16239945590496063,
-0.3495943248271942,
0.29432976245880127,
0.37474316358566284,
0.2810593843460083,
0.15814179182052612,
0.20935402810573578,
-0.42846447229385376,
-0.20997942984104156,
0.1168096661567688,
0.17548276484012604,
0.0024511702358722687,
0.21198996901512146,
0.16728593409061432,
-0.12470931559801102,
0.46548697352409363,
0.12908807396888733,
-0.021187832579016685,
0.4665984511375427,
0.07007358223199844,
-0.011321231722831726,
0.1822868287563324,
0.2355288863182068,
-0.5699739456176758,
0.2422923743724823,
-0.353186696767807,
-0.24486681818962097,
-0.29094427824020386,
-0.1562376320362091,
-0.1942671537399292,
-0.05005544424057007,
-0.16266842186450958,
-0.07656124234199524,
0.11096365749835968,
0.36738231778144836,
0.05811520293354988,
0.20869940519332886,
0.024835195392370224,
0.493735134601593,
0.004856342449784279,
-0.03155742958188057,
-0.26760968565940857,
0.26460516452789307,
0.0966234877705574,
-0.09386979043483734,
0.10458607971668243,
-0.04825960099697113,
0.2818028926849365,
-0.19720470905303955,
-0.3327758312225342,
0.279530793428421,
0.036526817828416824,
0.26596370339393616,
-0.12725481390953064,
-0.15448693931102753,
-0.029938826337456703,
0.1675499826669693,
0.14740394055843353,
0.09585928916931152,
0.21312084794044495,
-0.0639682412147522,
-0.4033500850200653,
0.4964956045150757,
-0.267508327960968,
0.1624840945005417,
-0.20350833237171173,
-0.30087414383888245,
0.3311518430709839,
0.017040442675352097,
-0.15143528580665588,
-0.11405875533819199,
0.1137290745973587,
0.21258299052715302,
0.11771227419376373,
0.3921520709991455,
-0.48413172364234924,
0.007295653223991394,
0.4338069558143616,
-0.21364077925682068,
-0.04922715574502945,
-0.12464556843042374,
-0.050172023475170135,
-0.17919325828552246,
0.3040243089199066,
0.185703307390213,
0.3856220245361328,
0.24724699556827545,
0.2780143618583679,
0.06877949833869934,
-0.12882333993911743,
-0.22137406468391418,
0.014366872608661652,
0.22484099864959717,
0.0402095764875412,
0.3112909197807312,
0.020099051296710968,
0.002279951237142086,
-0.25426602363586426,
0.09012249112129211,
0.09588729590177536,
0.22183483839035034,
-0.3730548918247223,
0.20281679928302765,
-0.55129075050354,
0.013851430267095566,
-0.19041505455970764,
-0.20029045641422272,
-0.13253913819789886,
-0.3375953733921051,
-0.3206472396850586,
0.1449737250804901,
-0.09430413693189621,
-0.041106805205345154,
-0.26168540120124817,
0.12432035058736801,
0.10740505158901215,
-0.62494295835495,
-0.45077091455459595,
-0.16779455542564392,
-0.4074415862560272,
-0.08444271981716156,
0.3857674300670624,
0.20885564386844635,
-0.15773475170135498,
-0.22328893840312958,
-0.21856732666492462,
0.2964610755443573,
0.19261646270751953,
-0.008905045688152313,
0.0596245601773262,
0.35004809498786926,
-0.2425384819507599,
0.1646992564201355,
0.0057823546230793,
-0.01605566218495369,
0.15586736798286438,
-0.009156356565654278,
-0.24764610826969147,
-0.15253625810146332,
0.1652977466583252,
-0.1294085830450058,
-0.23401762545108795,
-0.33236241340637207,
-0.09667766839265823,
-0.5214059948921204,
0.32306015491485596,
0.09255604445934296,
0.1762116402387619,
0.14593270421028137,
0.11491535604000092,
0.16564494371414185,
0.3463287353515625,
0.16591176390647888,
-0.12034904211759567,
-0.5970844030380249,
0.3689182996749878,
-0.24494625627994537,
-0.19356364011764526,
-0.11533084511756897,
-0.24628996849060059,
0.19069497287273407,
-0.008194593712687492,
-0.4344508647918701,
0.09787900745868683,
-0.0659043937921524,
0.22379055619239807,
-0.052926674485206604,
-0.17931796610355377,
-0.02390885353088379,
-0.08753465116024017,
0.08936754614114761,
-0.20616212487220764,
-0.17826053500175476,
0.15160571038722992,
0.08937889337539673,
-0.13909417390823364,
0.1571885645389557,
0.45421579480171204,
-0.19583530724048615,
-0.058385059237480164,
0.05152824893593788,
0.2626791000366211,
0.290971577167511,
-0.11451362818479538,
0.24538585543632507,
-0.2096801996231079,
-0.17191293835639954,
-0.1279638558626175,
0.08395424485206604,
-0.09844236075878143,
0.16177329421043396,
0.1528988778591156,
-0.24629457294940948,
-0.2413356602191925,
-0.18254195153713226,
-0.656822919845581,
-0.18142294883728027,
-0.005589716136455536,
-0.3202100992202759,
-0.18439728021621704,
0.018438875675201416,
0.2604571282863617,
-0.16064561903476715,
0.14861848950386047,
0.05464360490441322,
0.297473669052124,
0.11971665918827057,
0.20463211834430695,
-0.3960880637168884,
0.11193729192018509,
-0.11787048727273941,
0.24808108806610107,
0.005096144042909145,
0.5360294580459595,
-0.003193974494934082,
-0.0907062441110611,
0.14104098081588745,
-0.21553254127502441,
0.7217608690261841,
-0.16258805990219116,
0.05606254190206528,
0.45939767360687256,
-0.2104516327381134,
-0.6044759750366211,
0.0068401917815208435,
0.16700825095176697,
0.163481667637825,
0.15119455754756927,
0.5760692358016968,
0.010013818740844727,
-0.12852796912193298,
-0.199859619140625,
0.22270208597183228,
-0.20243985950946808,
-0.3445548117160797,
-0.2850557863712311,
-0.2255185842514038,
-0.06808165460824966,
-0.18655729293823242,
-0.01301996223628521,
0.3293658494949341,
-0.07060129195451736,
-0.29556605219841003,
-0.06765270233154297,
-0.1669779121875763,
0.03569912165403366,
0.21972084045410156,
0.26520466804504395,
0.09674964100122452,
0.2483375072479248,
0.19769306480884552,
0.38740116357803345,
0.05574551224708557,
0.7442405223846436,
0.02215111255645752,
-0.07527551054954529,
0.0715954601764679,
-0.2758868932723999,
0.09052912890911102,
0.1520586609840393,
0.06058786064386368,
-0.14565959572792053,
0.0786779522895813,
-0.30975592136383057,
-0.007917880080640316,
0.17530210316181183,
0.09506867080926895,
-0.1101246252655983,
-0.24201136827468872,
-0.7129291296005249,
0.4532376825809479,
0.04256545379757881,
-0.1564187854528427,
0.22509713470935822,
-0.314547061920166,
-0.24959595501422882,
0.4461992383003235,
-0.20859691500663757,
0.6061732769012451,
-0.15666300058364868,
-0.12191739678382874,
0.35867613554000854,
-0.5138266682624817,
0.3590756356716156,
-0.27303314208984375,
0.0318363681435585,
-0.2504296898841858,
0.16733793914318085,
0.11540688574314117,
-0.16573502123355865,
0.38962459564208984,
0.27483442425727844,
0.1986050009727478,
0.05173221603035927,
-0.10322946310043335,
-0.15574897825717926,
-0.06028471887111664,
0.1018591970205307,
0.05972234159708023,
-0.10146069526672363,
-0.4556279480457306,
0.10696296393871307,
0.07534274458885193,
0.1735319048166275,
0.19548049569129944,
-0.2303793728351593,
-0.4078677296638489,
-0.04251899570226669,
-0.022688239812850952,
0.13747638463974,
0.1728813499212265,
-0.02934347838163376,
0.22740992903709412,
-0.44155335426330566,
-0.24593546986579895,
0.23020602762699127,
0.17787271738052368,
0.08191925287246704,
-0.22164836525917053,
-0.060138385742902756,
-0.16961556673049927,
0.1673530638217926,
-0.14272302389144897,
0.12135112285614014,
0.3365158140659332,
0.025261402130126953,
-0.3567972779273987,
-0.1456911861896515,
-0.37911495566368103,
-0.21542876958847046,
-0.0415683388710022,
0.058471567928791046,
-0.024526894092559814,
-0.07932896167039871,
-0.2772124707698822,
-0.1435740739107132,
0.4257153272628784,
-0.13877972960472107,
0.11398179829120636,
0.15977632999420166,
0.05687544122338295,
0.016552645713090897,
-0.30301472544670105,
-0.3575962781906128,
-0.1820593774318695,
0.5093300938606262,
0.1579972505569458,
0.19293631613254547,
0.20821057260036469,
0.051727574318647385,
-0.0917121171951294,
-0.12951228022575378,
0.22224277257919312,
0.43575263023376465,
0.04484778642654419,
-0.02967696636915207,
-0.19301387667655945,
-0.17349722981452942,
-0.18097087740898132,
-0.0118543840944767,
0.13120406866073608,
-0.04070050269365311,
0.26184797286987305,
-0.47149819135665894,
-0.5265726447105408,
-0.03309409320354462,
0.2197704017162323,
0.22014586627483368,
0.31547755002975464,
-0.0958251953125,
0.047110967338085175,
0.0677097737789154,
-0.21542978286743164,
0.07108258455991745,
-0.265773743391037,
-0.10031750798225403,
-0.0827963650226593,
0.09622743725776672,
0.17655304074287415,
-0.21771293878555298,
0.16637001931667328,
-0.005675528198480606,
0.036491118371486664,
-0.2181805670261383,
-0.20833350718021393,
0.10005585849285126,
0.05669660121202469,
-0.09008181095123291,
0.012907550670206547,
-0.16415482759475708,
-0.06938615441322327,
-0.09660550951957703,
0.22162257134914398,
0.3820699155330658,
0.0998723953962326,
0.34956294298171997,
-0.024878475815057755,
0.12121809273958206,
-0.19032777845859528,
0.21290600299835205,
-0.1822245717048645,
0.038529518991708755,
0.010642947629094124,
0.1102013885974884,
-0.03325848653912544,
0.06849268078804016,
-0.13725897669792175,
-0.2449645698070526,
-0.20538412034511566,
0.2365856170654297,
0.3251399099826813,
-0.4228181838989258,
0.13782836496829987,
0.2811325788497925,
0.18970689177513123,
0.23583592474460602,
-0.1883537918329239,
0.2029823362827301,
0.1614997386932373,
0.1202753335237503,
-0.14308062195777893,
-0.3692331314086914,
0.3591672480106354,
0.01825961098074913,
-0.047489412128925323,
0.16837820410728455,
0.16701962053775787,
-0.30886417627334595,
-0.05932968854904175,
-0.042409881949424744,
0.6978723406791687,
0.3786400556564331,
0.021902740001678467,
0.3855205178260803,
-0.08557263016700745,
0.07778576016426086,
-0.10935928672552109,
0.29708191752433777,
0.15544775128364563,
0.43132126331329346,
0.17803767323493958,
-0.23016701638698578,
-0.19477617740631104,
0.37139031291007996,
-0.34400510787963867,
-0.6303634643554688,
0.09000054746866226,
0.23044642806053162,
-0.3169172406196594,
0.14261728525161743,
0.15093384683132172,
0.21870118379592896,
-0.10499969869852066,
-0.012989329174160957,
0.045141346752643585,
0.002377033233642578,
-0.11669724434614182,
-0.1491565853357315,
-0.3154759407043457,
-0.2567765712738037,
-0.1229582130908966,
-0.004172287881374359,
-0.002565443515777588,
-0.12481231987476349,
-0.17708009481430054,
0.012987770140171051,
-0.26370447874069214,
-0.1881130486726761,
0.19694426655769348,
-0.06286247074604034,
-0.1170174703001976,
-0.24851134419441223,
0.12015005201101303,
-0.037689611315727234,
-0.186481773853302,
0.12389025092124939,
-0.052910901606082916,
0.20666256546974182,
0.3140786290168762,
0.19103668630123138,
-0.13717608153820038,
0.07811672985553741,
-0.1366894692182541,
-0.3925939202308655,
0.27610448002815247,
-0.09510670602321625,
0.03019079379737377,
0.343414306640625,
0.1417294144630432,
-0.07332893460988998,
0.4109914004802704,
0.21131999790668488,
0.28252267837524414,
-0.20496603846549988,
0.5985872745513916,
-0.2963593006134033,
-0.14777803421020508,
-0.023272361606359482,
-0.169569194316864,
-0.1603003591299057,
-0.4015321433544159,
-0.10544362664222717,
0.24352000653743744,
0.3292621672153473,
0.04410884529352188,
0.03935043513774872,
-0.04350447282195091,
0.23911897838115692,
0.17169950902462006,
0.111626997590065,
0.09292072057723999,
0.13991998136043549,
-0.52388596534729,
0.23166444897651672,
0.0432528592646122,
0.24007266759872437,
0.2969348132610321,
0.03336472064256668,
-0.02729303389787674,
-0.052347347140312195,
-0.27240878343582153,
0.41071417927742004,
0.027236182242631912,
0.07510995864868164,
-0.39709100127220154,
-0.28138452768325806,
-0.18267931044101715,
-0.05553693324327469,
0.03104386478662491,
-0.37132254242897034,
0.25876832008361816,
-0.3185615539550781,
0.07854069024324417,
0.1069905161857605,
-0.049984775483608246,
0.05643482878804207,
0.05782030150294304,
0.3877177834510803,
0.26081380248069763,
0.21906910836696625,
-0.06399135291576385,
0.037638984620571136,
-0.3323194086551666,
-0.1498623937368393,
-0.12460045516490936,
0.21963384747505188,
-0.20414668321609497,
0.4002670347690582,
-0.3165942430496216,
-0.07076209783554077,
-0.23043178021907806,
-0.02287115529179573,
-0.08583433926105499,
-0.1036146730184555,
-0.06213773041963577,
0.08615586906671524,
-0.25220057368278503,
0.06722668558359146,
0.2920839786529541,
0.027475574985146523,
0.031087668612599373,
0.10092348605394363,
-0.1776500642299652,
0.13351953029632568,
0.42405903339385986,
-0.3454294800758362,
-0.12810468673706055,
0.12736108899116516,
-0.02181798219680786,
0.06836385279893875,
-0.06323550641536713,
0.036552295088768005,
0.08193998783826828,
0.4876803755760193,
-0.2314940094947815,
0.031183745712041855,
-0.015322184190154076,
-0.004090910777449608,
0.04823056235909462,
-0.0944947600364685,
-0.3028230369091034,
0.160832941532135,
-0.13041910529136658,
0.06731218099594116,
-0.20159709453582764
] |
https://github.com/huggingface/datasets/issues/5086 | HTTPError: 404 Client Error: Not Found for url | Hi @km5ar, thanks for reporting.
This should be fixed in the notebook:
- the filename `datasets-issues-with-hf-doc-builder.jsonl` no longer exists on the repo; instead, current filename is `datasets-issues-with-comments.jsonl`
- see: https://huggingface.co/datasets/lewtun/github-issues/tree/main
Anyway, depending on your version of `datasets`, you can now use:
```python
from datasets import load_dataset
issues_dataset = load_dataset("lewtun/github-issues")
issues_dataset
```
instead of:
```python
from huggingface_hub import hf_hub_url
data_files = hf_hub_url(
repo_id="lewtun/github-issues",
filename="datasets-issues-with-hf-doc-builder.jsonl",
repo_type="dataset",
)
from datasets import load_dataset
issues_dataset = load_dataset("json", data_files=data_files, split="train")
issues_dataset
```
Output:
```python
In [25]: ds = load_dataset("lewtun/github-issues")
Downloading: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 10.5k/10.5k [00:00<00:00, 5.75MB/s]
Using custom data configuration lewtun--github-issues-cff5093ecc410ea2
Downloading and preparing dataset json/lewtun--github-issues to .../.cache/huggingface/datasets/lewtun___json/lewtun--github-issues-cff5093ecc410ea2/0.0.0/e6070c77f18f01a5ad4551a8b7edfba20b8438b7cad4d94e6ad9378022ce4aab...
Downloading data: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 12.2M/12.2M [00:00<00:00, 26.5MB/s]
Downloading data files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:02<00:00, 2.70s/it]
Extracting data files: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 1589.96it/s]
Dataset json downloaded and prepared to .../.cache/huggingface/datasets/lewtun___json/lewtun--github-issues-cff5093ecc410ea2/0.0.0/e6070c77f18f01a5ad4551a8b7edfba20b8438b7cad4d94e6ad9378022ce4aab. Subsequent calls will reuse this data.
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 133.95it/s]
In [26]: ds
Out[26]:
DatasetDict({
train: Dataset({
features: ['url', 'repository_url', 'labels_url', 'comments_url', 'events_url', 'html_url', 'id', 'node_id', 'number', 'title', 'user', 'labels', 'state', 'locked', 'assignee', 'assignees', 'milestone', 'comments', 'created_at', 'updated_at', 'closed_at', 'author_association', 'active_lock_reason', 'pull_request', 'body', 'timeline_url', 'performed_via_github_app', 'is_pull_request'],
num_rows: 3019
})
})
``` | ## Describe the bug
I was following chap 5 from huggingface course: https://huggingface.co/course/chapter5/6?fw=tf
However, I'm not able to download the datasets, with a 404 erros
<img width="1160" alt="iShot2022-10-06_15 54 50" src="https://user-images.githubusercontent.com/54015474/194406327-ae62c2f3-1da5-4686-8631-13d879a0edee.png">
## Steps to reproduce the bug
```python
from huggingface_hub import hf_hub_url
data_files = hf_hub_url(
repo_id="lewtun/github-issues",
filename="datasets-issues-with-hf-doc-builder.jsonl",
repo_type="dataset",
)
from datasets import load_dataset
issues_dataset = load_dataset("json", data_files=data_files, split="train")
issues_dataset
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.5.2
- Platform: macOS-10.16-x86_64-i386-64bit
- Python version: 3.9.12
- PyArrow version: 9.0.0
- Pandas version: 1.4.4
| 178 | HTTPError: 404 Client Error: Not Found for url
## Describe the bug
I was following chap 5 from huggingface course: https://huggingface.co/course/chapter5/6?fw=tf
However, I'm not able to download the datasets, with a 404 erros
<img width="1160" alt="iShot2022-10-06_15 54 50" src="https://user-images.githubusercontent.com/54015474/194406327-ae62c2f3-1da5-4686-8631-13d879a0edee.png">
## Steps to reproduce the bug
```python
from huggingface_hub import hf_hub_url
data_files = hf_hub_url(
repo_id="lewtun/github-issues",
filename="datasets-issues-with-hf-doc-builder.jsonl",
repo_type="dataset",
)
from datasets import load_dataset
issues_dataset = load_dataset("json", data_files=data_files, split="train")
issues_dataset
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.5.2
- Platform: macOS-10.16-x86_64-i386-64bit
- Python version: 3.9.12
- PyArrow version: 9.0.0
- Pandas version: 1.4.4
Hi @km5ar, thanks for reporting.
This should be fixed in the notebook:
- the filename `datasets-issues-with-hf-doc-builder.jsonl` no longer exists on the repo; instead, current filename is `datasets-issues-with-comments.jsonl`
- see: https://huggingface.co/datasets/lewtun/github-issues/tree/main
Anyway, depending on your version of `datasets`, you can now use:
```python
from datasets import load_dataset
issues_dataset = load_dataset("lewtun/github-issues")
issues_dataset
```
instead of:
```python
from huggingface_hub import hf_hub_url
data_files = hf_hub_url(
repo_id="lewtun/github-issues",
filename="datasets-issues-with-hf-doc-builder.jsonl",
repo_type="dataset",
)
from datasets import load_dataset
issues_dataset = load_dataset("json", data_files=data_files, split="train")
issues_dataset
```
Output:
```python
In [25]: ds = load_dataset("lewtun/github-issues")
Downloading: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 10.5k/10.5k [00:00<00:00, 5.75MB/s]
Using custom data configuration lewtun--github-issues-cff5093ecc410ea2
Downloading and preparing dataset json/lewtun--github-issues to .../.cache/huggingface/datasets/lewtun___json/lewtun--github-issues-cff5093ecc410ea2/0.0.0/e6070c77f18f01a5ad4551a8b7edfba20b8438b7cad4d94e6ad9378022ce4aab...
Downloading data: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 12.2M/12.2M [00:00<00:00, 26.5MB/s]
Downloading data files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:02<00:00, 2.70s/it]
Extracting data files: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 1589.96it/s]
Dataset json downloaded and prepared to .../.cache/huggingface/datasets/lewtun___json/lewtun--github-issues-cff5093ecc410ea2/0.0.0/e6070c77f18f01a5ad4551a8b7edfba20b8438b7cad4d94e6ad9378022ce4aab. Subsequent calls will reuse this data.
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 133.95it/s]
In [26]: ds
Out[26]:
DatasetDict({
train: Dataset({
features: ['url', 'repository_url', 'labels_url', 'comments_url', 'events_url', 'html_url', 'id', 'node_id', 'number', 'title', 'user', 'labels', 'state', 'locked', 'assignee', 'assignees', 'milestone', 'comments', 'created_at', 'updated_at', 'closed_at', 'author_association', 'active_lock_reason', 'pull_request', 'body', 'timeline_url', 'performed_via_github_app', 'is_pull_request'],
num_rows: 3019
})
})
``` | [
0.041061293333768845,
-0.10149156302213669,
0.0027762483805418015,
0.39377039670944214,
0.128495991230011,
0.21601170301437378,
0.03236088156700134,
0.2607898414134979,
0.05805240944027901,
0.1501384973526001,
-0.27367040514945984,
0.06521695852279663,
-0.042441993951797485,
-0.14198367297649384,
0.06076059862971306,
-0.20839980244636536,
-0.10240399092435837,
0.08647032827138901,
-0.09914498031139374,
-0.06672047078609467,
-0.1601702868938446,
0.24104516208171844,
-0.03696778044104576,
0.21904338896274567,
-0.20866669714450836,
0.0427367277443409,
-0.16203048825263977,
0.4426603317260742,
-0.3722955584526062,
-0.20636476576328278,
0.39270177483558655,
0.06768448650836945,
0.1734500676393509,
0.5535292029380798,
-0.00011435223859734833,
0.18940822780132294,
0.20434536039829254,
0.055502429604530334,
-0.3043462932109833,
-0.522354781627655,
-0.26301103830337524,
0.06706943362951279,
-0.075662761926651,
-0.14572077989578247,
0.02826336771249771,
0.0736980065703392,
0.07153429090976715,
0.30190587043762207,
0.4470563530921936,
0.4263039529323578,
0.2028706669807434,
0.37039652466773987,
0.20111168920993805,
-0.019806910306215286,
0.2994369566440582,
0.10110604017972946,
-0.1270696222782135,
0.33940446376800537,
-0.15505161881446838,
0.08117850869894028,
0.17528213560581207,
0.3812660574913025,
0.10114742815494537,
0.018247291445732117,
0.24386125802993774,
-0.026623360812664032,
-0.11514665931463242,
-0.22479498386383057,
-0.012626484036445618,
0.21522262692451477,
0.2771313786506653,
-0.05480793118476868,
-0.29096662998199463,
0.002155713737010956,
0.05687210336327553,
-0.07600851356983185,
0.18952441215515137,
0.18845196068286896,
-0.06615470349788666,
0.23787668347358704,
-0.3688909709453583,
-0.46476879715919495,
-0.22681336104869843,
0.20116561651229858,
0.09163033962249756,
-0.13354088366031647,
-0.10194177180528641,
0.028092212975025177,
-0.15703696012496948,
-0.039588235318660736,
-0.22287800908088684,
-0.11595042049884796,
0.18607909977436066,
0.3161287307739258,
-0.046728771179914474,
-0.08046361804008484,
0.24048683047294617,
0.014010846614837646,
0.4276411533355713,
-0.04248673468828201,
-0.041213780641555786,
-0.20928800106048584,
-0.39367803931236267,
0.1278550624847412,
-0.01274358481168747,
0.02282402664422989,
-0.1194567009806633,
-0.004564070142805576,
0.3952367305755615,
0.7632431387901306,
0.2377704381942749,
0.08454792201519012,
-0.09318367391824722,
-0.08027739822864532,
-0.40212833881378174,
-0.14244896173477173,
0.45100468397140503,
-0.19081930816173553,
-0.14896366000175476,
0.1409427672624588,
-0.37509655952453613,
0.010672315955162048,
-0.03579546883702278,
0.3920968770980835,
-0.17632445693016052,
0.012710025534033775,
0.24048490822315216,
0.05752094089984894,
-0.2149827927350998,
-0.007557984441518784,
-0.22838681936264038,
0.19497160613536835,
0.05034739896655083,
0.11424052715301514,
0.006748907268047333,
-0.15930864214897156,
0.2006194293498993,
-0.10239404439926147,
0.1457919180393219,
-0.05337010696530342,
-0.1719871163368225,
0.1778392642736435,
-0.24566099047660828,
0.24022436141967773,
0.10360260307788849,
0.061028383672237396,
-0.01740451529622078,
-0.1856067180633545,
-0.05511897802352905,
-0.04379110783338547,
-0.6134620904922485,
-0.22857964038848877,
0.0102295633405447,
0.14755189418792725,
-0.057636238634586334,
-0.011792495846748352,
-0.35915684700012207,
-0.18260110914707184,
-0.2575564980506897,
0.2213650643825531,
0.058201055973768234,
0.12058066576719284,
-0.08488575369119644,
-0.06659568846225739,
0.19162778556346893,
0.5250521302223206,
0.2569872736930847,
-0.27585309743881226,
0.2609798312187195,
-0.12022101879119873,
-0.1280241310596466,
0.1469818353652954,
-0.034134648740291595,
0.1610555350780487,
-0.36662018299102783,
0.03477432578802109,
0.2827981114387512,
-0.4987799823284149,
-0.4786732494831085,
0.12347029149532318,
-0.22175104916095734,
0.1316981166601181,
-0.003979399800300598,
-0.14305293560028076,
-0.13273322582244873,
0.09832743555307388,
0.11142797768115997,
0.2581433653831482,
0.13593068718910217,
-0.03422180190682411,
-0.22342641651630402,
-0.39593037962913513,
-0.3105875849723816,
0.13460734486579895,
0.26622119545936584,
0.11300694942474365,
0.12682008743286133,
0.0043802447617053986,
0.409137099981308,
-0.12144753336906433,
0.1113416776061058,
0.5754090547561646,
0.41643446683883667,
0.1557653844356537,
0.04688494652509689,
-0.2714907228946686,
-0.15281033515930176,
0.16832822561264038,
-0.20329807698726654,
0.16099528968334198,
-0.30835503339767456,
-0.159509539604187,
-0.464098185300827,
-0.03145813196897507,
-0.24043790996074677,
-0.17033547163009644,
0.08117609471082687,
-0.12249225378036499,
0.16339129209518433,
0.4112022817134857,
-0.056625500321388245,
0.4338448941707611,
-0.18796014785766602,
0.4187750816345215,
-0.30478960275650024,
0.7642563581466675,
-0.140454962849617,
0.05839542672038078,
0.33917856216430664,
0.1787848025560379,
0.2110145390033722,
-0.05679807811975479,
-0.05261707305908203,
0.35422372817993164,
-0.03334644064307213,
0.23734112083911896,
0.40309563279151917,
-0.09827850759029388,
0.43496230244636536,
-0.2988561689853668,
-0.16024944186210632,
0.09021316468715668,
0.12109100818634033,
0.28090575337409973,
0.17869913578033447,
0.11430126428604126,
0.03220648318529129,
0.19599878787994385,
0.35049670934677124,
0.2539640963077545,
0.12317372858524323,
-0.09319743514060974,
-0.07718639075756073,
-0.07854574918746948,
0.2895476818084717,
-0.12152509391307831,
-0.04267187416553497,
-0.24368630349636078,
-0.1916215419769287,
-0.07587941735982895,
0.37554144859313965,
0.01595916599035263,
-0.0894627645611763,
0.35799139738082886,
-0.050983451306819916,
0.0969296544790268,
0.22202645242214203,
0.029034394770860672,
0.13099482655525208,
-0.008085520006716251,
-0.14733542501926422,
0.1754748672246933,
-0.0496394969522953,
-0.021260946989059448,
0.030905798077583313,
0.07197102904319763,
0.004839977715164423,
0.007908344268798828,
0.08118300884962082,
-0.03251039981842041,
-0.30589616298675537,
-0.535911500453949,
-0.32131871581077576,
0.17806200683116913,
-0.4370770752429962,
-0.09970742464065552,
-0.4106006324291229,
-0.20305728912353516,
-0.018310900777578354,
-0.22450342774391174,
-0.5358850359916687,
-0.28976401686668396,
0.04593319445848465,
0.08922172337770462,
-0.04358125850558281,
0.04590051621198654,
-0.07367797195911407,
0.11721763014793396,
0.18135112524032593,
0.06595703214406967,
-0.34190574288368225,
0.06954909861087799,
-0.14761891961097717,
0.026311807334423065,
-0.06353994458913803,
-0.08393323421478271,
0.18048688769340515,
-0.48835915327072144,
-0.00097623560577631,
-0.5195867419242859,
-0.2951345145702362,
0.22120413184165955,
-0.006208155304193497,
0.10810495913028717,
0.22816136479377747,
0.38851314783096313,
-0.18572719395160675,
-0.02269894815981388,
0.3381957411766052,
-0.05226777866482735,
-0.20613428950309753,
0.013009335845708847,
0.10067921131849289,
-0.013913336209952831,
-0.017433473840355873,
-0.10415960103273392,
-0.10150738805532455,
-0.3764680027961731,
0.22920294106006622,
0.08303914964199066,
0.0922439843416214,
0.035751815885305405,
0.16433244943618774,
0.40988731384277344,
-0.10522061586380005,
0.13837379217147827,
-0.048514220863580704,
-0.5493481159210205,
0.37190645933151245,
-0.3291478157043457,
-0.4072977602481842,
0.2336975336074829,
0.08224175125360489,
0.22984027862548828,
-0.03145795315504074,
-0.765835165977478,
-0.4813075363636017,
-0.05199982970952988,
0.10423527657985687,
-0.02422317862510681,
0.15075337886810303,
0.07814771682024002,
-0.05883706733584404,
0.024802377447485924,
0.07580619305372238,
-0.08271833509206772,
-0.18770641088485718,
0.20120030641555786,
0.36950936913490295,
0.13704554736614227,
0.3410601019859314,
0.21684157848358154,
0.5888701677322388,
0.3493059575557709,
0.3395249545574188,
0.5783982276916504,
0.0578770749270916,
0.3930082321166992,
0.013993494212627411,
-0.16355736553668976,
0.017465565353631973,
0.009606584906578064,
0.11467395722866058,
0.06333044171333313,
0.3059452772140503,
0.2896708846092224,
-0.43769681453704834,
-0.3563651740550995,
-0.20527246594429016,
-0.2895719110965729,
-0.4311710596084595,
0.06924618035554886,
0.04686842858791351,
0.21557801961898804,
-0.05991539731621742,
-0.010637559927999973,
-0.035546451807022095,
0.3496180772781372,
0.7887596487998962,
0.18249833583831787,
0.12183123826980591,
-0.15904168784618378,
0.08783666789531708,
-0.6775850653648376,
0.18148764967918396,
0.0986696109175682,
0.11826401203870773,
-0.005068141967058182,
0.29246845841407776,
0.048028621822595596,
-0.05809413641691208,
0.49527645111083984,
-0.045016758143901825,
0.23194070160388947,
-0.16204547882080078,
-0.14486181735992432,
-0.32537561655044556,
0.035658013075590134,
0.07471714913845062,
0.029694832861423492,
0.13689139485359192,
0.5075502395629883,
-0.3315788209438324,
-0.13588690757751465,
0.2929897606372833,
-0.34938767552375793,
-0.10027629137039185,
-0.22011752426624298,
-0.20909945666790009,
-0.6447798609733582,
-0.3624765872955322,
-0.0720667764544487,
0.12108079344034195,
0.2165435552597046,
0.1593630313873291,
-0.10200978070497513,
0.21493805944919586,
-0.19088327884674072,
-0.0318303108215332,
-0.13399730622768402,
0.11846645176410675,
-0.051133446395397186,
0.028585880994796753,
0.2647337317466736,
0.21886064112186432,
0.5343295335769653,
0.6370115876197815,
-0.2241353988647461,
-0.6680523157119751,
-0.0242292582988739,
0.017014458775520325,
0.09996884316205978,
0.4157120883464813,
-0.10026079416275024,
-0.00633644312620163,
0.350221186876297,
0.3982585668563843,
-0.3032064437866211,
0.15718653798103333,
0.3096359968185425,
-0.10088576376438141,
-0.2009103149175644,
-0.10068102926015854,
0.354379802942276,
-0.06777554750442505,
0.14594000577926636,
0.29740455746650696,
0.6738793849945068,
-0.271066814661026,
0.13788624107837677,
-0.08054443448781967,
1.0438387393951416,
-0.006538808345794678,
0.17000983655452728,
0.3690539002418518,
-0.6632570028305054,
0.5665338635444641,
-0.3675992488861084,
0.17734786868095398,
-0.00696202740073204,
-0.09319943934679031,
-0.241786390542984,
-0.12780244648456573,
0.1307550072669983,
-0.060916803777217865,
0.06678982079029083,
0.3704747259616852,
-0.0428965725004673,
0.2665765881538391,
0.051877208054065704,
0.20796191692352295,
-0.33032870292663574,
-0.05370396748185158,
-0.44659578800201416,
0.14307355880737305,
-0.07723408937454224,
0.4012826085090637,
-0.15259715914726257,
-0.15747743844985962,
-0.474142462015152,
-0.3883751630783081,
-0.1637672483921051,
0.13524067401885986,
-0.14269021153450012,
0.12076099961996078,
0.1557391732931137,
-0.15820714831352234,
-0.061257168650627136,
0.21767066419124603,
-0.00004602968692779541,
-0.07078556716442108,
-0.4323773980140686,
0.3526087999343872,
-0.4286944568157196,
-0.12310931831598282,
-0.09929066151380539,
0.03600257262587547,
0.27387526631355286,
-0.19257673621177673,
-0.12656071782112122,
0.013265088200569153,
-0.054777730256319046,
-0.21452349424362183,
0.06848794221878052,
-0.03139014542102814,
-0.14138451218605042,
0.02067514881491661,
0.018971120938658714,
-0.06624700129032135,
0.07890422642230988,
-0.29567423462867737,
0.10253973305225372,
0.10276169329881668,
-0.1696777492761612,
-0.31410881876945496,
0.22631965577602386,
-0.1577153205871582,
-0.10486721992492676,
0.6004055738449097,
-0.2066059410572052,
-0.09984250366687775,
0.2608377933502197,
0.14163459837436676,
-0.3402455449104309,
-0.05749627202749252,
-0.03430730476975441,
0.3739548921585083,
-0.4935450851917267,
0.1421329379081726,
-0.19433963298797607,
0.2972556948661804,
-0.3806883990764618,
0.061170365661382675,
0.18259304761886597,
-0.2121317982673645,
0.08379699289798737,
-0.517234206199646,
-0.09294471889734268,
0.2522750198841095,
-0.3292323052883148,
0.15141981840133667,
0.0684153139591217,
0.1299428790807724,
0.12534722685813904,
-0.2021825909614563,
-0.2520442605018616,
0.23066678643226624,
-0.42148357629776,
-0.22844821214675903,
0.03142213821411133,
0.006715703755617142,
0.334989458322525,
-0.02234450727701187,
0.06949757784605026,
0.10901914536952972,
-0.29258638620376587,
-0.08964332938194275,
-0.366008996963501,
0.1118522584438324,
0.01190946251153946,
-0.22796766459941864,
0.08580093830823898,
-0.12830407917499542,
-0.09759275615215302,
0.028204435482621193,
0.06341385841369629,
0.22740721702575684,
0.03171386569738388,
-0.11394107341766357,
0.05086606740951538,
-0.17729336023330688,
-0.18456652760505676,
0.2862018644809723,
0.16787204146385193,
0.5872564315795898,
0.17207060754299164,
0.059469953179359436,
-0.19233344495296478,
0.07657842338085175,
-0.01452674251049757,
0.08938632160425186,
-0.054717808961868286,
-0.06910593807697296,
0.5814222693443298,
-0.3017047643661499,
0.030214112251996994,
0.1405438333749771,
0.27152198553085327,
0.1638643741607666,
-0.30906274914741516,
0.03274732083082199,
0.19820860028266907,
0.11524984240531921,
-0.07531294971704483,
-0.026569951325654984,
0.5229775905609131,
0.09541785717010498,
-0.12329794466495514,
0.06087426468729973,
-0.02798723801970482,
0.030133932828903198,
-0.11978615820407867,
0.28532129526138306,
0.5241497755050659,
0.07335597276687622,
0.0322277769446373,
-0.020441215485334396,
-0.27764081954956055,
0.2644617259502411,
0.05182497203350067,
0.1873152256011963,
0.13677197694778442,
0.06882987171411514,
-0.09742655605077744,
0.0029842015355825424,
-0.2223319113254547,
0.2801250219345093,
0.17336265742778778,
-0.2412644773721695,
-0.25564107298851013,
-0.11537712812423706,
0.05020610988140106,
0.05950147658586502,
-0.17057034373283386,
0.3676653802394867,
-0.04667115584015846,
0.03901452571153641,
-0.2128598839044571,
0.23242954909801483,
-0.025031186640262604,
0.12395523488521576,
-0.0453096479177475,
-0.313249796628952,
-0.2694186568260193,
0.02855781838297844,
0.13611294329166412,
-0.46319013833999634,
-0.001072913408279419,
0.026507332921028137,
-0.017273984849452972,
-0.5328457355499268,
-0.10551435500383377,
0.18718627095222473,
0.18166768550872803,
-0.14851510524749756,
0.05608166754245758,
0.174454465508461,
-0.00347919762134552,
-0.048847977072000504,
0.10063030570745468,
0.4184824824333191,
0.0032457634806632996,
0.13575968146324158,
-0.11465004086494446,
0.2536497414112091,
-0.023889821022748947,
0.08886522799730301,
0.185630202293396,
0.14609171450138092,
-0.0023143328726291656,
0.32273444533348083,
0.1442270427942276,
-0.17515546083450317,
-0.04323970898985863,
-0.1952160745859146,
0.3520103096961975,
-0.2967240512371063,
0.3948621153831482,
-0.6037018299102783,
0.07101381570100784,
-0.09780140221118927,
-0.12588012218475342,
-0.38052910566329956,
0.07145281136035919,
0.16307443380355835,
-0.2254442721605301,
0.09507127106189728,
-0.2248419225215912,
0.03771166130900383,
-0.11507995426654816,
0.19530844688415527,
0.810502290725708,
0.12027474492788315,
-0.15044005215168,
-0.20930080115795135,
-0.41400864720344543,
0.20280775427818298,
-0.022567737847566605,
-0.032815489917993546,
0.1580681949853897,
0.19451172649860382,
-0.44205889105796814,
0.006524711847305298,
0.34436312317848206,
-0.1840084344148636,
0.056687407195568085,
0.016964249312877655,
-0.11772391200065613,
-0.15208087861537933,
-0.003444567322731018,
0.05116163194179535,
0.044714875519275665,
-0.08346851170063019,
0.2428838461637497,
-0.08351901918649673,
-0.053990837186574936,
-0.06642888486385345,
0.04605068266391754,
-0.1697244942188263,
-0.5273088216781616,
0.317954421043396,
0.24647963047027588,
-0.04821766912937164,
-0.07069894671440125,
-0.48253709077835083,
-0.16100701689720154,
-0.20644395053386688,
-0.01413935050368309,
-0.028124675154685974,
-0.1744195967912674,
0.3255613148212433,
-0.17464075982570648,
-0.39471250772476196,
-0.36696454882621765,
0.4922706186771393,
0.10726103186607361,
0.01558381225913763,
-0.25369375944137573,
0.09427210688591003,
-0.2538048326969147,
-0.006674677599221468,
0.21484319865703583,
0.09593841433525085,
-0.04691609740257263,
0.12812694907188416,
-0.01895274966955185,
-0.3355151414871216,
0.5836787819862366,
-0.1580205261707306,
-0.15615540742874146,
0.12458691745996475,
0.24797265231609344,
0.18844600021839142,
-0.17026525735855103,
-0.4855883717536926,
0.02844993770122528,
0.28279638290405273,
0.09719471633434296,
-0.3278791308403015,
0.18973428010940552,
-0.07962560653686523,
0.09297606348991394,
0.08059938251972198,
0.161670982837677,
0.030581068247556686,
-0.1275824010372162,
0.47705379128456116,
-0.11314552277326584
] |
https://github.com/huggingface/datasets/issues/5086 | HTTPError: 404 Client Error: Not Found for url | Thanks for reporting @km5ar and thank you @albertvillanova for the quick solution! I'll post a fix on the source too | ## Describe the bug
I was following chap 5 from huggingface course: https://huggingface.co/course/chapter5/6?fw=tf
However, I'm not able to download the datasets, with a 404 erros
<img width="1160" alt="iShot2022-10-06_15 54 50" src="https://user-images.githubusercontent.com/54015474/194406327-ae62c2f3-1da5-4686-8631-13d879a0edee.png">
## Steps to reproduce the bug
```python
from huggingface_hub import hf_hub_url
data_files = hf_hub_url(
repo_id="lewtun/github-issues",
filename="datasets-issues-with-hf-doc-builder.jsonl",
repo_type="dataset",
)
from datasets import load_dataset
issues_dataset = load_dataset("json", data_files=data_files, split="train")
issues_dataset
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.5.2
- Platform: macOS-10.16-x86_64-i386-64bit
- Python version: 3.9.12
- PyArrow version: 9.0.0
- Pandas version: 1.4.4
| 20 | HTTPError: 404 Client Error: Not Found for url
## Describe the bug
I was following chap 5 from huggingface course: https://huggingface.co/course/chapter5/6?fw=tf
However, I'm not able to download the datasets, with a 404 erros
<img width="1160" alt="iShot2022-10-06_15 54 50" src="https://user-images.githubusercontent.com/54015474/194406327-ae62c2f3-1da5-4686-8631-13d879a0edee.png">
## Steps to reproduce the bug
```python
from huggingface_hub import hf_hub_url
data_files = hf_hub_url(
repo_id="lewtun/github-issues",
filename="datasets-issues-with-hf-doc-builder.jsonl",
repo_type="dataset",
)
from datasets import load_dataset
issues_dataset = load_dataset("json", data_files=data_files, split="train")
issues_dataset
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.5.2
- Platform: macOS-10.16-x86_64-i386-64bit
- Python version: 3.9.12
- PyArrow version: 9.0.0
- Pandas version: 1.4.4
Thanks for reporting @km5ar and thank you @albertvillanova for the quick solution! I'll post a fix on the source too | [
0.04595087841153145,
-0.22973991930484772,
-0.0069292448461055756,
0.45495253801345825,
0.1510334014892578,
0.24672609567642212,
0.008114073425531387,
0.22636844217777252,
0.12358404695987701,
0.18057358264923096,
-0.30378127098083496,
0.021852413192391396,
-0.061907075345516205,
-0.08203218877315521,
0.0547303706407547,
-0.22272539138793945,
-0.08134680241346359,
0.09928835183382034,
-0.19152265787124634,
-0.07040773332118988,
-0.14464178681373596,
0.2357405126094818,
-0.06809195131063461,
0.2267380803823471,
-0.2647179663181305,
0.05148537456989288,
-0.15074756741523743,
0.42408034205436707,
-0.34714770317077637,
-0.18110474944114685,
0.3873331844806671,
0.03268791362643242,
0.19493329524993896,
0.5354011654853821,
-0.00011632327368715778,
0.2193421572446823,
0.15221059322357178,
0.032286763191223145,
-0.2385292798280716,
-0.5208442211151123,
-0.2821265757083893,
0.11982794106006622,
-0.07700355350971222,
-0.14122119545936584,
0.01407790556550026,
0.0735771507024765,
0.02852555923163891,
0.3771970570087433,
0.4274675250053406,
0.4646262526512146,
0.19435468316078186,
0.3983941674232483,
0.15868645906448364,
-0.01492784358561039,
0.27839308977127075,
0.09062005579471588,
-0.142123281955719,
0.278262734413147,
-0.1970907747745514,
0.08925849199295044,
0.20835374295711517,
0.3447563648223877,
0.11557136476039886,
0.0453643798828125,
0.2442924678325653,
-0.025980044156312943,
-0.14525490999221802,
-0.286342978477478,
0.013920724391937256,
0.22539743781089783,
0.2588096261024475,
-0.04533994942903519,
-0.2732906937599182,
0.03661215305328369,
0.028711657971143723,
-0.03426581248641014,
0.18752828240394592,
0.21216987073421478,
-0.07848308980464935,
0.248642235994339,
-0.3433672785758972,
-0.3975193500518799,
-0.25148406624794006,
0.20978303253650665,
0.10928019881248474,
-0.1595982015132904,
-0.08192271739244461,
0.05728357657790184,
-0.20937354862689972,
-0.0446242019534111,
-0.19330856204032898,
-0.13628056645393372,
0.2644546329975128,
0.3265523612499237,
-0.0830390602350235,
-0.07420392334461212,
0.19545403122901917,
0.10067787021398544,
0.43226274847984314,
-0.06254839152097702,
-0.06542994827032089,
-0.19411388039588928,
-0.3813559114933014,
0.12155665457248688,
-0.04907694831490517,
-0.003903128206729889,
-0.13101163506507874,
0.00515410304069519,
0.3849347233772278,
0.752669095993042,
0.1891617327928543,
0.09016533195972443,
-0.03443996608257294,
-0.08777911961078644,
-0.3883823752403259,
-0.1577785313129425,
0.3879985213279724,
-0.21389806270599365,
-0.16229845583438873,
0.15663175284862518,
-0.31512144207954407,
0.02399248629808426,
-0.039981719106435776,
0.43253761529922485,
-0.18361112475395203,
0.0019604098051786423,
0.2178952842950821,
0.08217686414718628,
-0.2093840092420578,
0.0235346220433712,
-0.24136851727962494,
0.2023436576128006,
0.04647092893719673,
0.1100328266620636,
0.005821235477924347,
-0.1733969748020172,
0.22119319438934326,
-0.10374012589454651,
0.18597756326198578,
-0.0341147817671299,
-0.1480090618133545,
0.11599472165107727,
-0.18566715717315674,
0.2763117551803589,
0.1628958135843277,
0.05843845754861832,
-0.019756335765123367,
-0.14381524920463562,
-0.03481372073292732,
-0.05206175893545151,
-0.6073148250579834,
-0.1980457454919815,
0.04150066524744034,
0.1391984522342682,
-0.052307143807411194,
0.004350967705249786,
-0.2767423987388611,
-0.21353952586650848,
-0.27291321754455566,
0.2218296229839325,
0.06177205964922905,
0.1272425651550293,
-0.0901651456952095,
-0.0747690424323082,
0.17154072225093842,
0.5413376688957214,
0.2642136812210083,
-0.24236929416656494,
0.35878172516822815,
-0.1354154497385025,
-0.10154373198747635,
0.15987639129161835,
-0.01150224544107914,
0.16212768852710724,
-0.38185349106788635,
0.08493867516517639,
0.3065263032913208,
-0.46068719029426575,
-0.4362584352493286,
0.08160528540611267,
-0.18130797147750854,
0.10586193948984146,
0.035198770463466644,
-0.10379181802272797,
-0.11478357762098312,
0.10788249224424362,
0.09645570069551468,
0.2736796736717224,
0.1303882598876953,
-0.04563399404287338,
-0.22245942056179047,
-0.38027626276016235,
-0.2641620635986328,
0.13403503596782684,
0.3350045680999756,
0.1154116541147232,
0.15520328283309937,
-0.04518425837159157,
0.4138645529747009,
-0.15587079524993896,
0.11865166574716568,
0.5952499508857727,
0.32879358530044556,
0.18974633514881134,
0.07425610721111298,
-0.30156728625297546,
-0.10636327415704727,
0.17687392234802246,
-0.25370967388153076,
0.15490952134132385,
-0.28809720277786255,
-0.1706182211637497,
-0.4665044844150543,
-0.04523561894893646,
-0.2743552625179291,
-0.14451484382152557,
0.07123977690935135,
-0.14942499995231628,
0.17053857445716858,
0.44443896412849426,
-0.05506831780076027,
0.44689762592315674,
-0.15803702175617218,
0.40931493043899536,
-0.29880714416503906,
0.7924266457557678,
-0.14240844547748566,
0.0861227810382843,
0.3048906922340393,
0.16011746227741241,
0.24582412838935852,
-0.03149527311325073,
-0.05296323448419571,
0.2911451756954193,
-0.02366141602396965,
0.22834499180316925,
0.38671380281448364,
-0.16795150935649872,
0.3845957815647125,
-0.3416023850440979,
-0.15148527920246124,
0.08093476295471191,
0.16264480352401733,
0.24232974648475647,
0.25897160172462463,
0.09673202037811279,
0.019261173903942108,
0.1728200912475586,
0.3297067880630493,
0.25314751267433167,
0.06619914621114731,
-0.08265461027622223,
-0.039899006485939026,
-0.10142618417739868,
0.35644713044166565,
-0.1652827113866806,
-0.06977233290672302,
-0.24261020123958588,
-0.22974450886249542,
-0.08979318290948868,
0.3721846044063568,
0.026347603648900986,
-0.0753914937376976,
0.3894161581993103,
-0.05563846975564957,
0.1395793855190277,
0.23582753539085388,
-0.050393737852573395,
0.14173009991645813,
-0.021212875843048096,
-0.16327409446239471,
0.1987859308719635,
-0.012673472054302692,
0.03413980454206467,
0.024456411600112915,
0.08906597644090652,
-0.00029854109743610024,
0.028847714886069298,
0.050541166216135025,
0.00888093002140522,
-0.33785679936408997,
-0.5054144859313965,
-0.3373429477214813,
0.15817223489284515,
-0.483792781829834,
-0.09128408879041672,
-0.3760605454444885,
-0.16674530506134033,
0.01249802578240633,
-0.20198816061019897,
-0.49565762281417847,
-0.24620814621448517,
0.061465490609407425,
0.10181709378957748,
-0.011315710842609406,
0.014867614954710007,
-0.10155342519283295,
0.045754969120025635,
0.20211414992809296,
0.0682680755853653,
-0.3696132004261017,
0.12387284636497498,
-0.12421824783086777,
0.011470362544059753,
-0.07327655702829361,
-0.02962964028120041,
0.21548697352409363,
-0.4743082523345947,
-0.013111568987369537,
-0.488598108291626,
-0.2816286087036133,
0.2127721905708313,
-0.017835251986980438,
0.10329794138669968,
0.24185232818126678,
0.40616947412490845,
-0.21575169265270233,
-0.0009045014157891273,
0.3420444130897522,
-0.08557542413473129,
-0.2090979963541031,
0.04870178550481796,
0.10142840445041656,
-0.02584010735154152,
-0.009118134155869484,
-0.10043472796678543,
-0.17575272917747498,
-0.36093857884407043,
0.1734451949596405,
0.06155330315232277,
0.08692631125450134,
-0.017817553132772446,
0.13413093984127045,
0.3566909432411194,
-0.13559958338737488,
0.12892496585845947,
-0.07733141630887985,
-0.538308322429657,
0.38399457931518555,
-0.33750006556510925,
-0.44662749767303467,
0.24108684062957764,
0.06342792510986328,
0.22013182938098907,
-0.016006765887141228,
-0.7446809411048889,
-0.4990406632423401,
-0.03442409634590149,
0.06117274984717369,
-0.05827473849058151,
0.16183732450008392,
0.055692411959171295,
-0.10388222336769104,
0.04028777778148651,
0.07540686428546906,
-0.04960739612579346,
-0.17790839076042175,
0.1661345660686493,
0.3238838315010071,
0.12868711352348328,
0.3419635593891144,
0.2217225432395935,
0.5499550104141235,
0.3680083751678467,
0.36241415143013,
0.6451625823974609,
0.03355409577488899,
0.3564331829547882,
-0.0081443190574646,
-0.19113831222057343,
0.023645790293812752,
0.017048120498657227,
0.08339032530784607,
0.05198783800005913,
0.2614380121231079,
0.3169221580028534,
-0.4573272466659546,
-0.35077032446861267,
-0.217558354139328,
-0.24406330287456512,
-0.43604329228401184,
0.114824578166008,
0.03310489282011986,
0.23231005668640137,
-0.046586498618125916,
-0.016349824145436287,
-0.05900171399116516,
0.35381537675857544,
0.7709868550300598,
0.1485968977212906,
0.16403253376483917,
-0.16672028601169586,
0.06113435700535774,
-0.6925723552703857,
0.1813989281654358,
0.12843911349773407,
0.13958045840263367,
-0.011059742420911789,
0.31793656945228577,
0.09448052942752838,
-0.01653994433581829,
0.5623234510421753,
-0.08874311298131943,
0.2684244215488434,
-0.18217046558856964,
-0.1588655263185501,
-0.3997819423675537,
0.03740883246064186,
0.023660827428102493,
0.004638813901692629,
0.07261557877063751,
0.4582727253437042,
-0.292542040348053,
-0.12778900563716888,
0.2581799328327179,
-0.35711735486984253,
-0.10970648378133774,
-0.24377736449241638,
-0.23729261755943298,
-0.6491791009902954,
-0.36429068446159363,
-0.045019157230854034,
0.14446327090263367,
0.2101881057024002,
0.14443017542362213,
-0.14959600567817688,
0.16121011972427368,
-0.13321766257286072,
0.007359117269515991,
-0.13064661622047424,
0.1408170461654663,
-0.06493860483169556,
0.029012467712163925,
0.2451130449771881,
0.21401605010032654,
0.49170342087745667,
0.6111531257629395,
-0.2696954905986786,
-0.6505996584892273,
-0.024987082928419113,
0.01685992255806923,
0.10711652040481567,
0.4198788106441498,
-0.14831805229187012,
0.029202062636613846,
0.27515193819999695,
0.43406152725219727,
-0.3002159297466278,
0.1872178465127945,
0.3059048652648926,
-0.09076181799173355,
-0.25271984934806824,
-0.0515051931142807,
0.3317555785179138,
-0.06648430228233337,
0.14515389502048492,
0.3084052801132202,
0.7026069164276123,
-0.2545020580291748,
0.16100090742111206,
-0.06229471415281296,
1.0236918926239014,
-0.0071182698011398315,
0.2112462967634201,
0.36582350730895996,
-0.6142425537109375,
0.5481618046760559,
-0.3239702582359314,
0.1535935252904892,
-0.036574218422174454,
-0.14618277549743652,
-0.29834192991256714,
-0.15341004729270935,
0.10905731469392776,
-0.05865931510925293,
0.09126526117324829,
0.4031182527542114,
-0.06861276179552078,
0.249289408326149,
0.033239297568798065,
0.17948755621910095,
-0.3308711349964142,
-0.055958446115255356,
-0.4214017987251282,
0.12598073482513428,
-0.05683193355798721,
0.43688586354255676,
-0.13017645478248596,
-0.18001264333724976,
-0.46402764320373535,
-0.39289629459381104,
-0.12300941348075867,
0.11486359685659409,
-0.16712208092212677,
0.13921108841896057,
0.1262855976819992,
-0.1686486005783081,
-0.03931151330471039,
0.24446368217468262,
0.008624851703643799,
-0.09341855347156525,
-0.43646755814552307,
0.3092270791530609,
-0.4505075216293335,
-0.11223154515028,
-0.1040310487151146,
0.010089213959872723,
0.24511945247650146,
-0.20850098133087158,
-0.12243537604808807,
0.006976146250963211,
-0.0332910530269146,
-0.17371255159378052,
0.08290199935436249,
0.01221088320016861,
-0.14317959547042847,
0.0044365269131958485,
-0.04634185507893562,
-0.12630832195281982,
0.06611697375774384,
-0.2985343337059021,
0.08304931223392487,
0.08891511708498001,
-0.18318329751491547,
-0.20597073435783386,
0.26364877820014954,
-0.16836312413215637,
-0.07431910932064056,
0.6391156911849976,
-0.2059001922607422,
-0.0652499794960022,
0.24262316524982452,
0.13664983212947845,
-0.3717663288116455,
-0.053310126066207886,
-0.02766621857881546,
0.3767862021923065,
-0.5481598377227783,
0.11829264461994171,
-0.15296302735805511,
0.3333483934402466,
-0.39689695835113525,
0.0637490451335907,
0.17945259809494019,
-0.22998017072677612,
0.07824085652828217,
-0.5470526218414307,
-0.1166301742196083,
0.22970172762870789,
-0.2933163344860077,
0.1525118052959442,
0.0956014022231102,
0.12590044736862183,
0.13104437291622162,
-0.2110288441181183,
-0.23218603432178497,
0.24569426476955414,
-0.4416816532611847,
-0.25694310665130615,
-0.024097133427858353,
-0.0020833462476730347,
0.3320002853870392,
-0.03618384152650833,
0.05095646530389786,
0.17727510631084442,
-0.2619430422782898,
-0.08229948580265045,
-0.32064515352249146,
0.11891743540763855,
0.009785915724933147,
-0.23244668543338776,
0.06829403340816498,
-0.1375528872013092,
-0.10879163444042206,
0.03482649475336075,
0.10596513748168945,
0.2718225419521332,
0.026989102363586426,
-0.11611439287662506,
0.04002553969621658,
-0.21126148104667664,
-0.24403418600559235,
0.29362860321998596,
0.1845812201499939,
0.5452054142951965,
0.16584056615829468,
0.0152935441583395,
-0.1801431030035019,
0.07097207009792328,
-0.001165862544439733,
0.08020085841417313,
0.01738646626472473,
-0.1314277946949005,
0.5514926910400391,
-0.34577476978302,
0.0427134744822979,
0.13100619614124298,
0.2981027364730835,
0.1672385036945343,
-0.34569051861763,
0.0611925944685936,
0.17821544408798218,
0.10395175218582153,
-0.11465845257043839,
-0.0550009086728096,
0.46595972776412964,
0.10224923491477966,
-0.1373067945241928,
0.0410027801990509,
-0.007692068815231323,
0.00744185596704483,
-0.0965445339679718,
0.2882518172264099,
0.4645889401435852,
0.10890056937932968,
-0.03359737619757652,
-0.06664234399795532,
-0.25938525795936584,
0.2988141179084778,
0.029112650081515312,
0.17486786842346191,
0.09916809946298599,
0.1276404857635498,
-0.0812358632683754,
0.04623572155833244,
-0.2635310888290405,
0.28244367241859436,
0.15111714601516724,
-0.2773958444595337,
-0.2864934206008911,
-0.16222816705703735,
0.04444940760731697,
0.029150929301977158,
-0.1998652219772339,
0.3384253978729248,
0.0023657875135540962,
-0.010910334065556526,
-0.23775221407413483,
0.21901656687259674,
-0.029589630663394928,
0.15056347846984863,
-0.007940558716654778,
-0.3083745837211609,
-0.24984167516231537,
0.014647308737039566,
0.14538858830928802,
-0.5077039003372192,
0.027488596737384796,
0.044195085763931274,
-0.01852237433195114,
-0.5148553252220154,
-0.1274307370185852,
0.2271915078163147,
0.1620599925518036,
-0.12296205759048462,
0.06038699299097061,
0.19356882572174072,
0.014380153268575668,
-0.05333572253584862,
0.07533635944128036,
0.41811585426330566,
-0.01924973353743553,
0.12168477475643158,
-0.09180472046136856,
0.2447887361049652,
-0.040773116052150726,
0.09982193261384964,
0.18901385366916656,
0.19122356176376343,
0.02396765723824501,
0.3905002176761627,
0.12238408625125885,
-0.16267555952072144,
-0.07433895766735077,
-0.16898047924041748,
0.37743502855300903,
-0.30143558979034424,
0.39006251096725464,
-0.5825386047363281,
0.1345243752002716,
-0.12042222917079926,
-0.15934261679649353,
-0.43609365820884705,
0.07099087536334991,
0.21300335228443146,
-0.24795325100421906,
0.11821272224187851,
-0.22040122747421265,
0.01814192160964012,
-0.15098029375076294,
0.21440762281417847,
0.7897400259971619,
0.17577151954174042,
-0.21029134094715118,
-0.17950692772865295,
-0.41322383284568787,
0.2393975853919983,
0.005810592323541641,
-0.001630239188671112,
0.1766422688961029,
0.16418230533599854,
-0.48796799778938293,
-0.017325665801763535,
0.38270246982574463,
-0.08562511205673218,
0.119613878428936,
0.08874642103910446,
-0.09703829884529114,
-0.12625892460346222,
-0.0685499906539917,
0.05726364254951477,
0.06711843609809875,
-0.10298903286457062,
0.26363909244537354,
-0.12651164829730988,
-0.07702565938234329,
-0.09154408425092697,
0.07549011707305908,
-0.20236223936080933,
-0.5191569328308105,
0.38480672240257263,
0.2244580090045929,
0.03615805506706238,
-0.07956504821777344,
-0.39982113242149353,
-0.08048972487449646,
-0.1947670727968216,
0.006685652770102024,
-0.03614209592342377,
-0.14767366647720337,
0.2715727686882019,
-0.16162332892417908,
-0.428954541683197,
-0.30243393778800964,
0.4613058269023895,
0.1374809592962265,
0.050203196704387665,
-0.25928419828414917,
0.08233915269374847,
-0.25668197870254517,
0.017268113791942596,
0.23624567687511444,
0.08812997490167618,
-0.045706577599048615,
0.10639351606369019,
0.015738926827907562,
-0.365488737821579,
0.6292257308959961,
-0.1156792938709259,
-0.1706283837556839,
0.09170423448085785,
0.25467899441719055,
0.2197861671447754,
-0.19945327937602997,
-0.4833919405937195,
0.015558667480945587,
0.27037861943244934,
0.09337913244962692,
-0.2682986259460449,
0.21237778663635254,
-0.07663141191005707,
0.12206552922725677,
0.07465939223766327,
0.15603485703468323,
0.0009214431047439575,
-0.12614278495311737,
0.4983295500278473,
-0.1383609026670456
] |
https://github.com/huggingface/datasets/issues/5085 | Filtering on an empty dataset returns a corrupted dataset. | ~~It seems like #5043 fix (merged recently) is the root cause of such behaviour. When we empty indices mapping (because the dataset length equals to zero), we can no longer get column item like: `ds_filter_2['sentence']` which uses
`ds_filter_1._indices.column(0)`~~
**UPDATE:**
Empty datasets are returned without going through partial function on `map` method, which will not work to get indices for `filter`: we need to run `get_indices_from_mask_function` partial function on the dataset to get output = `{"indices": []}`. But this is complicated since functions used in args, in particular `get_indices_from_mask_function`, do not support empty datasets.
We can just handle empty datasets aside on filter method. | ## Describe the bug
When filtering a dataset twice, where the first result is an empty dataset, the second dataset seems corrupted.
## Steps to reproduce the bug
```python
datasets = load_dataset("glue", "sst2")
dataset_split = datasets['validation']
ds_filter_1 = dataset_split.filter(lambda x: False) # Some filtering condition that leads to an empty dataset
assert ds_filter_1.num_rows == 0
sentences = ds_filter_1['sentence']
assert len(sentences) == 0
ds_filter_2 = ds_filter_1.filter(lambda x: False) # Some other filtering condition
assert ds_filter_2.num_rows == 0
assert 'sentence' in ds_filter_2.column_names
sentences = ds_filter_2['sentence']
```
## Expected results
The last line should be returning an empty list, same as 4 lines above.
## Actual results
The last line currently raises `IndexError: index out of bounds`.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.5.2
- Platform: macOS-11.6.6-x86_64-i386-64bit
- Python version: 3.9.11
- PyArrow version: 7.0.0
- Pandas version: 1.4.1
| 103 | Filtering on an empty dataset returns a corrupted dataset.
## Describe the bug
When filtering a dataset twice, where the first result is an empty dataset, the second dataset seems corrupted.
## Steps to reproduce the bug
```python
datasets = load_dataset("glue", "sst2")
dataset_split = datasets['validation']
ds_filter_1 = dataset_split.filter(lambda x: False) # Some filtering condition that leads to an empty dataset
assert ds_filter_1.num_rows == 0
sentences = ds_filter_1['sentence']
assert len(sentences) == 0
ds_filter_2 = ds_filter_1.filter(lambda x: False) # Some other filtering condition
assert ds_filter_2.num_rows == 0
assert 'sentence' in ds_filter_2.column_names
sentences = ds_filter_2['sentence']
```
## Expected results
The last line should be returning an empty list, same as 4 lines above.
## Actual results
The last line currently raises `IndexError: index out of bounds`.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.5.2
- Platform: macOS-11.6.6-x86_64-i386-64bit
- Python version: 3.9.11
- PyArrow version: 7.0.0
- Pandas version: 1.4.1
~~It seems like #5043 fix (merged recently) is the root cause of such behaviour. When we empty indices mapping (because the dataset length equals to zero), we can no longer get column item like: `ds_filter_2['sentence']` which uses
`ds_filter_1._indices.column(0)`~~
**UPDATE:**
Empty datasets are returned without going through partial function on `map` method, which will not work to get indices for `filter`: we need to run `get_indices_from_mask_function` partial function on the dataset to get output = `{"indices": []}`. But this is complicated since functions used in args, in particular `get_indices_from_mask_function`, do not support empty datasets.
We can just handle empty datasets aside on filter method. | [
-0.10343395173549652,
-0.03265092521905899,
-0.040131181478500366,
0.22334840893745422,
0.05369693040847778,
0.0005477741360664368,
0.40057241916656494,
0.42343005537986755,
0.11768132448196411,
0.006940789520740509,
-0.11518204212188721,
0.22237542271614075,
0.0821421816945076,
0.07910182327032089,
-0.16912145912647247,
-0.06236741691827774,
-0.0632438138127327,
0.11599024385213852,
-0.3161800801753998,
-0.16736525297164917,
-0.08962319791316986,
0.0701308622956276,
-0.3231992721557617,
-0.16072265803813934,
-0.12516333162784576,
-0.09643924981355667,
0.020099805667996407,
0.017962105572223663,
-0.17425158619880676,
-0.40512508153915405,
0.2018202841281891,
-0.1708180010318756,
-0.1600153148174286,
0.589345395565033,
-0.0001262893492821604,
-0.03161413595080376,
0.3647086024284363,
0.007662435993552208,
-0.12411579489707947,
-0.2557751536369324,
-0.5293005704879761,
-0.20601209998130798,
-0.02843294106423855,
-0.04570258781313896,
-0.129340261220932,
-0.026444919407367706,
-0.3867090344429016,
-0.21536549925804138,
0.31967949867248535,
0.288219690322876,
0.055832985788583755,
0.06107769161462784,
-0.11071013659238815,
0.12640994787216187,
0.26786255836486816,
-0.009888261556625366,
0.06439197808504105,
0.052777357399463654,
0.3829419016838074,
-0.29373300075531006,
0.2660491168498993,
0.4991282820701599,
-0.47558215260505676,
0.04060865193605423,
-0.15645700693130493,
0.003952972590923309,
0.5285300016403198,
-0.38363736867904663,
0.18507146835327148,
0.4266994595527649,
0.25607848167419434,
0.0820145308971405,
-0.45818498730659485,
-0.42866024374961853,
-0.07087802141904831,
-0.23332902789115906,
0.02626972645521164,
0.345492959022522,
-0.22125698626041412,
0.25290125608444214,
0.0369839072227478,
0.09358220547437668,
0.13624748587608337,
-0.11943274736404419,
-0.4802071452140808,
0.5703773498535156,
0.07525525987148285,
0.09600196778774261,
-0.007187940180301666,
-0.208120658993721,
0.0877331793308258,
-0.3535763621330261,
-0.290642648935318,
0.3544214963912964,
-0.334584504365921,
-0.035738542675971985,
0.295179545879364,
-0.24694374203681946,
-0.04285721480846405,
0.10253056138753891,
-0.03990846499800682,
-0.1649998128414154,
0.11126693338155746,
0.007949043065309525,
0.4181848466396332,
0.2504337728023529,
0.08021140098571777,
0.5819503664970398,
-0.044233717024326324,
-0.20496335625648499,
-0.011739581823348999,
-0.006303928792476654,
0.35685256123542786,
0.2509958744049072,
0.0595819465816021,
-0.12830302119255066,
0.2609368562698364,
-0.2242528200149536,
-0.6744458079338074,
0.47750234603881836,
-0.6129987835884094,
0.012128962203860283,
-0.004251592792570591,
-0.04922463744878769,
0.07349219918251038,
0.21039697527885437,
-0.024293530732393265,
0.12374264746904373,
-0.2567936182022095,
-0.14259712398052216,
-0.15081240236759186,
-0.0672537088394165,
-0.08030063658952713,
-0.248856320977211,
0.015681259334087372,
-0.1130734235048294,
0.04671688377857208,
0.1312694102525711,
-0.2866400480270386,
-0.09498587250709534,
0.10855194926261902,
-0.31791073083877563,
0.44081801176071167,
0.5997487902641296,
0.006686151027679443,
0.1903906911611557,
0.214808851480484,
-0.46993881464004517,
0.09818058460950851,
0.39443710446357727,
-0.3550586402416229,
-0.1192440390586853,
-0.26648959517478943,
0.10236044228076935,
-0.3200589418411255,
0.2955420911312103,
0.18953774869441986,
0.44788306951522827,
0.2435397505760193,
-0.18653704226016998,
0.09778530895709991,
-0.0928858071565628,
-0.40050873160362244,
-0.08421707153320312,
0.12635573744773865,
0.7311642169952393,
-0.8604628443717957,
-0.06509694457054138,
-0.1330074816942215,
0.012105169706046581,
-0.18133273720741272,
0.05624038726091385,
-0.06834132224321365,
0.12981760501861572,
-0.24673396348953247,
-0.03159022703766823,
0.2097206711769104,
-0.07458475977182388,
-0.3925842046737671,
0.18270407617092133,
-0.2034536600112915,
0.4418218433856964,
-0.13725996017456055,
-0.040884342044591904,
0.27452367544174194,
-0.08797498792409897,
0.21428212523460388,
-0.1305321455001831,
-0.23229098320007324,
-0.20649513602256775,
-0.3627651333808899,
0.08167337626218796,
0.3147541880607605,
-0.17324447631835938,
0.2979072630405426,
0.09315175563097,
0.01144343614578247,
-0.37083521485328674,
0.11189247667789459,
0.12386946380138397,
0.2021024376153946,
0.25552135705947876,
0.5922003984451294,
0.15889385342597961,
0.12782582640647888,
-0.2810654640197754,
-0.2091251015663147,
0.22078284621238708,
0.09680631756782532,
0.042734358459711075,
-0.2876703143119812,
-0.10455691069364548,
-0.10106084495782852,
-0.011659529991447926,
-0.11780440807342529,
-0.20364366471767426,
-0.0010789837688207626,
-0.057890474796295166,
-0.08304388076066971,
0.0661812275648117,
-0.14965568482875824,
0.4610902667045593,
-0.14737387001514435,
0.17145846784114838,
-0.21038919687271118,
0.48694121837615967,
0.2156873345375061,
-0.1056581437587738,
-0.3584219217300415,
-0.03390298783779144,
0.1908664107322693,
0.08328716456890106,
-0.10081537812948227,
0.34649530053138733,
0.2510450482368469,
-0.3620537519454956,
-0.21035894751548767,
0.13515746593475342,
0.09880632162094116,
-0.23420771956443787,
-0.11200771480798721,
0.3139753043651581,
0.3308922350406647,
-0.010607466101646423,
-0.33808058500289917,
0.44329363107681274,
-0.3226228356361389,
0.3390202522277832,
-0.09843549132347107,
-0.022411059588193893,
0.20806388556957245,
-0.13511879742145538,
-0.2561913728713989,
-0.2514079809188843,
0.03806909918785095,
-0.1122453361749649,
0.08034458756446838,
0.24899214506149292,
-0.28976869583129883,
0.19547340273857117,
-0.25665032863616943,
-0.09960637986660004,
0.03902784734964371,
-0.031019844114780426,
0.09030541777610779,
0.030230294913053513,
0.05953085422515869,
0.4011666774749756,
0.3814045190811157,
0.16333813965320587,
-0.05817771330475807,
-0.12359168380498886,
-0.004352616146206856,
-0.07049180567264557,
0.4096042215824127,
0.0313175804913044,
-0.11369533836841583,
0.34734711050987244,
0.12575432658195496,
0.10029631853103638,
-0.12679006159305573,
0.016652826219797134,
0.310611754655838,
0.21663731336593628,
-0.43049782514572144,
0.04957974702119827,
-0.3341062366962433,
-0.7006176114082336,
-0.09513433277606964,
0.2171170860528946,
-0.027697954326868057,
-0.330160528421402,
-0.09801147878170013,
0.14621946215629578,
-0.2612569034099579,
0.12115257233381271,
-0.40408509969711304,
0.11390241980552673,
0.3684878647327423,
0.041088417172431946,
0.08497762680053711,
0.00505840452387929,
-0.19422060251235962,
-0.036789409816265106,
-0.04016886651515961,
0.3062227666378021,
0.008409295231103897,
0.11420252174139023,
-0.3233373165130615,
-0.20728647708892822,
-0.5451343059539795,
0.1563309282064438,
-0.13566911220550537,
0.5316717028617859,
0.11374008655548096,
0.186043381690979,
-0.19449597597122192,
-0.016849935054779053,
0.11330428719520569,
0.29936710000038147,
-0.09262245148420334,
0.05301111191511154,
0.00434041116386652,
0.18109846115112305,
-0.32794302701950073,
-0.07180578261613846,
0.0729447603225708,
-0.05438774824142456,
-0.39367783069610596,
-0.41341546177864075,
0.18678434193134308,
0.06550785154104233,
0.03886687755584717,
-0.05385458469390869,
-0.273200124502182,
-0.07119999080896378,
-0.1335362046957016,
-0.19690532982349396,
0.2084561288356781,
0.033930446952581406,
-0.03571908548474312,
-0.07006441056728363,
-0.16608433425426483,
-0.21551311016082764,
0.04315294697880745,
-0.41409939527511597,
-0.35184600949287415,
-0.20141948759555817,
0.09463705122470856,
-0.11109462380409241,
0.18555113673210144,
0.12415333092212677,
-0.026847461238503456,
0.038380950689315796,
-0.12146613746881485,
-0.22274257242679596,
0.03296991437673569,
0.1388855278491974,
0.19132161140441895,
0.07847422361373901,
0.5743503570556641,
0.3490831255912781,
0.2556251287460327,
0.42667797207832336,
0.2906247079372406,
0.26600009202957153,
0.07663626968860626,
0.5282508730888367,
-0.021495886147022247,
-0.3878944516181946,
-0.23851032555103302,
0.32452332973480225,
-0.24897870421409607,
-0.04510074853897095,
-0.05467802286148071,
-0.16990377008914948,
-0.10004667937755585,
-0.09608317911624908,
-0.48078280687332153,
-0.11401239037513733,
0.043961167335510254,
-0.3949705958366394,
0.010706841945648193,
0.3386956751346588,
0.15368744730949402,
-0.10856124758720398,
-0.07635937631130219,
-0.34188753366470337,
0.043137017637491226,
0.4087928235530853,
-0.012274353764951229,
-0.08936825394630432,
-0.011765391565859318,
-0.0979091003537178,
0.12505529820919037,
0.3370531499385834,
0.3087252080440521,
0.1017179787158966,
-0.13738688826560974,
-0.01199420541524887,
0.07734248787164688,
0.8349487781524658,
-0.4066365659236908,
0.09043333679437637,
0.2524811029434204,
-0.0035632848739624023,
-0.2565422058105469,
-0.18056318163871765,
-0.2426905333995819,
0.09512501209974289,
0.2143244594335556,
0.024395652115345,
-0.2997897267341614,
-0.0455329567193985,
0.15309512615203857,
-0.0059179761447012424,
-0.14485949277877808,
0.05068177729845047,
-0.15039072930812836,
-0.17589998245239258,
0.10003214329481125,
0.054734475910663605,
0.03417735546827316,
0.27701711654663086,
0.0510241761803627,
0.0503331683576107,
-0.0827503427863121,
-0.14623650908470154,
0.1510581076145172,
0.08564959466457367,
0.5245646238327026,
-0.03497283533215523,
0.38640862703323364,
-0.09111511707305908,
-0.12206460535526276,
0.005623579025268555,
0.7773491144180298,
-0.23367205262184143,
-0.1767926812171936,
-0.02947951853275299,
-0.07047025859355927,
0.19734154641628265,
0.4699847102165222,
0.06123822182416916,
0.16896435618400574,
-0.22839000821113586,
0.09036238491535187,
0.09070493280887604,
-0.16002625226974487,
0.13876938819885254,
0.17243348062038422,
-0.26517578959465027,
-0.4047926962375641,
0.13634178042411804,
-0.039825569838285446,
-0.07066011428833008,
0.40576618909835815,
0.5578814148902893,
-0.19603604078292847,
0.46503204107284546,
-0.10603786259889603,
0.808656632900238,
0.3455314040184021,
-0.1531132161617279,
0.3203561305999756,
0.0923658162355423,
0.5125347375869751,
0.1816329061985016,
0.07648790627717972,
0.060272034257650375,
-0.41070258617401123,
0.037870459258556366,
0.02371193841099739,
0.04958745464682579,
0.0846918448805809,
0.04275413230061531,
0.4418356120586395,
-0.18675974011421204,
0.21677090227603912,
0.12211553752422333,
0.007751818746328354,
0.142996683716774,
0.24758289754390717,
-0.03360077738761902,
-0.015504220500588417,
0.07184669375419617,
-0.090538889169693,
-0.01866764947772026,
-0.014837905764579773,
0.16474689543247223,
-0.26238396763801575,
-0.4227873682975769,
-0.011084048077464104,
0.0665976032614708,
0.026376137509942055,
0.11169847846031189,
-0.33922988176345825,
-0.09949846565723419,
-0.18353036046028137,
-0.16090968251228333,
0.3377464711666107,
0.04196883738040924,
0.2228737324476242,
0.3557197153568268,
0.4575813114643097,
0.14032983779907227,
-0.18131676316261292,
0.5878768563270569,
0.2954733371734619,
-0.518581748008728,
0.07438023388385773,
-0.197789266705513,
-0.1836695373058319,
0.03611791133880615,
0.21010014414787292,
-0.0002011321485042572,
-0.1253577321767807,
-0.1271110475063324,
0.10999701172113419,
0.3719724416732788,
-0.18889980018138885,
0.043279979377985,
0.1476067304611206,
-0.26890379190444946,
0.22061994671821594,
-0.10542656481266022,
-0.41837477684020996,
-0.059161100536584854,
0.3494279086589813,
0.15646760165691376,
0.18525870144367218,
0.15129338204860687,
0.1514410525560379,
-0.09588415920734406,
-0.06550776213407516,
0.13896891474723816,
0.13598887622356415,
-0.1134381890296936,
0.3571818768978119,
-0.43143317103385925,
0.09343665838241577,
0.14064404368400574,
0.2300647348165512,
0.012000780552625656,
0.23962938785552979,
-0.22854754328727722,
-0.36955997347831726,
0.2386147528886795,
0.24559985101222992,
0.25018617510795593,
0.02433422952890396,
-0.17310383915901184,
0.05717585235834122,
-0.054634153842926025,
-0.07757800817489624,
-0.223164364695549,
0.23453277349472046,
-0.058624062687158585,
0.5033854842185974,
0.07379278540611267,
0.2144835889339447,
-0.0901457816362381,
-0.34897804260253906,
0.010332712903618813,
0.12811683118343353,
0.03451941907405853,
-0.1486831158399582,
-0.19826805591583252,
0.2062608003616333,
-0.06917556375265121,
-0.30445143580436707,
0.05414866283535957,
-0.3750782012939453,
0.005202189087867737,
-0.15834163129329681,
0.21157371997833252,
0.3686998188495636,
-0.049837611615657806,
-0.007513897027820349,
-0.015171889215707779,
-0.05569835752248764,
-0.14691007137298584,
0.2814701199531555,
-0.20151793956756592,
-0.013928338885307312,
0.15087899565696716,
0.4166979491710663,
0.10505577176809311,
0.15761373937129974,
-0.06312242895364761,
-0.028034277260303497,
-0.4099106788635254,
-0.20294690132141113,
0.3376944065093994,
-0.26773911714553833,
0.05347399041056633,
0.05566232651472092,
0.43459177017211914,
0.19343061745166779,
-0.03081473521888256,
0.0420977845788002,
0.23601403832435608,
0.13069535791873932,
-0.23000283539295197,
0.03199844807386398,
0.038539428263902664,
0.49997425079345703,
0.27051618695259094,
0.22548508644104004,
0.007608644664287567,
-0.07699088007211685,
0.09216603636741638,
0.20284923911094666,
0.5343292355537415,
0.09408078342676163,
0.361600399017334,
0.7261261343955994,
0.19644670188426971,
-0.033378440886735916,
-0.007687347009778023,
-0.30178940296173096,
-0.13063162565231323,
0.5886954665184021,
0.1691523790359497,
0.20294608175754547,
0.08857407420873642,
-0.0184832401573658,
-0.18865588307380676,
-0.31681227684020996,
0.22122757136821747,
0.27180367708206177,
-0.5235386490821838,
0.22036781907081604,
0.18078500032424927,
-0.06291823834180832,
-0.12840183079242706,
-0.38775819540023804,
-0.09909458458423615,
0.17327667772769928,
-0.25201478600502014,
-0.025239650160074234,
-0.24406901001930237,
-0.31626221537590027,
0.2385627031326294,
0.1124192625284195,
0.21449150145053864,
-0.1917504519224167,
0.4255022704601288,
-0.028544440865516663,
-0.18970726430416107,
-0.3295159637928009,
-0.3549239933490753,
0.28331947326660156,
0.15418192744255066,
-0.19930212199687958,
0.24630014598369598,
0.5585986375808716,
-0.35988083481788635,
0.13856840133666992,
0.38178256154060364,
0.42820820212364197,
0.20656254887580872,
0.14662863314151764,
0.09254348278045654,
0.12772712111473083,
-0.39065638184547424,
-0.07127562165260315,
0.25298964977264404,
-0.10273270308971405,
0.0046464428305625916,
0.16310013830661774,
0.0808306634426117,
-0.12269848585128784,
0.21222327649593353,
0.22575169801712036,
0.38216179609298706,
-0.5264008045196533,
-0.04785936325788498,
-0.06548570096492767,
0.23537683486938477,
-0.143919438123703,
-0.21154209971427917,
-0.2671274244785309,
-0.03211408108472824,
0.486878365278244,
-0.016613686457276344,
0.1792692244052887,
0.09436529129743576,
0.015976034104824066,
-0.19891725480556488,
-0.01584523543715477,
0.2831096351146698,
-0.24900725483894348,
-0.21461397409439087,
0.0896938294172287,
-0.65110844373703,
-0.015710197389125824,
-0.5216403603553772,
0.08079364895820618,
0.0147282425314188,
0.3769755959510803,
-0.012804806232452393,
0.0623697005212307,
0.04026370495557785,
0.16643603146076202,
-0.03879476338624954,
0.12681782245635986,
-0.42754286527633667,
-0.2800937592983246,
-0.15236954391002655,
0.022336360067129135,
-0.19161956012248993,
-0.26171210408210754,
0.1024307906627655,
-0.32655519247055054,
0.015183478593826294,
0.22248126566410065,
-0.09110895544290543,
0.03356108069419861,
-0.003639388829469681,
0.09966472536325455,
0.4358712434768677,
0.33189207315444946,
0.11881902068853378,
0.13023118674755096,
-0.3550572693347931,
-0.09699702262878418,
-0.39661088585853577,
0.13369035720825195,
0.1570458710193634,
0.5232360363006592,
-0.19928939640522003,
0.06316618621349335,
0.14946743845939636,
0.07146614789962769,
0.047764234244823456,
0.15541785955429077,
-0.5384547114372253,
0.03651177138090134,
-0.2366141974925995,
0.18417905271053314,
-0.20615582168102264,
0.14499443769454956,
0.062457744032144547,
0.292411744594574,
-0.1545514166355133,
-0.35813388228416443,
0.49111321568489075,
-0.6984185576438904,
-0.199116051197052,
-0.47554296255111694,
0.029862843453884125,
0.27150166034698486,
-0.15316928923130035,
-0.41520780324935913,
-0.31618359684944153,
0.3283166289329529,
-0.1929033100605011,
-0.35721880197525024,
-0.02966824173927307,
-0.037816960364580154,
-0.04802491515874863,
-0.15400904417037964,
-0.25052639842033386,
0.3008696734905243,
-0.3023763597011566,
0.2523905634880066,
-0.17159031331539154
] |
https://github.com/huggingface/datasets/issues/5083 | Support numpy/torch/tf/jax formatting for IterableDataset | hii @lhoestq, can you assign this issue to me? Though i am new to open source still I would love to put my best foot forward. I can see there isn't anyone right now assigned to this issue. | Right now `IterableDataset` doesn't do any formatting.
In particular this code should return a numpy array:
```python
from datasets import load_dataset
ds = load_dataset("imagenet-1k", split="train", streaming=True).with_format("np")
print(next(iter(ds))["image"])
```
Right now it returns a PIL.Image.
Setting `streaming=False` does return a numpy array after #5072 | 38 | Support numpy/torch/tf/jax formatting for IterableDataset
Right now `IterableDataset` doesn't do any formatting.
In particular this code should return a numpy array:
```python
from datasets import load_dataset
ds = load_dataset("imagenet-1k", split="train", streaming=True).with_format("np")
print(next(iter(ds))["image"])
```
Right now it returns a PIL.Image.
Setting `streaming=False` does return a numpy array after #5072
hii @lhoestq, can you assign this issue to me? Though i am new to open source still I would love to put my best foot forward. I can see there isn't anyone right now assigned to this issue. | [
-0.16015176475048065,
-0.29652366042137146,
-0.02708999440073967,
-0.04405905306339264,
0.29049986600875854,
-0.014095332473516464,
0.5831495523452759,
0.46640753746032715,
-0.24507053196430206,
-0.0968402773141861,
-0.08783755451440811,
0.4100490212440491,
-0.12891240417957306,
0.0897969976067543,
0.027687501162290573,
-0.13570432364940643,
0.18020883202552795,
0.5426880717277527,
-0.03624539077281952,
0.15246272087097168,
-0.25185149908065796,
0.2571188807487488,
-0.3173048496246338,
-0.084795743227005,
-0.30340009927749634,
0.05389085412025452,
0.0421697273850441,
-0.09637414664030075,
-0.07243955135345459,
-0.3476620018482208,
0.448595255613327,
0.2042839527130127,
0.08149448037147522,
0.4135230481624603,
-0.00012929156946484,
0.01382492482662201,
0.08541794121265411,
-0.151788130402565,
-0.07472400367259979,
0.12997908890247345,
0.08763917535543442,
-0.3377552926540375,
0.15610849857330322,
-0.10071370750665665,
-0.4221609830856323,
-0.4244963526725769,
-0.049546755850315094,
-0.27528929710388184,
0.22897276282310486,
0.1934261918067932,
0.058148838579654694,
0.09240645915269852,
0.05913947895169258,
0.3267323076725006,
-0.48099902272224426,
0.3286151885986328,
-0.35295116901397705,
0.013245400041341782,
0.6638481616973877,
0.3042239546775818,
0.14113293588161469,
0.37769263982772827,
-0.1094631627202034,
0.20141373574733734,
0.21421411633491516,
0.012832061387598515,
-0.19184660911560059,
-0.18584811687469482,
0.1411983072757721,
0.06860766559839249,
0.6801272630691528,
-0.11744169145822525,
-0.12477443367242813,
-0.33240774273872375,
-0.13709630072116852,
-0.4835551679134369,
-0.02221960574388504,
0.11961381882429123,
-0.17997513711452484,
0.03633849322795868,
-0.42571529746055603,
-0.011339946649968624,
-0.5157932639122009,
0.28914374113082886,
-0.07155602425336838,
0.42703777551651,
-0.048406653106212616,
0.1288743019104004,
-0.2845264971256256,
0.14222034811973572,
0.6040916442871094,
-0.015183471143245697,
0.11414135992527008,
0.18423883616924286,
0.02266143634915352,
-0.24669630825519562,
-0.11471832543611526,
-0.3760759234428406,
0.01228947564959526,
0.08015361428260803,
0.06642691791057587,
0.2289583384990692,
-0.4977981746196747,
-0.1022488996386528,
0.3985699713230133,
0.02581566572189331,
-0.0985969677567482,
0.31290239095687866,
0.23045699298381805,
0.11719619482755661,
0.27769091725349426,
-0.13433107733726501,
0.13249126076698303,
-0.0709151104092598,
0.2105211764574051,
0.08380653709173203,
0.23001225292682648,
-0.17734073102474213,
-0.08424261212348938,
-0.1696142703294754,
-0.2884975075721741,
-0.25851351022720337,
-0.06422556936740875,
-0.13876119256019592,
0.11471272259950638,
0.41969865560531616,
-0.036557961255311966,
0.07355595380067825,
-0.08811036497354507,
-0.41330814361572266,
0.031535714864730835,
-0.1788841187953949,
-0.298759788274765,
-0.08785528689622879,
0.11704276502132416,
-0.25794875621795654,
0.05588120222091675,
-0.10849908739328384,
-0.053685061633586884,
0.15075597167015076,
0.16316106915473938,
-0.19723333418369293,
0.784807562828064,
0.06741750240325928,
-0.3072301149368286,
0.18512146174907684,
0.26466095447540283,
0.26565539836883545,
-0.0882498174905777,
0.20831021666526794,
-0.22138634324073792,
-0.16172270476818085,
-0.37018638849258423,
-0.04104853421449661,
-0.0679318755865097,
-0.010037466883659363,
0.14550310373306274,
0.02840312570333481,
0.16539517045021057,
-0.456393301486969,
0.4015059471130371,
-0.31963735818862915,
-0.3414583206176758,
-0.14079786837100983,
0.32378584146499634,
0.10300508141517639,
-0.4038409888744354,
0.001964174211025238,
0.19184903800487518,
-0.028095215559005737,
0.5238448977470398,
0.21492630243301392,
0.149860218167305,
0.11895212531089783,
-0.34061935544013977,
-0.19973433017730713,
0.24987247586250305,
-0.09422354400157928,
-0.32902759313583374,
0.19335390627384186,
0.28803837299346924,
0.33061257004737854,
-0.011209279298782349,
0.37794801592826843,
0.007997309789061546,
0.11565030366182327,
-0.015175461769104004,
0.4892088770866394,
-0.23567411303520203,
0.024079905822873116,
-0.1362273246049881,
0.022479074075818062,
0.10107239335775375,
0.2873438000679016,
0.18402892351150513,
0.12791961431503296,
-0.1210966482758522,
-0.05762181803584099,
0.5613151788711548,
-0.060984332114458084,
-0.056302882730960846,
-0.14589224755764008,
0.2983778715133667,
-0.004289381206035614,
0.12321189045906067,
-0.1626330316066742,
-0.22662681341171265,
0.08620103448629379,
0.4372090697288513,
-0.22296246886253357,
-0.23373623192310333,
0.08580430597066879,
-0.18289557099342346,
0.07783583551645279,
-0.46848705410957336,
-0.3297489881515503,
-0.07931318879127502,
0.2764395773410797,
0.035700518637895584,
-0.12024447321891785,
-0.40195128321647644,
0.3802224397659302,
-0.09783747047185898,
-0.11159238964319229,
-0.49237483739852905,
0.42417776584625244,
0.2465766817331314,
-0.28288784623146057,
-0.074500173330307,
0.5349456071853638,
-0.1891864836215973,
-0.23575161397457123,
-0.057347699999809265,
0.5434119701385498,
-0.027280690148472786,
-0.053776830434799194,
-0.2465435266494751,
0.2348019778728485,
0.37506094574928284,
-0.37732958793640137,
-0.032710812985897064,
0.607011616230011,
-0.033400848507881165,
-0.3354930281639099,
-0.3749101459980011,
0.4241400957107544,
-0.4866892993450165,
0.3058464229106903,
-0.14696240425109863,
0.00334971584379673,
0.08862077444791794,
0.28068745136260986,
-0.3346725106239319,
-0.34018778800964355,
-0.007442548871040344,
-0.26257339119911194,
-0.1942513883113861,
-0.3451381027698517,
-0.36073702573776245,
0.05004493519663811,
0.4526907205581665,
0.060625109821558,
0.008826632052659988,
0.010581888258457184,
-0.014300249516963959,
-0.12275082617998123,
0.3300624191761017,
-0.08774208277463913,
0.38948410749435425,
0.030110787600278854,
-0.15202747285366058,
0.012892316095530987,
0.12710605561733246,
-0.1438746303319931,
0.1595008224248886,
0.06647440046072006,
0.2729712426662445,
0.272246778011322,
0.0985850989818573,
-0.05804579332470894,
-0.14657451212406158,
-0.29056793451309204,
-0.37975484132766724,
0.14510928094387054,
-0.07304981350898743,
0.01834108494222164,
-0.27838534116744995,
-0.5126457214355469,
-0.2093035876750946,
-0.18140439689159393,
0.0828789621591568,
-0.3588651716709137,
-0.29180294275283813,
0.2883298695087433,
0.40123236179351807,
0.1219329833984375,
-0.49938419461250305,
0.11179584264755249,
0.3442905843257904,
-0.20630481839179993,
-0.25212153792381287,
-0.09283645451068878,
0.025380700826644897,
-0.08959290385246277,
0.03928963840007782,
-0.5410736799240112,
0.43234536051750183,
0.12982411682605743,
0.1840580552816391,
-0.2875785231590271,
-0.2405993640422821,
0.26021018624305725,
-0.061531342566013336,
-0.12897121906280518,
0.5452626943588257,
0.45665180683135986,
-0.049662891775369644,
0.20108309388160706,
0.30526241660118103,
-0.24055637419223785,
0.08971294015645981,
0.14171789586544037,
-0.1255892664194107,
0.20405782759189606,
0.016734477132558823,
-0.1086704358458519,
-0.033420681953430176,
-0.1748322993516922,
0.032549962401390076,
0.10390909016132355,
0.22399309277534485,
0.5128713846206665,
0.12924444675445557,
0.11897974461317062,
0.3291761875152588,
-0.38872554898262024,
0.006011303514242172,
-0.03570450469851494,
0.42688438296318054,
-0.12358196079730988,
-0.07660561800003052,
-0.08604247868061066,
0.30483174324035645,
0.3151860237121582,
0.19739842414855957,
-0.1800825297832489,
-0.21708743274211884,
-0.04410216212272644,
0.16843058168888092,
-0.11834801733493805,
-0.1359112709760666,
0.14088886976242065,
0.17239436507225037,
0.02994404546916485,
-0.09689197689294815,
0.0961645096540451,
-0.22491642832756042,
0.02299589291214943,
0.22902151942253113,
0.5785112977027893,
0.3957202434539795,
0.22395840287208557,
0.46541500091552734,
0.2872374951839447,
-0.09488533437252045,
0.480874627828598,
0.001329120248556137,
0.24832311272621155,
-0.3040512204170227,
-0.3976781964302063,
0.05483492836356163,
0.21064867079257965,
0.013627640902996063,
0.3796044588088989,
0.152048259973526,
-0.08150703459978104,
-0.1716211885213852,
0.10933162271976471,
-0.1635800302028656,
0.08490142226219177,
0.08237744122743607,
-0.10624738037586212,
0.29650914669036865,
-0.28897371888160706,
0.2718166410923004,
-0.04523049667477608,
-0.578629195690155,
-0.12870511412620544,
-0.045192331075668335,
0.34135353565216064,
0.09143128246068954,
-0.18094155192375183,
-0.32740551233291626,
-0.25144293904304504,
0.24314075708389282,
0.0027679025661200285,
0.6419227719306946,
-0.07269975543022156,
0.011475127190351486,
0.35123395919799805,
0.054853059351444244,
0.6522263288497925,
-0.29740267992019653,
-0.2625589370727539,
0.0809096246957779,
0.1463284194469452,
-0.40665045380592346,
-0.1978766918182373,
-0.08124127238988876,
0.5500975847244263,
0.20739854872226715,
0.5066280364990234,
0.07852097600698471,
-0.37733468413352966,
0.3176020085811615,
-0.09784521907567978,
-0.13689076900482178,
-0.10645601898431778,
-0.4051804542541504,
-0.2243417501449585,
0.044745296239852905,
-0.04768378287553787,
0.05682527273893356,
0.19580481946468353,
0.29210227727890015,
-0.3246527314186096,
-0.11662626266479492,
-0.3447561264038086,
-0.08996020257472992,
-0.03502237796783447,
0.20085442066192627,
0.14055974781513214,
-0.14476393163204193,
0.38192111253738403,
0.40750065445899963,
0.15982116758823395,
0.011539474129676819,
-0.24077555537223816,
0.18869885802268982,
0.23938310146331787,
-0.38428065180778503,
0.5132291913032532,
0.39777708053588867,
-0.04206552729010582,
-0.2130102813243866,
-0.039522286504507065,
0.04213480278849602,
-0.01799819990992546,
-0.2812670171260834,
0.34100815653800964,
-0.11364664137363434,
-0.44867968559265137,
-0.5095974802970886,
0.19873842597007751,
0.043627332895994186,
0.0902978777885437,
0.7093912959098816,
-0.06692470610141754,
-0.2053462117910385,
0.03183898702263832,
0.47855493426322937,
0.9173724055290222,
-0.16904765367507935,
0.26065492630004883,
0.26963335275650024,
-0.4725158214569092,
0.2511281669139862,
-0.20464743673801422,
0.2668715715408325,
-0.22356155514717102,
-0.2715095579624176,
-0.22654470801353455,
-0.004141073673963547,
0.20797258615493774,
0.025720743462443352,
-0.2706938087940216,
0.3691871464252472,
-0.078232042491436,
0.08270565420389175,
0.04058190435171127,
0.08819866180419922,
-0.054904237389564514,
-0.1772766262292862,
-0.2735934853553772,
-0.04861529916524887,
-0.42698949575424194,
0.057288844138383865,
-0.08538205921649933,
-0.1542736291885376,
0.2684198021888733,
0.21057316660881042,
-0.2044253796339035,
-0.094969242811203,
-0.19937394559383392,
-0.04504580795764923,
0.18560568988323212,
-0.613288402557373,
-0.02565654180943966,
0.45410820841789246,
0.3594282269477844,
-0.30564653873443604,
-0.25429150462150574,
0.03259115293622017,
0.1757608950138092,
0.16352374851703644,
-0.2111983299255371,
0.12585411965847015,
0.5006785988807678,
-0.03458420932292938,
0.043605737388134,
0.1275458186864853,
0.03148585557937622,
-0.36956149339675903,
-0.4424342215061188,
0.03274565935134888,
0.5965660214424133,
-0.2351509928703308,
-0.24851852655410767,
-0.18849033117294312,
0.04572274163365364,
-0.08359338343143463,
-0.03716825321316719,
0.12710943818092346,
0.13891682028770447,
0.17260760068893433,
-0.046102773398160934,
-0.21194365620613098,
-0.08462585508823395,
0.34850382804870605,
0.19791081547737122,
-0.265279620885849,
0.5027908086776733,
0.359046995639801,
-0.13923978805541992,
-0.08892922103404999,
0.15715575218200684,
0.3026977479457855,
-0.2392333447933197,
-0.019311077892780304,
0.02636236511170864,
0.4322895407676697,
-0.006616875529289246,
0.2268674671649933,
-0.1948215216398239,
0.15480375289916992,
-0.28621387481689453,
-0.14220252633094788,
-0.2613356411457062,
-0.14113612473011017,
-0.03598665073513985,
0.4063754975795746,
-0.12835250794887543,
-0.29336026310920715,
0.269899845123291,
-0.17577892541885376,
-0.15161770582199097,
-0.29332172870635986,
0.18797090649604797,
-0.03358759731054306,
0.09385701268911362,
0.17898690700531006,
0.16501721739768982,
-0.23348017036914825,
-0.054738663136959076,
0.10986746847629547,
-0.18522688746452332,
-0.04047147184610367,
0.032210540026426315,
0.23487409949302673,
0.1731751561164856,
-0.3935263156890869,
-0.07655809074640274,
-0.05041591078042984,
-0.41584742069244385,
-0.3026234209537506,
0.011388055980205536,
-0.03351718932390213,
0.049360744655132294,
0.20695066452026367,
0.1311536580324173,
0.08419429510831833,
-0.06380366533994675,
-0.35309019684791565,
0.059213876724243164,
0.24532242119312286,
0.21644361317157745,
0.08297774195671082,
0.2095022052526474,
-0.11071600764989853,
-0.17998191714286804,
0.2454833984375,
0.3131006360054016,
0.05645182356238365,
0.4209233224391937,
-0.36952048540115356,
0.10144732892513275,
0.025113707408308983,
0.4521315097808838,
0.08396054059267044,
-0.1651143729686737,
-0.26618364453315735,
-0.05754514038562775,
0.03428756818175316,
0.10210944712162018,
-0.0857156291604042,
0.1628188192844391,
0.14455156028270721,
-0.17363640666007996,
0.22171546518802643,
0.12672410905361176,
-0.07450325042009354,
0.09132326394319534,
0.09281741082668304,
0.3255850076675415,
-0.6403363347053528,
0.043244585394859314,
0.5329242944717407,
0.10061533749103546,
-0.09063997864723206,
0.019687870517373085,
-0.18147829174995422,
-0.20091885328292847,
0.3544715642929077,
0.11608808487653732,
0.41858217120170593,
0.49469056725502014,
-0.08436974883079529,
0.0034245550632476807,
-0.13731054961681366,
-0.3415239453315735,
-0.06150944530963898,
-0.08713756501674652,
0.5633617043495178,
0.19075867533683777,
0.4997074007987976,
-0.16972565650939941,
-0.26386579871177673,
-0.09935951232910156,
-0.13310280442237854,
0.019657224416732788,
0.16908970475196838,
-0.343285471200943,
0.03871019184589386,
-0.2586251497268677,
0.027932409197092056,
-0.13648763298988342,
0.05665043741464615,
-0.05162058770656586,
0.314431756734848,
-0.1025686115026474,
-0.378549724817276,
0.44842275977134705,
-0.09276673942804337,
0.5385956168174744,
-0.18787525594234467,
0.14517632126808167,
-0.04156161844730377,
0.17424286901950836,
-0.0008592866361141205,
0.02469940297305584,
0.1955198347568512,
0.26989930868148804,
-0.006264287978410721,
-0.054732102900743484,
-0.3425769507884979,
-0.2079617977142334,
0.16528593003749847,
0.261568546295166,
0.02001906931400299,
-0.3233928382396698,
0.06289157271385193,
-0.034881457686424255,
0.08614733815193176,
0.18947671353816986,
0.17872343957424164,
0.16072700917720795,
-0.10712584853172302,
0.17398256063461304,
-0.22319361567497253,
-0.41463229060173035,
0.049093808978796005,
-0.18206670880317688,
-0.295636385679245,
-0.13617420196533203,
0.19204875826835632,
0.004333898425102234,
-0.02535899728536606,
0.017918583005666733,
-0.04319336265325546,
-0.06368407607078552,
0.1519160270690918,
0.20664699375629425,
-0.0009715817868709564,
0.02382640913128853,
-0.32727086544036865,
-0.14565972983837128,
-0.07964492589235306,
0.1291382908821106,
-0.09306839853525162,
0.044211361557245255,
0.041527144610881805,
0.12705259025096893,
-0.09000085294246674,
0.2680663466453552,
-0.2834576666355133,
0.1721145212650299,
0.632386326789856,
-0.019494758918881416,
-0.2071220576763153,
0.05608339235186577,
0.2564540505409241,
-0.22033944725990295,
-0.08850821852684021,
0.13668327033519745,
-0.2927040457725525,
-0.015911825001239777,
-0.0338682122528553,
-0.16950984299182892,
-0.23500670492649078,
0.06928452104330063,
0.3317425847053528,
0.1459311693906784,
0.037953175604343414,
0.004096329212188721,
-0.010099796578288078,
-0.12690068781375885,
0.13991425931453705,
-0.10674801468849182,
0.6865915656089783,
-0.03335993364453316,
0.5373222827911377,
-0.00982037652283907,
-0.2202485054731369,
-0.3875155746936798,
0.55873042345047,
-0.04374029487371445,
-0.11308660358190536,
-0.010415254160761833,
0.021439792588353157,
-0.19642925262451172,
0.07323893904685974,
0.02327198162674904,
0.09742021560668945,
0.05521426349878311,
0.05469324439764023,
-0.55203777551651,
-0.25835901498794556,
0.19840532541275024,
-0.32212311029434204,
-0.37892505526542664,
-0.042853422462940216,
-0.029470622539520264,
0.24232512712478638,
0.2727668285369873,
-0.5596680045127869,
-0.1490066647529602,
0.3313402235507965,
-0.08174248784780502,
-0.15151099860668182,
0.2856973111629486,
0.33076727390289307,
0.23606126010417938,
-0.1197824478149414,
0.18146184086799622,
0.1187429428100586,
-0.1660090684890747,
-0.19751015305519104,
-0.057728320360183716
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.